/* ──────────────────────────────────────────────────────────────────────────
   Load'Em
   Palette is taken from the app's own AppColors so the site and the product
   read as one thing: warm gunmetal ground, copper and brass accents.
   Dark-first, because the app is dark-first.
   ────────────────────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/hanken-grotesk-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/hanken-grotesk-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Dark is the default; light is the override. */
:root {
  --ground:    #141311;
  --surface:   #1E1D1A;
  --surface-2: #2A2825;
  --line:      #38342D;
  --line-soft: #262320;
  --ink:       #EDE9E1;
  --ink-mid:   #B2ABA0;
  --ink-low:   #999184;
  --accent:    #C08252;
  --accent-2:  #D2B890;
  --brass:     #D4AF37;
  --on-accent: #17140F;
  --shadow:    0 1px 2px rgba(0,0,0,.45), 0 12px 32px -16px rgba(0,0,0,.7);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --ground:    #F2EDE4;
    --surface:   #FBF8F2;
    --surface-2: #EAE3D6;
    --line:      #D6CCBA;
    --line-soft: #E5DCCC;
    --ink:       #201B15;
    --ink-mid:   #564E43;
    --ink-low:   #6B6253;
    --accent:    #8A4F23;
    --accent-2:  #6E4E28;
    --brass:     #7C600E;
    --on-accent: #FFFFFF;
    --shadow:    0 1px 2px rgba(60,45,25,.07), 0 12px 32px -18px rgba(60,45,25,.3);
  }
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { width: min(68rem, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(44rem, 100% - 2.5rem); margin-inline: auto; }

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-2); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 2px; }
img { max-width: 100%; height: auto; display: block; }

/* ── Header ─────────────────────────────────────────────────────────────── */
header.site {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
header.site .bar {
  display: flex; align-items: center; gap: 1.25rem;
  padding: .8rem 0; width: min(68rem, 100% - 2.5rem); margin-inline: auto;
}
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800;
         letter-spacing: -.02em; color: var(--ink); text-decoration: none; font-size: 1.06rem; }
.brand img { width: 28px; height: 28px; border-radius: 5px; }
header.site nav { margin-left: auto; display: flex; align-items: center; gap: 1.4rem; }
header.site nav a:not(.btn) { color: var(--ink-mid); text-decoration: none;
                              font-size: .94rem; font-weight: 500; }
header.site nav a:not(.btn):hover { color: var(--ink); }
/* ── Mobile navigation ──────────────────────────────────────────────────── */
/* A checkbox rather than <details>, so the menu needs no JavaScript and every
   link stays in the markup for crawlers. The checkbox is visually hidden but
   NOT `hidden`: `hidden` drops it out of the tab order, which would leave the
   burger unusable by keyboard. */
.navtoggle {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.burger { display: none; }

@media (max-width: 46rem) {
  header.site .bar { flex-wrap: wrap; }

  .burger {
    display: flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; margin-left: auto; cursor: pointer;
    border: 1px solid var(--line); border-radius: 9px; background: var(--surface);
  }
  .burger:hover { border-color: var(--accent); }
  /* Focus lands on the hidden checkbox, so show the ring on the visible box. */
  .navtoggle:focus-visible ~ .burger { outline: 2px solid var(--brass); outline-offset: 3px; }

  /* Three bars from one element: no icon font, no SVG. */
  .bars, .bars::before, .bars::after {
    display: block; width: 18px; height: 2px;
    background: var(--ink); border-radius: 2px;
  }
  .bars { position: relative; }
  .bars::before, .bars::after { content: ""; position: absolute; left: 0; }
  .bars::before { top: -6px; }
  .bars::after  { top: 6px; }
  .navtoggle:checked ~ .burger .bars { background: transparent; }
  .navtoggle:checked ~ .burger .bars::before { top: 0; transform: rotate(45deg); }
  .navtoggle:checked ~ .burger .bars::after  { top: 0; transform: rotate(-45deg); }
  @media (prefers-reduced-motion: no-preference) {
    .bars, .bars::before, .bars::after { transition: transform .18s ease, top .18s ease, background .18s ease; }
  }

  header.site nav { display: none; }
  .navtoggle:checked ~ nav {
    display: flex; flex-direction: column; align-items: stretch;
    gap: 0; width: 100%; margin: .75rem 0 0;
    border-top: 1px solid var(--line);
  }
  .navtoggle:checked ~ nav a:not(.btn) {
    padding: .85rem .15rem; font-size: 1rem;
    border-bottom: 1px solid var(--line-soft);
  }
  /* The CTA reads as a button at the foot of the list rather than a pill
     stranded on its own row. */
  .navtoggle:checked ~ nav a.btn {
    margin-top: .9rem; border-bottom: 0; border-radius: 9px;
    text-align: center; padding: .85rem !important; white-space: nowrap;
  }
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .78rem 1.4rem; border-radius: 7px; font-weight: 700; font-size: .98rem;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform .12s ease, background-color .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-2); color: var(--on-accent); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

/* ── Type ───────────────────────────────────────────────────────────────── */
h1, h2, h3 { line-height: 1.1; letter-spacing: -.025em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.3rem, 6vw, 3.7rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.15rem); font-weight: 750; }
h3 { font-size: 1.14rem; font-weight: 700; letter-spacing: -.015em; }
p { text-wrap: pretty; }
.lede { font-size: 1.18rem; color: var(--ink-mid); max-width: 40rem; }
.eyebrow {
  font-size: .74rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 .9rem;
}
.muted { color: var(--ink-mid); }
.small { font-size: .9rem; }

/* ── Sections ───────────────────────────────────────────────────────────── */
section { padding-block: clamp(3.5rem, 8vw, 6rem); }
section.tint { background: var(--surface); border-block: 1px solid var(--line-soft); }
.section-head { max-width: 40rem; margin-bottom: 2.75rem; }
.section-head p { margin: .7rem 0 0; color: var(--ink-mid); }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero { padding-block: clamp(3.5rem, 9vw, 6.5rem) clamp(3rem, 7vw, 5rem); }
.hero-grid { display: grid; gap: clamp(2.5rem, 6vw, 4rem); align-items: center;
             grid-template-columns: 1fr; }
@media (min-width: 60rem) { .hero-grid { grid-template-columns: 1.05fr .95fr; } }
.hero h1 { margin-bottom: 1.1rem; }
.hero .lede { margin: 0 0 1.9rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-note { margin-top: 1.1rem; font-size: .88rem; color: var(--ink-low); }

.shots { position: relative; display: grid; grid-template-columns: repeat(3, 1fr);
         gap: .7rem; align-items: end; }
.shots img { border-radius: 12px; border: 1px solid var(--line);
             box-shadow: var(--shadow); }
.shots img:nth-child(2) { transform: translateY(-1.4rem); }
@media (prefers-reduced-motion: reduce) { .shots img:nth-child(2) { transform: none; } }

/* ── Feature grid ───────────────────────────────────────────────────────── */
.grid { display: grid; gap: 1.1rem;
        grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 1.5rem 1.6rem; display: grid; gap: .55rem; align-content: start;
}
section.tint .card { background: var(--ground); }
.card h3 { color: var(--ink); }
.card p { margin: 0; color: var(--ink-mid); font-size: .96rem; }
.card .ico { font-size: 1.3rem; line-height: 1; color: var(--accent); }

/* ── Highlight band (the licence wedge) ─────────────────────────────────── */
.band {
  background: var(--surface-2); border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px; padding: clamp(1.6rem, 4vw, 2.4rem);
  display: grid; gap: 1rem; align-items: center;
}
@media (min-width: 52rem) { .band { grid-template-columns: 1.4fr 1fr; gap: 2.5rem; } }
.band h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); }
.band p { margin: .6rem 0 0; color: var(--ink-mid); }
.band ul { margin: .4rem 0 0; padding-left: 1.1rem; color: var(--ink-mid); }
.band li { margin-block: .35rem; }

/* ── Screenshot showcase ────────────────────────────────────────────────── */
.showcase { display: grid; gap: 2.5rem; }
.showcase-item { display: grid; gap: 1.6rem; align-items: center; }
@media (min-width: 56rem) {
  .showcase-item { grid-template-columns: 1fr 1.25fr; gap: 3rem; }
  .showcase-item:nth-child(even) > div:first-child { order: 2; }
}
.showcase-item img { border-radius: 10px; border: 1px solid var(--line); box-shadow: var(--shadow); }

/* ── Platform list ──────────────────────────────────────────────────────── */
.platforms { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }
.platform {
  font-size: .86rem; color: var(--ink-mid); background: var(--surface);
  border: 1px solid var(--line); border-radius: 100px; padding: .35rem .9rem;
}

/* ── Pricing ────────────────────────────────────────────────────────────── */
.plans { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
         max-width: 46rem; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
        padding: 1.8rem; display: grid; gap: .5rem; align-content: start; position: relative; }
.plan.featured { border-color: var(--accent); }
.plan .tag {
  position: absolute; top: -.7rem; right: 1.2rem; background: var(--accent);
  color: var(--on-accent); font-size: .7rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; padding: .25rem .6rem; border-radius: 4px;
}
.price { font-size: 2.4rem; font-weight: 800; letter-spacing: -.03em; color: var(--ink);
         font-variant-numeric: tabular-nums; }
.price span { font-size: 1rem; font-weight: 500; color: var(--ink-low); letter-spacing: 0; }
.plan ul { list-style: none; margin: 1rem 0 1.4rem; padding: 0; display: grid; gap: .5rem; }
.plan li { padding-left: 1.5rem; position: relative; color: var(--ink-mid); font-size: .95rem; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.plan .btn { margin-top: auto; }

/* ── Prose (guides, legal) ──────────────────────────────────────────────── */
.prose { max-width: 42rem; }
.prose h2 { margin: 2.6rem 0 .8rem; font-size: 1.5rem; }
.prose h3 { margin: 2rem 0 .6rem; }
.prose p, .prose li { color: var(--ink-mid); }
.prose li { margin-block: .4rem; }
.prose strong { color: var(--ink); font-weight: 650; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .94rem; }
.prose th, .prose td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line); }
.prose th { color: var(--ink); font-weight: 700; }
.prose td { color: var(--ink-mid); }
.table-scroll { overflow-x: auto; }
.callout {
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--brass);
  border-radius: 8px; padding: 1.1rem 1.3rem; margin: 1.8rem 0;
}
.callout p { margin: 0; }

/* ── Guide cards ────────────────────────────────────────────────────────── */
.guide-list { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.guide-list a {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 1.4rem 1.5rem; text-decoration: none; display: grid; gap: .4rem;
}
.guide-list a:hover { border-color: var(--accent); }
.guide-list h3 { color: var(--ink); }
.guide-list p { margin: 0; color: var(--ink-mid); font-size: .93rem; }

/* ── Calculator tool ────────────────────────────────────────────────────── */
.calc { display: grid; gap: 1.6rem; }
@media (min-width: 54rem) { .calc { grid-template-columns: 20rem 1fr; align-items: start; } }
.calc-fields { background: var(--surface); border: 1px solid var(--line);
               border-radius: 10px; padding: 1.4rem; display: grid; gap: .9rem; }
.field { display: grid; gap: .3rem; }
.field label { font-size: .84rem; color: var(--ink-mid); font-weight: 600; }
.field input, .field select {
  background: var(--ground); color: var(--ink); border: 1px solid var(--line);
  border-radius: 6px; padding: .55rem .7rem; font: inherit; font-size: .95rem;
  font-variant-numeric: tabular-nums; width: 100%;
}
.calc-out { background: var(--surface); border: 1px solid var(--line);
            border-radius: 10px; padding: 1.4rem; overflow-x: auto; }
.calc-out table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums;
                  font-size: .93rem; }
.calc-out th, .calc-out td { padding: .45rem .7rem; text-align: right; border-bottom: 1px solid var(--line-soft); }
.calc-out th:first-child, .calc-out td:first-child { text-align: left; }
.calc-out th { color: var(--ink); font-weight: 700; font-size: .8rem;
               text-transform: uppercase; letter-spacing: .06em; }
.calc-out td { color: var(--ink-mid); }
.calc-out tr.node td { color: var(--accent); font-weight: 600; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
footer.site { border-top: 1px solid var(--line); padding: 3rem 0 4rem; margin-top: 2rem; }
footer.site .cols { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
footer.site h2 { margin: 0 0 .7rem; font-size: .78rem; text-transform: uppercase;
                 letter-spacing: .12em; color: var(--ink-low); font-weight: 700; }
footer.site ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
footer.site a { color: var(--ink-mid); text-decoration: none; font-size: .94rem; }
footer.site a:hover { color: var(--accent); }
footer.site .fine { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line-soft);
                    color: var(--ink-low); font-size: .86rem; }

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--accent);
  color: var(--on-accent); padding: .6rem 1rem; border-radius: 0 0 6px 0; z-index: 50;
  text-decoration: none; font-weight: 700;
}
.skip:focus { left: 0; }

/* ── Store buttons ──────────────────────────────────────────────────────── */
.stores { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }
.store {
  display: inline-flex; align-items: center; gap: .6rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: .6rem 1rem; text-decoration: none; color: var(--ink);
  transition: border-color .15s ease;
}
.store:hover { border-color: var(--accent); color: var(--ink); }
.store svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.store span { display: grid; line-height: 1.15; }
.store .k { font-size: .68rem; color: var(--ink-low); letter-spacing: .04em; }
.store .v { font-size: .93rem; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .store { transition: none; } }

/* ── Centred single-purpose pages (404, welcome) ────────────────────────── */
.centre { min-height: 62vh; display: grid; place-items: center; text-align: center; }
.centre .inner { max-width: 34rem; }
.centre h1 { margin-bottom: .8rem; }
.centre p { color: var(--ink-mid); }
.centre .cta-row { justify-content: center; margin-top: 1.8rem; }
.big-mark { font-size: 3rem; line-height: 1; color: var(--accent); margin-bottom: 1rem; }
