/* Billy Burrow Studios — site styles. Tokens follow design.md (section 11). */
:root {
  --color-paper: #F5EBCB;
  --color-paper-light: #FBF5E3;
  --color-paper-dark: #E8D9AE;
  --color-ink: #1B1A22;
  --color-ink-soft: #3A3944;
  --color-ink-muted: #6E6A66;
  --color-ochre: #D95F1E;
  --color-ochre-deep: #B84A14;
  --color-ochre-light: #F0A56B;

  --font-display: "Patrick Hand SC", "Londrina Solid", "Arial Narrow", sans-serif;
  --font-body: "Nunito Sans", "DM Sans", system-ui, sans-serif;

  --text-hero: clamp(3rem, 8vw, 6.5rem);
  --text-h1: clamp(2.5rem, 5vw, 4rem);
  --text-h2: clamp(1.75rem, 3.5vw, 2.5rem);
  --text-h3: 1.5rem;

  --radius-sm: 8px; --radius-md: 16px; --radius-lg: 28px; --radius-pill: 999px;
  --border: 2px solid var(--color-ink);
  --shadow-hard: 4px 4px 0 var(--color-ink);

  --space-1: 4px; --space-2: 8px; --space-3: 16px; --space-4: 24px;
  --space-5: 32px; --space-6: 48px; --space-7: 64px; --space-8: 96px;

  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
  --gutter: 24px;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1;
  margin: 0 0 var(--space-3);
  letter-spacing: .01em;
}
h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); line-height: 1.1; }
h3 { font-size: var(--text-h3); line-height: 1.2; }
p { margin: 0 0 var(--space-3); max-width: 65ch; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--color-ochre-deep); }
:focus-visible { outline: 3px solid var(--color-ochre); outline-offset: 2px; border-radius: 4px; }
.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--color-ink); color: var(--color-paper); padding: 8px 16px; border-radius: var(--radius-sm);
}
.skip:focus { left: 8px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 720px; }
.eyebrow {
  font-family: var(--font-display); font-size: .9rem; line-height: 1.3;
  text-transform: uppercase; letter-spacing: .24em; margin: 0 0 var(--space-3);
  color: var(--color-ink-soft);
}
.orange { color: var(--color-ochre); }
.lead { font-size: 1.25rem; color: var(--color-ink-soft); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--color-paper);
  border-bottom: 2px solid var(--color-ink);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand .mark { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--color-ink); transition: transform .3s var(--ease-pop); }
.brand:hover .mark { transform: rotate(-8deg) scale(1.06); }
.brand .word { width: 150px; height: auto; }
.nav { display: flex; align-items: center; gap: var(--space-4); }
.nav a.link {
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: .1em; font-size: 1.05rem;
  text-decoration: none; padding: 6px 0; position: relative;
}
.nav a.link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; border-radius: 4px;
  background: var(--color-ochre); transform: scaleX(0); transition: transform .2s ease-out;
}
.nav a.link:hover { color: var(--color-ink); }
.nav a.link:hover::after, .nav a.link[aria-current="page"]::after { transform: scaleX(1); }
.menu-btn { display: none; }

@media (max-width: 767px) {
  :root { --gutter: 16px; }
  .brand .mark { width: 44px; height: 44px; }
  .brand .word { width: 120px; }
  .menu-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-width: 44px; min-height: 44px; padding: 8px 14px;
    background: var(--color-paper-light); border: var(--border); border-radius: var(--radius-pill);
    font-family: var(--font-display); font-size: 1rem; letter-spacing: .1em; text-transform: uppercase; color: var(--color-ink);
    box-shadow: 2px 2px 0 var(--color-ink); cursor: pointer;
  }
  .menu-btn svg { width: 20px; height: 20px; }
  .nav {
    position: fixed; inset: 0; z-index: 60;
    flex-direction: column; justify-content: center; gap: var(--space-4);
    background: var(--color-ochre);
    transform: translateY(-100%); visibility: hidden;
    transition: transform .35s var(--ease-pop), visibility 0s .35s;
  }
  .nav.open { transform: none; visibility: visible; transition: transform .35s var(--ease-pop); }
  .nav a.link { font-size: 2.6rem; letter-spacing: .06em; }
  .nav a.link::after { background: var(--color-ink); }
  .nav .btn { font-size: 1.3rem; }
  .nav .close {
    position: absolute; top: 14px; right: 16px; background: var(--color-paper);
  }
}
@media (min-width: 768px) { .nav .close { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 14px 28px;
  font-family: var(--font-display); font-size: 1.15rem; line-height: 1; text-transform: uppercase; letter-spacing: .08em;
  text-decoration: none; color: var(--color-ink);
  background: var(--color-ochre); border: 3px solid var(--color-ink); border-radius: var(--radius-pill);
  box-shadow: var(--shadow-hard); cursor: pointer;
  transition: transform .15s var(--ease-pop), box-shadow .15s var(--ease-pop), background-color .15s;
}
.btn:hover { color: var(--color-ink); background: var(--color-ochre-deep); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--color-ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--color-ink); }
.btn.secondary { background: transparent; }
.btn.secondary:hover { background: var(--color-ink); color: var(--color-paper); }
.btn.cream { background: var(--color-paper); }
.btn.cream:hover { background: var(--color-paper-light); }
.btn.small { min-height: 44px; padding: 10px 20px; font-size: 1rem; }
.btn svg { width: 22px; height: 22px; flex: none; }
.dark .btn { border-color: var(--color-paper); box-shadow: 4px 4px 0 var(--color-paper); }
.dark .btn:hover { box-shadow: 6px 6px 0 var(--color-paper); }
.dark .btn.secondary { color: var(--color-paper); }
.dark .btn.secondary:hover { background: var(--color-paper); color: var(--color-ink); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-4); }

/* ---------- Sections ---------- */
.section { padding: var(--space-8) 0; position: relative; }
.sand { background: var(--color-paper-dark); }
.dark { background: var(--color-ink); color: var(--color-paper); }
.dark .eyebrow { color: var(--color-ochre-light); }
.dark a:hover { color: var(--color-ochre-light); }
.ochre { background: var(--color-ochre); position: relative; isolation: isolate; }
.ochre::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--grain); opacity: .07; mix-blend-mode: multiply; pointer-events: none; }
.ochre .eyebrow { color: var(--color-ink); }
.ochre a:hover { color: var(--color-ink); }
@media (max-width: 1023px) { .section { padding: var(--space-7) 0; } }
@media (max-width: 767px) { .section { padding: var(--space-6) 0; } }

/* Mound / dune dividers: an SVG in the colour of the NEXT section, sitting on the bottom of this one */
.divider { display: block; width: 100%; height: clamp(36px, 6vw, 80px); margin: -1px 0; position: relative; z-index: 1; }
.divider.flip { transform: scaleY(-1); }

/* ---------- Hero ---------- */
.hero { padding: var(--space-7) 0 0; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: var(--space-6); }
.hero h1 { font-size: var(--text-hero); line-height: .95; margin-bottom: var(--space-4); }
.hero .art { position: relative; }
.hero .art img {
  -webkit-mask: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent), linear-gradient(transparent, #000 4%, #000 96%, transparent);
  -webkit-mask-composite: source-in; mask-composite: intersect;
  mask: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent), linear-gradient(transparent, #000 4%, #000 96%, transparent);
  mask-composite: intersect;
  width: 100%; max-width: 540px; margin: 0 auto; animation: popup .7s var(--ease-pop) both .1s; }
@keyframes popup { from { opacity: 0; transform: translateY(40px) scale(.96); } to { opacity: 1; transform: none; } }
.hero .copy > * { animation: fadeup .5s ease-out both; }
.hero .copy > *:nth-child(2) { animation-delay: .06s; }
.hero .copy > *:nth-child(3) { animation-delay: .12s; }
.hero .copy > *:nth-child(4) { animation-delay: .18s; }
@keyframes fadeup { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (max-width: 899px) {
  .hero { padding-top: var(--space-5); }
  .hero-grid { grid-template-columns: 1fr; gap: var(--space-4); }
  .hero .art { order: -1; }
  .hero .art img { max-width: 340px; }
}

/* Mesa silhouette along the bottom of the hero */
.mesa { display: block; width: 100%; height: clamp(70px, 11vw, 150px); margin-top: var(--space-5); }

/* ---------- Cards ---------- */
.grid { display: grid; gap: var(--space-4); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.two { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 899px) { .grid.three, .grid.two { grid-template-columns: 1fr; } }
.card {
  background: var(--color-paper-light); color: var(--color-ink);
  border: var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-hard);
  padding: var(--space-4);
  transition: transform .2s var(--ease-pop), box-shadow .2s var(--ease-pop);
}
.card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--color-ink); }
.card p:last-child { margin-bottom: 0; }
.card .icon {
  width: 64px; height: 64px; border-radius: 50%; background: var(--color-ochre);
  border: var(--border); display: grid; place-items: center; margin-bottom: var(--space-3);
}
.card .icon svg { width: 32px; height: 32px; }
.section-head { margin-bottom: var(--space-6); }
.section-head p { margin-bottom: 0; }

/* ---------- Tags ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: var(--space-4) 0 0; list-style: none; }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-display); font-size: .95rem; letter-spacing: .14em; text-transform: uppercase; line-height: 1;
  padding: 8px 14px; border: var(--border); border-radius: var(--radius-pill); background: var(--color-paper-dark); color: var(--color-ink);
}
.tag.o { background: var(--color-ochre); }
.dark .tag { border-color: var(--color-paper); }

/* ---------- Game feature (home) / game page ---------- */
.feature { display: grid; grid-template-columns: .8fr 1.2fr; gap: var(--space-7); align-items: center; }
@media (max-width: 899px) { .feature { grid-template-columns: 1fr; gap: var(--space-5); } }
.phone {
  position: relative; width: min(300px, 78vw); margin: 0 auto;
  border: 3px solid var(--color-ink); border-radius: 36px; padding: 10px; background: var(--color-ink);
  box-shadow: 8px 8px 0 var(--color-ochre);
}
.dark .phone { border-color: var(--color-paper); }
.phone img { border-radius: 26px; width: 100%; aspect-ratio: 412 / 892; object-fit: cover; }
.phone-wrap { position: relative; }
.phone-wrap::before {
  content: ""; position: absolute; z-index: 0; width: 82%; aspect-ratio: 1; border-radius: 50%;
  background: var(--color-ochre); left: 50%; top: 50%; transform: translate(-50%, -50%);
}
.phone-wrap .phone { z-index: 1; }
.checklist { list-style: none; padding: 0; margin: var(--space-4) 0; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist svg { flex: none; width: 26px; height: 26px; margin-top: 2px; }

.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: var(--space-4);
  overflow-x: auto; padding: 6px 6px var(--space-4); scroll-snap-type: x mandatory;
}
.shots figure { margin: 0; scroll-snap-align: center; }
.shots img {
  border: 3px solid var(--color-ink); border-radius: 24px; box-shadow: var(--shadow-hard);
  aspect-ratio: 412 / 892; object-fit: cover; width: 100%; background: #9fdcf2;
}
.shots figcaption { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .12em; text-align: center; margin-top: 12px; }

.steps { counter-reset: step; }
.steps .card { position: relative; padding-top: var(--space-6); }
.steps .card::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -26px; left: var(--space-4);
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--color-ochre); border: var(--border); box-shadow: 3px 3px 0 var(--color-ink);
  font-family: var(--font-display); font-size: 1.8rem;
}
.steps { row-gap: var(--space-6); }

.critters { border: 3px solid var(--color-ink); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-hard); background: #78f6fd; }
.critters img { width: 100%; }

.store-row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-4); }
.store {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; min-height: 52px;
  border: 2px dashed currentColor; border-radius: var(--radius-md);
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: .08em; line-height: 1.1;
}
.store small { display: block; font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-size: .8rem; opacity: .85; }
.store svg { width: 26px; height: 26px; flex: none; }

/* ---------- About / burrow ---------- */
.burrow { display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--space-6); align-items: center; }
@media (max-width: 899px) { .burrow { grid-template-columns: 1fr; } }
.burrow .badge {
  width: min(320px, 70vw); margin: 0 auto; border-radius: 50%;
  border: 3px solid var(--color-ink); box-shadow: 0 0 0 6px var(--color-paper), 8px 8px 0 6px var(--color-ink);
}
.values { display: grid; gap: var(--space-3); margin: var(--space-4) 0 0; padding: 0; list-style: none; }
.values li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; }
.values strong { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: .06em; font-size: 1.25rem; display: block; line-height: 1.2; }
.values svg { width: 36px; height: 36px; }

/* ---------- Contact band ---------- */
.contact-band { text-align: center; overflow: hidden; }
.contact-band p { margin-left: auto; margin-right: auto; }
.contact-band .actions { justify-content: center; }
.sun {
  position: absolute; z-index: 0; border-radius: 50%; pointer-events: none;
  background: var(--color-ochre); opacity: .14;
}
.contact-band .wrap { position: relative; z-index: 1; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: var(--space-3); }
.faq details {
  background: var(--color-paper-light); border: var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-hard);
}
.faq summary {
  list-style: none; cursor: pointer; padding: 18px var(--space-4); min-height: 44px;
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-3);
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: .04em; font-size: 1.3rem; line-height: 1.15;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--color-ochre); border: 2px solid var(--color-ink); font-family: var(--font-body); font-weight: 800; font-size: 1.3rem; line-height: 1;
  transition: transform .25s var(--ease-pop);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 var(--space-4) var(--space-4); }
.faq .answer p:last-child { margin-bottom: 0; }
.contact-card { display: grid; grid-template-columns: auto 1fr; gap: var(--space-4); align-items: center; }
.contact-card img { width: 96px; height: 96px; border-radius: 50%; border: var(--border); }
@media (max-width: 599px) { .contact-card { grid-template-columns: 1fr; } }
.email { font-family: var(--font-display); font-size: clamp(1.2rem, 4.5vw, 1.6rem); letter-spacing: .04em; overflow-wrap: anywhere; }

/* ---------- Legal pages ---------- */
.legal { padding: var(--space-7) 0 var(--space-8); }
.legal h1 { margin-bottom: var(--space-4); }
.legal h2 { font-size: 1.9rem; margin-top: var(--space-6); }
.legal ul { padding-left: 1.3em; max-width: 65ch; }
.legal li { margin-bottom: 8px; }
.legal li::marker { color: var(--color-ochre-deep); }
.legal .doc { background: var(--color-paper-light); border: var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-hard); padding: var(--space-6) var(--space-5); }
@media (max-width: 599px) { .legal .doc { padding: var(--space-4) var(--space-3); } }
mark.todo { background: var(--color-ochre-light); color: var(--color-ink); padding: 0 4px; border-radius: 4px; }
.draft-note {
  display: flex; gap: 12px; align-items: flex-start; margin-bottom: var(--space-4);
  background: var(--color-paper-dark); border: 2px dashed var(--color-ink); border-radius: var(--radius-md); padding: 14px 18px; font-size: 1rem;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--color-ink); color: var(--color-paper); position: relative; margin-top: -1px; }
.site-footer .top { display: block; width: 100%; height: clamp(36px, 6vw, 70px); background: var(--bg-before, var(--color-paper)); }
.site-footer .wrap { padding-top: var(--space-6); padding-bottom: var(--space-5); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--space-6); }
@media (max-width: 767px) { .foot-grid { grid-template-columns: 1fr 1fr; gap: var(--space-5); } .foot-brand { grid-column: 1 / -1; } }
.foot-word {
  width: 220px; aspect-ratio: 1630 / 410; background: var(--color-paper);
  -webkit-mask: url(assets/wordmark.png) center / contain no-repeat; mask: url(assets/wordmark.png) center / contain no-repeat;
}
.foot-brand p { color: var(--color-paper-dark); font-size: 1rem; margin-top: var(--space-3); }
.site-footer h2 { font-size: 1.1rem; letter-spacing: .3em; color: var(--color-ochre-light); margin-bottom: var(--space-3); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer ul a { text-decoration: none; display: inline-block; padding: 4px 0; }
.site-footer a:hover { color: var(--color-ochre-light); text-decoration: underline; }
.signoff {
  border-top: 1px solid var(--color-ink-soft); margin-top: var(--space-6); padding-top: var(--space-4);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3);
  font-size: .875rem; color: var(--color-paper-dark);
}
.signoff .burrow-line { font-family: var(--font-display); letter-spacing: .2em; text-transform: uppercase; font-size: 1rem; color: var(--color-paper); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .5s ease-out, transform .6s var(--ease-pop); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: opacity .2s ease-out !important; }
  .reveal { transform: none; }
  .btn:hover, .card:hover { transform: none; }
}

/* long email address in the footer must wrap on phones */
.foot-grid > * { min-width: 0; }
.site-footer ul a { overflow-wrap: anywhere; }
