/*
 * Context Design Co: v4 light register (2026-10-27)
 * Import order: v4/tokens.css, v4/glass.css, THIS FILE, then page styles.
 *
 * Charl, 2026-10-27: "the theme has gone too dark for a professional firm."
 * The gateway (index.html) moved first; /labs/ and /co/ follow with this file.
 * It re-points the v4 tokens at the gateway's light values (pale silver canvas,
 * navy ink, copper the only accent) and re-surfaces the .g-* primitives as
 * white glass with navy hairlines. Pages that do not import it stay obsidian.
 *
 * Contrast (WCAG 2.x, measured against #F3F4F7 canvas and white glass):
 *   ink 14.2  ·  ink-2 10.3  ·  ink-3 6.1  ·  ink-4 5.2  ·  copper text 5.1
 *   white on the copper fill (lightest stop) 4.7  ·  metal-word H1 stops 3.1 minimum (large text)
 */

:root {
  /* canvas: the obsidian ramp becomes a pale silver ramp. Keeping the token
     names lets every scrim, seam and frost band that reads them turn light. */
  --cdc-obsidian-0: #E6E9EE;
  --cdc-obsidian:   #F3F4F7;
  --cdc-obsidian-2: #EEF0F4;
  --cdc-obsidian-3: #FFFFFF;
  --cdc-obsidian-rgb: 243, 244, 247;

  /* ink: navy ramp, every tier AA on the canvas and on white glass */
  --cdc-ink:   #15233F;
  --cdc-ink-2: #2E3A56;
  --cdc-ink-3: #535C70;
  --cdc-ink-4: #5F6779;

  /* copper: fills keep #C6711F; copper TEXT moves to a deeper tone, because
     #E9A65F (links on dark) is 1.9:1 on a light canvas */
  --cdc-copper-hi:    #9E5517;
  --cdc-copper-2:     #8B4A14;
  --cdc-copper-glow:  rgba(198, 113, 31, 0.22);
  --cdc-copper-veil:  rgba(198, 113, 31, 0.07);
  --cdc-copper-air:   rgba(198, 113, 31, 0.05);

  /* hairlines: navy-tinted lines on light */
  --cdc-hairline:        rgba(21, 35, 63, 0.12);
  --cdc-hairline-soft:   rgba(21, 35, 63, 0.08);
  --cdc-hairline-strong: rgba(21, 35, 63, 0.20);
  --cdc-hairline-copper: rgba(158, 85, 23, 0.40);
  --cdc-gridline:        rgba(21, 35, 63, 0.07);

  /* glass: white glass, the gateway door recipe */
  --cdc-glass-tint:       rgba(255, 255, 255, 0.72);
  --cdc-glass-tint-2:     rgba(255, 255, 255, 0.66);
  --cdc-glass-tint-3:     rgba(255, 255, 255, 0.58);
  --cdc-glass-tint-solid: #FFFFFF;
  --cdc-glass-sat:        1.3;
  --cdc-glass-bright:     1.02;
  --cdc-glass-edge:       inset 0 1px 0 rgba(255, 255, 255, 0.9),
                          inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  --cdc-glass-border:     1px solid rgba(21, 35, 63, 0.10);
  --cdc-glass-border-top: rgba(255, 255, 255, 0.95);
  --cdc-glass-shadow:     0 1px 2px rgba(21, 35, 63, 0.05), 0 20px 50px -24px rgba(21, 35, 63, 0.24);
  --cdc-glass-shadow-lift: 0 2px 4px rgba(21, 35, 63, 0.06), 0 30px 60px -24px rgba(198, 113, 31, 0.30);

  /* steel hero: white scrims instead of obsidian ones (they read the rgb above) */
  --cdc-steel-scrim-x: linear-gradient(90deg,
                         rgba(var(--cdc-obsidian-rgb), 0.98) 0%,
                         rgba(var(--cdc-obsidian-rgb), 0.95) 44%,
                         rgba(var(--cdc-obsidian-rgb), 0.55) 54%,
                         rgba(var(--cdc-obsidian-rgb), 0) 68%);
  --cdc-steel-scrim-top: linear-gradient(180deg,
                         rgba(var(--cdc-obsidian-rgb), 0.98) 0%,
                         rgba(var(--cdc-obsidian-rgb), 0.72) 10%,
                         rgba(var(--cdc-obsidian-rgb), 0) 24%);
}

/* stacked hero (phones, tablets): the slab sits right under the nav, so the top
   scrim carries the whole job of keeping the nav links readable */
@media (max-width: 980px) {
  :root {
    --cdc-steel-scrim-top: linear-gradient(180deg,
                           rgba(var(--cdc-obsidian-rgb), 0.98) 0%,
                           rgba(var(--cdc-obsidian-rgb), 0.86) 9%,
                           rgba(var(--cdc-obsidian-rgb), 0) 22%);
  }
}

body {
  color: var(--cdc-ink-2);
  background:
    radial-gradient(ellipse 70% 40% at 82% -8%, rgba(198, 113, 31, 0.06) 0%, transparent 60%),
    var(--cdc-obsidian);   /* flat canvas: the hero's steel layer seams into this exact value */
  background-color: var(--cdc-obsidian);
}
::selection { background: rgba(198, 113, 31, 0.22); color: var(--cdc-ink); }

/* ---- steel hero: the milled slab, lifted to bright anodised steel ----
   The photo is a navy slab with a copper chamfer. Lifting brightness and
   pulling saturation turns it into pale brushed metal; the copper rim stays
   warm. The white scrims (tokens above) keep the copy on a calm plane. */
.g-steel { background: var(--cdc-obsidian); }
.g-steel img { filter: brightness(2.35) contrast(0.82) saturate(0.6); opacity: .8; }   /* the photo's dark field lifts to pale steel; opacity lets the canvas through it */
.g-steel__sweep { mix-blend-mode: soft-light; opacity: .8; }

/* ---- frost nav: light frost, navy brand ---- */
.g-nav__band { background: rgba(255, 255, 255, calc(var(--nav-bg) * var(--band-tint) * 1.3)); }   /* whiter than the gateway: the nav rides over lifted steel here */
.g-nav__brand { color: var(--cdc-navy, #15233F); font-weight: 600; }
.g-nav__links a { color: var(--cdc-ink-3); font-weight: 500; }
.g-nav__links a:hover { color: var(--cdc-copper-hi); }
/* copper in the nav floats over lifted steel at the top of the hero: the deepest copper keeps it AA */
.g-nav__brand .brand-accent,
.g-nav__links a.is-cta { color: var(--cdc-copper-deep); }
.g-nav__links a.is-cta:hover { color: var(--cdc-navy, #15233F); }
/* the shared login pill is dark-register by design; here it goes navy, as on the gateway */
.g-nav .cdc-login { color: #15233F !important; border-color: rgba(21, 35, 63, 0.22); background: rgba(255, 255, 255, 0.5); }
.g-nav .cdc-login:hover { color: #9E5517 !important; border-color: #C6711F; background: rgba(255, 255, 255, 0.8); }
.g-nav .cdc-login:focus-visible { outline-color: #9E5517; }

/* ---- glass surfaces: white glass, inner bezel highlight, soft navy shadow ---- */
.g-card:hover {
  background: rgba(255, 255, 255, 0.84);
  border-color: rgba(198, 113, 31, 0.32);
}
.g-panel--edge::before {
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(21, 35, 63, 0.08) 38%,
    rgba(198, 113, 31, 0.28) 62%,
    rgba(255, 255, 255, 0.9) 100%);
}
.g-card--spot::after {
  background: radial-gradient(480px circle at var(--mx, 50%) var(--my, 0%),
    rgba(198, 113, 31, 0.08), transparent 42%);
}
.g-glow { opacity: .32; }
.g-glow--soft { opacity: .18; }

/* ---- controls ---- */
.g-btn:focus-visible { outline: 2px solid #9E5517; outline-offset: 3px; }
.g-btn--fill {
  background: linear-gradient(180deg, #B05F1B 0%, #9E5517 58%, #7E4312 130%);
  border: 1px solid rgba(139, 74, 20, 0.5);
  color: #FFFFFF;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 10px 22px -10px rgba(139, 74, 20, 0.55);
}
.g-btn--fill:hover { background: linear-gradient(180deg, #A65A17 0%, #8B4A14 58%, #6E3A10 130%); }
.g-btn--glass { color: var(--cdc-ink); }
.g-btn--glass:hover { border-color: rgba(198, 113, 31, 0.45); background: rgba(255, 255, 255, 0.85); }
.g-btn--ghost:hover { color: var(--cdc-copper-hi); }

/* ---- type ---- */
.g-kicker { color: var(--cdc-ink-3); }

/* ---- fallbacks: solid white where glass cannot blur ---- */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .g-panel, .g-card { background: #FFFFFF; }
  .g-pill, .g-btn--glass { background: #FFFFFF; }
  .g-nav__band { background: rgba(255, 255, 255, calc(var(--nav-bg) * var(--band-tint))); }
}
@media (prefers-reduced-transparency: reduce) {
  .g-panel, .g-card, .g-pill, .g-btn--glass, .g-nav__band { background: #FFFFFF !important; }
}
