/* ============================================================
   Sodium Studio — shared stylesheet for all pages
   Edit design tokens, fonts, nav, footer, and buttons here ONCE
   and every page updates. Page-specific differences are scoped
   via <body> classes:
     index.html        → <body>              (studio home)
     casterly/hearth   → <body class="app">
     privacy/terms     → <body class="legal">
     contact pages     → <body class="contact">
   ============================================================ */

/* --- design tokens (change colours + fonts here) --- */
:root{
  --cream:#F7F4EE;
  --cream-deep:#EFE9DD;
  --cream-card:#FBF9F4;
  --ink:#1A1612;
  --ink-soft:#6B6157;
  --orange:#FF6A00;
  --orange-deep:#E25D00;
  --line:rgba(26,22,18,0.13);
  --mono:'JetBrains Mono',ui-monospace,'SF Mono',Menlo,monospace;
}

/* --- base --- */
*{margin:0;padding:0;box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  background:var(--cream);
  color:var(--ink);
  font-family:var(--mono);
  font-size:16px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
body.legal{line-height:1.7;}
/* grain overlay */
body::before{
  content:"";
  position:fixed;inset:0;
  pointer-events:none;z-index:9999;
  opacity:0.04;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a{color:inherit;text-decoration:none;}
img{display:block;}

.wrap{max-width:1120px;margin:0 auto;padding:0 32px;}
/* narrow reading column on doc pages — scoped to .doc so the
   nav + footer keep the full site width on every page */
body.legal .doc .wrap{max-width:760px;}
body.contact .doc .wrap{max-width:680px;}

/* --- labels + headings --- */
.eyebrow{
  font-size:12px;font-weight:700;
  letter-spacing:0.18em;text-transform:uppercase;color:var(--orange);
  display:inline-block;
}
h1,h2,h3{font-weight:700;line-height:1.08;letter-spacing:-0.03em;}

/* --- buttons --- */
.btn{
  display:inline-flex;align-items:center;gap:10px;
  font-family:var(--mono);font-weight:700;font-size:14px;
  letter-spacing:0.02em;
  background:var(--orange);color:#fff;
  padding:15px 26px;border-radius:10px;
  border:1px solid var(--orange);
  transition:transform .18s ease,background .18s ease,box-shadow .18s ease;
  cursor:pointer;
}
.btn:hover{background:var(--orange-deep);transform:translateY(-2px);box-shadow:0 10px 24px -10px rgba(226,93,0,0.6);}
.btn .arrow{transition:transform .18s ease;}
.btn:hover .arrow{transform:translateX(3px);}
.btn.ghost{background:transparent;color:var(--ink);border:1px solid var(--line);}
.btn.ghost:hover{background:var(--ink);color:var(--cream);border-color:var(--ink);box-shadow:none;}
.pricetag{font-size:13px;color:var(--ink-soft);letter-spacing:0.01em;}

/* App Store badge */
.appstore-badge img{height:52px;width:auto;transition:transform .18s ease,opacity .18s ease;}
.appstore-badge:hover img{transform:translateY(-2px);opacity:0.85;}

/* --- nav --- */
nav{
  position:sticky;top:0;z-index:100;
  background:rgba(247,244,238,0.82);
  backdrop-filter:saturate(140%) blur(12px);
  border-bottom:1px solid var(--line);
}
.nav-inner{max-width:1120px;margin:0 auto;padding:0 32px;display:flex;align-items:center;justify-content:space-between;height:64px;}
.logo img{height:24px;width:auto;display:block;}
.nav-links{display:flex;align-items:center;gap:30px;font-size:13px;}
.nav-links a.txt{color:var(--ink-soft);transition:color .15s;}
.nav-links a.txt:hover{color:var(--ink);}
.nav-links .btn{padding:10px 18px;}

/* ============================================================
   HOME PAGE (index.html) components
   ============================================================ */

/* hero */
.hero{padding:72px 0 72px;}
.hero h1{font-size:clamp(36px,6vw,68px);margin:22px 0 0;max-width:16ch;}
.hero h1 em{font-style:normal;color:var(--orange);}
.hero .sub{font-size:clamp(15px,1.7vw,17px);color:var(--ink-soft);max-width:46ch;margin:26px 0 0;line-height:1.65;}

/* app index — numbered rows, one per product */
.apps{padding:0 0 110px;}
.apps .head{margin-bottom:10px;}
.app-row{
  display:flex;align-items:center;gap:32px;
  padding:42px 0;border-top:1px solid var(--line);
  position:relative;
}
.app-row:last-child{border-bottom:1px solid var(--line);}
.app-row .num{font-size:13px;font-weight:700;color:var(--orange);letter-spacing:0.1em;flex:none;width:36px;}
.app-row .icon{flex:none;width:88px;height:88px;border-radius:20px;overflow:hidden;}
.app-row .icon img{width:100%;height:100%;object-fit:cover;}
.app-row .info{flex:1;min-width:0;}
.app-row h2{font-size:clamp(22px,2.6vw,30px);display:flex;align-items:baseline;gap:14px;flex-wrap:wrap;}
.app-row .tagline{font-size:14px;color:var(--ink-soft);margin-top:8px;max-width:52ch;line-height:1.65;}
.app-row .platforms{margin-top:14px;display:flex;flex-wrap:wrap;gap:8px;}
.app-row .action{flex:none;font-size:14px;font-weight:700;color:var(--ink-soft);display:flex;align-items:center;gap:8px;white-space:nowrap;}
.app-row .action .arrow{transition:transform .18s ease;}
a.app-row{transition:background .18s ease;}
a.app-row:hover{background:var(--cream-card);}
a.app-row:hover .action{color:var(--orange);}
a.app-row:hover .action .arrow{transform:translateX(4px);}
.tag{
  display:inline-flex;align-items:center;
  font-size:11px;font-weight:700;letter-spacing:0.14em;text-transform:uppercase;
  color:var(--orange);border:1px dashed rgba(255,106,0,0.5);
  border-radius:40px;padding:4px 12px;
}
.chip{display:inline-flex;align-items:center;padding:4px 12px;border:1px solid var(--line);border-radius:40px;font-size:12px;color:var(--ink-soft);background:var(--cream-card);}

/* studio blurb */
.studio{padding:96px 0;background:var(--cream-deep);border-top:1px solid var(--line);}
.studio .inner{max-width:60ch;}
.studio h2{font-size:clamp(24px,3.4vw,36px);margin-top:16px;}
.studio p{font-size:15px;color:var(--ink-soft);margin-top:20px;line-height:1.75;}

/* ============================================================
   APP PAGES (casterly.html, hearth.html)
   ============================================================ */
.app-hero{padding:88px 0 64px;text-align:center;}
.app-hero .app-icon{width:120px;height:120px;border-radius:27px;overflow:hidden;margin:0 auto 30px;box-shadow:0 24px 48px -24px rgba(26,22,18,0.35);}
.app-hero .app-icon img{width:100%;height:100%;object-fit:cover;}
.app-hero h1{font-size:clamp(40px,6.5vw,72px);}
.app-hero .tagline{font-size:clamp(16px,2vw,20px);color:var(--orange);font-weight:700;margin-top:10px;letter-spacing:-0.01em;}
.app-hero .sub{font-size:15px;color:var(--ink-soft);max-width:52ch;margin:24px auto 0;line-height:1.7;}
.app-hero .cta-row{display:flex;align-items:center;justify-content:center;gap:22px;margin-top:36px;flex-wrap:wrap;}

/* screenshot strip — horizontal scroll, snap per shot.
   Desktop gets arrows + click-drag; touch just swipes. */
.shots{padding:24px 0 0;}
.shots-frame{position:relative;max-width:1120px;margin:0 auto;}
.shots-track{
  display:flex;gap:20px;
  overflow-x:auto;scroll-snap-type:x proximity;
  padding:8px 32px 24px;
  scrollbar-width:thin;scrollbar-color:var(--line) transparent;
}
.shots-track.dragging{scroll-snap-type:none;cursor:grabbing;}
.shots-track.dragging img{cursor:grabbing;}
.shots-arrow{
  position:absolute;top:50%;transform:translateY(-50%);z-index:5;
  width:44px;height:44px;border-radius:50%;
  border:1px solid var(--line);
  background:rgba(247,244,238,0.85);backdrop-filter:blur(6px);
  color:var(--ink);font-family:var(--mono);font-size:17px;line-height:1;
  display:none;align-items:center;justify-content:center;
  cursor:pointer;transition:border-color .15s,color .15s,opacity .15s;
}
.shots-arrow.prev{left:10px;}
.shots-arrow.next{right:10px;}
.shots-arrow:hover{border-color:var(--orange);color:var(--orange);}
.shots-arrow[disabled]{opacity:0.25;cursor:default;border-color:var(--line);color:var(--ink);}
@media(hover:hover) and (pointer:fine){
  .shots-arrow{display:flex;}
  .shots-track{cursor:grab;}
}
.shots-track img{
  -webkit-user-drag:none;user-select:none;
  flex:none;width:248px;height:auto;
  border:1px solid var(--line);border-radius:24px;
  scroll-snap-align:start;
  background:var(--cream-card);
  cursor:zoom-in;
  transition:transform .25s ease;
}
.shots-track img:hover{transform:translateY(-4px);}
.shots-hint{text-align:center;font-size:12px;color:var(--ink-soft);letter-spacing:0.1em;text-transform:uppercase;margin-top:4px;}

/* sections */
section.block{padding:96px 0;}
.block.alt{background:var(--cream-deep);border-top:1px solid var(--line);border-bottom:1px solid var(--line);}
.head{max-width:38ch;margin-bottom:54px;}
.head h2{font-size:clamp(26px,3.8vw,42px);margin-top:16px;}
.head .lede{color:var(--ink-soft);margin-top:18px;font-size:15px;line-height:1.65;max-width:48ch;}

/* feature grid */
.values{display:grid;grid-template-columns:repeat(2,1fr);gap:1px;background:var(--line);border:1px solid var(--line);border-radius:8px;overflow:hidden;}
.value{background:var(--cream);padding:34px 32px;}
.value h3{font-size:16px;letter-spacing:-0.01em;display:flex;align-items:center;gap:11px;flex-wrap:wrap;}
.value h3::before{content:"";width:8px;height:8px;background:var(--orange);border-radius:50%;flex:none;}
.value h3 .pro{font-size:10px;font-weight:700;letter-spacing:0.14em;color:var(--orange);border:1px solid rgba(255,106,0,0.4);border-radius:40px;padding:2px 9px;}
.value p{font-size:14px;color:var(--ink-soft);margin-top:13px;line-height:1.65;}
.block.alt .value{background:var(--cream-deep);}

/* narrative callout (hearth 11pm story) */
.story{max-width:56ch;margin:0 auto;text-align:center;}
.story p{font-size:clamp(17px,2.2vw,22px);line-height:1.7;font-weight:500;}
.story p strong{color:var(--orange);font-weight:700;}

/* pricing */
.price-card{text-align:center;max-width:540px;margin:0 auto;border:1px solid var(--line);border-radius:12px;padding:56px 40px;background:var(--cream-card);}
.price-card .eyebrow{margin-bottom:18px;}
.price-big{font-size:72px;font-weight:700;line-height:1;letter-spacing:-0.04em;}
.price-big span{color:var(--orange);}
.price-card .once{font-size:13px;letter-spacing:0.14em;text-transform:uppercase;color:var(--ink-soft);margin-top:8px;}
.price-card .terms{font-size:14px;color:var(--ink-soft);margin:24px auto 30px;max-width:36ch;line-height:1.7;}

/* ============================================================
   LEGAL / DOC PAGES (privacy, terms)
   ============================================================ */
.doc{padding:72px 0 96px;}
.doc .doc-app{display:flex;align-items:center;gap:14px;margin-bottom:28px;}
.doc .doc-app img{width:48px;height:48px;border-radius:11px;}
.doc .doc-app span{font-weight:700;font-size:17px;letter-spacing:-0.01em;}
.doc h1{font-size:clamp(32px,5.4vw,48px);margin:16px 0 10px;}
.updated{font-size:13px;color:var(--ink-soft);margin-bottom:48px;}
.doc h2{font-size:21px;margin:46px 0 14px;letter-spacing:-0.02em;}
.doc h2 .n{font-size:13px;color:var(--orange);font-weight:700;margin-right:12px;vertical-align:middle;}
.doc p{font-size:15px;color:var(--ink);margin-bottom:16px;}
.doc p.muted{color:var(--ink-soft);}
.doc ul{list-style:none;margin:0 0 18px;padding:0;}
.doc li{font-size:15px;color:var(--ink);padding-left:22px;position:relative;margin-bottom:11px;}
.doc li::before{content:"";position:absolute;left:2px;top:11px;width:7px;height:7px;background:var(--orange);border-radius:50%;}
.doc a.inline{color:var(--orange-deep);text-decoration:underline;text-underline-offset:3px;}

/* ============================================================
   CONTACT PAGES
   ============================================================ */
body.contact .doc{padding:72px 0 110px;}
.methods{margin:40px 0 0;display:flex;flex-direction:column;gap:12px;}
.method{
  display:flex;align-items:center;gap:16px;text-decoration:none;
  background:var(--cream-card);border:1px solid var(--line);border-radius:8px;
  padding:18px 20px;transition:border-color .15s,transform .15s,box-shadow .15s;
}
.method:hover{border-color:var(--orange);transform:translateY(-2px);box-shadow:0 12px 26px -16px rgba(26,22,18,0.3);}
.method .glyph{
  flex:none;width:42px;height:42px;border-radius:8px;background:var(--cream-deep);
  display:flex;align-items:center;justify-content:center;color:var(--orange);
}
.method:hover .glyph{background:var(--orange);color:var(--cream);}
.method .glyph svg{width:20px;height:20px;}
.method .txt{display:flex;flex-direction:column;}
.method .label{font-size:12px;font-weight:700;letter-spacing:0.1em;text-transform:uppercase;color:var(--ink-soft);}
.method .val{font-size:15px;color:var(--ink);margin-top:2px;}
.method .chev{margin-left:auto;color:var(--ink-soft);}
.method:hover .chev{color:var(--orange);}

/* --- footer --- */
footer{padding:48px 0;border-top:1px solid var(--line);margin-top:auto;}
.foot-inner{max-width:1120px;margin:0 auto;padding:0 32px;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:18px;font-size:13px;color:var(--ink-soft);}
.foot-brand{display:flex;flex-direction:column;align-items:flex-start;gap:10px;}
.foot-brand img{height:18px;width:auto;opacity:0.85;}
.foot-links{display:flex;gap:24px;flex-wrap:wrap;}
.foot-links a:hover{color:var(--orange);}

/* lightbox (click-to-enlarge screenshots) */
.lightbox{
  position:fixed;inset:0;z-index:1000;
  display:flex;align-items:center;justify-content:center;
  padding:48px;
  background:rgba(26,22,18,0.82);
  backdrop-filter:saturate(120%) blur(6px);
  opacity:0;visibility:hidden;
  transition:opacity .28s ease,visibility .28s ease;
  cursor:zoom-out;
}
.lightbox.open{opacity:1;visibility:visible;}
.lightbox img{
  max-width:100%;max-height:100%;
  width:auto;height:auto;
  border-radius:18px;
  box-shadow:0 40px 90px -30px rgba(0,0,0,0.7);
  transform:scale(.96);transition:transform .28s cubic-bezier(.2,.7,.2,1);
}
.lightbox.open img{transform:scale(1);}
.lightbox .close{
  position:absolute;top:22px;right:26px;
  width:40px;height:40px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:rgba(247,244,238,0.1);border:1px solid rgba(247,244,238,0.25);
  color:var(--cream);font-family:var(--mono);font-size:20px;line-height:1;
  cursor:pointer;transition:background .15s ease;
}
.lightbox .close:hover{background:rgba(247,244,238,0.22);}

/* reveal animation */
.reveal{opacity:0;transform:translateY(22px);transition:opacity .7s cubic-bezier(.2,.7,.2,1),transform .7s cubic-bezier(.2,.7,.2,1);}
.reveal.in{opacity:1;transform:none;}
.d1{transition-delay:.08s;}.d2{transition-delay:.16s;}.d3{transition-delay:.24s;}
@media(prefers-reduced-motion:reduce){.reveal{opacity:1;transform:none;transition:none;}}

/* --- responsive --- */
@media(max-width:860px){
  .nav-links .txt{display:none;}
  .values{grid-template-columns:1fr;}
  .app-row{flex-wrap:wrap;gap:20px;padding:32px 0;}
  .app-row .num{width:auto;}
  .app-row .info{flex-basis:100%;order:3;}
  .app-row .action{margin-left:auto;}
  .hero{padding:64px 0 48px;}
  section.block{padding:64px 0;}
  .shots-track img{width:208px;}
}
