/* /css/global.css
   ==========================================================================
   GFC – Global Foundation Styles
   --------------------------------------------------------------------------
   Project-wide foundation for:
   - Main website
   - Presale
   - Whitepaper
   - FAQ
   - Crypto Explained
   - Transparency Portal

   Contains only shared design tokens, reset, typography, layout,
   controls, cards, forms, accessibility and global runtime states.

   Page-specific presentation belongs in the corresponding page CSS.
   ========================================================================== */


/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */

:root {
  /* -----------------------------------------------------------------------
     Core colors
     ----------------------------------------------------------------------- */

  --bg: #020617;
  --bg-soft: #050816;

  --surface: #070b14;
  --surface-alt: #0b1120;
  --surface-2: #111827;
  --surface-glass: rgba(255, 255, 255, 0.045);
  --surface-glass-soft: rgba(255, 255, 255, 0.025);

  --text: #e5e7eb;
  --text-muted: #9ca3af;
  --ink: var(--text);
  --ink-muted: rgba(229, 237, 247, 0.72);
  --muted: var(--text-muted);

  --line: #1f2937;
  --border: var(--line);
  --border-soft: rgba(255, 255, 255, 0.1);
  --border-strong: #374151;

  /* -----------------------------------------------------------------------
     Brand
     ----------------------------------------------------------------------- */

  --accent: #5cc8ff;
  --accent-hover: #8bddff;
  --accent-ink: #081c25;

  --brand: #0ea5e9;
  --brand-blue: #0ea5e9;
  --brand-green: #5cc8ff;
  --brand-gold: #5cc8ff;
  --brand-ink: #020617;

  /* -----------------------------------------------------------------------
     Status
     ----------------------------------------------------------------------- */

  --ok: #22c55e;
  --success: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --info: var(--accent);

  /* -----------------------------------------------------------------------
     Typography
     ----------------------------------------------------------------------- */

  --font:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    "Noto Sans",
    "Apple Color Emoji",
    "Segoe UI Emoji",
    "Segoe UI Symbol",
    sans-serif;

  --mono:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    "Courier New",
    monospace;

  --h1: clamp(2rem, 2.2rem + 1vw, 3rem);
  --h2: clamp(1.5rem, 1.6rem + 0.5vw, 2rem);
  --h3: clamp(1.125rem, 1.1rem + 0.3vw, 1.25rem);
  --h4: 1.02rem;
  --lead: 1.05rem;

  --h1-size: var(--h1);
  --lead-size: var(--lead);

  /* -----------------------------------------------------------------------
     Spacing
     ----------------------------------------------------------------------- */

  --space-0: 4px;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;

  --gap: 24px;
  --gutter: clamp(16px, 3.5vw, 28px);

  /* -----------------------------------------------------------------------
     Layout
     ----------------------------------------------------------------------- */

  --container-maxw: 1240px;
  --container-max: var(--container-maxw);
  --container-narrow: 980px;
  --maxw: 1200px;

  --header-h: 76px;
  --header-logo-h: calc(var(--header-h) - 12px);
  --row-h: 54px;
  --control-h: 48px;

  /* -----------------------------------------------------------------------
     Radius and shadows
     ----------------------------------------------------------------------- */

  --radius: 12px;
  --radius-sm: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --shadow:
    0 18px 60px rgba(0, 0, 0, 0.7);

  --shadow-soft:
    0 6px 18px rgba(0, 0, 0, 0.35);

  --shadow-card:
    0 16px 40px rgba(0, 0, 0, 0.24);

  /* -----------------------------------------------------------------------
     Focus
     ----------------------------------------------------------------------- */

  --focus-ring: 2px solid var(--accent);
  --focus-offset: 3px;

  /* -----------------------------------------------------------------------
     Hero layer
     ----------------------------------------------------------------------- */

  --hero-bg: #0b0d12;
  --hero-ink: #eaf2f7;
  --hero-muted: rgba(234, 242, 247, 0.76);
  --hero-accent: #5cc8ff;
  --hero-accent-ink: #08171f;

  --hero-surface: rgba(255, 255, 255, 0.06);
  --hero-surface-soft: rgba(255, 255, 255, 0.04);
  --hero-border: rgba(255, 255, 255, 0.14);

  --hero-radius: 20px;
  --hero-pad: clamp(22px, 4vw, 40px);
  --hero-maxw: 1200px;
  --hero-text-maxch: 70ch;
  --hero-meta-maxw: 1120px;

  /* -----------------------------------------------------------------------
     Section layer
     ----------------------------------------------------------------------- */

  --sec-bg: #0b0d12;
  --sec-bg-soft: #0f1318;

  --sec-surface: rgba(255, 255, 255, 0.06);
  --sec-surface-soft: rgba(255, 255, 255, 0.04);

  --sec-border: rgba(255, 255, 255, 0.14);
  --sec-border-strong: rgba(255, 255, 255, 0.22);

  --sec-ink: #eaf2f7;
  --sec-muted: rgba(234, 242, 247, 0.7);
  --sec-accent: #5cc8ff;
  --sec-accent-ink: #08202c;

  --sec-radius: 14px;
  --sec-radius-lg: 20px;

  --sec-shadow:
    0 8px 26px rgba(0, 0, 0, 0.4);

  /* -----------------------------------------------------------------------
     Footer layer
     ----------------------------------------------------------------------- */

  --ft-bg: #0b0d12;
  --ft-surface: rgba(255, 255, 255, 0.05);
  --ft-border: rgba(255, 255, 255, 0.12);

  --ft-text: #eaf2f7;
  --ft-muted: rgba(234, 242, 247, 0.75);
  --ft-accent: #5cc8ff;
  --ft-accent-ink: #08202c;

  --ft-radius: 14px;
  --ft-radius-sm: 10px;
  --ft-font: var(--font);
  --ft-lh: 1.55;
  --ft-gap: 18px;
  --ft-gap-lg: clamp(24px, 3vw, 40px);
  --ft-pad: clamp(20px, 3vw, 36px);
  --ft-maxw: 1200px;

  /* -----------------------------------------------------------------------
     Modal layer
     ----------------------------------------------------------------------- */

  --md-ink: #eaf2f7;
  --md-muted: rgba(234, 242, 247, 0.78);
  --md-bg: #0b0d12;

  --md-surface: rgba(255, 255, 255, 0.08);
  --md-surface-2: rgba(255, 255, 255, 0.06);
  --md-border: rgba(255, 255, 255, 0.16);

  --md-accent: #5cc8ff;
  --md-accent-ink: #08202c;

  --md-radius: 14px;
  --md-radius-lg: 20px;

  --md-shadow:
    0 20px 70px rgba(0, 0, 0, 0.55),
    0 2px 0 rgba(255, 255, 255, 0.08) inset;

  --md-pad: clamp(20px, 3.5vw, 32px);
  --md-gutter: clamp(14px, 2.5vw, 22px);
  --md-maxw: min(680px, calc(100vw - 32px));

  --backdrop-color: rgba(5, 10, 16, 0.65);
  --backdrop-blur: 8px;
}


/* ==========================================================================
   2. RESET AND DOCUMENT BASE
   ========================================================================== */

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

* {
  margin: 0;
  padding: 0;
}

html {
  min-block-size: 100%;
  background: var(--bg);
  color-scheme: dark;
  scroll-behavior: auto;
  scroll-padding-block-start: calc(var(--header-h) + 18px);
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-block-size: 100vh;
  min-block-size: 100dvh;
  overflow-x: clip;
  background:
    radial-gradient(
      circle at top center,
      rgba(92, 200, 255, 0.055),
      transparent 32rem
    ),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  overflow-wrap: break-word;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.modal-open {
  overscroll-behavior: none;
}

/* Mobile-navigation runtime lock; nav.js toggles this defensively. */
html.nav-open,
body.nav-open {
  overflow: hidden;
  overscroll-behavior: none;
}

img,
svg,
video,
canvas,
picture {
  display: block;
  max-inline-size: 100%;
}

img,
video {
  block-size: auto;
}

iframe {
  max-inline-size: 100%;
  border: 0;
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
}

button,
select {
  text-transform: none;
}

button {
  border-radius: 0;
}

textarea {
  overflow: auto;
}

a {
  color: var(--brand-green);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-hover);
}

strong {
  color: var(--text);
  font-weight: 700;
}

code,
kbd,
samp,
pre {
  font-family: var(--mono);
}

pre {
  max-inline-size: 100%;
  overflow-x: auto;
  tab-size: 2;
  -webkit-overflow-scrolling: touch;
}

code {
  overflow-wrap: anywhere;
}

hr {
  block-size: 1px;
  border: 0;
  background: var(--border);
}

main:focus {
  outline: none;
}

[hidden] {
  display: none !important;
}


/* ==========================================================================
   3. ACCESSIBILITY
   ========================================================================== */

.skip-link {
  position: fixed;
  inset-block-start: -100%;
  inset-inline-start: 1rem;
  z-index: 10000;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  color: var(--text);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.skip-link:focus,
.skip-link:focus-visible {
  inset-block-start: 1rem;
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

.visually-hidden,
.sr-only {
  position: absolute !important;
  inline-size: 1px !important;
  block-size: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.sr-only[aria-hidden="true"] {
  visibility: hidden;
}

:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

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

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}


/* ==========================================================================
   4. LAYOUT
   ========================================================================== */

.container {
  inline-size: min(
    var(--container-maxw),
    calc(100vw - (var(--gutter) * 2))
  );
  margin-inline: auto;
}

.container.narrow {
  inline-size: min(
    var(--container-narrow),
    calc(100vw - (var(--gutter) * 2))
  );
  margin-inline: auto;
}

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

.section.alt {
  background: rgba(255, 255, 255, 0.018);
}

.section.highlight {
  background:
    radial-gradient(
      circle at top left,
      rgba(92, 200, 255, 0.055),
      transparent 28rem
    ),
    rgba(255, 255, 255, 0.01);
}

.two-col {
  display: grid;
  grid-template-columns:
    minmax(0, 1.1fr)
    minmax(280px, 0.9fr);
  gap: clamp(24px, 4vw, 42px);
  align-items: start;
}

.section-actions,
.cta-row,
.cta-trust,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.section-actions {
  margin-block-start: 24px;
}

.cta-row {
  margin-block-start: 28px;
}

.cta-trust {
  margin-block-start: 12px;
}


/* ==========================================================================
   5. TYPOGRAPHY
   ========================================================================== */

h1,
h2,
h3,
h4 {
  color: var(--text);
  line-height: 1.16;
  letter-spacing: -0.025em;
}

h1 {
  font-size: var(--h1);
}

h2 {
  font-size: var(--h2);
}

h3 {
  font-size: var(--h3);
}

h4,
.h4 {
  font-size: var(--h4);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

p + p {
  margin-block-start: 1rem;
}

.lead {
  max-inline-size: var(--hero-text-maxch);
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.7;
}

.small {
  font-size: 0.9rem;
}

.tiny {
  font-size: 0.8rem;
}

.muted {
  color: var(--muted);
}

.tiny-muted {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.note {
  margin-block-start: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(92, 200, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(92, 200, 255, 0.055);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.eyebrow {
  margin-block-end: 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tagline {
  margin-block-start: 24px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.text-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

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

.nowrap {
  white-space: nowrap;
}

.mono {
  font-family: var(--mono);
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Use for hashes, addresses, IDs and other technical strings that may be
   longer than the available inline space. Keeps normal prose unaffected. */
.technical-string {
  min-inline-size: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}


/* ==========================================================================
   6. SHARED HEADER FOUNDATION
   --------------------------------------------------------------------------
   Layout and responsive behavior belong to page-specific navigation CSS.
   ========================================================================== */

.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 1000;
  min-block-size: var(--header-h);
  border-block-end: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(2, 6, 23, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.header-inner {
  min-block-size: var(--header-h);
}

.site-nav {
  min-inline-size: 0;
}

.header-actions {
  min-inline-size: 0;
}

.gfc-header-logo {
  text-decoration: none;
}

.gfc-header-logo img {
  object-fit: contain;
}


/* ==========================================================================
   7. SHARED LANGUAGE SWITCH FOUNDATION
   --------------------------------------------------------------------------
   Page-specific navigation CSS may refine these values.
   ========================================================================== */

.modal-lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-inline-size: 0;
}

.lang-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-inline-size: 44px;
  min-block-size: 44px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.lang-pill-btn:hover,
.lang-pill-btn:focus-visible {
  border-color: rgba(92, 200, 255, 0.68);
  background: rgba(92, 200, 255, 0.1);
  color: var(--accent);
}

.lang-pill-btn.is-active,
.lang-pill-btn[aria-current="page"] {
  border-color: rgba(92, 200, 255, 0.68);
  background: rgba(92, 200, 255, 0.1);
  color: var(--accent);
}

.lang-sep {
  color: var(--muted);
  font-size: 0.9rem;
}


/* ==========================================================================
   8. BUTTONS AND INTERACTIVE CONTROLS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-block-size: 44px;
  padding: 0.68rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 140ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
}

.btn,
.lang-pill-btn,
.link-btn {
  touch-action: manipulation;
}

.btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background:
    linear-gradient(
      90deg,
      var(--brand-blue),
      var(--brand-green)
    );
  color: var(--brand-ink);
  box-shadow:
    0 10px 26px rgba(14, 165, 233, 0.18);
}

.btn-secondary {
  border-color: rgba(92, 200, 255, 0.55);
  background: rgba(92, 200, 255, 0.055);
  color: var(--accent);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
}

.btn-outline {
  border-color: rgba(92, 200, 255, 0.45);
  background: transparent;
  color: var(--accent);
}

.btn-small,
.btn.small {
  min-block-size: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.88rem;
}

.btn[aria-disabled="true"],
.btn[disabled],
button[aria-disabled="true"],
button[disabled] {
  opacity: 0.58;
  cursor: not-allowed;
}

.btn[disabled]:hover,
button[disabled]:hover,
[aria-disabled="true"]:hover {
  filter: none;
  transform: none;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand-green);
  font: inherit;
  text-align: start;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.link-btn:hover {
  color: var(--accent-hover);
}

.link-btn.subtle {
  color: var(--muted);
}

.link-btn.subtle:hover {
  color: var(--accent);
}


/* ==========================================================================
   9. CARDS AND SHARED SURFACES
   ========================================================================== */

.card,
.surface,
.surface-soft {
  min-inline-size: 0;
}

.card {
  display: grid;
  gap: 0.75rem;
  padding: clamp(18px, 2.6vw, 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.035),
      rgba(255, 255, 255, 0.018)
    ),
    var(--surface-alt);
  box-shadow: var(--shadow-soft);
}

.card-header {
  margin-block-end: 0.4rem;
}

.card-title {
  margin: 0;
  font-size: var(--h3);
}

.card-body {
  display: grid;
  gap: 0.6rem;
}

.surface {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.surface-soft {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-alt);
}


/* ==========================================================================
   10. FORMS
   ========================================================================== */

.form {
  display: grid;
  gap: 10px;
}

.form label {
  display: block;
  color: var(--text);
  font-weight: 700;
}

.form input,
.form textarea,
.form select {
  inline-size: 100%;
  min-inline-size: 0;
  min-block-size: 44px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(2, 6, 23, 0.72);
  color: var(--text);
}

.form textarea {
  min-block-size: 7rem;
  resize: vertical;
}

.form input::placeholder,
.form textarea::placeholder {
  color: rgba(156, 163, 175, 0.78);
}

.form input:hover,
.form textarea:hover,
.form select:hover {
  border-color: rgba(92, 200, 255, 0.36);
}

.form input:focus,
.form textarea:focus,
.form select:focus {
  outline: 3px solid rgba(92, 200, 255, 0.24);
  border-color: rgba(92, 200, 255, 0.72);
}

.form input:disabled,
.form textarea:disabled,
.form select:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.input-error,
.form [aria-invalid="true"] {
  border-color: var(--danger) !important;
  outline: 3px solid rgba(239, 68, 68, 0.25) !important;
}

#form-status,
[data-form-status] {
  min-block-size: 1.4em;
}

#form-status[data-status="error"],
[data-form-status][data-status="error"] {
  color: #fca5a5;
}

#form-status[data-status="success"],
[data-form-status][data-status="success"] {
  color: #86efac;
}

#form-status[data-status="info"],
[data-form-status][data-status="info"] {
  color: var(--accent);
}


/* ==========================================================================
   11. GLOBAL RUNTIME STATES
   ========================================================================== */

.gfc-error-banner {
  inline-size: min(
    var(--container-maxw),
    calc(100vw - (var(--gutter) * 2))
  );
  margin: 14px auto 0;
  padding: 12px 14px;
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: var(--radius);
  background: rgba(245, 158, 11, 0.1);
  color: #fde68a;
  font-size: 0.92rem;
  line-height: 1.5;
}

.gfc-form-toast {
  position: fixed;
  inset-inline-end: 18px;
  inset-block-end: 18px;
  z-index: 1020;
  max-inline-size: min(420px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid rgba(92, 200, 255, 0.28);
  border-radius: var(--radius);
  background: rgba(11, 17, 32, 0.96);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 0.92rem;
  line-height: 1.5;
}

.gfc-form-toast[data-visible="true"] {
  animation: gfc-toast-in 160ms ease-out both;
}

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

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

#gfc-hints {
  pointer-events: none;
}

#gfc-hints .gfc-hint {
  pointer-events: auto;
}


/* ==========================================================================
   12. LISTS AND UTILITIES
   ========================================================================== */

.plain {
  margin: 0;
  padding: 0;
  list-style: none;
}

.compact {
  padding-inline-start: 18px;
}

.compact li {
  margin-block: 4px;
}

.bullets {
  padding-inline-start: 20px;
}

.bullets li {
  margin-block: 8px;
}

.mt-5 {
  margin-block-start: 1.25rem;
}


/* ==========================================================================
   13. TABLET
   ========================================================================== */

@media (max-width: 900px) {
  html,
  body {
    inline-size: 100%;
  }

  body {
    overflow-wrap: break-word;
    word-break: normal;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .container,
  .two-col,
  .card,
  .surface,
  .surface-soft {
    min-inline-size: 0;
  }

  img,
  video,
  svg,
  canvas {
    max-inline-size: 100%;
    block-size: auto;
  }
}


/* ==========================================================================
   14. MOBILE
   ========================================================================== */

@media (max-width: 640px) {
  :root {
    --header-h: 68px;
  }

  .section {
    padding-block: 52px;
  }

  .lead {
    font-size: 1.02rem;
  }

  .card {
    padding: 1rem;
  }

  .section-actions,
  .cta-row,
  .cta-trust,
  .card-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .section-actions .btn,
  .cta-row .btn,
  .cta-trust .btn,
  .card-actions .btn {
    inline-size: 100%;
  }

  .lang-pill-btn {
    min-inline-size: 44px;
    min-block-size: 44px;
    padding-inline: 9px;
  }

  .gfc-form-toast {
    inset-inline-end: 12px;
    inset-block-end: 12px;
    max-inline-size: calc(100vw - 24px);
  }
}


/* ==========================================================================
   15. SMALL MOBILE
   ========================================================================== */

@media (max-width: 390px) {
  .lang-pill-btn {
    min-inline-size: 44px;
    min-block-size: 44px;
    padding-inline: 8px;
    font-size: 0.82rem;
  }
}


/* ==========================================================================
   16. LIGHT COLOR SCHEME
   ========================================================================== */

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --bg-soft: #f4f7fa;

    --surface: #ffffff;
    --surface-alt: #f4f7fa;
    --surface-2: #e8edf3;

    --surface-glass: rgba(255, 255, 255, 0.92);
    --surface-glass-soft: rgba(248, 250, 252, 0.9);

    --text: #111827;
    --text-muted: #5f6b7d;
    --ink: var(--text);
    --ink-muted: rgba(17, 24, 39, 0.7);
    --muted: var(--text-muted);

    --line: #d7dde5;
    --border: var(--line);
    --border-soft: rgba(14, 24, 42, 0.11);
    --border-strong: #aab4c2;

    --accent: #087aaa;
    --accent-hover: #045f86;
    --brand: #087aaa;
    --brand-blue: #066d96;
    --brand-green: #087aaa;
    --brand-gold: #087aaa;
    --brand-ink: #ffffff;

    --shadow:
      0 18px 54px rgba(14, 24, 42, 0.18);

    --shadow-soft:
      0 6px 18px rgba(14, 24, 42, 0.08);

    --shadow-card:
      0 16px 40px rgba(14, 24, 42, 0.09);

    --hero-bg: #eef4f9;
    --hero-ink: #111827;
    --hero-muted: #5f6b7d;
    --hero-accent: #087aaa;
    --hero-accent-ink: #ffffff;
    --hero-surface: rgba(255, 255, 255, 0.94);
    --hero-surface-soft: rgba(247, 250, 253, 0.92);
    --hero-border: rgba(14, 24, 42, 0.12);

    --sec-bg: #ffffff;
    --sec-bg-soft: #f4f7fa;
    --sec-surface: rgba(255, 255, 255, 0.92);
    --sec-surface-soft: rgba(248, 250, 252, 0.9);
    --sec-border: rgba(14, 24, 42, 0.12);
    --sec-border-strong: rgba(14, 24, 42, 0.2);
    --sec-ink: #111827;
    --sec-muted: #5f6b7d;
    --sec-accent: #087aaa;
    --sec-accent-ink: #ffffff;
    --sec-shadow:
      0 18px 42px rgba(14, 24, 42, 0.08);

    --ft-bg: #f4f7fa;
    --ft-surface: rgba(255, 255, 255, 0.9);
    --ft-border: rgba(14, 24, 42, 0.12);
    --ft-text: #111827;
    --ft-muted: #5f6b7d;
    --ft-accent: #087aaa;
    --ft-accent-ink: #ffffff;

    --md-ink: #111827;
    --md-muted: #5f6b7d;
    --md-bg: #ffffff;
    --md-surface: rgba(14, 24, 42, 0.045);
    --md-surface-2: rgba(14, 24, 42, 0.025);
    --md-border: rgba(14, 24, 42, 0.14);
    --md-accent: #087aaa;
    --md-accent-ink: #ffffff;

    --backdrop-color: rgba(14, 24, 42, 0.45);
  }

  html {
    color-scheme: light;
  }

  body {
    background:
      radial-gradient(
        circle at top center,
        rgba(20, 135, 190, 0.06),
        transparent 32rem
      ),
      var(--bg);
  }

  .site-header {
    border-block-end-color: rgba(14, 24, 42, 0.09);
    background: rgba(255, 255, 255, 0.88);
  }

  .lang-pill-btn {
    border-color: rgba(14, 24, 42, 0.13);
    background: rgba(14, 24, 42, 0.025);
  }

  .btn-ghost {
    border-color: rgba(14, 24, 42, 0.14);
    background: rgba(14, 24, 42, 0.025);
  }

  .card {
    border-color: var(--line);
    background:
      linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.96),
        rgba(248, 250, 252, 0.92)
      );
  }

  .form input,
  .form textarea,
  .form select {
    background: rgba(14, 24, 42, 0.025);
    color: var(--text);
  }

  .form input::placeholder,
  .form textarea::placeholder {
    color: rgba(95, 107, 125, 0.75);
  }

  #form-status[data-status="error"],
  [data-form-status][data-status="error"] {
    color: #a12626;
  }

  #form-status[data-status="success"],
  [data-form-status][data-status="success"] {
    color: #146b47;
  }

  .gfc-error-banner {
    color: #754c00;
  }

  .gfc-form-toast {
    border-color: rgba(20, 135, 190, 0.25);
    background: rgba(255, 255, 255, 0.97);
    color: var(--text);
  }
}


/* ==========================================================================
   16B. EXPLICIT DARK PAGE OVERRIDE
   --------------------------------------------------------------------------
   Pages that declare data-color-scheme="dark" remain visually and
   semantically dark even when the operating system prefers a light scheme.
   This prevents mixed light/dark surfaces and low-contrast inherited text.
   ========================================================================== */

html[data-color-scheme="dark"] {
  color-scheme: dark;

  --bg: #020617;
  --bg-soft: #050816;
  --surface: #070b14;
  --surface-alt: #0b1120;
  --surface-2: #111827;
  --surface-glass: rgba(255, 255, 255, 0.045);
  --surface-glass-soft: rgba(255, 255, 255, 0.025);

  --text: #e5e7eb;
  --text-muted: #9ca3af;
  --ink: var(--text);
  --ink-muted: rgba(229, 237, 247, 0.72);
  --muted: var(--text-muted);

  --line: #1f2937;
  --border: var(--line);
  --border-soft: rgba(255, 255, 255, 0.1);
  --border-strong: #374151;

  --accent: #5cc8ff;
  --accent-hover: #8bddff;
  --brand: #0ea5e9;
  --brand-blue: #0ea5e9;
  --brand-green: #5cc8ff;
  --brand-gold: #5cc8ff;
  --brand-ink: #020617;

  --shadow: 0 18px 60px rgba(0, 0, 0, 0.7);
  --shadow-soft: 0 6px 18px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 16px 40px rgba(0, 0, 0, 0.24);

  --hero-bg: #0b0d12;
  --hero-ink: #eaf2f7;
  --hero-muted: rgba(234, 242, 247, 0.76);
  --hero-accent: #5cc8ff;
  --hero-accent-ink: #08171f;
  --hero-surface: rgba(255, 255, 255, 0.06);
  --hero-surface-soft: rgba(255, 255, 255, 0.04);
  --hero-border: rgba(255, 255, 255, 0.14);

  --sec-bg: #0b0d12;
  --sec-bg-soft: #0f1318;
  --sec-surface: rgba(255, 255, 255, 0.06);
  --sec-surface-soft: rgba(255, 255, 255, 0.04);
  --sec-border: rgba(255, 255, 255, 0.14);
  --sec-border-strong: rgba(255, 255, 255, 0.22);
  --sec-ink: #eaf2f7;
  --sec-muted: rgba(234, 242, 247, 0.7);
  --sec-accent: #5cc8ff;
  --sec-accent-ink: #08202c;
  --sec-shadow: 0 8px 26px rgba(0, 0, 0, 0.4);

  --ft-bg: #0b0d12;
  --ft-surface: rgba(255, 255, 255, 0.05);
  --ft-border: rgba(255, 255, 255, 0.12);
  --ft-text: #eaf2f7;
  --ft-muted: rgba(234, 242, 247, 0.75);
  --ft-accent: #5cc8ff;
  --ft-accent-ink: #08202c;

  --md-ink: #eaf2f7;
  --md-muted: rgba(234, 242, 247, 0.78);
  --md-bg: #0b0d12;
  --md-surface: rgba(255, 255, 255, 0.08);
  --md-surface-2: rgba(255, 255, 255, 0.06);
  --md-border: rgba(255, 255, 255, 0.16);
  --md-accent: #5cc8ff;
  --md-accent-ink: #08202c;
  --backdrop-color: rgba(5, 10, 16, 0.65);
}

html[data-color-scheme="dark"] body {
  background:
    radial-gradient(
      circle at top center,
      rgba(92, 200, 255, 0.055),
      transparent 32rem
    ),
    var(--bg);
  color: var(--text);
}

html[data-color-scheme="dark"] .site-header {
  border-block-end-color: rgba(255, 255, 255, 0.09);
  background: rgba(2, 6, 23, 0.88);
}

html[data-color-scheme="dark"] .lang-pill-btn {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

html[data-color-scheme="dark"] .btn-ghost {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
}

html[data-color-scheme="dark"] .card {
  border-color: var(--line);
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.035),
      rgba(255, 255, 255, 0.018)
    ),
    var(--surface-alt);
}

html[data-color-scheme="dark"] .form input,
html[data-color-scheme="dark"] .form textarea,
html[data-color-scheme="dark"] .form select {
  background: rgba(2, 6, 23, 0.72);
  color: var(--text);
}

html[data-color-scheme="dark"] .form input::placeholder,
html[data-color-scheme="dark"] .form textarea::placeholder {
  color: rgba(156, 163, 175, 0.78);
}

html[data-color-scheme="dark"] #form-status[data-status="error"],
html[data-color-scheme="dark"] [data-form-status][data-status="error"] {
  color: #fca5a5;
}

html[data-color-scheme="dark"] #form-status[data-status="success"],
html[data-color-scheme="dark"] [data-form-status][data-status="success"] {
  color: #86efac;
}

html[data-color-scheme="dark"] .gfc-error-banner {
  color: #fde68a;
}

html[data-color-scheme="dark"] .gfc-form-toast {
  border-color: rgba(92, 200, 255, 0.28);
  background: rgba(11, 17, 32, 0.96);
  color: var(--text);
}


/* ==========================================================================
   17. FORCED COLORS
   ========================================================================== */

@media (forced-colors: active) {
  html,
  body {
    background: Canvas;
    color: CanvasText;
  }

  .site-header {
    border-block-end: 1px solid CanvasText;
    background: Canvas;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .btn,
  .link-btn,
  .lang-pill-btn,
  .card,
  .surface,
  .surface-soft,
  .form input,
  .form textarea,
  .form select,
  .gfc-error-banner,
  .gfc-form-toast {
    border: 1px solid CanvasText;
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
  }

  .btn-primary {
    background: ButtonFace;
    color: ButtonText;
  }

  .btn:focus-visible,
  .link-btn:focus-visible,
  .lang-pill-btn:focus-visible,
  .form input:focus,
  .form textarea:focus,
  .form select:focus {
    outline: 2px solid Highlight;
  }
}


/* ==========================================================================
   18. PRINT
   ========================================================================== */

@media print {
  :root {
    --bg: #ffffff;
    --bg-soft: #ffffff;
    --surface: #ffffff;
    --surface-alt: #ffffff;
    --surface-2: #ffffff;
    --text: #000000;
    --text-muted: #000000;
    --muted: #000000;
    --line: #000000;
    --border: #000000;
    --accent: #000000;
    --brand-green: #000000;
  }

  html,
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  body {
    min-block-size: auto;
  }

  a {
    color: #000000 !important;
    text-decoration: underline !important;
  }

  .site-header {
    position: static !important;
    border-block-end: 1px solid #000000 !important;
    background: #ffffff !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  .card,
  .surface,
  .surface-soft,
  .note,
  .gfc-error-banner {
    border: 1px solid #000000 !important;
    background: none !important;
    color: #000000 !important;
    box-shadow: none !important;
  }

  .gfc-form-toast {
    display: none !important;
  }

  .btn {
    border: 1px solid #000000 !important;
    background: none !important;
    color: #000000 !important;
    box-shadow: none !important;
  }

  .skip-link {
    display: none !important;
  }
}