/* ==========================================================================
   Memoir™ — marketing site design system
   Capture. Share. Remember.

   Structure:
     1. Tokens (light + dark via media query AND [data-theme] override)
     2. Reset & base typography (fluid scale)
     3. Utilities (.container, .skip-link, .visually-hidden, .text-gradient)
     4. Buttons
     5. Header / navigation (desktop + mobile panel)
     6. Sections, eyebrow, section head
     7. Cards, feature grid, icon badge, stats, CTA band
     8. Legal layout & prose
     9. Forms
    10. Reveal animation
    11. Footer
    12. Motion, print
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  color-scheme: light;

  --c-bg: #F5F7FA;
  --c-surface: #FFFFFF;
  --c-elevated: #FFFFFF;

  --c-primary: #01A4A7;
  --c-primary-dark: #018587;
  --c-primary-tint: #E6F6F6;
  --c-primary-contrast: #FFFFFF;

  --c-navy: #05305C;
  --c-navy-light: #0A4A8A;
  --c-heading: #05305C;

  --c-text: #1E3A52;
  --c-muted: #6B7785;
  --c-border: #E2E8F0;
  --c-link: #017A7C;

  --c-danger: #B00020;
  --c-danger-tint: #FBE9EC;
  --c-success: #2E7D32;
  --c-success-tint: #E8F3E9;
  --c-warning: #ED6C02;

  --btn-navy-bg: #05305C;
  --btn-navy-bg-hover: #0A4A8A;
  --btn-navy-fg: #FFFFFF;

  --footer-bg: #05305C;
  --footer-fg: #F5F7FA;
  --footer-muted: rgba(245, 247, 250, 0.72);
  --footer-border: rgba(255, 255, 255, 0.14);

  --shadow-card: 0 1px 3px 0 rgba(5, 48, 92, 0.08), 0 1px 2px -1px rgba(5, 48, 92, 0.06);
  --shadow-lift: 0 12px 32px -8px rgba(5, 48, 92, 0.18);
  --shadow-header: 0 4px 16px -6px rgba(5, 48, 92, 0.14);

  --grad-brand: linear-gradient(135deg, #01A4A7 0%, #05305C 100%);

  --radius: 8px;
  --radius-lg: 16px;

  --header-h: 72px;

  /* Theme-toggle icon visibility (flipped in dark blocks). */
  --display-sun: none;
  --display-moon: block;

  /* Fluid type scale */
  --fs-display: clamp(2.4rem, 1.55rem + 3.6vw, 3.9rem);
  --fs-h1: clamp(2.1rem, 1.5rem + 2.6vw, 3.2rem);
  --fs-h2: clamp(1.55rem, 1.25rem + 1.4vw, 2.15rem);
  --fs-h3: clamp(1.15rem, 1.06rem + 0.4vw, 1.35rem);
  --fs-body-lg: clamp(1.05rem, 1rem + 0.25vw, 1.19rem);
  --fs-small: 0.9rem;
}

/* Dark theme tokens — keep both blocks identical.
   a) System preference, unless the visitor forced light. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --c-bg: #121212;
    --c-surface: #1E1E1E;
    --c-elevated: #2A2A2A;

    --c-primary: #01A4A7;
    --c-primary-dark: #2BC5C8;
    --c-primary-tint: rgba(1, 164, 167, 0.14);
    --c-primary-contrast: #FFFFFF;

    --c-navy: #E8EDF2;
    --c-navy-light: #9CC3EC;
    --c-heading: #F5F7FA;

    --c-text: #E8EDF2;
    --c-muted: #9AA7B4;
    --c-border: #3A3A3A;
    --c-link: #2BC5C8;

    --c-danger: #FF7A85;
    --c-danger-tint: rgba(176, 0, 32, 0.24);
    --c-success: #7FC983;
    --c-success-tint: rgba(46, 125, 50, 0.22);
    --c-warning: #FFA45C;

    --btn-navy-bg: #2A2A2A;
    --btn-navy-bg-hover: #3A3A3A;
    --btn-navy-fg: #F5F7FA;

    --footer-bg: #1E1E1E;
    --footer-fg: #E8EDF2;
    --footer-muted: #9AA7B4;
    --footer-border: #3A3A3A;

    --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.5), 0 1px 2px -1px rgba(0, 0, 0, 0.4);
    --shadow-lift: 0 12px 32px -8px rgba(0, 0, 0, 0.6);
    --shadow-header: 0 4px 16px -6px rgba(0, 0, 0, 0.55);

    --display-sun: block;
    --display-moon: none;
  }
}

/* b) Explicit visitor choice via the toggle. */
:root[data-theme="dark"] {
  color-scheme: dark;

  --c-bg: #121212;
  --c-surface: #1E1E1E;
  --c-elevated: #2A2A2A;

  --c-primary: #01A4A7;
  --c-primary-dark: #2BC5C8;
  --c-primary-tint: rgba(1, 164, 167, 0.14);
  --c-primary-contrast: #FFFFFF;

  --c-navy: #E8EDF2;
  --c-navy-light: #9CC3EC;
  --c-heading: #F5F7FA;

  --c-text: #E8EDF2;
  --c-muted: #9AA7B4;
  --c-border: #3A3A3A;
  --c-link: #2BC5C8;

  --c-danger: #FF7A85;
  --c-danger-tint: rgba(176, 0, 32, 0.24);
  --c-success: #7FC983;
  --c-success-tint: rgba(46, 125, 50, 0.22);
  --c-warning: #FFA45C;

  --btn-navy-bg: #2A2A2A;
  --btn-navy-bg-hover: #3A3A3A;
  --btn-navy-fg: #F5F7FA;

  --footer-bg: #1E1E1E;
  --footer-fg: #E8EDF2;
  --footer-muted: #9AA7B4;
  --footer-border: #3A3A3A;

  --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.5), 0 1px 2px -1px rgba(0, 0, 0, 0.4);
  --shadow-lift: 0 12px 32px -8px rgba(0, 0, 0, 0.6);
  --shadow-header: 0 4px 16px -6px rgba(0, 0, 0, 0.55);

  --display-sun: block;
  --display-moon: none;
}

/* --------------------------------------------------------------------------
   2. Reset & base typography
   -------------------------------------------------------------------------- */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1 0 auto;
  width: 100%;
}

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

h1,
h2,
h3,
h4 {
  color: var(--c-heading);
  line-height: 1.18;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
}

h1 {
  font-size: var(--fs-h1);
  font-weight: 800;
}

h2 {
  font-size: var(--fs-h2);
  font-weight: 700;
}

h3 {
  font-size: var(--fs-h3);
  font-weight: 700;
}

h4 {
  font-size: 1.05rem;
  font-weight: 600;
}

p {
  overflow-wrap: break-word;
}

a {
  color: var(--c-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

ul,
ol {
  padding-inline-start: 1.4em;
}

button {
  font: inherit;
  color: inherit;
}

strong {
  color: var(--c-heading);
}

::selection {
  background: var(--c-primary);
  color: #FFFFFF;
}

:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.lead {
  font-size: var(--fs-body-lg);
  color: var(--c-muted);
}

/* --------------------------------------------------------------------------
   3. Utilities
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: 20px;
}

@media (max-width: 480px) {
  .container {
    padding-inline: 16px;
  }
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--c-navy);
  color: #FFFFFF;
  font-weight: 600;
  border-radius: var(--radius);
  transform: translateY(-250%);
  transition: transform 0.2s ease;
}

:root[data-theme="dark"] .skip-link {
  background: var(--c-elevated);
}

.skip-link:focus {
  transform: translateY(0);
  text-decoration: none;
}

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

/* Gradient headline text (brand teal → navy) with a solid fallback. */
.text-gradient {
  color: var(--c-primary-dark);
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

:root[data-theme="dark"] .text-gradient {
  background: linear-gradient(135deg, #2BC5C8 0%, #9CC3EC 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .text-gradient {
    background: linear-gradient(135deg, #2BC5C8 0%, #9CC3EC 100%);
    -webkit-background-clip: text;
    background-clip: text;
  }
}

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 24px;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease,
    box-shadow 0.18s ease, transform 0.18s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn:focus-visible {
  outline-offset: 3px;
}

.btn svg {
  flex: none;
}

.btn-primary {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: var(--c-primary-contrast);
}

.btn-primary:hover {
  background: var(--c-primary-dark);
  border-color: var(--c-primary-dark);
  box-shadow: 0 8px 20px -8px rgba(1, 164, 167, 0.65);
}

:root[data-theme="dark"] .btn-primary:hover {
  color: #05305C;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-primary:hover {
    color: #05305C;
  }
}

.btn-outline {
  background: transparent;
  border-color: var(--c-link);
  color: var(--c-link);
}

.btn-outline:hover {
  background: var(--c-primary-tint);
}

.btn-navy {
  background: var(--btn-navy-bg);
  border-color: var(--btn-navy-bg);
  color: var(--btn-navy-fg);
}

.btn-navy:hover {
  background: var(--btn-navy-bg-hover);
  border-color: var(--btn-navy-bg-hover);
}

/* For gradient / navy surfaces (e.g. inside .cta-band). */
.btn-white {
  background: #FFFFFF;
  border-color: #FFFFFF;
  color: #05305C;
}

.btn-white:hover {
  background: #E6F6F6;
  border-color: #E6F6F6;
}

.btn-ghost-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.65);
  color: #FFFFFF;
}

.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #FFFFFF;
}

.btn-lg {
  min-height: 54px;
  padding: 15px 32px;
  font-size: 1.06rem;
  border-radius: 10px;
}

.btn-sm {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.94rem;
}

@media (hover: hover) {
  .btn:hover {
    transform: translateY(-1px);
  }

  .btn:active {
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   5. Header / navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  transition: box-shadow 0.25s ease;
}

@supports ((-webkit-backdrop-filter: blur(8px)) or (backdrop-filter: blur(8px))) {
  .site-header {
    background: rgba(255, 255, 255, 0.86);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }

  :root[data-theme="dark"] .site-header {
    background: rgba(30, 30, 30, 0.86);
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .site-header {
      background: rgba(30, 30, 30, 0.86);
    }
  }
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-header);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  border-radius: 6px;
}

.brand-logo {
  width: auto;
  height: 44px;
}

/* In dark mode, lift the wordmark's navy letters so they stay legible. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-logo {
    filter: brightness(1.75) saturate(0.85);
  }
}

:root[data-theme="dark"] .brand-logo {
  filter: brightness(1.75) saturate(0.85);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-inline-start: auto;
}

.site-nav-link {
  color: var(--c-text);
  font-weight: 500;
  font-size: 0.98rem;
  padding-block: 6px;
  transition: color 0.15s ease;
}

.site-nav-link:hover {
  color: var(--c-link);
  text-decoration: none;
}

.site-nav-link.is-active {
  color: var(--c-link);
  text-decoration: underline;
  text-decoration-color: var(--c-primary);
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--c-border);
  border-radius: 50%;
  background: transparent;
  color: var(--c-text);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.theme-toggle:hover {
  background: var(--c-primary-tint);
  color: var(--c-link);
  border-color: var(--c-primary);
}

.theme-toggle .icon-sun {
  display: var(--display-sun);
}

.theme-toggle .icon-moon {
  display: var(--display-moon);
}

/* Hamburger */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--c-heading);
  cursor: pointer;
}

.nav-toggle-line {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line-1 {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line-2 {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line-3 {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile panel */
.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  box-shadow: var(--shadow-header);
}

.mobile-nav-inner {
  display: flex;
  flex-direction: column;
  padding-block: 12px 20px;
}

.mobile-nav-link {
  padding: 14px 4px;
  color: var(--c-text);
  font-weight: 600;
  font-size: 1.05rem;
  border-bottom: 1px solid var(--c-border);
}

.mobile-nav-link:hover {
  color: var(--c-link);
  text-decoration: none;
}

.mobile-nav-link.is-active {
  color: var(--c-link);
}

.mobile-nav-cta {
  margin-top: 18px;
}

/* Without JS the panel cannot open — keep links reachable by rendering it
   statically (mobile widths only; ≥900px the desktop nav is shown anyway). */
html:not(.js) .mobile-nav {
  display: block;
  position: static;
  box-shadow: none;
}

html.js .mobile-nav.is-open {
  display: block;
}

@media (prefers-reduced-motion: no-preference) {
  html.js .mobile-nav.is-open {
    animation: mobileNavIn 0.22s ease both;
  }
}

@keyframes mobileNavIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 900px) {
  html:not(.js) .mobile-nav,
  html.js .mobile-nav,
  html.js .mobile-nav.is-open {
    display: none;
  }
}

@media (max-width: 899.98px) {
  .site-nav {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .brand-logo {
    height: 36px;
  }

  .header-inner {
    min-height: 62px;
  }
}

@media (max-width: 559.98px) {
  .header-cta,
  .header-logout {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   6. Sections
   -------------------------------------------------------------------------- */

.section {
  padding-block: clamp(56px, 9vw, 104px);
}

.section-alt {
  background: var(--c-surface);
  border-block: 1px solid var(--c-border);
}

.eyebrow {
  display: inline-block;
  color: var(--c-link);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.section-head {
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: clamp(36px, 5vw, 56px);
  text-align: center;
}

.section-head p {
  margin-top: 14px;
  color: var(--c-muted);
  font-size: var(--fs-body-lg);
}

/* --------------------------------------------------------------------------
   7. Cards, grids, badges, stats, CTA band
   -------------------------------------------------------------------------- */

.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 28px;
}

.card h3 {
  margin-top: 16px;
  margin-bottom: 8px;
}

.card p {
  color: var(--c-muted);
  font-size: 0.97rem;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .card {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
  }

  .card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
  }
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--c-primary-tint);
  color: var(--c-primary);
}

:root[data-theme="dark"] .icon-badge {
  color: var(--c-primary-dark);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-badge {
    color: var(--c-primary-dark);
  }
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  color: var(--c-primary);
  font-size: clamp(2.1rem, 1.6rem + 2vw, 3rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

:root[data-theme="dark"] .stat-number {
  color: var(--c-primary-dark);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .stat-number {
    color: var(--c-primary-dark);
  }
}

.stat-label {
  display: block;
  margin-top: 8px;
  color: var(--c-muted);
  font-weight: 500;
}

.cta-band {
  background: var(--grad-brand);
  border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 64px);
  text-align: center;
  color: #FFFFFF;
}

.cta-band h2 {
  color: #FFFFFF;
  margin-bottom: 12px;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.88);
  max-width: 560px;
  margin-inline: auto;
  font-size: var(--fs-body-lg);
}

.cta-band .cta-actions,
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}

.cta-band :focus-visible {
  outline-color: #FFFFFF;
}

/* --------------------------------------------------------------------------
   8. Legal layout & prose
   -------------------------------------------------------------------------- */

.legal-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(32px, 4vw, 56px);
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.legal-toc h2 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 12px;
}

.legal-toc ol {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.legal-toc a {
  display: block;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--c-text);
  font-size: 0.93rem;
  font-weight: 500;
}

.legal-toc a:hover {
  background: var(--c-primary-tint);
  color: var(--c-link);
  text-decoration: none;
}

.legal-meta {
  color: var(--c-muted);
  font-size: var(--fs-small);
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-toc {
    position: static;
  }
}

.prose {
  max-width: 74ch;
  line-height: 1.7;
}

.prose h2 {
  margin-top: 2.2em;
  margin-bottom: 0.6em;
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin-top: 1.6em;
  margin-bottom: 0.5em;
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.prose p,
.prose ul,
.prose ol {
  margin-bottom: 1em;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose li::marker {
  color: var(--c-primary);
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-block: 1.4em;
  font-size: 0.94rem;
}

.prose th,
.prose td {
  border: 1px solid var(--c-border);
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--c-primary-tint);
  color: var(--c-heading);
  font-weight: 600;
}

.prose blockquote {
  border-inline-start: 3px solid var(--c-primary);
  padding-inline-start: 18px;
  color: var(--c-muted);
  margin-block: 1.4em;
}

/* --------------------------------------------------------------------------
   9. Forms
   -------------------------------------------------------------------------- */

.form-field {
  margin-bottom: 20px;
}

.form-field label {
  display: block;
  font-weight: 600;
  color: var(--c-heading);
  margin-bottom: 7px;
  font-size: 0.96rem;
}

.form-field .field-hint {
  font-weight: 400;
  color: var(--c-muted);
}

.form-input,
.form-field input[type="text"],
.form-field input[type="email"],
.form-field select,
.form-field textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
  color: var(--c-text);
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-field textarea {
  min-height: 150px;
  resize: vertical;
}

.form-input:focus,
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-primary-tint);
}

.form-field .is-invalid,
.form-input.is-invalid {
  border-color: var(--c-danger);
}

.field-error {
  display: block;
  margin-top: 6px;
  color: var(--c-danger);
  font-size: var(--fs-small);
  font-weight: 500;
}

.form-panel {
  padding: 16px 18px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  font-weight: 500;
}

.form-success {
  background: var(--c-success-tint);
  border: 1px solid var(--c-success);
  color: var(--c-success);
}

.form-error-summary {
  background: var(--c-danger-tint);
  border: 1px solid var(--c-danger);
  color: var(--c-danger);
}

/* --------------------------------------------------------------------------
   10. Reveal on scroll (progressive enhancement)
   -------------------------------------------------------------------------- */

html.js .reveal {
  opacity: 0;
  transform: translateY(16px);
}

html.js .reveal.revealed {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  html.js .reveal {
    transition: opacity 0.55s ease, transform 0.55s ease;
  }

  html.js .reveal-delay-1 {
    transition-delay: 0.08s;
  }

  html.js .reveal-delay-2 {
    transition-delay: 0.16s;
  }

  html.js .reveal-delay-3 {
    transition-delay: 0.24s;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  margin-top: auto;
  background: var(--footer-bg);
  color: var(--footer-fg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  padding-block: clamp(48px, 6vw, 72px);
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--footer-fg);
}

.footer-logo:hover {
  text-decoration: none;
}

.footer-logo-img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #FFFFFF;
  padding: 4px;
}

.footer-logo-name {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.footer-tagline {
  margin-top: 14px;
  font-weight: 600;
  color: #7EE0E2;
  letter-spacing: 0.02em;
}

.footer-blurb {
  margin-top: 10px;
  max-width: 34ch;
  color: var(--footer-muted);
  font-size: 0.95rem;
}

.footer-heading {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7EE0E2;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--footer-muted);
  font-size: 0.96rem;
  transition: color 0.15s ease;
  overflow-wrap: anywhere;
}

.footer-links a:hover {
  color: #FFFFFF;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer :focus-visible {
  outline-color: #7EE0E2;
}

.footer-bottom {
  border-top: 1px solid var(--footer-border);
}

.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 20px;
  font-size: 0.9rem;
  color: var(--footer-muted);
}

/* Same colour and size as the copyright line beside it — no highlight. */
.footer-bottom-note a {
  color: inherit;
  text-decoration: none;
}

.footer-bottom-note a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom-inner {
    justify-content: center;
    text-align: center;
  }
}

/* --------------------------------------------------------------------------
   12. Motion & print
   -------------------------------------------------------------------------- */

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

@media print {
  body {
    background: #FFFFFF;
    color: #000000;
  }

  .site-header,
  .site-footer,
  .skip-link,
  .theme-toggle,
  .nav-toggle,
  .mobile-nav,
  .cta-band {
    display: none !important;
  }

  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-toc {
    display: none;
  }

  .card,
  .section-alt {
    box-shadow: none;
    border-color: #CCCCCC;
  }

  a {
    color: #000000;
  }
}
