/* ================================
   Infinicast — Design System
   ================================ */

:root {
  color-scheme: light;
  /* Brand colors */
  --navy: #002146;
  --navy-90: rgba(0, 33, 70, 0.9);
  --navy-80: rgba(0, 33, 70, 0.8);
  --navy-60: rgba(0, 33, 70, 0.6);
  --navy-30: rgba(0, 33, 70, 0.3);
  --navy-10: rgba(0, 33, 70, 0.1);

  --blue: #00669F;
  --light-blue: #60CBE1;

  /* Warm neutrals — softer than pure white */
  --bone: #F6F3EE;
  --paper: #FBFAF7;
  --ink: #0A1626;
  --ink-70: rgba(10, 22, 38, 0.7);
  --ink-50: rgba(10, 22, 38, 0.5);
  --ink-30: rgba(10, 22, 38, 0.3);
  --ink-10: rgba(10, 22, 38, 0.1);

  /* Type */
  --font-display: 'Syne', system-ui, sans-serif;
  --font-body: 'Syne', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  /* Layout */
  --max-w: 1440px;
  --gutter: clamp(20px, 4vw, 56px);
  --section-y: clamp(80px, 10vw, 160px);

  /* Borders */
  --hairline: 1px solid var(--ink-10);
  --hairline-dark: 1px solid rgba(255,255,255,0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Typography scale */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-70);
}
.eyebrow.on-dark { color: var(--light-blue); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  text-wrap: balance;
}

.h-display {
  font-size: clamp(48px, 8vw, 128px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.h-1 { font-size: clamp(40px, 6vw, 88px); line-height: 0.98; letter-spacing: -0.03em; }
.h-2 { font-size: clamp(32px, 4.4vw, 64px); line-height: 1.02; letter-spacing: -0.025em; }
.h-3 { font-size: clamp(24px, 2.6vw, 36px); line-height: 1.1; letter-spacing: -0.015em; }
.h-4 { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.25; letter-spacing: -0.005em; font-weight: 600; }

.lead {
  font-size: clamp(18px, 1.7vw, 24px);
  line-height: 1.45;
  font-weight: 400;
  color: var(--ink-70);
  text-wrap: pretty;
  max-width: 36ch;
}
.lead.wide { max-width: 50ch; }
.lead.on-dark { color: rgba(255,255,255,0.78); }

.body-lg {
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-70);
  text-wrap: pretty;
}

p { text-wrap: pretty; }

/* Layout */
.shell {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.shell.full { max-width: none; padding: 0; }

.section { padding: var(--section-y) 0; }
.section-tight { padding: clamp(48px, 6vw, 96px) 0; }

/* Dark theme block */
.on-dark {
  background: var(--navy);
  color: rgba(255,255,255,0.92);
}
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4 {
  color: white;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 26px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 200ms ease, background 200ms ease, color 200ms ease, border-color 200ms ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--navy);
  color: white;
}
.btn-primary:hover { background: var(--blue); }
.btn-light {
  background: white;
  color: var(--navy);
}
.btn-light:hover { background: var(--light-blue); color: var(--navy); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink-30);
}
.btn-ghost:hover { border-color: var(--ink); background: var(--ink); color: white; }
.btn-ghost.on-dark { color: white; border-color: rgba(255,255,255,0.3); }
.btn-ghost.on-dark:hover { background: white; color: var(--navy); }

.btn .arrow {
  display: inline-block;
  transition: transform 200ms ease;
}
.btn:hover .arrow { transform: translateX(4px); }

/* Hairline link */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  font-weight: 500;
  transition: opacity 200ms ease;
}
.text-link:hover { opacity: 0.6; }

/* Photo placeholder */
.photo {
  position: relative;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(0, 33, 70, 0.04) 0px,
      rgba(0, 33, 70, 0.04) 1px,
      transparent 1px,
      transparent 8px
    ),
    linear-gradient(180deg, #E8EEF4 0%, #C8D6E2 100%);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  color: var(--navy-60);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.photo::before {
  content: '';
  position: absolute;
  inset: 16px;
  border: 1px dashed rgba(0, 33, 70, 0.18);
  pointer-events: none;
}
.photo .ph-label {
  position: relative;
  padding: 16px 20px;
}
.photo.dark {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(96, 203, 225, 0.05) 0px,
      rgba(96, 203, 225, 0.05) 1px,
      transparent 1px,
      transparent 8px
    ),
    linear-gradient(180deg, #0a2e5c 0%, #001530 100%);
  color: rgba(96, 203, 225, 0.7);
}
.photo.dark::before { border-color: rgba(96, 203, 225, 0.2); }

/* Cards */
.card {
  background: white;
  border: var(--hairline);
  border-radius: 4px;
  padding: clamp(28px, 3vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Hairline divider */
.rule {
  height: 1px;
  background: var(--ink-10);
  width: 100%;
}
.rule.on-dark { background: rgba(255,255,255,0.12); }

/* Page transition */
.page-enter {
  animation: pageIn 600ms cubic-bezier(0.2, 0.7, 0.1, 1);
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Utility */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.gap-sm { gap: 12px; }
.gap-md { gap: 24px; }
.gap-lg { gap: 48px; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.text-mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; }
.upper { text-transform: uppercase; }
.muted { color: var(--ink-70); }
.muted-on-dark { color: rgba(255,255,255,0.7); }

/* Grids */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 3vw, 48px); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 48px); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 2vw, 32px); }

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ================================
   MOBILE — comprehensive overrides
   ================================ */

@media (max-width: 900px) {
  :root {
    --section-y: clamp(56px, 12vw, 96px);
  }
  body { font-size: 16px; }

  /* Headings: slightly tighter clamps for phones */
  .h-display { font-size: clamp(44px, 13vw, 96px); line-height: 0.98; }
  .h-1 { font-size: clamp(34px, 9.5vw, 64px); line-height: 1.0; }
  .h-2 { font-size: clamp(28px, 7vw, 48px); }
  .h-3 { font-size: clamp(22px, 5vw, 32px); }

  .lead { font-size: 17px; max-width: none; }
  .body-lg { font-size: 17px; }

  /* Generic container resets */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; gap: 28px; }

  /* Cards */
  .card { padding: 24px 22px; }

  /* Buttons go full-width-ish in tight stacks */
  .btn { padding: 14px 22px; font-size: 14px; }

  /* Hide large marquee mask edges on small screens */
  .marquee { mask-image: linear-gradient(90deg, transparent, black 4%, black 96%, transparent); }
  .marquee-track { gap: 40px; animation-duration: 30s; }
  .logo-chip { font-size: 22px; }
}

@media (max-width: 600px) {
  :root {
    --section-y: 64px;
    --gutter: 20px;
  }

  .h-display { font-size: clamp(40px, 14vw, 80px); letter-spacing: -0.03em; }
  .h-1 { font-size: clamp(32px, 10vw, 56px); letter-spacing: -0.025em; }
  .h-2 { font-size: clamp(26px, 8vw, 42px); }

  .card { padding: 22px 20px; }
  .logo-chip { font-size: 19px; }
}

/* ================================
   PAGE-SPECIFIC mobile overrides
   ================================ */

@media (max-width: 900px) {
  /* Home — pillar row, stat grids, showcase */
  .home-pillars { grid-template-columns: 1fr !important; gap: 0 !important; }
  .home-pillars > div { border-right: none !important; border-bottom: 1px solid var(--ink-10) !important; padding-right: 0 !important; padding-bottom: 32px !important; padding-top: 32px !important; }
  .home-pillars > div:last-child { border-bottom: none !important; }

  .home-statement,
  .home-showcase-head,
  .home-showcase-cards,
  .home-network,
  .home-list-2col {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
  .home-showcase-cards { gap: 20px !important; }
  .home-list-2col { padding: 16px 0 !important; }

  /* Hero CTAs full width */
  .hero-ctas { width: 100%; }
  .hero-ctas .btn { flex: 1 1 auto; justify-content: center; }

  /* TV / Signage / ICT page two-col splits */
  .two-col-split { grid-template-columns: 1fr !important; gap: 32px !important; }

  /* Industries cards already covered by .industry-cards */
  .industry-cards > * { width: 100% !important; }

  /* About/Contact split */
  .about-grid { grid-template-columns: 1fr !important; }

  /* How-it-works steps already partially covered */
  .how-step { gap: 24px !important; }

  /* TV comparison split — kill side border on mobile */
  .vs-split { grid-template-columns: 1fr !important; gap: 0 !important; }
  .vs-split > div:first-child { border-right: none !important; border-bottom: 1px solid rgba(255,255,255,0.15) !important; padding: 32px 0 !important; }
  .vs-split > div:last-child { padding: 32px 0 !important; }

  /* Section rules */
  .pad-y-lg { padding-top: 56px !important; padding-bottom: 56px !important; }
}

@media (max-width: 600px) {
  /* Tighter card image aspect */
  .home-showcase-cards img,
  .home-showcase-cards .photo { aspect-ratio: 16/10 !important; }

  /* Stat grids */
  .stat-grid { grid-template-columns: 1fr 1fr !important; gap: 16px !important; }

  /* Final CTA */
  .final-cta { padding: 64px 0 !important; }
  .final-cta h2 { font-size: clamp(40px, 12vw, 72px) !important; }
}

/* ================================
   NAV — mobile menu
   ================================ */

@media (max-width: 1100px) {
  .nav-links-desktop { display: none !important; }
  .nav-mobile-toggle { display: inline-flex !important; }
}
@media (min-width: 1101px) {
  .nav-mobile-toggle { display: none !important; }
}

.nav-mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid currentColor;
  background: transparent;
  border-radius: 999px;
  cursor: pointer;
  color: inherit;
  margin-left: 12px;
}
.nav-mobile-toggle svg { width: 18px; height: 18px; }

@media (max-width: 720px) {
  .nav-cta-desktop { display: none !important; }
}

.nav-mobile-sheet {
  position: fixed;
  inset: 0;
  background: var(--paper);
  color: var(--ink);
  z-index: 200;
  display: flex;
  flex-direction: column;
  padding: 24px var(--gutter) 32px;
  overflow-y: auto;
}
.nav-mobile-sheet.dark { background: var(--navy); color: white; }
.nav-mobile-sheet .nav-mobile-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 48px;
}
.nav-mobile-sheet .nav-mobile-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
  list-style: none;
  padding: 0;
}
.nav-mobile-sheet .nav-mobile-list a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -0.015em;
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav-mobile-sheet .nav-mobile-list a .arrow {
  opacity: 0.4;
  transition: transform 200ms ease, opacity 200ms ease;
}
.nav-mobile-sheet .nav-mobile-list a:hover .arrow { transform: translateX(6px); opacity: 0.9; }
.nav-mobile-sheet .nav-mobile-cta {
  margin-top: auto;
  padding-top: 48px;
}

/* Footer mobile */
@media (max-width: 700px) {
  .footer-top { grid-template-columns: 1fr 1fr !important; gap: 32px 24px !important; }
  .footer-cols-3 { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr !important; }
}

/* Marquee track */
.marquee {
  overflow: hidden;
  width: 100%;
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: clamp(48px, 6vw, 96px);
  animation: marquee 40s linear infinite;
  width: max-content;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Logo strip items */
.logo-chip {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 2.4vw, 32px);
  letter-spacing: -0.01em;
  color: var(--ink);
  opacity: 0.55;
  white-space: nowrap;
  font-style: italic;
}
.on-dark .logo-chip { color: white; opacity: 0.65; }
