/* Cozy Alchemy marketing site.
   Same shape as the FC Sim / 38-0 landing pages (static HTML, no build, no trackers) reskinned to the game's
   own "Moonlit Apothecary" look: night-wood grounds, parchment cards, honey and periwinkle accents, Pixelify
   Sans for display type, and the game's own pixel art drawn crisp. Tokens mirror ../src/theme.ts. */

@font-face{ font-family:'Pixelify Sans'; font-weight:700; font-style:normal; font-display:swap; src:url('/assets/fonts/PixelifySans-Bold.ttf') format('truetype'); }
@font-face{ font-family:'Pixelify Sans'; font-weight:500; font-style:normal; font-display:swap; src:url('/assets/fonts/PixelifySans-Medium.ttf') format('truetype'); }

:root{
  --night:#261B17; --night-soft:#3A2A23; --walnut:#4A3524; --oak:#8A6A4A;
  --parchment:#F3E7CF; --parchment-deep:#E7D7B8; --white:#FFF9EE;
  --ink:#2A211C; --ink-soft:#6B5745; --sage:#9BA488;
  --honey:#E7B24C; --periwinkle:#6E7BE0; --violet:#A46BD8; --teal:#3FC7C0; --rose:#D08A8A;
  --r-sm:10px; --r-md:14px; --r-lg:22px; --r-pill:999px;
  --maxw:1120px; --maxw-narrow:740px;
  --display:'Pixelify Sans', 'Courier New', monospace;
  --sans:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
@media (prefers-reduced-motion:reduce){ html{scroll-behavior:auto;} .reveal{transition:none !important;} .marquee__track{animation:none !important;} }
body{margin:0; font-family:var(--sans); background:var(--night); color:var(--parchment); line-height:1.6; -webkit-font-smoothing:antialiased; overflow-x:hidden;}
a{color:var(--honey); text-decoration:none;}
a:hover{color:#f3c86c;}
img{display:block; max-width:100%;}
h1,h2,h3,h4{margin:0; line-height:1.1; font-family:var(--display); font-weight:700; letter-spacing:.01em;}
.px{image-rendering:pixelated; image-rendering:crisp-edges;}
.container{width:100%; max-width:var(--maxw); margin:0 auto; padding:0 28px;}
.skip{position:absolute; left:-999px; top:8px; background:var(--honey); color:var(--ink); padding:8px 12px; border-radius:var(--r-sm); z-index:100;}
.skip:focus{left:8px;}

/* Type */
.eyebrow{font-family:var(--display); font-weight:500; font-size:14px; letter-spacing:.08em; text-transform:uppercase; color:var(--honey); display:inline-flex; align-items:center; gap:10px; margin:0 0 16px;}
.eyebrow img{width:18px; height:18px;}
.lead{font-size:clamp(17px,1.5vw,20px); color:rgba(243,231,207,.82); max-width:54ch; margin:0;}
.sec-title{font-size:clamp(32px,4.2vw,54px); margin-bottom:16px;}
.on-parchment{background:var(--parchment); color:var(--ink);}
.on-parchment .eyebrow{color:var(--oak);}
.on-parchment .lead{color:var(--ink-soft);}
.on-parchment a:not(.btn){color:var(--walnut); text-decoration:underline; text-underline-offset:3px;}
.accent-honey{color:var(--honey);} .accent-peri{color:var(--periwinkle);} .accent-teal{color:var(--teal);}

/* Header */
.topbar{position:sticky; top:0; z-index:50; background:rgba(38,27,23,.9); backdrop-filter:saturate(1.2) blur(10px); border-bottom:1px solid rgba(243,231,207,.08);}
.topbar__inner{display:flex; align-items:center; justify-content:space-between; gap:20px; height:64px;}
.brand{display:flex; align-items:center; gap:10px; color:var(--parchment); font-family:var(--display); font-size:20px;}
.brand img{width:36px; height:36px; border-radius:9px; background:var(--parchment); padding:3px;}
.nav{display:flex; gap:22px; align-items:center;}
.nav a{color:rgba(243,231,207,.8); font-weight:600; font-size:15px;}
.nav a:hover{color:var(--parchment);}
.btn{display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:12px 18px; border-radius:var(--r-md); font-weight:700; font-size:15px; background:var(--honey); color:var(--ink) !important; border:2px solid #b98a2f; box-shadow:0 2px 0 #b98a2f;}
.btn:hover{background:#f0c05b;}
.btn--quiet{background:transparent; color:var(--parchment) !important; border-color:rgba(243,231,207,.35); box-shadow:none;}
.btn--quiet:hover{background:rgba(243,231,207,.08);}
@media (max-width:760px){ .nav a:not(.btn){display:none;} }

/* Hero */
.hero{position:relative; padding:56px 0 0;}
.hero__copy{max-width:760px; margin:0 auto; text-align:center;}
.hero__title{font-size:clamp(34px,4.6vw,60px); margin:0 0 18px; line-height:1.12;}
.hero__lead{font-size:clamp(17px,1.6vw,20px); color:rgba(243,231,207,.85); max-width:56ch; margin:0 auto 24px;}
.cta-row{display:flex; align-items:center; justify-content:center; gap:16px; flex-wrap:wrap; margin-bottom:14px;}
.store-badge img{height:56px; width:auto;}
.hero__meta{display:flex; justify-content:center; gap:12px; flex-wrap:wrap; color:rgba(243,231,207,.7); font-size:14px;}
.hero__meta b{color:var(--parchment);}
/* Three upright phones, front one taller, cropped by the band below so they "sit" in the scene */
.phones{display:flex; justify-content:center; align-items:flex-end; gap:22px; margin:44px auto 0; padding:0 16px 48px; max-width:900px;}
.phone{width:min(250px,28vw); flex:0 0 auto; border-radius:34px; background:#0b0806; padding:9px; box-shadow:0 26px 60px rgba(0,0,0,.55), 0 0 0 2px rgba(243,231,207,.08); overflow:hidden;}
.phone img{border-radius:26px; width:100%; height:auto;}
.phone--side{width:min(220px,25vw); opacity:.96;}
.phone--front{width:min(270px,30vw);}
@media (max-width:640px){
  .phones{gap:12px; margin-top:32px;}
  .phone--side{display:none;}
  .phone--front{width:min(280px,78vw);}
}
/* Pixel scene bands: the app's room art, repeated edge to edge at a whole-number scale (2x the 512px source)
   so the pixels stay the size they are in the game rather than one copy stretched across the page. */
.band{position:relative; height:160px; background-color:#1c1411; border-top:3px solid var(--walnut); border-bottom:3px solid var(--walnut); overflow:hidden;
  background-repeat:repeat-x; background-position:center 34%; background-size:1024px 1024px; image-rendering:pixelated;}
.band--garden{background-image:url('/assets/scenes/garden.png'); background-size:1024px 192px; background-position:center bottom; height:192px;}
.band--apothecary{background-image:url('/assets/scenes/apothecary.png');}
.band--market{background-image:url('/assets/scenes/market.png');}
@media (max-width:640px){ .band{height:120px; background-size:768px 768px;} .band--garden{height:144px; background-size:768px 144px;} }

/* Sprite marquee */
.marquee{overflow:hidden; background:var(--walnut); border-bottom:2px solid var(--oak); padding:14px 0;}
.marquee__track{display:flex; gap:26px; width:max-content; animation:slide 60s linear infinite;}
.marquee__track img{width:44px; height:44px; flex:0 0 auto; opacity:.95;}
@keyframes slide{ from{transform:translateX(0);} to{transform:translateX(-50%);} }

/* Sections */
.section{padding:84px 0;}
.sec-head{max-width:760px; margin-bottom:38px;}
.sec-head--center{text-align:center; margin-left:auto; margin-right:auto;}
.sec-head--center .eyebrow{justify-content:center;}
.grid-3{display:grid; grid-template-columns:repeat(3,1fr); gap:22px;}
@media (max-width:900px){ .grid-3{grid-template-columns:1fr;} }
.card{background:var(--white); color:var(--ink); border:2px solid var(--oak); border-radius:var(--r-lg); padding:24px; box-shadow:0 2px 0 var(--oak);}
.card h3{font-size:22px; margin-bottom:8px;}
.card p{margin:0; color:var(--ink-soft);}
.card .ic{width:56px; height:56px; margin-bottom:14px;}
.step{position:relative;}
.step .num{position:absolute; top:-14px; right:18px; background:var(--periwinkle); color:#fff; font-family:var(--display); font-size:15px; padding:4px 10px; border-radius:var(--r-pill); border:2px solid var(--white);}
.card--night{background:var(--night-soft); color:var(--parchment); border-color:var(--walnut); box-shadow:0 2px 0 var(--walnut);}
.card--night p{color:rgba(243,231,207,.78);}
.card--night h3{color:var(--parchment);}

/* Stat band */
.statband{background:var(--walnut); border-top:2px solid var(--oak); border-bottom:2px solid var(--oak);}
.stats{display:grid; grid-template-columns:repeat(5,1fr); gap:14px; padding:22px 0;}
.stat{text-align:center; display:flex; flex-direction:column; align-items:center; gap:2px;}
.stat img{width:28px; height:28px; margin-bottom:4px;}
.stat b{display:block; font-family:var(--display); font-size:clamp(26px,3.2vw,38px); color:var(--honey); line-height:1;}
.stat span{font-size:14px; color:rgba(243,231,207,.8);}
@media (max-width:760px){ .stats{grid-template-columns:repeat(2,1fr);} .stat:last-child{grid-column:span 2;} }

/* Feature rows with screenshots */
.feature{display:grid; grid-template-columns:1fr 1fr; gap:44px; align-items:center; padding:36px 0;}
.feature--flip .feature__shot{order:-1;}
.feature__shot{display:flex; justify-content:center;}
.feature__shot .phone{width:240px;}
.feature h3{font-size:clamp(26px,3.2vw,40px); margin-bottom:12px;}
.feature p{color:rgba(243,231,207,.82); margin:0 0 12px; font-size:17px;}
.feature ul{margin:0; padding-left:0; list-style:none; color:rgba(243,231,207,.8);}
.feature li{display:flex; gap:10px; align-items:center; margin:8px 0;}
.feature li img{width:24px; height:24px; flex:0 0 auto;}
@media (max-width:900px){ .feature{grid-template-columns:1fr; gap:22px;} .feature--flip .feature__shot{order:0;} }

/* Village */
.village{display:grid; grid-template-columns:repeat(6,1fr); gap:14px;}
.villager{background:var(--white); border:2px solid var(--oak); border-radius:var(--r-md); padding:10px; text-align:center; box-shadow:0 2px 0 var(--oak);}
.villager img{width:100%; height:auto; border-radius:8px; background:var(--parchment-deep);}
.villager span{display:block; font-family:var(--display); font-size:14px; color:var(--ink); margin-top:8px;}
@media (max-width:900px){ .village{grid-template-columns:repeat(3,1fr);} }
.sagecard{display:grid; grid-template-columns:auto 1fr; gap:22px; align-items:center; margin-top:26px;}
.sagecard img{width:120px; height:120px;}
@media (max-width:640px){ .sagecard{grid-template-columns:1fr; text-align:center;} .sagecard img{margin:0 auto;} }

/* Sprite shelf */
.shelf{display:grid; grid-template-columns:repeat(auto-fill,minmax(64px,1fr)); gap:10px; margin-top:22px;}
.shelf img{width:100%; height:auto; background:var(--night-soft); border:2px solid var(--walnut); border-radius:12px; padding:10px;}
.seasons{display:flex; gap:12px; flex-wrap:wrap; margin-top:18px;}
.season{display:inline-flex; align-items:center; gap:8px; background:var(--night-soft); border:2px solid var(--walnut); border-radius:var(--r-pill); padding:8px 14px; font-family:var(--display); font-size:16px; color:var(--parchment);}
.season img{width:22px; height:22px;}
.regions{display:grid; grid-template-columns:repeat(5,1fr); gap:10px; margin-top:26px;}
.region{border:2px solid var(--walnut); border-radius:12px; overflow:hidden; background:#1c1411; aspect-ratio:7/3;}
.region img{width:100%; height:100%; object-fit:cover;}
@media (max-width:900px){ .regions{grid-template-columns:repeat(2,1fr);} .region:last-child{grid-column:span 2;} }

/* Charter */
.charter{display:grid; grid-template-columns:repeat(3,1fr); gap:18px;}
.charter .card{background:var(--parchment);}
.charter .card img{width:40px; height:40px; margin-bottom:10px;}
@media (max-width:900px){ .charter{grid-template-columns:1fr;} }

/* FAQ */
.faq{max-width:780px; margin:0 auto;}
.faq__item{background:var(--night-soft); border:2px solid var(--walnut); border-radius:var(--r-md); padding:0 18px; margin-bottom:10px;}
.faq__item summary{cursor:pointer; padding:16px 0; font-weight:700; font-size:17px; list-style:none; display:flex; justify-content:space-between; gap:12px; color:var(--parchment);}
.faq__item summary::-webkit-details-marker{display:none;}
.faq__item summary::after{content:"+"; font-family:var(--display); color:var(--honey); font-size:22px; line-height:1;}
.faq__item[open] summary::after{content:"–";}
.faq__item p{margin:0 0 16px; color:rgba(243,231,207,.8);}

/* CTA */
.cta{background:linear-gradient(180deg, var(--periwinkle), #5361c9); color:#fff; text-align:center; padding:76px 0;}
.cta__title{font-size:clamp(32px,4.8vw,58px); margin-bottom:14px;}
.cta p{max-width:52ch; margin:0 auto 26px; color:rgba(255,255,255,.88); font-size:18px;}
.cta .eyebrow{color:#fff; opacity:.85; justify-content:center;}
.cta .sage{width:96px; height:96px; margin:0 auto 10px;}

/* Footer */
.footer{padding:44px 0 34px; border-top:1px solid rgba(243,231,207,.1); background:#1c1411;}
.footer__inner{display:grid; grid-template-columns:2fr 1fr 1fr; gap:28px;}
.footer h4{font-size:16px; margin-bottom:10px; color:var(--parchment);}
.footer a{display:block; color:rgba(243,231,207,.75); margin:6px 0; font-size:15px;}
.footer a:hover{color:var(--parchment);}
.footer p{color:rgba(243,231,207,.65); font-size:14px; max-width:44ch; margin:10px 0 0;}
.footer .fine{margin-top:26px; font-size:13px; color:rgba(243,231,207,.5);}
.footer .fine a{display:inline;}
@media (max-width:760px){ .footer__inner{grid-template-columns:1fr;} }

/* Legal pages */
.legal{padding:56px 0 80px;}
.legal .container{max-width:var(--maxw-narrow);}
.legal h1{font-size:clamp(32px,4.5vw,48px); margin-bottom:6px;}
.legal .updated{color:rgba(243,231,207,.6); font-size:14px; margin:0 0 30px;}
.legal h2{font-size:24px; margin:34px 0 10px; color:var(--honey);}
.legal p, .legal li{color:rgba(243,231,207,.85); font-size:16.5px;}
.legal ul{padding-left:20px;}
.legal .note{background:var(--night-soft); border:2px solid var(--walnut); border-radius:var(--r-md); padding:16px 18px;}

/* Reveal on scroll (progressive; content is visible without JS) */
.reveal{opacity:0; transform:translateY(14px); transition:opacity .6s ease, transform .6s ease;}
.reveal.is-in, .no-js .reveal{opacity:1; transform:none;}
