/* ==========================================================================
   Why Not Sell It — shared brand layer
   Sibling of the Why Not Own It design system. Same tokens, same type,
   same accent discipline (ONE accent, CTA only). Sell It leans darker:
   the dusk garage is the front door, so night is the home key.
   ========================================================================== */

/* ---------- fonts (self-hosted, same files as Own It) ---------- */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-latin-var.woff2") format("woff2-variations");
  font-weight: 200 800; font-display: swap; font-style: normal;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin-var.woff2") format("woff2-variations");
  font-weight: 100 900; font-display: swap; font-style: normal;
}
@font-face {
  font-family: "Modak";
  src: url("/assets/fonts/modak-latin-400.woff2") format("woff2");
  font-weight: 400; font-display: swap; font-style: normal;
}

:root {
  /* ---- colour: identical family tokens ---- */
  --navy: #0b1c33;
  --navy-deep: #071426;
  --navy-soft: #12294a;
  --ink: #1a2333;
  --ink-soft: #4c5a70;
  --paper: #ffffff;
  --cream: #f7f5f0;
  --line: #e6e2d9;
  --accent: #ff8a1e;            /* CTA ONLY — never decorative */
  --accent-deep: color-mix(in srgb, var(--accent) 82%, black);
  --accent-soft: color-mix(in srgb, var(--accent) 12%, white);
  --green: #178a4c;
  --green-soft: color-mix(in srgb, var(--green) 12%, white);
  --gold: color-mix(in srgb, var(--accent) 62%, white 38%);

  /* ---- Sell It's own night extension of the dusk world ---- */
  --dusk-sky-hi: #0a1a33;
  --dusk-sky-lo: #2a2450;
  --dusk-violet: #4a3468;
  --dusk-coral: #e8734a;
  --dusk-amber: #f2a03d;
  --tungsten: #ffc06a;          /* the work lamp */
  --tungsten-hot: #fff0d0;
  --concrete: #2b2c31;
  --concrete-lit: #55524c;
  --eucalypt: #3f5d42;

  /* ---- type ---- */
  --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-shout: "Modak", "Bricolage Grotesque", system-ui, sans-serif;
  --fs-hero: clamp(2.4rem, 6.2vw + 0.5rem, 4.4rem);
  --fs-h2: clamp(1.7rem, 3.4vw + 0.5rem, 2.7rem);
  --fs-h3: clamp(1.2rem, 1.6vw + 0.5rem, 1.5rem);
  --fs-body: clamp(1rem, 0.4vw + 0.9rem, 1.125rem);
  --fs-small: 0.875rem;

  /* ---- shape + depth ---- */
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 3px rgb(11 28 51 / 0.08);
  --shadow-md: 0 8px 30px rgb(11 28 51 / 0.10);
  --shadow-lg: 0 20px 60px rgb(11 28 51 / 0.16);

  /* ---- layout ---- */
  --wrap: 1160px;
  --gap: clamp(1rem, 2.5vw, 2rem);
  --section: clamp(4rem, 9vw, 7.5rem);
  --header-h: 62px;
}

/* Display-P3 accent on wide-gamut screens, same trick as Own It */
@media (color-gamut: p3) {
  :root { --accent: color(display-p3 1 0.55 0.14); }
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.022em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-hero); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); letter-spacing: -0.012em; }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

::selection { background: var(--accent); color: #fff; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.skip-link {
  position: absolute; left: 50%; translate: -50% -120%;
  z-index: 200; background: var(--accent); color: #fff;
  padding: 0.7rem 1.2rem; border-radius: 0 0 12px 12px; font-weight: 600;
  transition: translate 0.18s ease;
}
.skip-link:focus { translate: -50% 0; }

/* ---------- layout primitives ---------- */
.wrap { width: min(100% - 2 * var(--gap), var(--wrap)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2 * var(--gap), 760px); margin-inline: auto; }
.section { padding-block: var(--section); position: relative; }
.section--cream { background: var(--cream); }
.section--paper { background: var(--paper); }
.section--dark { background: var(--navy); color: #f4f6fa; }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }
.section--dark p { color: #c9d3e2; }

.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--ink-soft); font-size: clamp(1.02rem, 0.6vw + 0.95rem, 1.2rem); }
.section--dark .section-head p { color: #b8c4d6; }

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-soft);
  margin: 0 0 0.9rem; display: flex; align-items: center; gap: 0.6rem;
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; background: var(--accent); border-radius: 2px;
  flex: none;
}
.center .eyebrow { justify-content: center; }
.section--dark .eyebrow { color: #94a6c0; }

/* ---------- buttons ---------- */
.btn {
  --btn-bg: var(--accent);
  --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  padding: 0.95rem 1.6rem;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 0; border-radius: 999px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.02rem;
  letter-spacing: -0.01em; text-decoration: none; cursor: pointer;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 35%, transparent);
  transition: transform 0.16s cubic-bezier(.2,.9,.3,1.2), box-shadow 0.2s ease, background 0.2s ease;
  min-height: 48px;
  touch-action: manipulation;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 42%, transparent); }
.btn:active { transform: translateY(0) scale(0.985); }
.btn--ghost {
  --btn-bg: transparent; --btn-fg: var(--ink);
  border: 2px solid color-mix(in srgb, var(--ink) 18%, transparent);
  box-shadow: none;
}
.btn--ghost:hover { box-shadow: none; border-color: color-mix(in srgb, var(--ink) 34%, transparent); background: color-mix(in srgb, var(--ink) 4%, transparent); }
.section--dark .btn--ghost { --btn-fg: #fff; border-color: rgb(255 255 255 / 0.28); }
.section--dark .btn--ghost:hover { background: rgb(255 255 255 / 0.08); border-color: rgb(255 255 255 / 0.5); }
.btn--lg { padding: 1.1rem 2rem; font-size: 1.1rem; }
@media (prefers-reduced-motion: reduce) {
  .btn, .btn:hover, .btn:active { transform: none; transition: none; }
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  height: var(--header-h);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--cream) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  view-transition-name: site-header;
}
.site-header--over {
  background: linear-gradient(to bottom, rgb(4 8 16 / 0.55), rgb(4 8 16 / 0.12) 70%, transparent);
  backdrop-filter: none; -webkit-backdrop-filter: none;
  border-bottom-color: rgb(255 255 255 / 0.10);
  color: #fff;
}
body.has-garage .site-header { position: fixed; left: 0; right: 0; top: 0; }
.site-header .wrap { display: flex; align-items: center; gap: 1rem; width: min(100% - 2rem, calc(var(--wrap) + 40px)); }

.brandmark {
  display: inline-flex; align-items: baseline; gap: 0.34rem;
  font-family: var(--font-display); font-weight: 800; font-size: 1.06rem;
  letter-spacing: -0.03em; text-decoration: none; white-space: nowrap;
}
.brandmark b { font-weight: 800; }
.brandmark .brandmark__why { opacity: 0.62; font-weight: 600; }
.brandmark .brandmark__dot { color: var(--accent); }

.nav { margin-left: auto; display: flex; align-items: center; gap: 0.3rem; }
.nav a {
  padding: 0.5rem 0.8rem; border-radius: 999px; text-decoration: none;
  font-size: 0.94rem; font-weight: 500; opacity: 0.82;
  transition: opacity 0.15s ease, background 0.15s ease;
}
.nav a:hover { opacity: 1; background: color-mix(in srgb, currentColor 8%, transparent); }
.nav a[aria-current="page"] { opacity: 1; font-weight: 700; }
.nav .btn { margin-left: 0.5rem; padding: 0.6rem 1.15rem; font-size: 0.95rem; min-height: 42px; }
@media (max-width: 860px) { .nav__links { display: none; } }

.nav-toggle {
  display: none; margin-left: auto;
  width: 44px; height: 44px; border-radius: 12px;
  background: transparent; border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  cursor: pointer; align-items: center; justify-content: center;
}
@media (max-width: 860px) { .nav-toggle { display: inline-flex; } .nav { margin-left: 0; } }
.nav-toggle span { display: block; width: 18px; height: 2px; background: currentColor; box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor; }

/* mobile sheet */
.mobile-menu {
  position: fixed; inset: 0; z-index: 90;
  background: var(--navy); color: #fff;
  display: grid; place-content: center; gap: 0.4rem; text-align: center;
  clip-path: circle(0% at calc(100% - 42px) 32px);
  transition: clip-path 0.5s cubic-bezier(.65,0,.35,1);
  pointer-events: none;
}
.mobile-menu[data-open="true"] { clip-path: circle(150% at calc(100% - 42px) 32px); pointer-events: auto; }
.mobile-menu a {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.8rem, 7vw, 2.6rem); letter-spacing: -0.03em;
  text-decoration: none; padding: 0.28rem 1rem; color: #fff;
}
.mobile-menu a:hover { color: var(--accent); }
.mobile-menu .btn { margin-top: 1.4rem; justify-self: center; }
.mobile-menu__close {
  position: absolute; top: 18px; right: 18px; width: 46px; height: 46px;
  border-radius: 50%; border: 1px solid rgb(255 255 255 / 0.3);
  background: transparent; color: #fff; font-size: 1.3rem; cursor: pointer;
}
@media (prefers-reduced-motion: reduce) { .mobile-menu { transition: none; } }

/* ---------- cards / grid ---------- */
.grid { display: grid; gap: var(--gap); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 2.4vw, 2rem);
  box-shadow: var(--shadow-sm);
}
.section--dark .card {
  background: color-mix(in srgb, #fff 6%, transparent);
  border-color: rgb(255 255 255 / 0.12);
  color: #e8eefa;
  box-shadow: none;
}
.card__num {
  font-family: var(--font-display); font-weight: 800;
  font-size: 2.4rem; line-height: 1; color: var(--accent);
  letter-spacing: -0.04em; margin-bottom: 0.6rem;
}

/* blueprint accent — used in exactly three trust zones, as on Own It */
.blueprint {
  background-image:
    linear-gradient(color-mix(in srgb, var(--navy) 7%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--navy) 7%, transparent) 1px, transparent 1px);
  background-size: 26px 26px;
}

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.2,.7,.3,1); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-deep); color: #b9c6da; padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; }
.site-footer a { color: #dce5f2; text-decoration: none; opacity: 0.85; }
.site-footer a:hover { opacity: 1; color: #fff; text-decoration: underline; }
.site-footer h4 { color: #fff; font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 0.9rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; font-size: 0.94rem; }
.footer-legal {
  margin-top: 2.6rem; padding-top: 1.6rem;
  border-top: 1px solid rgb(255 255 255 / 0.1);
  font-size: 0.82rem; color: #8698b3;
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; align-items: center;
}
.footer-family {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.35rem 0.8rem; border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 0.16); font-size: 0.8rem;
}

/* ---------- misc shared bits ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.4rem 0.85rem; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent-deep); font-size: 0.82rem; font-weight: 700;
  font-family: var(--font-display); letter-spacing: 0.01em;
}
.section--dark .pill { background: rgb(255 255 255 / 0.1); color: #ffd9ae; }

.licence-strip {
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; align-items: center;
  font-size: 0.88rem; color: var(--ink-soft);
}
.licence-strip strong { color: var(--ink); }
.section--dark .licence-strip { color: #b8c4d6; }
.section--dark .licence-strip strong { color: #fff; }

details.faq {
  border-bottom: 1px solid var(--line); padding: 1.1rem 0;
}
details.faq summary {
  cursor: pointer; list-style: none; font-family: var(--font-display);
  font-weight: 700; font-size: 1.06rem; display: flex; gap: 1rem; align-items: flex-start;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+"; margin-left: auto; font-size: 1.4rem; line-height: 1;
  color: var(--accent); transition: rotate 0.2s ease; flex: none;
}
details.faq[open] summary::after { rotate: 45deg; }
details.faq > div { padding-top: 0.7rem; color: var(--ink-soft); max-width: 68ch; }
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
  details.faq::details-content {
    block-size: 0; overflow: hidden;
    transition: block-size 0.32s ease, content-visibility 0.32s allow-discrete;
  }
  details.faq[open]::details-content { block-size: auto; }
}

/* view transitions, matching Own It's app-like page changes */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
