/* Textlings site — shared styles for store + pack pages.
   The homepage (index.html) is intentionally self-contained; this sheet
   carries the same design language to the multi-page parts of the site. */

:root{
  --bg:        oklch(0.188 0.013 318);
  --bg-deep:   oklch(0.150 0.013 318);
  --surface:   oklch(0.232 0.015 318);
  --surface-2: oklch(0.282 0.016 318);
  --surface-3: oklch(0.330 0.017 318);
  --text:      oklch(0.97 0.004 320);
  --muted:     oklch(0.74 0.012 320);
  --faint:     oklch(0.58 0.012 320);
  --line:      oklch(0.32 0.014 318);
  --line-soft: oklch(0.27 0.014 318);
  --accent:    oklch(0.80 0.115 322);
  --accent-hi: oklch(0.86 0.10 322);
  --accent-2:  oklch(0.80 0.095 268);   /* periwinkle — night / initiative / free */
  --bubble-you-1: oklch(0.585 0.155 322);
  --bubble-you-2: oklch(0.640 0.150 332);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --maxw: 1180px;
}

*{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
@media (prefers-reduced-motion:reduce){ html{ scroll-behavior:auto; } }
body{
  margin:0; background:var(--bg); color:var(--text);
  font-family:var(--sans); font-size:17px; line-height:1.55;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  overflow-x:clip; min-height:100svh; display:flex; flex-direction:column;
}
a{ color:inherit; text-decoration:none; }
p{ text-wrap:pretty; }
:focus-visible{ outline:2px solid var(--accent-hi); outline-offset:3px; border-radius:5px; }

.skip{
  position:absolute; left:-9999px; top:0; z-index:100;
  background:var(--accent); color:var(--bg-deep); padding:12px 18px; border-radius:0 0 12px 0; font-weight:650;
}
.skip:focus{ left:0; }

.wrap{ width:100%; max-width:var(--maxw); margin:0 auto; padding:0 clamp(20px,5vw,40px); }
main{ flex:1; }

/* ---------- shared bits ---------- */
.eyebrow{
  font-family:var(--mono); font-size:13px; letter-spacing:.06em; text-transform:uppercase; color:var(--accent-hi);
}
.section-title{
  font-size:clamp(30px,4.4vw,52px); line-height:1.04; letter-spacing:-.035em; font-weight:680; margin:14px 0 0;
}
.section-title .dim{ color:var(--muted); }
.lede{ color:var(--muted); font-size:19px; line-height:1.55; }
.lede b{ color:var(--text); font-weight:600; }
.meta-line{ font-family:var(--mono); font-size:13px; color:var(--faint); letter-spacing:.01em; }

.btn{
  font:inherit; font-weight:600; font-size:16px; display:inline-flex; align-items:center; gap:11px;
  padding:14px 22px; border-radius:13px; border:1px solid transparent; cursor:pointer;
  transition:transform .12s ease, background .15s ease, border-color .15s ease;
}
.btn:active{ transform:translateY(1px); }
.btn-primary{ background:var(--accent); color:var(--bg-deep); }
.btn-primary:hover{ background:var(--accent-hi); }
.btn-ghost{ background:transparent; color:var(--text); border-color:var(--line); }
.btn-ghost:hover{ border-color:var(--surface-3); background:var(--surface); }
.btn[aria-disabled="true"]{ opacity:.55; cursor:not-allowed; pointer-events:none; }

/* =========================================================
   HEADER
   ========================================================= */
header.nav{
  position:sticky; top:0; z-index:40;
  background:color-mix(in oklch, var(--bg) 80%, transparent);
  backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid var(--line-soft);
}
.nav-inner{ display:flex; align-items:center; gap:24px; height:64px; }
.brand{ display:inline-flex; align-items:center; gap:9px; font-weight:680; font-size:18px; letter-spacing:-.02em; }
.brand .dot{
  width:10px; height:10px; border-radius:50%; background:var(--accent);
  box-shadow:0 0 0 4px color-mix(in oklch, var(--accent) 20%, transparent);
}
.nav-links{ display:flex; gap:26px; margin-left:auto; align-items:center; }
.nav-links a{ color:var(--muted); font-size:15px; transition:color .15s ease; }
.nav-links a:hover{ color:var(--text); }
.nav-links a[aria-current]{ color:var(--text); }
.nav-cta{
  color:var(--text) !important; border:1px solid var(--line); padding:8px 15px; border-radius:10px;
  font-weight:600; font-size:14.5px;
}
.nav-cta:hover{ border-color:var(--surface-3); background:var(--surface); }
@media (max-width:720px){ .nav-links .hide-sm{ display:none; } }

/* =========================================================
   PAGE HEAD / BREADCRUMB
   ========================================================= */
.crumb{ font-family:var(--mono); font-size:13px; color:var(--faint); margin:clamp(28px,4vw,44px) 0 0; }
.crumb a{ color:var(--muted); }
.crumb a:hover{ color:var(--text); }
.crumb .sep{ margin:0 8px; opacity:.6; }

.page-head{ padding:clamp(26px,4vw,40px) 0 clamp(28px,4vw,44px); }
.page-head .lede{ max-width:52ch; margin-top:16px; }

/* =========================================================
   STORE GRID  (mirrors homepage teaser)
   ========================================================= */
.pack-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:clamp(16px,2vw,22px); }
.pack{
  display:flex; flex-direction:column;
  background:var(--surface); border:1px solid var(--line-soft); border-radius:18px; overflow:hidden;
  transition:border-color .18s ease, transform .18s ease;
}
.pack:hover{ border-color:var(--surface-3); transform:translateY(-3px); }
.pack-top{
  padding:20px 20px 16px; position:relative;
  background:radial-gradient(120% 100% at 80% 0%, color-mix(in oklch, var(--accent) 16%, transparent), transparent 64%);
  border-bottom:1px solid var(--line-soft);
}
.pack.free .pack-top{
  background:radial-gradient(120% 100% at 80% 0%, color-mix(in oklch, var(--accent-2) 20%, transparent), transparent 64%);
}
.pack-tag{
  font-family:var(--mono); font-size:11px; letter-spacing:.07em; text-transform:uppercase;
  padding:4px 10px; border-radius:999px; display:inline-block; white-space:nowrap;
  background:var(--surface-3); color:var(--muted);
}
.pack.free .pack-tag{ background:var(--accent-2); color:var(--bg-deep); font-weight:650; }
.pack-name{ font-size:23px; letter-spacing:-.02em; font-weight:680; margin:14px 0 4px; }
.pack-premise{ color:var(--muted); font-size:14.5px; line-height:1.5; min-height:44px; }
.pack-cast{ display:flex; flex-wrap:wrap; gap:7px; padding:16px 20px; }
.cast-pill{
  display:inline-flex; align-items:center; gap:7px; padding:5px 11px 5px 5px;
  background:var(--bg-deep); border:1px solid var(--line-soft); border-radius:999px; font-size:12.5px;
}
.cast-pill .pf{
  width:22px; height:22px; border-radius:50%; flex:none; display:grid; place-items:center;
  font-family:var(--mono); font-size:11px; font-weight:650; color:var(--bg-deep);
  background:linear-gradient(150deg, var(--accent-hi), var(--accent-2));
}
.cast-pill b{ font-weight:600; }
.cast-pill small{ color:var(--faint); }
.pack-foot{ margin-top:auto; padding:14px 20px 20px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.pack-price{ font-weight:680; font-size:18px; }
.pack-price.free{ color:var(--accent-2); }
.pack-foot .go{
  font-size:14px; font-weight:600; color:var(--accent-hi);
  border:1px solid var(--line); padding:8px 14px; border-radius:10px; transition:background .15s ease, border-color .15s ease;
}
.pack-foot .go:hover{ background:var(--surface-2); border-color:var(--surface-3); }
@media (max-width:820px){ .pack-grid{ grid-template-columns:1fr; } }

/* =========================================================
   PACK PAGE — hero + buy
   ========================================================= */
.pack-hero{
  display:grid; grid-template-columns:1.25fr .9fr; gap:clamp(28px,5vw,56px); align-items:start;
  padding:clamp(20px,3vw,32px) 0 clamp(40px,6vw,72px);
}
.ph-tag{
  font-family:var(--mono); font-size:11.5px; letter-spacing:.07em; text-transform:uppercase;
  padding:5px 12px; border-radius:999px; display:inline-block;
  background:var(--surface-3); color:var(--muted);
}
.ph-tag.free{ background:var(--accent-2); color:var(--bg-deep); font-weight:650; }
.pack-hero h1{ font-size:clamp(38px,6vw,68px); letter-spacing:-.04em; line-height:1; margin:18px 0 0; font-weight:700; }
.pack-hero .premise{ color:var(--muted); font-size:20px; margin:18px 0 0; max-width:40ch; }

.buy{
  background:var(--surface); border:1px solid var(--line-soft); border-radius:20px; padding:26px 24px;
  display:flex; flex-direction:column; gap:14px; position:sticky; top:84px;
}
.buy.primary{ border-color:color-mix(in oklch, var(--accent) 45%, var(--line-soft)); background:color-mix(in oklch, var(--accent) 7%, var(--surface)); }
.buy .price{ font-size:34px; font-weight:700; letter-spacing:-.02em; }
.buy .price.free{ color:var(--accent-2); }
.buy .price small{ font-size:14px; font-weight:500; color:var(--faint); font-family:var(--mono); margin-left:8px; }
.buy .note{ color:var(--muted); font-size:14.5px; line-height:1.5; }
.buy .btn{ width:100%; justify-content:center; }

/* itch.io buy-widget placeholder slot */
.itch-slot{
  border:1.5px dashed var(--line); border-radius:14px; padding:18px 16px; text-align:center;
  background:var(--bg-deep);
}
.itch-slot .ph-label{ font-family:var(--mono); font-size:11px; letter-spacing:.05em; text-transform:uppercase; color:var(--faint); }
.itch-slot .ph-sub{ color:var(--muted); font-size:14px; margin:8px 0 0; line-height:1.5; }
.buy .install-steps{ margin:2px 0 0; padding-left:18px; color:var(--muted); font-size:14px; line-height:1.6; }
.buy .install-steps b{ color:var(--text); font-weight:600; }

/* =========================================================
   ROSTER  (characters in a pack)
   ========================================================= */
.section{ padding:clamp(40px,6vw,72px) 0; border-top:1px solid var(--line-soft); }
.section > .eyebrow{ display:inline-block; }
.section h2{ font-size:clamp(26px,3.4vw,38px); letter-spacing:-.03em; line-height:1.05; font-weight:680; margin:12px 0 0; }
.section .sub{ color:var(--muted); margin:12px 0 0; max-width:52ch; }
.roster{ display:grid; grid-template-columns:repeat(2,1fr); gap:clamp(14px,2vw,20px); margin-top:clamp(28px,4vw,40px); }
.rcard{
  display:flex; gap:16px; align-items:flex-start;
  background:var(--surface); border:1px solid var(--line-soft); border-radius:16px; padding:20px 20px;
}
.rcard .face{
  width:48px; height:48px; border-radius:50%; flex:none; display:grid; place-items:center;
  font-weight:650; font-size:20px; color:var(--bg-deep);
  background:linear-gradient(150deg, var(--accent-hi), var(--accent-2));
}
.rcard .rbody b{ font-size:18px; letter-spacing:-.01em; }
.rcard .rbody .role{ font-family:var(--mono); font-size:11.5px; color:var(--accent-hi); letter-spacing:.03em; margin-left:8px; }
.rcard .rbody p{ margin:7px 0 0; color:var(--muted); font-size:14.5px; line-height:1.5; }
@media (max-width:760px){ .roster{ grid-template-columns:1fr; } }

/* =========================================================
   SAMPLE CONVERSATION (placeholder until Chris drops in real excerpt)
   ========================================================= */
.snip{
  max-width:430px; background:var(--bg-deep); border:1px solid var(--line-soft); border-radius:20px;
  padding:20px 18px; margin-top:clamp(24px,3vw,32px);
}
.snip .thread{ display:flex; flex-direction:column; gap:7px; }
.snip .daystamp{
  align-self:center; font-family:var(--mono); font-size:10.5px; color:var(--faint);
  letter-spacing:.04em; margin:0 0 8px; text-transform:uppercase;
}
.snip .msg{ max-width:82%; padding:9px 13px; border-radius:19px; font-size:14.5px; line-height:1.4; }
.snip .msg.them{ align-self:flex-start; background:var(--surface-2); color:var(--text); border-bottom-left-radius:7px; }
.snip .msg.you{
  align-self:flex-end; color:#fff;
  background:linear-gradient(160deg, var(--bubble-you-1), var(--bubble-you-2)); border-bottom-right-radius:7px;
}
.snip .msg .sender{ display:block; font-size:11px; color:var(--accent-hi); margin-bottom:2px; font-weight:600; }
.snip .placeholder{
  text-align:center; color:var(--faint); font-family:var(--mono); font-size:12px; line-height:1.7;
  padding:14px 6px;
}
.snip .placeholder b{ color:var(--muted); font-weight:600; }
.snip-note{
  max-width:430px; margin:14px 0 0;
  font-family:var(--mono); font-size:12px; line-height:1.55; color:var(--faint);
}

/* =========================================================
   CREATORS STRIP (store index)
   ========================================================= */
.creators{
  margin-top:clamp(48px,7vw,88px); background:var(--surface); border:1px solid var(--line-soft);
  border-radius:22px; padding:clamp(28px,4vw,48px); display:grid; grid-template-columns:1.2fr .8fr; gap:32px; align-items:center;
}
.creators h2{ font-size:clamp(24px,3vw,34px); letter-spacing:-.03em; margin:10px 0 0; font-weight:680; }
.creators p{ color:var(--muted); margin:14px 0 0; max-width:46ch; }
.creators .cta-row{ display:flex; flex-wrap:wrap; gap:12px; }
@media (max-width:820px){ .creators{ grid-template-columns:1fr; } }

/* =========================================================
   FOOTER
   ========================================================= */
footer{ border-top:1px solid var(--line-soft); padding:clamp(44px,6vw,72px) 0 56px; background:var(--bg-deep); margin-top:clamp(48px,7vw,96px); }
.foot-top{ display:flex; justify-content:space-between; gap:36px; flex-wrap:wrap; margin-bottom:40px; }
.foot-brand{ max-width:34ch; }
.foot-brand .brand{ font-size:20px; margin-bottom:12px; }
.foot-brand p{ color:var(--muted); font-size:15px; margin:0; }
.foot-cols{ display:flex; gap:clamp(36px,6vw,72px); flex-wrap:wrap; }
.foot-col h4{ font-family:var(--mono); font-size:12px; letter-spacing:.06em; text-transform:uppercase; color:var(--faint); margin:0 0 14px; font-weight:600; }
.foot-col a{ display:block; color:var(--muted); font-size:15px; margin-bottom:10px; transition:color .15s ease; }
.foot-col a:hover{ color:var(--text); }
.foot-bottom{
  display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; align-items:center;
  padding-top:26px; border-top:1px solid var(--line-soft);
  font-family:var(--mono); font-size:12.5px; color:var(--faint);
}
.foot-bottom .no-track{ color:var(--accent-hi); }
.foot-bottom a{ color:var(--muted); }
.foot-bottom a:hover{ color:var(--text); }

@media (max-width:900px){
  .pack-hero{ grid-template-columns:1fr; }
  .buy{ position:static; }
}
