/* Room Designer 3D — blueprint theme: cool slate and electric blue, with teal highlights.
   Everything is driven by the tokens in :root below: colours (with a dark
   theme), a small type scale and a spacing scale. Change a token to re-theme
   the whole site. Hero, dark bands and the footer stay dark in both themes. */

/* Fonts are self-hosted (fonts/, latin subset, variable weight) so no
   third-party request is made on page load. Licences: fonts/OFL-*.txt. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/space-grotesk-latin.woff2") format("woff2");
}

:root {
  color-scheme: light;

  /* Colours: page (light theme) */
  --color-bg: #f5f7fb;
  --color-surface: #ffffff;
  --color-surface-alt: #eef2fa;
  --color-ink: #0f172a;
  --color-ink-soft: #334155;
  --color-muted: #5b6678;
  --color-line: #e2e8f0;
  --color-line-strong: #c3cddb;
  --color-accent: #14b8a6; /* decorative only (rules, bars) */
  --color-accent-text: #2445d6; /* accent-coloured text and links on light surfaces */
  --color-accent-bright: #3355f0; /* button fills (white text) */
  --color-accent-hover: #2445d6;
  --color-danger: #c2283c;
  --color-danger-ink: #fff;
  --color-notice-bg: #fff7e0; /* amber notice band (owner preview) */
  --color-notice-line: #e9c46a;
  --color-notice-ink: #4a3500;
  --color-success: #0f7a5c;
  --color-selected-bg: #2445d6;
  --color-selected-ink: #ffffff;
  --color-focus: #2445d6;

  /* Colours: always-dark areas (hero, dark bands, footer, total bands) */
  --color-dark: #0a1024;
  --color-dark-soft: #131c3a;
  --color-on-dark: #ffffff;
  --color-on-dark-soft: #c9d3ea;
  --color-on-dark-muted: #9fabc6;
  --color-on-dark-line: rgba(148, 170, 255, 0.18);
  --color-focus-on-dark: #5eead4;
  --color-highlight-on-dark: #5eead4; /* teal accents on navy: eyebrows, current menu item, nav underline */

  /* Type scale (9 sizes; nothing smaller than 12px, and the two below 14px
     are for the designer's dense chips, badges and Riley's lines only) */
  --fs-2xs: 0.75rem; /* 12px — tags, a chip's caption, Riley's name */
  --fs-xs: 0.8125rem; /* 13px — labels on the 3D room, counts, Riley's lines */
  --fs-sm: 0.875rem; /* 14px — captions, labels, fine print */
  --fs-base: 1rem; /* 16px — body */
  --fs-md: 1.125rem; /* 18px — lead text, small headings */
  --fs-lg: 1.375rem; /* 22px — card and section sub-headings */
  --fs-xl: 1.75rem; /* 28px — totals, page sub-titles */
  --fs-2xl: clamp(1.9rem, 3.2vw, 2.6rem); /* section titles */
  --fs-3xl: clamp(2.5rem, 5.5vw, 4.4rem); /* hero */
  --fs-3xl-beside: clamp(2.5rem, 4.3vw, 3.9rem); /* the hero headline beside a picture */

  /* Spacing scale (the two half steps are for the designer's dense chips) */
  --space-05: 2px;
  --space-15: 6px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 120px;
  --gutter: var(--space-6);

  --radius-sm: 6px; /* chips, tags, small controls */
  --radius: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --shadow: 0 24px 48px -20px rgba(15, 23, 42, 0.22);
  --shadow-soft: 0 12px 32px -16px rgba(15, 23, 42, 0.16);
  --max-width: 1180px;
  --content-width: 760px;
  --app-width: 920px; /* the one column the signed-in pages share (account, My projects, a project) */
  --header-height: 88px; /* the fixed header: what pages leave room for at the top */
  --tap: 44px;
  --font-display: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Dark theme: follows the device unless Light is chosen, or is forced by Dark. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --color-bg: #0b1122;
    --color-surface: #121a30;
    --color-surface-alt: #18223d;
    --color-ink: #eef2ff;
    --color-ink-soft: #cdd6ea;
    --color-muted: #9aa6c0;
    --color-line: #24304f;
    --color-line-strong: #3a4970;
    --color-accent-text: #8ea6ff;
    --color-danger: #ff8094;
    --color-danger-ink: #0b1122;
    --color-success: #5fd4ae;
    --color-selected-bg: #8ea6ff;
    --color-selected-ink: #0b1122;
    --color-focus: #8ea6ff;
    --color-dark: #070b18;
    --color-dark-soft: #0f1630;
    --shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.6);
    --shadow-soft: 0 12px 32px -16px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --color-bg: #0b1122;
  --color-surface: #121a30;
  --color-surface-alt: #18223d;
  --color-ink: #eef2ff;
  --color-ink-soft: #cdd6ea;
  --color-muted: #9aa6c0;
  --color-line: #24304f;
  --color-line-strong: #3a4970;
  --color-accent-text: #8ea6ff;
  --color-danger: #ff8094;
  --color-danger-ink: #0b1122;
  --color-success: #5fd4ae;
  --color-selected-bg: #8ea6ff;
  --color-selected-ink: #0b1122;
  --color-focus: #8ea6ff;
  --color-dark: #070b18;
  --color-dark-soft: #0f1630;
  --shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.6);
  --shadow-soft: 0 12px 32px -16px rgba(0, 0, 0, 0.5);
}

@media (max-width: 640px) {
  :root {
    --gutter: var(--space-4);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-ink-soft);
  line-height: 1.7;
  font-size: var(--fs-base);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--color-ink);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 var(--space-4);
}

[hidden] {
  display: none !important;
}

/* Keyboard focus: a clear ring on every interactive element. */
:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.site-header :focus-visible,
.hero :focus-visible,
.section-dark :focus-visible,
.cta-band :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--color-focus-on-dark);
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 1000;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  color: var(--color-ink);
  font-weight: 600;
}

.skip-link:focus {
  top: var(--space-4);
}

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

.eyebrow {
  display: inline-block;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent-text);
  margin: 0 0 var(--space-4);
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 1px;
  background: currentColor;
  margin-right: var(--space-3);
  vertical-align: middle;
}

.eyebrow.center {
  display: block;
  text-align: center;
}

.hero .eyebrow,
.section-dark .eyebrow,
.cta-band .eyebrow {
  color: var(--color-accent-bright);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.9s var(--ease),
    transform 0.9s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ---------- Header / nav ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    background 0.4s var(--ease),
    border-color 0.4s var(--ease);
}

.site-header.scrolled {
  background: rgba(21, 19, 15, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--color-on-dark-line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--gutter);
  max-width: var(--max-width);
  margin: 0 auto;
  transition: padding 0.4s var(--ease);
}

.site-header.scrolled .nav {
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 600;
  font-style: italic;
  color: var(--color-on-dark);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  gap: var(--space-6);
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-brand,
.nav-links a,
.lang-menu summary {
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .nav-links {
    gap: var(--space-4);
  }
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--color-on-dark-soft);
  font-weight: 500;
  font-size: var(--fs-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 8px;
  width: 0;
  height: 1px;
  background: var(--color-accent-bright);
  transition: width 0.3s var(--ease);
}

.nav-links a:hover,
.nav-links a.current {
  color: var(--color-on-dark);
}

.nav-links a:hover::after,
.nav-links a.current::after {
  width: 100%;
}

.nav-links a.nav-cta {
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: var(--color-on-dark);
  padding: 0 var(--space-5);
}

.nav-links a.nav-cta::after {
  display: none;
}

.nav-links a.nav-cta:hover {
  background: var(--color-accent-bright);
  border-color: var(--color-accent-bright);
  color: var(--color-dark);
}

/* Language menu: a <details> at the end of the nav links. */
.lang-menu {
  position: relative;
}

.lang-menu summary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--tap);
  color: var(--color-on-dark-soft);
  font-weight: 500;
  font-size: var(--fs-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}

.lang-menu summary::-webkit-details-marker {
  display: none;
}

.lang-menu summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.lang-menu[open] summary::after {
  transform: translateY(1px) rotate(-135deg);
}

.lang-menu summary:hover,
.lang-menu[open] summary {
  color: var(--color-on-dark);
}

.lang-menu-list {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 11rem;
  margin: 0;
  padding: var(--space-2) 0;
  list-style: none;
  background: var(--color-dark); /* opaque: nothing on the page shows through the menu */
  border: 1px solid var(--color-on-dark-line);
  border-radius: var(--radius);
}

.nav-links .lang-menu-list a {
  display: flex;
  padding: 0 var(--space-4);
  text-transform: none;
  letter-spacing: 0;
  font-size: var(--fs-base);
}

.nav-links .lang-menu-list a::after {
  display: none;
}

.nav-links .lang-menu-list a[aria-current="true"] {
  color: var(--color-accent-bright);
}

/* The theme menu: the same drop-down, with buttons (js/theme.js) in place of links. */
.theme-menu summary {
  justify-content: center;
  min-width: var(--tap); /* a finger's width, not the 18px icon */
}

.theme-menu summary::after {
  display: none;
}

.theme-menu-list {
  display: grid;
  min-width: 9rem;
}

.theme-menu-list button {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 var(--space-4);
  border: 0;
  background: none;
  color: var(--color-on-dark-soft);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.theme-menu-list button:hover {
  color: var(--color-on-dark);
}

.theme-menu-list button[aria-pressed="true"] {
  color: var(--color-highlight-on-dark);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--color-on-dark);
}

/* The menu button takes over below 1080px: the Spanish and Portuguese nav
   labels (plus the language menu) need about that much room on one line. */
@media (max-width: 1080px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-dark);
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-3) var(--gutter) var(--space-5);
    display: none;
    gap: var(--space-1);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a.nav-cta {
    justify-content: center;
    margin-top: var(--space-2);
  }

  .nav-lang,
  .nav-theme {
    margin-top: var(--space-2);
  }

  .lang-menu-list {
    position: static;
    border: 0;
    background: none;
    padding: 0 0 0 var(--space-5);
  }
}

/* Offline: a notice at the foot of the page (js/script.js) while the browser
   has no connection, and "back online" for a moment when it returns. */
.offline-notice {
  position: fixed;
  left: 50%;
  bottom: var(--space-4);
  z-index: 600;
  transform: translateX(-50%);
  width: calc(100% - 2 * var(--space-4));
  max-width: 36rem;
  padding: var(--space-3) var(--space-5);
  border: 1px solid var(--color-notice-line);
  border-left-width: 4px;
  border-radius: var(--radius);
  background: var(--color-notice-bg);
  color: var(--color-notice-ink);
  font-size: var(--fs-sm);
  box-shadow: var(--shadow-soft);
}

.offline-notice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.offline-notice[hidden] {
  display: none;
}

.offline-notice-text {
  flex: 1 1 auto;
}

/* The X that closes it: a tap-sized button that reads as part of the notice. */
.offline-notice-close {
  flex: none;
  margin: calc(-1 * var(--space-2)) calc(-1 * var(--space-3)) calc(-1 * var(--space-2)) 0;
  width: var(--tap);
  height: var(--tap);
  border: 0;
  border-radius: var(--radius);
  background: none;
  color: inherit;
  font: inherit;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.offline-notice-close:hover,
.offline-notice-close:focus-visible {
  background: rgba(0, 0, 0, 0.08);
}

.offline-notice.is-back {
  border-color: var(--color-success);
  background: var(--color-surface);
  color: var(--color-ink);
}

/* On the designer (js/script.js) the notice is part of the page, above the
   studio, so it never floats over Riley's card or a control on a phone. */
.offline-notice.is-inline {
  position: static;
  transform: none;
  width: auto;
  max-width: none;
  margin: var(--space-3) var(--gutter) 0;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(ellipse at 20% 15%, rgba(51, 85, 240, 0.16), transparent 55%),
    linear-gradient(160deg, var(--color-dark) 0%, var(--color-dark-soft) 100%);
  color: var(--color-on-dark);
  padding: 160px var(--gutter) var(--space-10);
  text-align: center;
  overflow: hidden;
}

/* The landing hero: at desktop the words sit left and the designer's picture
   right, so the product is in the first screen (1440x900) instead of under
   the fold; narrower, they stack, centred, as before. */
@media (min-width: 1040px) {
  .hero.hero-landing {
    text-align: left;
  }

  .hero.hero-landing .hero-inner {
    max-width: 1280px;
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: var(--space-8);
    align-items: center;
  }

  .hero.hero-landing .hero-words {
    min-width: 0;
  }

  /* A little smaller beside the picture, so the Spanish and Portuguese
     headlines stay to three lines. */
  .hero.hero-landing h1 {
    font-size: var(--fs-3xl-beside);
  }

  .hero.hero-landing .eyebrow.center {
    text-align: left;
  }

  .hero.hero-landing p {
    margin-left: 0;
  }

  .hero.hero-landing .hero-actions {
    justify-content: flex-start;
  }

  .hero.hero-landing .hero-shot {
    margin: 0;
    max-width: none;
  }

  .hero.hero-landing .hero-shot figcaption {
    margin-left: 0;
    text-align: left;
  }
}

.hero.hero-page {
  padding-bottom: var(--space-9);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    115deg,
    rgba(255, 255, 255, 0.025) 0px,
    rgba(255, 255, 255, 0.025) 1px,
    transparent 1px,
    transparent 90px
  );
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: var(--content-width);
  margin: 0 auto;
}

.hero h1 {
  font-size: var(--fs-3xl);
  color: var(--color-on-dark);
  margin: 0 0 var(--space-5);
  overflow-wrap: break-word;
}

.hero h1 em {
  color: var(--color-accent-bright);
  font-weight: 500;
}

.hero p {
  font-size: var(--fs-md);
  color: var(--color-on-dark-soft);
  max-width: 560px;
  margin: 0 auto var(--space-6);
  font-weight: 300;
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* The product itself, under the hero text: a screenshot of the designer in a
   thin frame that reads on the dark hero in both themes. The width/height
   attributes keep its space before it loads. */
.hero-shot {
  max-width: 960px;
  margin: var(--space-8) auto 0;
}

.hero-shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1280 / 760;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-on-dark-line);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  background: var(--color-bg);
}

.hero-shot figcaption {
  margin: var(--space-4) auto 0;
  max-width: 560px;
  font-size: var(--fs-sm);
  color: var(--color-on-dark-muted);
}

/* Phones get the tighter crop of the room (pages/index.html <picture>). */
@media (max-width: 720px) {
  .hero-shot img {
    aspect-ratio: 720 / 672;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 500;
  font-size: var(--fs-sm);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    background 0.3s var(--ease),
    color 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--color-accent-bright);
  color: var(--color-dark);
  border-color: var(--color-accent-bright);
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

.btn-outline {
  background: transparent;
  color: var(--color-on-dark);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
  border-color: var(--color-on-dark);
}

.btn-outline-dark {
  background: transparent;
  border-color: var(--color-line-strong);
  color: var(--color-ink);
}

.btn-outline-dark:hover:not(:disabled) {
  border-color: var(--color-ink);
}

.btn-block {
  width: 100%;
}

/* ---------- Sections ---------- */
.section {
  padding: var(--space-10) var(--gutter);
}

.section-title {
  text-align: center;
  font-size: var(--fs-2xl);
  margin: 0 0 var(--space-3);
}

.section-subtitle {
  text-align: center;
  color: var(--color-muted);
  max-width: 560px;
  margin: 0 auto var(--space-8);
}

@media (max-width: 640px) {
  .section {
    padding-top: var(--space-8);
    padding-bottom: var(--space-8);
  }
}

/* Cards grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: var(--space-05);
  max-width: var(--max-width);
  margin: 0 auto;
  background: var(--color-line);
  border: 1px solid var(--color-line);
}

.card {
  background: var(--color-surface);
  padding: var(--space-7) var(--space-6);
}

.card h3 {
  margin: 0 0 var(--space-3);
  font-size: var(--fs-lg);
}

.card p {
  color: var(--color-ink-soft);
  margin: 0;
}

.card-number {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--color-accent-text);
  display: block;
  margin-bottom: var(--space-4);
}

.scope-note {
  max-width: var(--max-width);
  margin: var(--space-6) auto 0;
  padding: var(--space-5) var(--space-6);
  border: 1px solid var(--color-line);
  border-left: 3px solid var(--color-accent);
  background: var(--color-surface);
}

.scope-note h3 {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  margin: 0 0 var(--space-2);
}

.scope-note ul {
  margin: 0;
  padding-left: var(--space-5);
}

.scope-note li {
  margin-bottom: var(--space-1);
}

/* FAQ accordion */
.faq-list {
  max-width: 820px;
  margin: 0 auto;
  padding-top: 0;
}

.faq-item {
  border-bottom: 1px solid var(--color-line);
}

.faq-item:first-child {
  border-top: 1px solid var(--color-line);
}

.faq-heading {
  margin: 0;
  font-size: var(--fs-lg);
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: var(--space-5) var(--space-1);
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--color-ink);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-5);
}

.faq-question:hover {
  color: var(--color-accent-text);
}

.faq-question .icon {
  transition: transform 0.3s var(--ease);
  color: var(--color-accent-text);
  font-size: var(--fs-xl);
  font-family: var(--font-body);
  line-height: 1;
  flex-shrink: 0;
}

.faq-item.open .faq-question .icon {
  transform: rotate(45deg);
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s var(--ease);
  color: var(--color-ink-soft);
}

.faq-answer-inner {
  overflow: hidden;
  padding: 0 var(--space-1);
}

.faq-item:not(.open) .faq-answer-inner {
  visibility: hidden;
}

.faq-item.open .faq-answer {
  grid-template-rows: 1fr;
}

.faq-item.open .faq-answer-inner {
  padding-bottom: var(--space-5);
}

/* Dark band */
.section-dark {
  background: var(--color-dark);
  color: var(--color-on-dark-soft);
}

.section-dark .section-title,
.section-dark .card h3 {
  color: var(--color-on-dark);
}

.section-dark .section-subtitle,
.section-dark .card p {
  color: var(--color-on-dark-soft);
}

.section-dark .card {
  background: var(--color-dark);
}

.section-dark .card-number {
  color: var(--color-accent-bright);
}

.section-dark .grid {
  background: var(--color-on-dark-line);
  border-color: var(--color-on-dark-line);
}

/* CTA band */
.cta-band {
  background: linear-gradient(160deg, var(--color-dark) 0%, var(--color-dark-soft) 100%);
  color: var(--color-on-dark);
  text-align: center;
  padding: var(--space-10) var(--gutter);
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    115deg,
    rgba(255, 255, 255, 0.025) 0px,
    rgba(255, 255, 255, 0.025) 1px,
    transparent 1px,
    transparent 90px
  );
  pointer-events: none;
}

.cta-band > * {
  position: relative;
}

.cta-band .section-title {
  color: var(--color-on-dark);
}

.cta-band .section-subtitle {
  color: var(--color-on-dark-soft);
}

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: var(--space-6);
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-2);
  font-size: var(--fs-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-ink-soft);
}

input,
select,
textarea {
  width: 100%;
  max-width: 100%;
  min-height: var(--tap);
  padding: var(--space-3) var(--space-1);
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--color-line-strong);
  font-family: inherit;
  font-size: var(--fs-base);
  background: transparent;
  color: var(--color-ink);
  transition: border-color 0.3s var(--ease);
}

select option {
  background: var(--color-surface);
  color: var(--color-ink);
}

input:focus,
select:focus,
textarea:focus {
  border-bottom-color: var(--color-focus);
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-bottom-color: var(--color-danger);
}

textarea {
  resize: vertical;
  min-height: 140px;
}

.field-error {
  margin: var(--space-2) 0 0;
  font-size: var(--fs-sm);
  color: var(--color-danger);
}

.form-note {
  font-size: var(--fs-sm);
  color: var(--color-muted);
  margin: var(--space-4) 0 0;
}

/* A caption under its field sits as close as an error does; a card's own
   helper line (right under its heading) stands clear of the first label. */
.form-group .form-note {
  margin-top: var(--space-2);
}

.app-card h2 + .form-note {
  margin: calc(-1 * var(--space-2)) 0 var(--space-5);
}

.form-consent {
  font-size: var(--fs-sm);
  color: var(--color-ink-soft);
  margin: 0 0 var(--space-5);
}

.form-status {
  white-space: pre-line;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius);
  margin-bottom: var(--space-6);
  border: 1px solid var(--color-line-strong);
  border-left-width: 4px;
  background: var(--color-surface);
  color: var(--color-ink);
}

.form-status.is-success {
  border-color: var(--color-success);
}

.form-status.is-error {
  border-color: var(--color-danger);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-dark);
  color: var(--color-on-dark-soft);
  padding: var(--space-8) var(--gutter) var(--space-6);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-6) var(--space-7);
  max-width: var(--max-width);
  margin: 0 auto var(--space-7);
}

.footer-col {
  min-width: 0;
}

.footer-heading {
  color: var(--color-on-dark);
  margin: 0 0 var(--space-3);
  font-size: var(--fs-sm);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--font-body);
  font-weight: 600;
}

.footer-brand {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-lg);
  color: var(--color-on-dark);
  margin: 0 0 var(--space-3);
}

.footer-tagline {
  max-width: 260px;
  font-size: var(--fs-sm);
  margin: 0 0 var(--space-3);
}

.footer-col a {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--color-on-dark-soft);
  font-size: var(--fs-sm);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.footer-col a:hover {
  color: var(--color-accent-bright);
  text-decoration: underline;
}

.footer-identity {
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--color-on-dark-muted);
  margin: 0;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  font-size: var(--fs-sm);
  color: var(--color-on-dark-muted);
  border-top: 1px solid var(--color-on-dark-line);
  padding-top: var(--space-5);
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-copy {
  margin: 0;
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.theme-switch-label {
  margin-right: var(--space-2);
}

.theme-switch button {
  min-height: var(--tap);
  padding: 0 var(--space-3);
  border: 1px solid var(--color-on-dark-line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--color-on-dark-soft);
  font-family: inherit;
  font-size: var(--fs-sm);
  cursor: pointer;
}

.theme-switch button[aria-pressed="true"] {
  background: var(--color-accent-bright);
  border-color: var(--color-accent-bright);
  color: var(--color-dark);
}

/* ---------- Legal pages ---------- */
.legal-content {
  max-width: 820px;
  margin: 0 auto;
  padding-top: var(--space-8);
}

.legal-content h2 {
  font-size: var(--fs-xl);
  margin: var(--space-7) 0 var(--space-4);
}

.legal-content h2:first-of-type {
  margin-top: 0;
}

.legal-content ul {
  padding-left: var(--space-5);
}

.legal-content li {
  margin-bottom: var(--space-2);
}

.legal-updated {
  font-size: var(--fs-sm);
  color: var(--color-muted);
  margin-bottom: var(--space-7);
}
