/* ==========================================================================
   salma.css  ::  shared styles for meow.meow.meow.meow.me.ow.meow.lamps-dev.dev
   palette pulled from Salma herself: black fur, amber blanket, teal towel
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --ink-0: #0b0908;
  --ink-1: #131010;
  --ink-2: #1d1817;
  --card: rgba(255, 255, 255, .048);
  --card-hi: rgba(255, 255, 255, .075);
  --stroke: rgba(255, 214, 145, .14);
  --stroke-hi: rgba(255, 214, 145, .32);

  --fg: #f6efe3;
  --muted: #b0a494;

  --amber: #ffc233;
  --amber-2: #ffa62b;
  --amber-soft: #ffdf96;
  --teal: #35d6cf;
  --teal-2: #17a9a4;
  --rose: #ff7a9c;
  --ok: #58e39b;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  --shadow: 0 24px 60px -20px rgba(0, 0, 0, .72);
  --ease: cubic-bezier(.22, .85, .18, 1);
  --nav-h: 62px;
}

@media (prefers-color-scheme: light) {
  :root {
    --ink-0: #fdf8ee;
    --ink-1: #f6eedd;
    --ink-2: #efe4cf;
    --card: rgba(255, 255, 255, .74);
    --card-hi: rgba(255, 255, 255, .9);
    --stroke: rgba(58, 40, 14, .12);
    --stroke-hi: rgba(58, 40, 14, .26);
    --fg: #211a12;
    --muted: #6d6151;
    --amber: #c98200;
    --amber-2: #b06a00;
    --amber-soft: #8a5f11;
    --teal: #0e8f8a;
    --teal-2: #0b6f6b;
    --rose: #cf4a72;
    --ok: #12864f;
    --shadow: 0 24px 60px -26px rgba(90, 62, 12, .34);
  }
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100%;
  font: 16px/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, Roboto, sans-serif;
  color: var(--fg);
  background: var(--ink-0);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- animated background ------------------------------------------ */

.aurora {
  position: fixed;
  inset: -25%;
  z-index: 0;
  filter: blur(100px);
  opacity: .5;
  pointer-events: none;
}
.aurora i {
  position: absolute;
  display: block;
  width: 44vmax;
  height: 44vmax;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 32%, var(--amber), transparent 62%);
  animation: drift 24s ease-in-out infinite;
}
.aurora i:nth-child(2) {
  left: 44%; top: 12%;
  background: radial-gradient(circle at 66% 42%, var(--teal), transparent 62%);
  animation-duration: 31s; animation-delay: -8s;
}
.aurora i:nth-child(3) {
  left: 12%; top: 46%;
  background: radial-gradient(circle at 50% 58%, var(--rose), transparent 64%);
  animation-duration: 38s; animation-delay: -16s;
}
@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33%      { transform: translate3d(11vw, -8vh, 0) scale(1.2); }
  66%      { transform: translate3d(-9vw, 9vh, 0) scale(.88); }
}

/* drifting paw prints */
.paws { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.paws span {
  position: absolute;
  bottom: -8vh;
  font-size: 22px;
  opacity: 0;
  filter: grayscale(.2);
  animation: floatup linear infinite;
}
@keyframes floatup {
  0%   { opacity: 0; transform: translateY(0) rotate(0deg) scale(.7); }
  12%  { opacity: .5; }
  88%  { opacity: .35; }
  100% { opacity: 0; transform: translateY(-118vh) rotate(320deg) scale(1.15); }
}

/* ---------- layout ------------------------------------------------------- */

.wrap {
  position: relative;
  z-index: 1;
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 34px);
}

main { position: relative; z-index: 1; }

section { padding: clamp(48px, 8vh, 92px) 0; }

/* ---------- nav ---------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--ink-0) 72%, transparent);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  transition: border-color .35s var(--ease), background .35s var(--ease);
}
.nav.stuck { border-bottom-color: var(--stroke); background: color-mix(in srgb, var(--ink-0) 90%, transparent); }
.nav .wrap { display: flex; align-items: center; gap: 18px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; letter-spacing: -.02em; text-decoration: none;
  color: var(--fg); flex: 0 0 auto;
}
.brand img {
  width: 30px; height: 30px; border-radius: 50%;
  object-fit: cover; object-position: 50% 32%;
  border: 1.5px solid var(--stroke-hi);
  transition: transform .5s var(--ease);
}
.brand:hover img { transform: rotate(-12deg) scale(1.12); }

.navlinks {
  display: flex; align-items: center; gap: 4px;
  margin-left: auto; overflow-x: auto; scrollbar-width: none;
  -ms-overflow-style: none;
}
.navlinks::-webkit-scrollbar { display: none; }
.navlinks a {
  position: relative;
  padding: 7px 12px;
  font-size: .88rem; font-weight: 600; white-space: nowrap;
  color: var(--muted); text-decoration: none;
  border-radius: 999px;
  transition: color .22s, background .22s;
}
.navlinks a:hover { color: var(--fg); background: var(--card-hi); }
.navlinks a[aria-current="page"] { color: var(--ink-0); background: var(--amber); }
@media (prefers-color-scheme: light) { .navlinks a[aria-current="page"] { color: #fff; } }

/* ---------- typography --------------------------------------------------- */

h1, h2, h3 { letter-spacing: -.025em; line-height: 1.12; margin: 0 0 .4em; font-weight: 800; }
h1 { font-size: clamp(2rem, 6.2vw, 3.9rem); }
h2 { font-size: clamp(1.45rem, 3.6vw, 2.3rem); }
h3 { font-size: clamp(1.08rem, 2.1vw, 1.3rem); }

.grad {
  background: linear-gradient(104deg, var(--amber) 4%, var(--amber-soft) 34%, var(--teal) 88%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  background-size: 220% auto;
  animation: shimmer 9s ease-in-out infinite;
}
@keyframes shimmer { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

p { margin: .6em 0; color: var(--muted); }
.lead { font-size: clamp(1rem, 1.9vw, 1.14rem); max-width: 62ch; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--amber); }

.eyebrow {
  display: inline-block;
  font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 14px;
}

/* ---------- pills / badges ----------------------------------------------- */

.pill {
  display: inline-flex; align-items: center; gap: .55em;
  padding: .34em .9em;
  font-size: .76rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ok);
  border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--ok) 13%, transparent);
}
.dot {
  width: .5em; height: .5em; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 0 var(--ok);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 .66em transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- buttons ------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; gap: .55em;
  padding: .78em 1.4em;
  font: inherit; font-weight: 700; font-size: .95rem;
  text-decoration: none; cursor: pointer;
  color: var(--ink-0);
  background: linear-gradient(100deg, var(--amber), var(--amber-2));
  border: 0; border-radius: 999px;
  box-shadow: 0 10px 26px -10px color-mix(in srgb, var(--amber) 70%, transparent);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), filter .22s;
}
.btn:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 18px 34px -12px color-mix(in srgb, var(--amber) 78%, transparent); filter: brightness(1.06); }
.btn:active { transform: translateY(-1px) scale(.99); }
.btn.ghost {
  color: var(--fg); background: var(--card); border: 1px solid var(--stroke-hi);
  box-shadow: none;
}
.btn.ghost:hover { background: var(--card-hi); box-shadow: none; }
@media (prefers-color-scheme: light) { .btn { color: #fff; } }

.btnrow { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* ---------- cards -------------------------------------------------------- */

.card {
  position: relative;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--stroke);
  border-radius: var(--r-lg);
  background: var(--card);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .07);
  overflow: hidden;
  transition: transform .4s var(--ease), border-color .4s, box-shadow .4s;
}
.card::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--amber) 16%, transparent), transparent 68%);
  opacity: 0; transition: opacity .4s;
  pointer-events: none;
}
.card:hover { transform: translateY(-6px); border-color: var(--stroke-hi); }
.card:hover::after { opacity: 1; }

.grid { display: grid; gap: clamp(14px, 2.2vw, 22px); }
.g2 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.icon {
  display: grid; place-items: center;
  width: 46px; height: 46px; margin-bottom: 14px;
  font-size: 22px;
  border-radius: 14px;
  background: linear-gradient(140deg, color-mix(in srgb, var(--amber) 26%, transparent), color-mix(in srgb, var(--teal) 20%, transparent));
  border: 1px solid var(--stroke);
}

/* ---------- code / hostname ---------------------------------------------- */

code, kbd, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
code.host {
  display: block; overflow-x: auto; white-space: nowrap;
  padding: .85em 1.1em;
  font-size: .82rem; color: var(--fg);
  border: 1px dashed var(--stroke-hi); border-radius: var(--r-md);
  background: rgba(0, 0, 0, .2);
}
@media (prefers-color-scheme: light) { code.host { background: rgba(255, 255, 255, .62); } }
kbd {
  padding: .12em .48em; font-size: .88em;
  border: 1px solid var(--stroke-hi); border-radius: 6px;
  background: rgba(0, 0, 0, .22);
}
@media (prefers-color-scheme: light) { kbd { background: rgba(0, 0, 0, .06); } }

/* ---------- marquee ------------------------------------------------------ */

.marquee {
  position: relative;
  display: flex; overflow: hidden;
  padding: 12px 0;
  border-top: 1px solid var(--stroke); border-bottom: 1px solid var(--stroke);
  background: color-mix(in srgb, var(--amber) 6%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee div {
  display: flex; flex: 0 0 auto; gap: 26px;
  padding-right: 26px;
  font-weight: 700; font-size: .9rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
  animation: slide 26s linear infinite;
}
@keyframes slide { to { transform: translateX(-100%); } }
.marquee b { color: var(--amber); }

/* ---------- scroll reveal ------------------------------------------------ */

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- salma hero portrait ------------------------------------------ */

.portrait {
  position: relative;
  width: min(300px, 68vw);
  aspect-ratio: 285 / 380;
  margin-inline: auto;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--stroke-hi);
  box-shadow: var(--shadow);
  animation: bob 7s ease-in-out infinite;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 26%; display: block; transition: transform .8s var(--ease); }
.portrait:hover img { transform: scale(1.07); }
.portrait::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 52%, color-mix(in srgb, var(--ink-0) 82%, transparent));
}
.portrait figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 16px;
  font-size: .85rem; font-weight: 600; color: var(--fg);
  z-index: 1;
}
@keyframes bob { 0%, 100% { transform: translateY(-6px) rotate(-1deg); } 50% { transform: translateY(8px) rotate(1deg); } }

.halo {
  position: absolute; inset: -14%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--amber), var(--teal), var(--rose), var(--amber));
  filter: blur(38px); opacity: .34; z-index: -1;
  animation: spin 18s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- stats -------------------------------------------------------- */

.stat b { display: block; font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 800; color: var(--amber); line-height: 1; }
.stat span { font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }

/* ---------- legal / prose ------------------------------------------------ */

.prose { max-width: 76ch; }
.prose h2 { margin-top: 1.9em; padding-top: .5em; border-top: 1px solid var(--stroke); }
.prose h2:first-of-type { margin-top: 1em; }
.prose ul { padding-left: 1.15em; }
.prose li { margin: .38em 0; color: var(--muted); }
.prose li::marker { color: var(--amber); }
.prose .updated {
  display: inline-block; margin-bottom: 6px;
  font-size: .82rem; color: var(--muted);
}
.callout {
  margin: 26px 0 0;
  padding: 16px 18px;
  border-left: 3px solid var(--amber);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: color-mix(in srgb, var(--amber) 9%, transparent);
  font-size: .92rem;
}

/* toc */
.toc { position: sticky; top: calc(var(--nav-h) + 18px); align-self: start; }
.toc ol { margin: 0; padding-left: 1.2em; font-size: .88rem; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--amber); }
.legalgrid { display: grid; grid-template-columns: 1fr; gap: 30px; }
@media (min-width: 940px) { .legalgrid { grid-template-columns: 230px 1fr; } }

/* ---------- games shared ------------------------------------------------- */

.gamehead { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-bottom: 20px; }
.fighter { display: flex; align-items: center; gap: 10px; }
.fighter img {
  width: 48px; height: 48px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--stroke-hi);
}
.fighter.p img { border-color: var(--amber); object-position: 50% 30%; }
.fighter.b img { border-color: var(--teal); }
.fighter small { display: block; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .09em; }
.fighter strong { font-size: 1rem; }
.vs { font-weight: 800; color: var(--muted); letter-spacing: .1em; }

.scoreboard { display: flex; gap: 10px; margin-left: auto; align-items: center; }
.scoreboard b {
  min-width: 54px; padding: .3em .6em;
  font-size: 1.5rem; font-weight: 800; text-align: center;
  border-radius: var(--r-sm);
  background: var(--card); border: 1px solid var(--stroke);
}
.scoreboard b.me { color: var(--amber); }
.scoreboard b.them { color: var(--teal); }

.stage {
  position: relative;
  border: 1px solid var(--stroke-hi); border-radius: var(--r-lg);
  background: rgba(0, 0, 0, .3);
  overflow: hidden;
  box-shadow: var(--shadow);
}
@media (prefers-color-scheme: light) { .stage { background: rgba(255, 255, 255, .5); } }
.stage canvas { display: block; width: 100%; height: auto; touch-action: none; }

.overlay {
  position: absolute; inset: 0; z-index: 5;
  display: grid; place-content: center; gap: 14px; justify-items: center;
  padding: 24px; text-align: center;
  background: color-mix(in srgb, var(--ink-0) 76%, transparent);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  transition: opacity .35s, visibility .35s;
}
.overlay[hidden] { display: none; }
.overlay h2 { margin: 0; }
.overlay p { margin: 0; }

.seg { display: inline-flex; padding: 4px; gap: 4px; border: 1px solid var(--stroke); border-radius: 999px; background: var(--card); }
.seg button {
  padding: .45em 1em;
  font: inherit; font-size: .85rem; font-weight: 700;
  color: var(--muted); background: none; border: 0; border-radius: 999px; cursor: pointer;
  transition: color .2s, background .2s;
}
.seg button:hover { color: var(--fg); }
.seg button[aria-pressed="true"] { color: var(--ink-0); background: var(--amber); }
@media (prefers-color-scheme: light) { .seg button[aria-pressed="true"] { color: #fff; } }

.hint { margin-top: 14px; font-size: .85rem; color: var(--muted); }

/* ---------- tic tac toe -------------------------------------------------- */

.board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: min(420px, 100%);
  margin: 0 auto;
  aspect-ratio: 1;
}
.cell {
  position: relative;
  display: grid; place-items: center;
  padding: 0; cursor: pointer;
  border: 1px solid var(--stroke); border-radius: var(--r-md);
  background: var(--card);
  transition: transform .2s var(--ease), background .25s, border-color .25s;
  overflow: hidden;
}
.cell:hover:not(:disabled) { background: var(--card-hi); border-color: var(--stroke-hi); transform: scale(1.04); }
.cell:disabled { cursor: default; }
.cell img { width: 78%; height: 78%; object-fit: cover; border-radius: 50%; animation: pop .4s var(--ease) both; }
.cell img.salma { object-position: 50% 28%; box-shadow: 0 0 0 2px var(--amber), 0 6px 20px -8px var(--amber); }
.cell img.soggy { box-shadow: 0 0 0 2px var(--teal), 0 6px 20px -8px var(--teal); }
@keyframes pop { from { opacity: 0; transform: scale(.35) rotate(-22deg); } }
.cell.win { background: color-mix(in srgb, var(--amber) 20%, transparent); border-color: var(--amber); animation: flash 1.1s ease-in-out infinite; }
@keyframes flash { 50% { background: color-mix(in srgb, var(--amber) 34%, transparent); } }
.cell.ghost img { opacity: .18; }

/* ---------- footer ------------------------------------------------------- */

.foot {
  position: relative; z-index: 1;
  margin-top: 40px; padding: 34px 0;
  border-top: 1px solid var(--stroke);
  font-size: .87rem; color: var(--muted);
}
.foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 26px; align-items: center; justify-content: space-between; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--amber); }
.footlinks { display: flex; flex-wrap: wrap; gap: 8px 18px; }

/* ---------- misc --------------------------------------------------------- */

.center { text-align: center; }
.mt0 { margin-top: 0; }
.hero { padding-top: clamp(36px, 7vh, 74px); }
.herogrid { display: grid; gap: clamp(26px, 5vw, 54px); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 860px) { .herogrid { grid-template-columns: 1.15fr .85fr; } }

::selection { background: var(--amber); color: var(--ink-0); }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
