/* ==========================================================================
   TreeShades — design system
   Rooted in simplicity. Built with intention.

   1. Fonts & tokens      5. Header & nav        9. Product pages
   2. Base                6. Home: hero          10. Docs (legal)
   3. Typography          7. Home: apps          11. Support
   4. Layout utilities    8. Home: about         12. Footer, motion, print
   ========================================================================== */

/* 1. Fonts & tokens ------------------------------------------------------- */
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-latin.woff2?v=19f9c92546") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/geist-mono-latin.woff2?v=684ad5b531") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand palette */
  --paper: #F7F7F2;   /* warm off-white */
  --forest: #183B2D;  /* deep forest green */
  --ink: #202320;     /* charcoal */
  --sage: #A5B4A5;    /* muted sage */
  --mist: #E9EAE5;    /* light neutral grey */

  /* Derived */
  --ink-2: #535953;   /* secondary text, 6.7:1 on paper */
  --ink-3: #7C827C;   /* non-text details */
  --line: #DADCD5;    /* hairlines */
  --sage-deep: #5E7F6C; /* the light half of the mark on paper */

  /* Mark colours (overridable per surface) */
  --mark-shade: var(--forest);
  --mark-light: var(--sage-deep);

  /* Accent: forest by default, each product overrides */
  --accent: var(--forest);
  --accent-ink: var(--forest);

  /* App palettes, taken from each app's own design tokens */
  --remi: #E8580C;
  --remi-ink: #B23F00;
  --remi-ground: #EFEDE6;
  --tasko: #2E4BC6;
  --tasko-soft: #DCE3FA;

  /* Type */
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Space & rhythm */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max: 1200px;
  --section: clamp(4.5rem, 10vw, 9rem);
  --header-h: 64px;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --radius: 4px;
}

.theme-remi  { --accent: var(--remi);  --accent-ink: var(--remi-ink); }
.theme-tasko { --accent: var(--tasko); --accent-ink: var(--tasko); }

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  background: var(--paper);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  font-feature-settings: "ss01" 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
main { flex: 1; }
main:focus { outline: none; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--forest); color: var(--paper); }

h1, h2, h3, h4, p, ul, ol, dl, figure { margin: 0; }
ul, ol { padding: 0; }

.skip {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  padding: .6rem 1rem; background: var(--ink); color: var(--paper);
  text-decoration: none; border-radius: var(--radius);
}
.skip:focus { top: .75rem; color: var(--paper); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Placeholder for content still to be provided (set in site.config.json) */
.ph {
  font-family: var(--mono);
  font-size: .85em;
  letter-spacing: -.01em;
  color: var(--forest);
  background: rgba(165, 180, 165, .2);
  border: 1px dashed var(--sage-deep);
  border-radius: 3px;
  padding: .05em .4em;
  white-space: nowrap;
}

/* 3. Typography ------------------------------------------------------------ */
.display {
  font-size: clamp(2.75rem, 1.4rem + 5.8vw, 6.25rem);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.048em;
  text-wrap: balance;
}
.display > span { display: block; }
.display__soft { color: var(--sage-deep); }

.h1 {
  font-size: clamp(2.25rem, 1.5rem + 3.2vw, 4.25rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -.04em;
  text-wrap: balance;
}
.h2 {
  font-size: clamp(1.75rem, 1.3rem + 2vw, 2.875rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.h3 {
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1.3;
}

.lede {
  font-size: clamp(1.125rem, 1rem + .45vw, 1.3125rem);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 36ch;
  letter-spacing: -.01em;
  text-wrap: pretty;
}
.muted { color: var(--ink-2); }

.mono, .label {
  font-family: var(--mono);
  font-feature-settings: "zero" 0;
}
.label {
  display: flex;
  align-items: baseline;
  gap: .9em;
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.label__num { color: var(--accent-ink); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  padding-block: .35em;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: color .25s ease, background-size .35s var(--ease);
}
.link-arrow::after {
  content: "\2192";
  font-family: var(--font);
  transition: transform .35s var(--ease);
}
.link-arrow:hover { color: var(--accent-ink); }
.link-arrow:hover::after { transform: translateX(4px); }

/* 4. Layout utilities ------------------------------------------------------ */
.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  /* viewport-fit=cover: keep content clear of the notch / rounded corners in landscape */
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

.section-head {
  display: grid;
  gap: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}
@media (min-width: 900px) {
  .section-head { grid-template-columns: 3fr 9fr; align-items: baseline; }
}

.app-icon {
  width: 72px; height: 72px;
  border-radius: 22.37%;
  box-shadow: 0 0 0 1px rgba(32, 35, 32, .08);
}
.app-icon--lg { width: 96px; height: 96px; }

/* Phone frame around real app screenshots */
.device {
  position: relative;
  width: 100%;
  max-width: 300px;
  padding: 8px;
  border-radius: 46px;
  background: #121311;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .06) inset,
    0 40px 70px -40px rgba(24, 33, 28, .55);
}
.device img {
  width: 100%;
  border-radius: 38px;
  background: var(--mist);
}

/* 5. Header & nav ---------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 247, 242, .86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.logo:hover { color: var(--ink); }
.logo__mark { width: 26px; height: 26px; flex: none; }
.logo__word { width: 113px; height: 16px; fill: currentColor; }
.mark-shade { fill: var(--mark-shade); }
.mark-light { fill: var(--mark-light); }
.logo .mark-light { transition: fill .4s ease; }
.logo:hover .mark-light { fill: var(--sage); }

.site-nav ul { list-style: none; display: flex; gap: 2.25rem; }
.site-nav a {
  position: relative;
  font-size: .9375rem;
  font-weight: 450;
  color: var(--ink-2);
  text-decoration: none;
  padding-block: .5rem;
  transition: color .2s ease;
}
.site-nav a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: .2rem;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform .35s var(--ease);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 500; }

.menu-btn {
  display: none;
  align-items: center;
  gap: .6rem;
  margin-right: -.5rem;
  padding: .6rem .5rem;
  border: 0;
  background: none;
  color: var(--ink);
  font: 500 .875rem/1 var(--font);
  cursor: pointer;
}
.menu-btn__icon { position: relative; width: 18px; height: 10px; }
.menu-btn__icon i {
  position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
  transition: transform .35s var(--ease), top .35s var(--ease);
}
.menu-btn__icon i:first-child { top: 1px; }
.menu-btn__icon i:last-child { top: 7.5px; }
.menu-btn[aria-expanded="true"] .menu-btn__icon i:first-child { top: 4.25px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__icon i:last-child { top: 4.25px; transform: rotate(-45deg); }

@media (max-width: 719px) {
  .js .menu-btn { display: inline-flex; }
  .js .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
    background: var(--paper);
    padding: 2rem var(--gutter);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .3s ease, transform .3s var(--ease), visibility 0s linear .3s;
  }
  .js .site-nav.is-open {
    opacity: 1; visibility: visible; transform: none;
    transition: opacity .3s ease, transform .3s var(--ease), visibility 0s;
  }
  .js .site-nav ul { flex-direction: column; gap: 0; }
  .js .site-nav li { border-bottom: 1px solid var(--line); }
  .js .site-nav a {
    display: block;
    padding: 1.1rem 0;
    font-size: 1.75rem;
    letter-spacing: -.03em;
    color: var(--ink);
  }
  .js .site-nav a::after { display: none; }
  .js .site-nav a[aria-current="page"] { font-weight: 450; }
  .js .site-nav a[aria-current="page"]::before {
    content: "";
    position: absolute; right: 0; top: 50%;
    width: 6px; height: 6px; margin-top: -3px;
    border-radius: 50%;
    background: var(--forest);
  }
  body.menu-open { overflow: hidden; }

  /* Without JS, keep links visible in a compact row */
  html:not(.js) .site-nav ul { gap: 1rem; }
  html:not(.js) .logo__word { display: none; }
}

/* 6. Home: hero ------------------------------------------------------------ */
.hero { padding-block: clamp(3rem, 8vw, 7rem) var(--section); }
.hero__grid {
  display: grid;
  gap: clamp(3rem, 7vw, 5rem);
  align-items: end;
}
.hero__copy { display: grid; gap: 1.75rem; }
.hero__copy .label { margin-bottom: .25rem; }
.hero__links { margin-top: .5rem; }

.hero__art { width: 100%; max-width: 460px; justify-self: center; }
@media (max-width: 599px) { .hero__art { max-width: 340px; } }
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1.25fr .75fr; }
  .hero__art { justify-self: end; }
}

.split-pine { width: 100%; height: auto; }
.split-pine__shade-field { fill: var(--forest); }
.split-pine__shade { fill: var(--forest); }
.split-pine__light { fill: var(--paper); }
.split-pine__ground { stroke: var(--forest); stroke-width: 1.25; }

.hero__caption {
  display: flex;
  justify-content: space-between;
  margin-top: .9rem;
  font-size: .75rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* The shade slides across the art once, like light moving over a tree */
@media (prefers-reduced-motion: no-preference) {
  .js .split-pine__shade-field {
    transform-box: fill-box;
    transform-origin: left;
    animation: shade-in 1.4s var(--ease) .15s both;
  }
  .js .split-pine__light { animation: fade-in 1s ease .6s both; }
}
@keyframes shade-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* 7. Home: apps ------------------------------------------------------------ */
.apps { padding-bottom: var(--section); }

.app-feature + .app-feature { margin-top: clamp(4rem, 10vw, 8rem); }
.app-feature__grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.app-feature__copy { display: grid; justify-items: start; gap: .5rem; }
.app-feature__name {
  margin-top: 1.5rem;
  font-size: clamp(3.25rem, 2rem + 4.6vw, 6rem);
  font-weight: 500;
  line-height: .95;
  letter-spacing: -.055em;
}
.app-feature__tag {
  font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem);
  letter-spacing: -.02em;
  line-height: 1.3;
}
.app-feature__desc {
  color: var(--ink-2);
  max-width: 34ch;
  margin-bottom: 1rem;
}

@media (min-width: 900px) {
  .app-feature--remi  .app-feature__grid { grid-template-columns: 5fr 7fr; }
  .app-feature--tasko .app-feature__grid { grid-template-columns: 7fr 5fr; }
  .app-feature--tasko .app-feature__copy { padding-left: clamp(0rem, 3vw, 3rem); }
}
@media (max-width: 899px) {
  .app-feature--tasko .app-feature__stage { order: 2; }
}

/* Stages: each app gets a surface drawn from its own design language */
.app-feature__stage,
.product-hero__stage {
  position: relative;
  display: grid;
  place-items: start center;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 5 / 4.4;
  padding-top: clamp(2.5rem, 7%, 4rem);
}
@media (max-width: 599px) {
  .app-feature__stage, .product-hero__stage { aspect-ratio: 4 / 4.6; }
}
.app-feature__stage .device,
.product-hero__stage .device { width: 62%; max-width: 310px; }

/* Remi: its 24-hour day ribbon runs behind the phone; one accent tick marks the next nudge */
.stage-remi {
  background: var(--remi-ground);
  padding-top: clamp(6rem, 19%, 8.5rem);
}
.ribbon {
  position: absolute;
  left: 7%;
  top: clamp(1.75rem, 6.5%, 2.75rem);
  width: 86%;
  overflow: visible;
}
.ribbon__day { stroke: #D3CFC5; stroke-width: 2; }
.ribbon__window { stroke: #D6D1C6; stroke-width: 7; stroke-linecap: round; }
.ribbon__ticks line { stroke: var(--ink); stroke-width: 2.5; }
.ribbon__next { stroke: var(--remi); stroke-width: 3; }
.ribbon__dot { fill: var(--remi); }
.ribbon__labels text { font: 500 12px var(--mono); fill: #8C887E; }

/* Tasko: its 1-2-3 severity dots, in white on Tasko blue. Asymmetric: scale left, phone right */
.stage-tasko {
  background: var(--tasko);
  place-items: start end;
  padding-right: 9%;
}
.stage-tasko .device {
  width: 56%;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset, 0 40px 70px -35px rgba(8, 14, 48, .7);
}
.severity {
  position: absolute;
  left: 8%;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  gap: 1.1rem;
}
.severity__col { display: flex; align-items: center; gap: 5px; }
.severity__col i { width: 7px; height: 7px; border-radius: 50%; background: #fff; flex: none; }
.severity__col b {
  margin-left: .65rem;
  font: 500 .625rem/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .85);
}
.severity__col:nth-child(1) b { margin-left: calc(.65rem + 24px); }
.severity__col:nth-child(2) b { margin-left: calc(.65rem + 12px); }
@media (max-width: 599px) {
  .severity__col b { display: none; }
  .stage-tasko .device { width: 62%; }
}

/* 8. Home: about ----------------------------------------------------------- */
.about { padding-bottom: var(--section); }
.about__grid {
  display: grid;
  gap: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
@media (min-width: 900px) { .about__grid { grid-template-columns: 3fr 9fr; } }
.statement {
  font-size: clamp(1.75rem, 1.15rem + 2.6vw, 3.375rem);
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: -.035em;
  max-width: 24ch;
  text-wrap: balance;
}
.signature {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: clamp(2rem, 5vw, 3.5rem);
  font-family: var(--mono);
  font-size: .8125rem;
  letter-spacing: .02em;
  color: var(--ink-2);
}
.signature__mark { width: 20px; height: 20px; }

/* 9. Product pages --------------------------------------------------------- */
.product-hero { padding-block: clamp(2rem, 5vw, 4rem) var(--section); }
.product-hero__grid { display: grid; gap: clamp(3rem, 6vw, 5rem); align-items: center; }
@media (min-width: 960px) { .product-hero__grid { grid-template-columns: 1fr 1fr; } }
.product-hero__copy { display: grid; justify-items: start; gap: 1.25rem; }
.crumb {
  display: flex; gap: .6em;
  font: 500 .75rem/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 1.5rem;
}
.crumb a { text-decoration: none; padding-block: 1rem; margin-block: -1rem; } /* 44px+ tap target */
.crumb span[aria-hidden] { color: var(--ink-3); }
.product-hero__name {
  margin-top: .5rem;
  font-size: clamp(4rem, 2rem + 8vw, 8.5rem);
  font-weight: 500;
  line-height: .9;
  letter-spacing: -.06em;
}
.product-hero__tag {
  font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem);
  letter-spacing: -.025em;
  line-height: 1.2;
}
.product-hero .lede { max-width: 42ch; margin-bottom: .75rem; }
.product-hero__stage { aspect-ratio: 1 / 1.08; }

/* Store buttons: text-only; disabled until real store URLs are configured */
.stores { display: flex; flex-wrap: wrap; gap: .75rem; }
.store {
  display: inline-grid;
  gap: .15rem;
  min-width: 172px;
  padding: .7rem 1.15rem .75rem;
  border: 1px solid var(--ink);
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
  transition: background-color .25s ease, color .25s ease;
}
.store__k { font: 500 .625rem/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: inherit; opacity: .7; }
.store__v { font-size: 1.0625rem; font-weight: 500; letter-spacing: -.015em; line-height: 1.2; }
a.store:hover { background: var(--ink); color: var(--paper); }
@media (max-width: 479px) {
  /* Two equal buttons side by side on phones instead of a tall stack */
  .stores { display: grid; grid-template-columns: 1fr 1fr; width: 100%; max-width: 380px; gap: .6rem; }
  .store { min-width: 0; padding-inline: .9rem; }
  .store__v { font-size: 1rem; }
}
.store--soon {
  border-style: dashed;
  border-color: var(--ink-3);
  color: var(--ink-2);
  cursor: default;
}

/* Screens rail */
.screens { padding-bottom: var(--section); }
.screens__rail {
  display: flex;
  gap: clamp(1.25rem, 2.5vw, 2rem);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2));
  scroll-padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2));
  padding-bottom: 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.screens__rail:focus-visible { outline-offset: -2px; }
.shot { flex: 0 0 min(68vw, 270px); scroll-snap-align: start; }
.shot .device { max-width: none; border-radius: 40px; padding: 7px; }
.shot .device img { border-radius: 33px; }
.shot figcaption {
  display: flex;
  gap: .75rem;
  margin-top: 1.25rem;
  font-size: .9375rem;
  line-height: 1.45;
  color: var(--ink-2);
  padding-right: 1rem;
}
.shot figcaption .mono { color: var(--accent-ink); font-size: .8125rem; padding-top: .1em; }

/* Features */
.features { padding-bottom: var(--section); }
.feature-list {
  list-style: none;
  counter-reset: feat;
  display: grid;
  gap: 2.5rem clamp(1.5rem, 3vw, 2.5rem);
}
@media (min-width: 640px)  { .feature-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .feature-list { grid-template-columns: repeat(4, 1fr); } }
.feature-list li {
  counter-increment: feat;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}
.feature-list li::before {
  content: counter(feat, decimal-leading-zero);
  display: block;
  margin-bottom: 1.5rem;
  font: 500 .75rem/1 var(--mono);
  color: var(--accent-ink);
}
.feature-list h3 { font-size: 1.125rem; font-weight: 500; letter-spacing: -.02em; line-height: 1.3; margin-bottom: .5rem; }
.feature-list p { font-size: .96875rem; color: var(--ink-2); line-height: 1.55; }

/* Get the app */
.get { padding-bottom: var(--section); }
.get__grid {
  display: grid;
  gap: 2rem;
  align-items: end;
  padding-top: clamp(2rem, 5vw, 3.5rem);
  border-top: 1px solid var(--line);
}
.get .app-icon { width: 64px; height: 64px; margin-bottom: 1.5rem; }
.get .h2 { margin-bottom: .35rem; }
@media (min-width: 800px) {
  .get__grid { grid-template-columns: 1fr auto; }
  .get__actions { justify-items: end; }
}
.get__actions { display: grid; gap: 1.25rem; }
.get__links { display: flex; gap: 1.5rem; font-size: .9375rem; color: var(--ink-2); }

/* 10. Docs (legal) --------------------------------------------------------- */
.doc { padding-block: clamp(2.5rem, 6vw, 5rem) var(--section); }
.doc__grid { display: grid; gap: 2.5rem 4rem; }
.doc__head { display: grid; gap: 1.25rem; padding-bottom: clamp(1.5rem, 4vw, 3rem); border-bottom: 1px solid var(--line); }
.doc__title {
  font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.75rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.045em;
}
.doc__meta { color: var(--ink-2); max-width: 56ch; font-size: 1.0625rem; }
.doc__meta.mono { font-size: .8125rem; letter-spacing: .02em; }

/* Table of contents: a <details> that is always open on desktop and collapsible on phones */
.toc > summary { list-style: none; cursor: default; }
.toc > summary::-webkit-details-marker { display: none; }
.doc__toc ol {
  list-style: none;
  counter-reset: toc;
  display: grid;
  gap: .1rem;
  margin-top: 1rem;
}
.doc__toc li { counter-increment: toc; }
.doc__toc a {
  display: flex;
  gap: .9rem;
  padding: .35rem 0;
  font-size: .9375rem;
  color: var(--ink-2);
  text-decoration: none;
  transition: color .2s ease;
}
.doc__toc a::before {
  content: counter(toc, decimal-leading-zero);
  font: 500 .75rem/1.9 var(--mono);
  color: var(--ink-3);
}
.doc__toc a:hover, .doc__toc a.is-active { color: var(--ink); }
.doc__toc a.is-active::before { color: var(--forest); }

@media (min-width: 1000px) {
  .doc__grid { grid-template-columns: 240px minmax(0, 1fr); }
  .doc__head { grid-column: 1 / -1; }
  .doc__toc { position: sticky; top: calc(var(--header-h) + 2rem); align-self: start; }
}
@media (max-width: 999px) {
  .doc__toc { border-bottom: 1px solid var(--line); }
  .toc > summary {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 48px; padding-block: .75rem;
    cursor: pointer;
  }
  .toc > summary::after {
    content: "+";
    font: 400 1.25rem/1 var(--font);
    letter-spacing: 0;
    color: var(--ink);
    transition: transform .25s var(--ease);
  }
  .toc[open] > summary::after { transform: rotate(45deg); }
  .toc[open] { padding-bottom: 1.5rem; }
  .doc__toc ol { margin-top: .25rem; }
  .doc__toc a { padding: .6rem 0; } /* comfortable tap targets */
}

.prose { max-width: 68ch; color: #343834; }
.prose > * + * { margin-top: 1.1rem; }
.prose__intro { font-size: 1.1875rem; line-height: 1.55; color: var(--ink); letter-spacing: -.01em; }
.prose h2 {
  margin-top: 3.25rem;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.25;
  color: var(--ink);
}
.prose h3 { margin-top: 2rem; font-size: 1.0625rem; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.prose h2 + *, .prose h3 + * { margin-top: .75rem; }
.prose > h2:first-child { margin-top: 0; }
.prose strong { font-weight: 600; color: var(--ink); }
.prose ul { list-style: none; display: grid; gap: .6rem; }
.prose ul li { position: relative; padding-left: 1.4rem; }
.prose ul li::before {
  content: ""; position: absolute; left: 0; top: .8em;
  width: .6rem; height: 1px; background: var(--forest);
}
.prose a { color: var(--forest); }

.steps { list-style: none; counter-reset: step; display: grid; gap: .7rem; }
.steps li { counter-increment: step; position: relative; padding-left: 2.4rem; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: .05rem;
  width: 1.6rem; height: 1.6rem;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font: 500 .75rem/1 var(--mono);
  color: var(--forest);
}
.note {
  font-size: .9375rem;
  color: var(--ink-2);
  padding: 1rem 1.25rem;
  background: var(--mist);
  border-radius: var(--radius);
}
.contact-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.contact-list div {
  display: grid;
  gap: .25rem 1.5rem;
  padding: .9rem 0;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 600px) { .contact-list div { grid-template-columns: 12rem 1fr; } }
.contact-list dt { font: 500 .75rem/1.9 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.contact-list dd { margin: 0; }

/* 11. Support -------------------------------------------------------------- */
.page-intro { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 6rem); }
.page-intro__grid { display: grid; gap: 2.5rem; align-items: end; }
.page-intro .label { margin-bottom: 1.5rem; }
@media (min-width: 900px) { .page-intro__grid { grid-template-columns: 7fr 5fr; } }

.contact-card { display: grid; gap: .75rem; padding-top: 1.25rem; border-top: 2px solid var(--forest); }
.contact-card__email { font-size: clamp(1.25rem, 1rem + 1vw, 1.625rem); letter-spacing: -.02em; font-weight: 500; }
.contact-card .muted { font-size: .9375rem; }

.support-apps { padding-bottom: var(--section); }
.support-apps__grid { display: grid; gap: clamp(3rem, 6vw, 4rem); }
@media (min-width: 900px) { .support-apps__grid { grid-template-columns: 1fr 1fr; } }
.support-app { scroll-margin-top: calc(var(--header-h) + 1.5rem); }
.support-app__head {
  display: flex; align-items: center; gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--ink);
}
.support-app .app-icon { width: 48px; height: 48px; }
.support-app--remi  { --accent-ink: var(--remi-ink); }
.support-app--tasko { --accent-ink: var(--tasko); }

.general-faq { padding-bottom: clamp(3rem, 7vw, 5rem); }

.deletion-strip { padding-bottom: var(--section); }
.deletion-strip__inner {
  display: grid;
  gap: 1rem 4rem;
  align-items: center;
  padding: clamp(1.75rem, 4vw, 2.5rem) clamp(1.25rem, 4vw, 2.5rem);
  background: var(--mist);
  border-radius: var(--radius);
}
.deletion-strip__inner p { color: var(--ink-2); max-width: 52ch; }
.deletion-strip__inner p + p { margin-top: 1rem; }
@media (min-width: 900px) { .deletion-strip__inner { grid-template-columns: 5fr 7fr; } }
.general-faq__grid { display: grid; gap: 2rem 4rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.general-faq .label { margin-bottom: 1.25rem; }
@media (min-width: 900px) { .general-faq__grid { grid-template-columns: 5fr 7fr; } }

.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 1.15rem 2.5rem 1.15rem 0;
  font-weight: 500;
  letter-spacing: -.015em;
  line-height: 1.4;
  transition: color .2s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent-ink); }
.faq summary::before, .faq summary::after {
  content: "";
  position: absolute; right: .25rem; top: 50%;
  width: 12px; height: 1.5px; margin-top: -.75px;
  background: currentColor;
  transition: transform .35s var(--ease);
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq details > div { display: grid; gap: .75rem; padding: 0 2.5rem 1.4rem 0; color: var(--ink-2); font-size: 1rem; }
.faq details > div a { color: var(--forest); }
@media (prefers-reduced-motion: no-preference) {
  .faq details[open] > div { animation: fade-in .45s ease; }
}

/* 404 */
.notfound { padding-block: clamp(4rem, 12vw, 10rem); }
.notfound__grid { display: grid; gap: 2.5rem; align-items: center; }
.notfound__grid > div { display: grid; gap: 1.25rem; justify-items: start; }
.notfound__mark { width: clamp(96px, 18vw, 180px); height: auto; }
@media (min-width: 800px) { .notfound__grid { grid-template-columns: auto 1fr; gap: 5rem; } }

/* 12. Footer --------------------------------------------------------------- */
.site-footer {
  --mark-shade: var(--paper);
  --mark-light: var(--sage);
  --accent-ink: var(--paper);
  background: var(--forest);
  color: rgba(247, 247, 242, .74);
  padding-block: clamp(3.5rem, 8vw, 6rem) max(2rem, env(safe-area-inset-bottom));
  font-size: .9375rem;
}
.site-footer .logo { color: var(--paper); }
.site-footer .logo:hover .mark-light { fill: var(--paper); }
.site-footer__top {
  display: grid;
  gap: 1.5rem;
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}
@media (min-width: 800px) {
  .site-footer__top { grid-template-columns: 1fr auto; align-items: start; }
}
.logo--footer .logo__mark { width: 32px; height: 32px; }
.logo--footer .logo__word { width: 141px; height: 20px; }
.site-footer__motto {
  font-size: clamp(1.25rem, 1rem + 1vw, 1.625rem);
  letter-spacing: -.025em;
  line-height: 1.25;
  color: var(--paper);
}
@media (min-width: 800px) { .site-footer__motto { text-align: right; } }

.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  padding-block: 2rem;
  border-top: 1px solid rgba(247, 247, 242, .16);
}
@media (min-width: 700px) { .site-footer__cols { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .site-footer__cols { grid-template-columns: 3fr 3fr 3fr 3fr; } .site-footer__cols nav:first-child { grid-column: 2; } }
.site-footer .label { color: var(--sage); margin-bottom: 1rem; }
.site-footer ul { list-style: none; display: grid; gap: .5rem; }
.site-footer a { text-decoration: none; transition: color .2s ease; }
.site-footer a:hover { color: var(--paper); }
.site-footer__cols a { color: rgba(247, 247, 242, .82); }

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(247, 247, 242, .16);
  font-size: .8125rem;
  color: rgba(247, 247, 242, .6);
}
.site-footer__base .mono { letter-spacing: .06em; text-transform: uppercase; font-size: .75rem; }

/* Motion -------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .9s ease, transform .9s var(--ease);
    transition-delay: var(--delay, 0s);
  }
  .js .reveal.is-in { opacity: 1; transform: none; }

  /* Gentle cross-page fade (supported browsers) */
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: .22s ease both vt-out; }
  ::view-transition-new(root) { animation: .32s ease both vt-in; }
}
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }

/* Print ---------------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .doc__toc, .skip { display: none; }
  body { background: #fff; color: #000; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
