/* ============================================================
   Digital Odyssey — Agency Edition · Design Tokens
   Built on the Digital Odyssey Design System (Montserrat / JetBrains
   Mono, 96px rhythm, pill CTAs, 24px cards), re-voltaged for a
   data-driven marketing agency: deep navy canvas + cyan energy accent.
   Light + dark theming via [data-theme]; dark is the default.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap');

@font-face {
  font-family: 'Montserrat';
  src: url('fonts/Montserrat-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('fonts/Montserrat-Italic-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900; font-style: italic; font-display: swap;
}

:root {
  /* ---------- Brand constants (theme-independent) ---------- */
  --primary:         #0052ff;   /* Odyssey Blue — primary action */
  --primary-active:  #003ecc;
  --primary-soft:    #2f6bff;
  --cyan:            #1ae0e6;   /* energy accent — data, orbit, highlights */
  --cyan-deep:       #00b3bd;
  --navy-deep:       #060a18;   /* signature dark canvas */
  --navy-soft:       #0a1024;
  --navy-card:       #0e1630;
  --navy-elevated:   #131d3a;
  --up:              #19c98a;
  --down:            #ff5a6a;
  --accent-yellow:   #f4b000;

  /* gradient device (orbit / energy) */
  --grad-energy: linear-gradient(115deg, #0052ff 0%, #1ae0e6 100%);
  --grad-orbit:  conic-gradient(from 210deg, #1ae0e6, #0052ff, #2f6bff, #1ae0e6);

  /* ---------- Fonts ---------- */
  --font-display: 'Montserrat', -apple-system, system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-sans:    'Montserrat', -apple-system, system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* ---------- Spacing (4px base) ---------- */
  --space-xxs:4px; --space-xs:8px; --space-sm:12px; --space-base:16px;
  --space-md:20px; --space-lg:24px; --space-xl:32px; --space-xxl:48px;
  --space-section:96px;

  /* ---------- Radius ---------- */
  --radius-xs:4px; --radius-sm:8px; --radius-md:12px; --radius-lg:16px;
  --radius-xl:24px; --radius-pill:100px; --radius-full:9999px;

  --container-max:1200px;

  /* mirror of DS names so any forked DS component still resolves */
  --color-primary: var(--primary);
  --color-primary-active: var(--primary-active);
  --color-accent-yellow: var(--accent-yellow);
  --color-up: var(--up);
  --color-down: var(--down);
}

/* ---------- LIGHT theme ---------- */
:root, [data-theme="light"] {
  --page-bg:      #ffffff;
  --page-soft:    #f5f7fb;
  --surface:      #ffffff;
  --surface-2:    #ffffff;
  --surface-inset:#f1f4f9;
  --border:       #dee1e6;
  --border-soft:  #eef0f3;
  --text:         #0a0b0d;
  --text-2:       #545b6b;
  --text-3:       #7c828a;
  --nav-bg:       rgba(255,255,255,.82);
  --nav-border:   #eef0f3;
  --shadow-card:  0 4px 18px rgba(10,20,50,.06);
  --shadow-hover: 0 18px 50px rgba(10,20,50,.12);
  --chip-bg:      #eef0f3;
}

/* ---------- DARK theme (default) ---------- */
[data-theme="dark"] {
  --page-bg:      #060a18;
  --page-soft:    #0a1024;
  --surface:      #0e1630;
  --surface-2:    #131d3a;
  --surface-inset:#0a1228;
  --border:       rgba(255,255,255,.09);
  --border-soft:  rgba(255,255,255,.06);
  --text:         #ffffff;
  --text-2:       #aab3c7;
  --text-3:       #79839a;
  --nav-bg:       rgba(8,12,26,.72);
  --nav-border:   rgba(255,255,255,.08);
  --shadow-card:  0 4px 18px rgba(0,0,0,.35);
  --shadow-hover: 0 24px 60px rgba(0,0,0,.5);
  --chip-bg:      rgba(255,255,255,.07);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--page-bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background .4s ease, color .4s ease;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: rgba(26,224,230,.3); }

/* ============================================================
   Type helpers (theme-aware)
   ============================================================ */
.do-display-mega { font-family:var(--font-display); font-weight:400; font-size:clamp(46px,7vw,84px); line-height:1.0; letter-spacing:-2.5px; color:var(--text); }
.do-display-xl   { font-family:var(--font-display); font-weight:400; font-size:clamp(40px,5.5vw,68px); line-height:1.02; letter-spacing:-1.8px; color:var(--text); }
.do-display-lg   { font-family:var(--font-display); font-weight:400; font-size:clamp(34px,4.4vw,52px); line-height:1.05; letter-spacing:-1.3px; color:var(--text); }
.do-display-md   { font-family:var(--font-display); font-weight:400; font-size:clamp(28px,3.4vw,44px); line-height:1.08; letter-spacing:-1px; color:var(--text); }
.do-display-sm   { font-family:var(--font-display); font-weight:500; font-size:clamp(24px,2.6vw,34px); line-height:1.12; letter-spacing:-0.5px; color:var(--text); }
.do-title-lg     { font-family:var(--font-sans); font-weight:600; font-size:24px; line-height:1.2; letter-spacing:-0.4px; color:var(--text); }
.do-title-md     { font-family:var(--font-sans); font-weight:600; font-size:18px; line-height:1.33; color:var(--text); }
.do-title-sm     { font-family:var(--font-sans); font-weight:600; font-size:16px; line-height:1.3; color:var(--text); }
.do-body-lg      { font-family:var(--font-sans); font-weight:400; font-size:18px; line-height:1.55; color:var(--text-2); }
.do-body-md      { font-family:var(--font-sans); font-weight:400; font-size:16px; line-height:1.55; color:var(--text-2); }
.do-body-sm      { font-family:var(--font-sans); font-weight:400; font-size:14px; line-height:1.55; color:var(--text-2); }
.do-caption      { font-family:var(--font-sans); font-weight:400; font-size:13px; line-height:1.5; color:var(--text-3); }
.eyebrow         { font-family:var(--font-sans); font-weight:600; font-size:12px; line-height:1.5; letter-spacing:0.16em; text-transform:uppercase; color:var(--cyan-deep); }
[data-theme="dark"] .eyebrow { color:var(--cyan); }
.mono            { font-family:var(--font-mono); }

/* gradient text */
.grad-text {
  background: var(--grad-energy);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ============================================================
   Scroll-reveal — opacity/translate in, set .is-in to reveal
   ============================================================ */
.reveal { opacity:0; transform: translateY(26px); transition: opacity .6s cubic-bezier(.16,1,.3,1), transform .6s cubic-bezier(.16,1,.3,1); }
/* Hero elements that get .is-in immediately skip the transition */
section:first-of-type .reveal.is-in { transition-duration: .4s; }
.reveal.is-in { opacity:1; transform:none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity:1 !important; transform:none !important; transition:none; }
  html { scroll-behavior:auto; }
}

/* shared layout helpers */
.container { max-width: var(--container-max); margin:0 auto; padding:0 24px; }
.section { padding: var(--space-section) 0; }
@media (max-width:640px){ .section { padding: 64px 0; } }

@keyframes do-spin { to { transform: rotate(360deg); } }
@keyframes do-float { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-12px);} }
@keyframes do-pulse { 0%,100%{ opacity:.5;} 50%{ opacity:1;} }
@keyframes do-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes do-orbit-cw { to { transform: rotate(360deg); } }
@keyframes do-orbit-ccw { to { transform: rotate(-360deg); } }

/* logo rocket launching out of its circle, on a loop */
@keyframes lm-launch {
  0%   { transform: translate(0,0) scale(1);      opacity:1; }
  42%  { transform: translate(30px,-30px) scale(1); opacity:1; }
  56%  { transform: translate(52px,-52px) scale(.45); opacity:0; }
  57%  { transform: translate(-6px,6px) scale(.45); opacity:0; }
  74%  { transform: translate(0,0) scale(1);      opacity:1; }
  100% { transform: translate(0,0) scale(1);      opacity:1; }
}
@keyframes lm-trail {
  0%,100% { opacity:0; transform: rotate(45deg) scaleX(.2); }
  20%     { opacity:.7; transform: rotate(45deg) scaleX(1); }
  52%     { opacity:0; transform: rotate(45deg) scaleX(1); }
}
@media (prefers-reduced-motion: reduce){ .lm-rocket, .lm-trail { animation: none !important; } }
@media (prefers-reduced-motion: reduce){ g[style*="do-orbit"] { animation: none !important; } }
/* single-line scrolling client marquee */
.marquee { position:relative; width:100%; overflow:hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display:inline-flex; align-items:center; gap:52px; width:max-content;
  animation: do-marquee 38s linear infinite; will-change: transform; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce){ .marquee-track { animation: none; } }

/* nav link */
.nav-link { font-family:var(--font-sans); font-weight:500; font-size:14.5px; color:var(--text-2); position:relative; transition:color .15s ease; }
.nav-link:hover, .nav-link.active { color:var(--text); }
.nav-link.active::after { content:''; position:absolute; left:0; right:0; bottom:-22px; height:2px; background:var(--grad-energy); border-radius:2px; }

/* card hover */
.do-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-xl); transition: transform .25s cubic-bezier(.16,1,.3,1), box-shadow .25s ease, border-color .25s ease; }
.do-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: color-mix(in srgb, var(--cyan) 40%, var(--border)); }

/* dotted/grid background for dark sections */
.grid-bg { background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px); background-size: 28px 28px; }

/* grid utilities */.grid-2 { display:grid; grid-template-columns:repeat(2,1fr); gap:24px; }
.grid-3 { display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }
.grid-4 { display:grid; grid-template-columns:repeat(4,1fr); gap:24px; }
.split  { display:grid; grid-template-columns:1.05fr .95fr; gap:64px; align-items:center; }

@media (max-width:1024px){
  .grid-4 { grid-template-columns:repeat(2,1fr); }
  .foot-grid { grid-template-columns:1.4fr 1fr 1fr !important; }
  .foot-grid > div:first-child { grid-column:1 / -1; margin-bottom:8px; }
}
@media (max-width:900px){
  .grid-3 { grid-template-columns:repeat(2,1fr); }
  .split  { grid-template-columns:1fr; gap:40px; }
  .legal-toc { display:none; }
  .hero-aside { display:none; }
}
@media (max-width:640px){
  .grid-2, .grid-3, .grid-4 { grid-template-columns:1fr; }
  .foot-grid { grid-template-columns:1fr 1fr !important; }
}


/* ============================================================
   MOBILE OPTIMISATION — comprehensive fixes for all pages
   ============================================================ */

/* Container padding on mobile */
.container { padding: 0 16px; }

/* Section rhythm tighter on mobile */
@media (max-width: 480px) {
  .section { padding: 48px 0; }
}

/* ---- Typography scale down on small screens ---- */
@media (max-width: 480px) {
  .do-display-mega { font-size: clamp(36px, 10vw, 52px); letter-spacing: -1.5px; }
  .do-display-xl   { font-size: clamp(30px, 9vw, 44px);  letter-spacing: -1px; }
  .do-display-lg   { font-size: clamp(26px, 8vw, 36px);  letter-spacing: -0.8px; }
  .do-display-md   { font-size: clamp(22px, 7vw, 30px);  letter-spacing: -0.5px; }
  .do-body-lg      { font-size: 16px; }
  .do-body-md      { font-size: 15px; }
}

/* ---- Grid fixes ---- */
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: 16px; }
  .split { grid-template-columns: 1fr; gap: 32px; }
}

/* ---- Hero section mobile ---- */
@media (max-width: 900px) {
  .hero-aside { display: none !important; }
}
@media (max-width: 640px) {
  .hero-split { grid-template-columns: 1fr !important; }
  .hero-cta-row { flex-direction: column !important; }
  .hero-cta-row a, .hero-cta-row button { width: 100% !important; justify-content: center !important; text-align: center !important; }
}

/* ---- Nav mobile ---- */
@media (max-width: 640px) {
  .nav-cta { display: none !important; }
}

/* ---- Cards mobile ---- */
@media (max-width: 640px) {
  .do-card { border-radius: 16px; }
  .service-card-inner { padding: 24px 20px !important; }
}

/* ---- CTA Band mobile ---- */
@media (max-width: 640px) {
  .cta-band-inner { padding: 64px 16px !important; }
  .cta-band-buttons { flex-direction: column !important; align-items: stretch !important; }
  .cta-band-buttons a, .cta-band-buttons button { width: 100% !important; justify-content: center !important; }
}

/* ---- Footer mobile ---- */
@media (max-width: 640px) {
  .foot-grid { grid-template-columns: 1fr !important; gap: 32px !important; }
  .foot-bottom { flex-direction: column !important; align-items: flex-start !important; gap: 16px !important; }
  .foot-newsletter { max-width: 100% !important; }
  .foot-newsletter input { width: 100% !important; }
}

/* ---- Process steps mobile ---- */
@media (max-width: 640px) {
  .process-grid { grid-template-columns: 1fr !important; }
  .process-connector { display: none !important; }
}

/* ---- Testimonial carousel mobile ---- */
@media (max-width: 640px) {
  .testimonial-card { padding: 24px 20px !important; }
}

/* ---- Contact form mobile ---- */
@media (max-width: 640px) {
  .contact-grid { grid-template-columns: 1fr !important; }
  .contact-form-inner { padding: 24px 16px !important; }
}

/* ---- Industries grid mobile ---- */
@media (max-width: 640px) {
  .industries-grid { grid-template-columns: 1fr 1fr !important; gap: 12px !important; }
}

/* ---- Work/case studies filter mobile ---- */
@media (max-width: 640px) {
  .filter-row { flex-wrap: wrap !important; gap: 8px !important; }
  .filter-row button { font-size: 13px !important; padding: 8px 14px !important; }
}

/* ---- Button full-width on mobile when stacked ---- */
@media (max-width: 480px) {
  .btn-stack-mobile { width: 100% !important; justify-content: center !important; }
}

/* ---- Pre-hero placeholder mobile ---- */
@media (max-width: 640px) {
  #pre-h1 { font-size: clamp(36px, 10vw, 52px) !important; }
  #pre-body { font-size: 16px !important; }
  #pre-cta { width: 100% !important; justify-content: center !important; }
}

/* ---- Prevent horizontal overflow globally ---- */
html, body { overflow-x: hidden; }
* { max-width: 100%; }
img, video, svg { max-width: 100%; height: auto; }

/* ---- Touch tap target minimum size ---- */
a, button { min-height: 44px; }
.nav-link { min-height: unset; }

/* ---- Remove hover effects on touch devices ---- */
@media (hover: none) {
  .do-card:hover { transform: none; box-shadow: var(--shadow-card); }
}

/* ---- Playbook / FAQ page mobile ---- */
@media (max-width: 640px) {
  .playbook-grid { grid-template-columns: 1fr !important; }
  .faq-grid { grid-template-columns: 1fr !important; }
  .legal-content { padding: 32px 16px !important; }
}

/* ---- About page timeline mobile ---- */
@media (max-width: 640px) {
  .timeline-grid { grid-template-columns: 1fr !important; }
  .journey-map { overflow-x: auto; }
}

/* ---- Services page mobile ---- */
@media (max-width: 640px) {
  .services-grid { grid-template-columns: 1fr !important; }
  .economics-grid { grid-template-columns: 1fr !important; }
}

/* ---- Stat counter mobile ---- */
@media (max-width: 640px) {
  .stat-value { font-size: clamp(36px, 10vw, 52px) !important; }
}

/* Hide hero glow blobs on mobile — prevent right-side blue patch */
@media (max-width: 768px) {
  .hero-glow { display: none !important; }
}




/* Marquee on mobile — 15s loop, all brands visible */
@media (max-width: 768px) {
  .marquee-track { animation-duration: 15s !important; gap: 36px !important; }
}

/* Contact page mobile fixes */
@media (max-width: 768px) {
  .contact-split { grid-template-columns: 1fr !important; }
  .contact-form-row { grid-template-columns: 1fr !important; }
  .contact-form-row input { width: 100% !important; box-sizing: border-box !important; }
}

/* Journey map — reduce height on mobile, prevent overflow */
@media (max-width: 768px) {
  .journey-map-wrap { height: 280px !important; }
}

/* Mini map — full width, no overflow */
@media (max-width: 768px) {
  .mini-map-wrap { width: 100% !important; box-sizing: border-box !important; overflow: hidden !important; }
}

/* Contact form — ensure all inputs full width */
@media (max-width: 768px) {
  .contact-form-wrap { padding: 20px 16px !important; box-sizing: border-box !important; width: 100% !important; }
  .contact-form-wrap input,
  .contact-form-wrap textarea,
  .contact-form-wrap select { width: 100% !important; box-sizing: border-box !important; max-width: 100% !important; }
}
