/* ══════════════════════════════════════════════════════════════
   GREAT EAGLE DESIGNS — Shared Design System
   Liquid Glass · Univers · #FF2A00 / #ffffff / #180a08
   ══════════════════════════════════════════════════════════════ */

:root {
  /* Brand */
  --accent:        #FF2A00;
  --accent-hover:  #e02300;
  --accent-dim:    rgba(255, 42, 0, 0.12);

  /* Light mode — tuned for clear contrast so tiles, borders, shadows and
     reveals read just as strongly as in dark mode. */
  --bg:            #ffffff;
  --bg-secondary:  #f1efec;
  --surface:       rgba(255,255,255,0.7);
  --surface-hover: rgba(255,255,255,0.95);
  --border:        rgba(0,0,0,0.14);
  --border-glass:  rgba(255,255,255,0.6);
  --text-primary:  #111111;
  --text-secondary:#4a4a4a;
  --text-tertiary: #8a8a8a;
  --overlay:       rgba(255,42,0,0.08);

  /* Glass */
  --glass-bg:      rgba(255,255,255,0.6);
  --glass-border:  rgba(0,0,0,0.06);
  --glass-shadow:  rgba(0,0,0,0.14);
  --glass-radius:  20px;
  --glass-blur:    28px;

  /* Ambient background gradient (light) — subtle warm wash */
  --bg-gradient:
    radial-gradient(120% 80% at 80% 0%, rgba(255,42,0,0.06) 0%, transparent 55%),
    radial-gradient(100% 70% at 0% 100%, rgba(255,107,0,0.05) 0%, transparent 50%),
    var(--bg);

  /* Warm orange-tinted hover glow (shared across all interactive tiles) */
  --hover-glow: 0 14px 36px rgba(255,42,0,0.26), 0 5px 14px rgba(255,42,0,0.18);
  --hover-lift: translateY(-3px) scale(1.01);
  --hover-ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* Consistent chip/pill padding shared across all chips site-wide */
  --chip-pad: 8px 16px;

  /* Typography — Univers with fallbacks */
  --font: 'Univers', 'UniversLTStd', 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --fs-primary:   16px;
  --fs-secondary: 14px;
  --fs-tertiary:  12px;

  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

[data-theme="dark"] {
  --bg:            #180a08;
  --bg-secondary:  #220d0a;
  --surface:       rgba(255,255,255,0.06);
  --surface-hover: rgba(255,255,255,0.10);
  --border:        rgba(255,255,255,0.08);
  --border-glass:  rgba(255,255,255,0.14);
  --text-primary:  #ffffff;
  --text-secondary:rgba(255,255,255,0.6);
  --text-tertiary: rgba(255,255,255,0.35);
  --overlay:       rgba(255,255,255,0.06);
  --glass-bg:      rgba(24,10,8,0.55);
  --glass-border:  rgba(255,255,255,0.12);
  --glass-shadow:  rgba(0,0,0,0.4);

  /* Ambient background gradient (dark) — warm ember glow, covers full screen */
  --bg-gradient:
    radial-gradient(110% 75% at 85% -5%, rgba(255,42,0,0.22) 0%, transparent 55%),
    radial-gradient(90% 70% at 0% 105%, rgba(180,30,0,0.16) 0%, transparent 55%),
    var(--bg);

  /* Brighter warm glow reads better on the dark ember background */
  --hover-glow: 0 14px 40px rgba(255,42,0,0.34), 0 4px 14px rgba(255,42,0,0.22);
}

/* ─── Univers font (falls back to Inter if not licensed locally) ─── */
@font-face {
  font-family: 'Univers';
  src: local('Univers'), local('UniversLTStd'), local('Univers LT Std');
  font-weight: 400;
  font-display: swap;
}

/* ─── Inter — SELF-HOSTED (latin woff2) ───────────────────────────
   Was loaded from fonts.googleapis.com, which leaks visitor IPs to
   Google. Now served from assets/fonts/ so no third-party font request.
   Paths are relative to this stylesheet (assets/site.css). */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300; font-display: swap; src: url('fonts/inter-300.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/inter-700.woff2') format('woff2'); }

* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* Smoothness is handled by the JS momentum scroller (site.js).
   On touch/reduced-motion we fall back to native smooth. */
@media (hover: none), (prefers-reduced-motion: reduce) { html { scroll-behavior: smooth; } }

body {
  font-family: var(--font);
  font-size: var(--fs-primary);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
  min-height: 100vh;
  overflow-x: clip;
  position: relative;
}

/* Full-viewport ambient gradient — always fits the screen, fixed on scroll */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--bg-gradient);
  transition: background 0.4s var(--ease);
}

a { text-decoration: none; color: inherit; }

/* ─── LIQUID GLASS ──────────────────────────────────────────────── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.8);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.8);
  border: 1px solid var(--glass-border);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.25),
    inset 0 -1px 0 rgba(0,0,0,0.05),
    0 8px 32px var(--glass-shadow),
    0 1px 0 rgba(255,255,255,0.1);
}

.liquid-glass { position: relative; isolation: isolate; }
.liquid-glass::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  border-radius: inherit;
  backdrop-filter: url(#lg-filter);
  -webkit-backdrop-filter: url(#lg-filter);
}
/* Wet-droplet specular rim: a bright top-edge glint fading to a soft inner
   ring, like light catching the curved lip of an Apple "Liquid Glass" surface. */
.liquid-glass::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  border-radius: inherit;
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.65),      /* crisp top glint */
    inset 0 0 24px -6px rgba(255,255,255,0.55),   /* inner glow ring */
    inset 0 -1px 2px rgba(255,255,255,0.12);      /* faint bottom catch */
  background:
    linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0) 32%),
    rgba(255,255,255,0.04);
  pointer-events: none;
}
/* Light mode: a rounder, brighter "bubble" — the top glint reads as a curved
   highlight and the rim carries a soft double ring, like a clear glass bubble. */
[data-theme="light"] .liquid-glass::before {
  box-shadow:
    inset 0 1.5px 1px rgba(255,255,255,0.9),
    inset 0 0 30px -4px rgba(255,255,255,0.7),
    inset 0 0 0 1px rgba(255,255,255,0.35),
    inset 0 -2px 6px rgba(255,255,255,0.35);
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0) 45%),
    linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0) 40%);
}
/* Light mode: gentle magnify feel — brighten + slightly boost the backdrop so
   the low-refraction glass still lenses the content underneath. */
[data-theme="light"] .liquid-glass::after {
  backdrop-filter: url(#lg-filter) brightness(1.04) contrast(1.02);
  -webkit-backdrop-filter: url(#lg-filter) brightness(1.04) contrast(1.02);
}

/* ─── NAV ───────────────────────────────────────────────────────── */
nav {
  position: fixed; top: 16px; left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - 48px); max-width: 1000px;
  border-radius: 100px;
  padding: 0 8px 0 20px; height: 52px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { font-size: var(--fs-primary); font-weight: 600; letter-spacing: -0.02em; color: var(--text-primary); white-space: nowrap; }
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
  font-size: var(--fs-secondary); font-weight: 500; color: var(--text-secondary);
  padding: 6px 14px; border-radius: 100px; transition: color 0.2s, background 0.2s; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); background: var(--overlay); }
.nav-actions { display: flex; align-items: center; gap: 8px; }

/* Icon buttons in nav */
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-secondary); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; flex-shrink: 0; position: relative;
}
.icon-btn:hover { background: var(--surface-hover); color: var(--text-primary); }
.icon-btn svg { width: 16px; height: 16px; }

/* Theme toggle icon swap */
.icon-sun { display: none; }
.icon-moon { display: block; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* ─── BUTTONS ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 100px;
  font-size: var(--fs-secondary); font-weight: 600; letter-spacing: 0.02em;
  cursor: pointer; transition: all 0.2s var(--ease); border: none;
}
.btn-sm { padding: 9px 18px; font-size: var(--fs-tertiary); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 20px rgba(255,42,0,0.35); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 8px 28px rgba(255,42,0,0.45); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  background: var(--glass-bg); color: var(--text-primary); border: 1px solid var(--border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.btn-ghost:hover { background: var(--surface-hover); transform: translateY(-1px); }

/* ─── SECTIONS ──────────────────────────────────────────────────── */
section { padding: 96px 24px; max-width: 1100px; margin: 0 auto; }
.section-header { margin-bottom: 56px; }
.section-eyebrow {
  font-size: var(--fs-tertiary); font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 700;
  letter-spacing: -0.025em; color: var(--text-primary); line-height: 1.15;
}

/* Eyebrow pill */
.eyebrow-pill {
  font-size: var(--fs-tertiary); font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 20px;
  padding: var(--chip-pad); border-radius: 100px; background: var(--accent-dim);
  border: 1px solid rgba(255,42,0,0.2); display: inline-block;
}

/* ─── PAGE HERO (inner pages) ───────────────────────────────────── */
.page-hero {
  padding: 160px 24px 64px; max-width: 900px; margin: 0 auto; text-align: center;
  position: relative; overflow: hidden;
}
.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700;
  letter-spacing: -0.035em; line-height: 1.1; color: var(--text-primary); margin-bottom: 20px;
}
.page-hero h1 em { font-style: normal; color: var(--accent); }
.page-hero p { font-size: var(--fs-primary); color: var(--text-secondary); max-width: 560px; margin: 0 auto; line-height: 1.75; }

/* Ambient blobs — superseded by the full-viewport body::before gradient */
.blob, .hero-blob { display: none; }
@keyframes blobFloat {
  0%,100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(30px,-40px) scale(1.05); }
  66% { transform: translate(-20px,20px) scale(0.95); }
}

/* ─── FOOTER ────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border); padding: 40px 24px;
  max-width: 1100px; margin: 64px auto 0;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.footer-logo { font-size: var(--fs-primary); font-weight: 700; letter-spacing: -0.02em; color: var(--text-primary); text-decoration: none; display: inline-block; transition: opacity 0.2s; }
a.footer-logo:hover { opacity: 0.75; }
.footer-logo span { color: var(--accent); }
.footer-links { display: flex; gap: 24px; list-style: none; }
.footer-links a { font-size: var(--fs-secondary); color: var(--text-tertiary); transition: color 0.2s; }
.footer-links a:hover { color: var(--text-primary); }
.footer-copy { font-size: var(--fs-tertiary); color: var(--text-tertiary); }

/* ─── PROSE (case study / article bodies) ───────────────────────── */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; letter-spacing: -0.02em; color: var(--text-primary); margin: 48px 0 16px; line-height: 1.2; }
.prose h3 { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); margin: 32px 0 12px; }
.prose h2 + p, .prose h3 + p { margin-top: 0; }
.prose p { font-size: var(--fs-primary); color: var(--text-secondary); line-height: 1.8; margin-bottom: 18px; }
.prose ul, .prose ol { margin: 0 0 20px 20px; }
.prose li { font-size: var(--fs-secondary); color: var(--text-secondary); line-height: 1.7; margin-bottom: 8px; }
.prose strong { color: var(--text-primary); font-weight: 600; }
.prose em, .prose .accent { color: var(--accent); font-style: normal; }
.prose img { width: 100%; border-radius: 16px; margin: 24px 0; display: block; }

/* Result / stat cards row */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 32px 0; }
.stat-card { padding: 24px; border-radius: 16px; background: var(--bg-secondary); border: 1px solid var(--border); }
.stat-card .num { font-size: 2rem; font-weight: 700; color: var(--accent); letter-spacing: -0.03em; line-height: 1; margin-bottom: 8px; }
.stat-card .lbl { font-size: var(--fs-tertiary); color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; }

/* Meta / services row */
.case-meta { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 32px; }
.case-tag {
  font-size: var(--fs-tertiary); font-weight: 500; color: var(--text-secondary);
  padding: var(--chip-pad); border-radius: 100px; border: 1px solid var(--border); background: var(--surface);
}

/* Quote */
.pull-quote {
  padding: 32px; border-radius: 20px; margin: 32px 0; position: relative;
}
.pull-quote blockquote { font-size: 1.25rem; font-weight: 500; font-style: italic; color: var(--text-primary); line-height: 1.5; }
.pull-quote cite { display: block; margin-top: 16px; font-size: var(--fs-secondary); color: var(--text-tertiary); font-style: normal; }

/* Back link */
.back-link {
  display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-secondary);
  font-weight: 500; color: var(--text-secondary); margin-bottom: 24px; transition: color 0.2s, gap 0.2s;
}
.back-link:hover { color: var(--accent); gap: 10px; }
.back-link svg { width: 14px; height: 14px; }

/* ─── SVG FILTER container ──────────────────────────────────────── */
#lg-filter-svg { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ─── WARM-GLOW HOVER (shared across all interactive tiles) ─────── */
.case-card,
.company-pill,
.post-card,
.hover-tile {
  transition:
    transform 0.4s var(--hover-ease),
    box-shadow 0.4s var(--hover-ease),
    border-color 0.3s var(--hover-ease),
    background 0.3s var(--hover-ease);
  will-change: transform;
}
.case-card:hover,
.company-pill:hover,
.post-card:hover,
.hover-tile:hover {
  transform: var(--hover-lift);
  box-shadow: var(--hover-glow);
}

/* ─── SCROLL REVEAL ─────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ─── RESPONSIVE ────────────────────────────────────────────────── */
@media (max-width: 600px) {
  nav { width: calc(100% - 24px); padding: 0 6px 0 14px; }
  .nav-links { display: none; }
  section { padding: 64px 16px; }
  .page-hero { padding: 120px 16px 48px; }
  footer { flex-direction: column; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
}


/* ─── COOKIE / ANALYTICS CONSENT BANNER ───────────────────────────
   Built by assets/consent.js. Small, themed, bottom-centred; defers
   Microsoft Clarity until the visitor accepts. */
.ged-consent {
  position: fixed; right: 20px; bottom: 20px; left: auto; z-index: 400;
  transform: translateY(24px); opacity: 0;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  width: min(420px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 16px 18px; border-radius: 16px;
  background: var(--glass-bg, rgba(24,10,8,0.9));
  -webkit-backdrop-filter: blur(16px) saturate(1.6); backdrop-filter: blur(16px) saturate(1.6);
  border: 1px solid var(--glass-border, rgba(255,255,255,0.12));
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,42,0,0.15);
}
.ged-consent.on { opacity: 1; transform: translateY(0); }
.ged-consent-text {
  flex: 1 1 260px; margin: 0;
  font-size: var(--fs-secondary); line-height: 1.5; color: var(--text-secondary);
}
.ged-consent-text strong { color: var(--text-primary); font-weight: 600; }
.ged-consent-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.ged-consent-btn {
  font-family: inherit; font-size: var(--fs-secondary); font-weight: 600;
  padding: 9px 18px; border-radius: 100px; cursor: pointer;
  border: 1px solid var(--border); background: transparent; color: var(--text-secondary);
  transition: background 0.2s, color 0.2s, transform 0.2s var(--hover-ease), border-color 0.2s;
}
.ged-consent-btn:hover { transform: translateY(-1px); }
.ged-consent-decline:hover { color: var(--text-primary); border-color: var(--text-tertiary); }
.ged-consent-accept {
  background: var(--accent); border-color: transparent; color: #fff;
  box-shadow: 0 4px 14px rgba(255,42,0,0.35);
}
.ged-consent-accept:hover { box-shadow: 0 6px 18px rgba(255,42,0,0.5); }
@media (max-width: 480px) {
  .ged-consent { flex-direction: column; align-items: stretch; }
  .ged-consent-actions { justify-content: flex-end; }
}
@media (prefers-reduced-motion: reduce) {
  .ged-consent { transition: opacity 0.2s linear; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════════
   GLOBAL RESPONSIVE LADDER  —  phone (≤560) / tablet (561–900) / laptop
   Shared across every page. Page-specific <style> blocks and
   case-study.css add finer tuning on top; this layer guarantees the base
   chrome, typography and common containers behave at every width and that
   nothing ever forces horizontal scroll.
   ═══════════════════════════════════════════════════════════════════ */

/* Never allow sideways scroll from an over-wide child. Use `clip` (not
   `hidden`) and keep it OFF the root <html> element — `overflow:hidden` on an
   ancestor of a position:sticky node breaks the pin and makes position:fixed
   children drift. `clip` on <body> contains width without creating a scroll
   container, so the "Designing for ___" pinned section keeps working. */
html { max-width: 100%; }
body { max-width: 100%; overflow-x: clip; }
img, video, svg, canvas { max-width: 100%; }

/* ── Tablet (≤900px) ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  section { padding: 80px 24px; }
  .page-hero { padding: 140px 24px 56px; }
  /* Fluidise any auto-fit/repeat grids that used large min tracks. */
  .stat-cards { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}

/* ── Large phone / small tablet (≤700px) ─────────────────────────── */
@media (max-width: 700px) {
  :root { --fs-primary: 15px; }
  section { padding: 64px 18px; }
  .page-hero { padding: 120px 18px 44px; }
  .page-hero h1 { font-size: clamp(1.9rem, 7vw, 2.8rem); }
  footer { flex-direction: column; text-align: center; align-items: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 16px; }
}

/* ── Phone (≤560px) ──────────────────────────────────────────────── */
@media (max-width: 560px) {
  section { padding: 56px 16px; }
  .page-hero { padding: 108px 16px 40px; }
  .btn { padding: 11px 22px; }
  .prose { padding: 0; }
  /* Tables inside prose/pages shouldn't blow out the viewport. */
  table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ── Small phone (≤400px) ────────────────────────────────────────── */
@media (max-width: 400px) {
  section { padding: 48px 14px; }
  .stat-cards { grid-template-columns: 1fr; }
}
