/*
 * EyeTrek — Responsive stylesheet
 * Additive overrides; all base styles remain in per-page <style> blocks.
 * Breakpoints: ≤1024px (tablet), ≤768px (mobile), ≤480px (small phones)
 */

/* Hamburger toggle: hidden by default (desktop) */
.et-nav-toggle { display: none; }

/* ─────────────────────────────────────────────
   TABLET  ≤ 1024px
───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .et-nav                { padding: 0 32px; }
  .et-hero               { padding: 120px 32px 64px; }
  .et-section            { padding: 80px 32px; }
  .et-cta                { padding: 80px 32px; }
  .et-footer             { padding: 28px 32px; }
  .et-page-header        { padding: 120px 32px 72px; }
  .et-intro-section,
  .et-how-section,
  .et-detects-section,
  .et-core-section,
  .et-table-section,
  .et-usewhen-section,
  .et-who-section        { padding: 72px 32px; }
  .et-2col               { gap: 48px; }
}

/* ─────────────────────────────────────────────
   MOBILE  ≤ 768px
───────────────────────────────────────────── */
@media (max-width: 768px) {

  /* ── Navigation ─────────────────────────── */
  .et-nav { padding: 0 20px; }

  .et-nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 201;
    flex-shrink: 0;
  }
  .et-nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink-deep);
    border-radius: 2px;
    transition: opacity 0.2s, transform 0.25s;
    transform-origin: center;
  }
  .et-nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .et-nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }
  .et-nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Nav drawer — hidden until toggled */
  .et-nav-links {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(250, 250, 248, 0.99);
    backdrop-filter: blur(8px);
    border-bottom: 2px solid var(--grey-mid);
    flex-direction: column;
    padding: 8px 0 24px;
    z-index: 199;
    height: auto;
    gap: 0;
    overflow-y: auto;
    max-height: calc(100vh - 64px);
  }
  .et-nav-links.et-nav-open { display: flex; }

  .et-nav-links > li {
    height: auto;
    width: 100%;
    display: block;
  }
  .et-nav-links > li > a {
    padding: 14px 24px;
    display: flex;
    width: 100%;
    border-bottom: 1px solid var(--grey-light);
    font-size: 14px;
    letter-spacing: 0.04em;
    white-space: normal;
  }
  .et-nav-chevron { display: none !important; }

  /* Dropdowns: visible only when nav drawer is open */
  .et-nav-links.et-nav-open .et-dropdown {
    display: block;
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    border-top: none;
    min-width: 0;
    padding: 4px 0;
    background: var(--grey-light);
  }
  .et-nav-links.et-nav-open .et-dropdown a { padding: 11px 40px; font-size: 13px; }
  .et-dropdown-divider { display: none; }

  /* ── Hero / page headers ─────────────────── */
  .et-hero        { padding: 100px 24px 56px; min-height: auto; }
  .et-hero-sub    { font-size: 16px; }
  .et-hero-lead   { font-size: 16px; }
  .et-page-header { padding: 100px 24px 56px; }
  .et-actions     { flex-wrap: wrap; gap: 16px; }

  /* ── Generic sections ────────────────────── */
  .et-section { padding: 64px 24px; }
  .et-inner   { max-width: 100%; }

  .et-intro-section,
  .et-how-section,
  .et-detects-section,
  .et-core-section,
  .et-table-section,
  .et-usewhen-section,
  .et-who-section { padding: 56px 24px; }

  .et-section-inner,
  .et-intro-inner,
  .et-how-inner,
  .et-detects-inner,
  .et-core-inner,
  .et-usewhen-inner { max-width: 100%; }

  /* ── Stats bar ───────────────────────────── */
  .et-stats { grid-template-columns: 1fr 1fr; }
  .et-stat {
    padding: 24px 20px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .et-stat:nth-child(odd)  { border-right: 1px solid rgba(255, 255, 255, 0.08); }
  .et-stat-num { font-size: 32px; }

  /* ── Multi-column grids → single column ─── */
  .et-2col            { grid-template-columns: 1fr; gap: 40px; }
  .et-usecases-grid   { grid-template-columns: 1fr; }
  .et-founders-grid   { grid-template-columns: 1fr; gap: 40px; }
  .et-mission-grid,
  .et-who-grid,
  .et-institution-inner { grid-template-columns: 1fr; gap: 40px; }
  .et-counter-cards   { grid-template-columns: 1fr; }
  .et-signal-cards    { grid-template-columns: 1fr; }

  /* ── Phases: 4-col → 2×2 ────────────────── */
  .et-phases    { grid-template-columns: 1fr 1fr; }
  .et-phase-num { font-size: 36px; }

  /* ── CTA ─────────────────────────────────── */
  .et-cta    { padding: 72px 24px; }
  .et-cta-h2 { margin-bottom: 32px; }

  /* ── Footer ──────────────────────────────── */
  .et-footer {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 28px 24px;
    text-align: center;
  }
  .et-footer-logo  { justify-content: center; }
  .et-footer-links { gap: 24px; justify-content: center; flex-wrap: wrap; }

  /* ── Comparison tables ───────────────────── */
  .et-table { min-width: 560px; }
  .et-table thead th:first-child { width: 110px; }
  .et-table-wrap::before {
    content: 'Scroll table to see full comparison →';
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--grey-text);
    margin-bottom: 12px;
  }
}

/* ─────────────────────────────────────────────
   SMALL PHONES  ≤ 480px
───────────────────────────────────────────── */
@media (max-width: 480px) {
  .et-hero        { padding: 88px 20px 48px; }
  .et-page-header { padding: 88px 20px 48px; }
  .et-section     { padding: 56px 20px; }
  .et-cta         { padding: 56px 20px; }
  .et-intro-section,
  .et-how-section,
  .et-detects-section,
  .et-core-section,
  .et-table-section,
  .et-usewhen-section,
  .et-who-section { padding: 48px 20px; }

  /* Stats → single column */
  .et-stats { grid-template-columns: 1fr; }
  .et-stat  { border-right: none !important; }
  .et-stat-num { font-size: 28px; }

  /* Phases → single column */
  .et-phases    { grid-template-columns: 1fr; }
  .et-phase-num { font-size: 30px; }

  /* Full-width CTAs */
  .et-btn-primary,
  .et-btn-cta { width: 100%; justify-content: center; }
}
