/* ==========================================================================
   InfraTwin pitch page — design tokens
   Light ("day") is default; dark ("night") is an explicit toggle.
   Typography: Inter. Accent: signal blue. Motion: fade-on-scroll only.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-subtle: #f7f7f7;
  --bg-inverse: #0b0d10;

  --text: #141414;
  --text-secondary: #55585e;
  --text-muted: #86898f;
  --text-inverse: #f7f7f7;

  --border: #e6e6e6;
  --border-strong: #d0d0d0;

  --accent: #1470b0;
  --accent-hover: #0e5587;
  --accent-soft: #e8f1f8;
  --accent-text-on: #ffffff;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-full: 999px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    system-ui, sans-serif;

  --container: 1180px;
  --gutter: clamp(20px, 5vw, 64px);

  --shadow-card: 0 1px 2px rgba(20, 20, 20, 0.04), 0 8px 24px rgba(20, 20, 20, 0.05);
}

:root[data-theme="dark"] {
  --bg: #0b0d10;
  --bg-subtle: #14171b;
  --bg-inverse: #ffffff;

  --text: #f2f2f0;
  --text-secondary: #b7bac0;
  --text-muted: #7d8087;

  --border: #24272c;
  --border-strong: #33373d;

  --accent: #4c9fdb;
  --accent-hover: #6fb3e4;
  --accent-soft: #142433;
  --accent-text-on: #0b0d10;

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* ==========================================================================
   Reset & base
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

img {
  max-width: 100%;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}

.watermark {
  position: absolute;
  bottom: 8px;
  right: 10px;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(240, 240, 240, 0.9);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7), 0 0 6px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  user-select: none;
  z-index: 2;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

button {
  font-family: inherit;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

section {
  padding: clamp(56px, 10vw, 128px) 0;
}

section[id] {
  scroll-margin-top: 80px;
}

.eyebrow {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  max-width: 26ch;
}

#problem .section-title,
#team .section-title {
  max-width: 40ch;
}

.section-lede {
  margin-top: 18px;
  font-size: clamp(1rem, 1.4vw, 1.1875rem);
  color: var(--text-secondary);
  max-width: 62ch;
  line-height: 1.6;
}

.section-head {
  margin-bottom: clamp(36px, 6vw, 64px);
}

/* ==========================================================================
   Motion — simple fade/translate reveal, reduced-motion aware
   ========================================================================== */

/* Visible by default — only hidden once JS confirms it can reveal them. */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==========================================================================
   Nav
   ========================================================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text);
}

.brand-dot {
  color: var(--accent);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-secondary);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-links a:hover {
  color: var(--text);
}

/* Pill-button treatment (matches the "See how it works" secondary button) — desktop only */
@media (min-width: 641px) {
  .nav-links a {
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-full);
    padding: 8px 16px;
  }

  .nav-links a:hover {
    border-color: var(--accent);
    color: var(--accent);
  }
}

.theme-toggle {
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  border-radius: var(--radius-full);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
}

.icon-sun {
  display: none;
}
:root[data-theme="dark"] .icon-sun {
  display: block;
}
:root[data-theme="dark"] .icon-moon {
  display: none;
}

.nav-toggle {
  display: none;
  border: none;
  background: none;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-menu {
  display: none;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding-top: calc(64px + clamp(48px, 9vw, 96px));
  padding-bottom: clamp(48px, 8vw, 96px);
}

.hero-title {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.hero-tagline {
  margin-top: 22px;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 46ch;
  line-height: 1.55;
}

.hero-ctas {
  margin-top: 34px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius-full);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

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

.btn-primary {
  background: var(--accent);
  color: var(--accent-text-on);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

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

.hero-visual {
  position: relative;
  margin-top: clamp(36px, 6vw, 56px);
}

.hero-visual img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.hero-visual-caption {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.hero-note {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--text-muted);
  max-width: none;
}

/* ==========================================================================
   Problem
   ========================================================================== */

.bg-subtle {
  background: var(--bg-subtle);
}

.bottleneck-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  margin-top: 8px;
}

.bottleneck-step {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.bottleneck-step:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.step-media {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--bg-subtle);
}

.step-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.step-media.img-placeholder {
  aspect-ratio: auto;
  min-height: 150px;
  height: auto;
}

.bottleneck-step .step-index {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.bottleneck-step h3 {
  margin-top: 10px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.bottleneck-step p {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.bottleneck-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.25rem;
}


/* ==========================================================================
   Solution
   ========================================================================== */

.solution-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.solution-flow-word {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.solution-flow-word.is-accent {
  color: var(--accent);
}

.solution-flow-word::before {
  content: "";
}

.solution-flow-word:not(:first-child)::before {
  content: "→";
  color: var(--text-muted);
  font-weight: 400;
}

.solution-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.solution-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.solution-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.solution-card .card-index {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.solution-card h3 {
  margin-top: 12px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.solution-card p {
  margin-top: 12px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 18px;
  background: var(--bg-subtle);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ==========================================================================
   Image placeholders — proposed images awaiting approval
   ========================================================================== */

.img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 14px;
  border: 1.5px dashed var(--border-strong);
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.img-placeholder svg {
  width: 24px;
  height: 24px;
  opacity: 0.6;
  flex-shrink: 0;
}

.img-placeholder p {
  font-size: 0.75rem;
  line-height: 1.5;
  margin: 0;
}

.img-placeholder strong {
  color: var(--text-secondary);
}

/* ==========================================================================
   Innovation sections (Infra.SENSE / Infra.SEG + Infra.DT)
   ========================================================================== */

.innovation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.innovation.is-reversed .innovation-media {
  order: 2;
}

.img-frame {
  position: relative;
}

.innovation-media img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.video-frame-inline video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #000;
}

.watermark-top {
  bottom: auto;
  top: 10px;
}

.innovation-media figcaption {
  margin-top: 10px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.stat-row {
  display: flex;
  gap: 36px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.stat {
  min-width: 140px;
}

.stat-value {
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1;
}

.stat-label {
  margin-top: 8px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  max-width: 22ch;
}

.commercial-note {
  margin-top: 28px;
  padding: 18px 20px;
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--text);
}

.commercial-note strong {
  color: var(--accent);
}

.innovation-tag {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.innovation h3 {
  margin-top: 12px;
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.innovation-lede {
  margin-top: 14px;
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.innovation-body {
  margin-top: 18px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.platform-gallery {
  margin-top: clamp(40px, 6vw, 64px);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.platform-card {
  margin: 0;
}

.platform-card-media {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}

.platform-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}

.platform-card figcaption {
  margin-top: 10px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ==========================================================================
   Video
   ========================================================================== */

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ==========================================================================
   Team
   ========================================================================== */

.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.team-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  gap: 20px;
}

.team-photo {
  width: 84px;
  height: 84px;
  border-radius: var(--radius-full);
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-name {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.team-role {
  margin-top: 4px;
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 600;
}

.team-bio {
  margin-top: 10px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.team-credentials {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.team-affiliations {
  margin: 8px 0 0;
  padding-left: 18px;
}

.team-affiliations li {
  margin-top: 4px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-lede {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-copyright {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
}

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

/* ==========================================================================
   Responsive — mobile (phone ratio focus, per project owner)
   ========================================================================== */

@media (max-width: 860px) {
  .bottleneck-flow {
    grid-template-columns: 1fr;
  }

  .bottleneck-arrow {
    transform: rotate(90deg);
    padding: 4px 0;
  }

  .solution-flow,
  .solution-grid {
    grid-template-columns: 1fr;
  }

  .solution-flow-word {
    justify-content: flex-start;
  }

  .innovation,
  .innovation.is-reversed {
    grid-template-columns: 1fr;
  }

  .innovation.is-reversed .innovation-media {
    order: 0;
  }

  .platform-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 28px var(--gutter);
    gap: 22px;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
  }

  .nav-links[data-open="true"] {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 1.1rem;
  }

  .nav-toggle {
    display: block;
  }

  .team-card {
    flex-direction: column;
  }

  .hero-ctas .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}
