/* ============================================================
   STYLE.CSS — Matt Dunham Portfolio
   v2 — Mobile-first, Apple-native feel, full dark mode

   1.  CSS Variables  — semantic color tokens, spacing
   2.  Dark Mode      — auto-switches with system setting
   3.  Reset
   4.  Base           — body, headings, links
   5.  Layout         — container, sections
   6.  Header/Nav     — sticky, animated mobile menu
   7.  Hero
   8.  Clients        — auto-scrolling logo strip
   9.  Blog Cards
   10. Video Sections — swipeable carousel + grid
   11. Services
   12. Footer
   13. Buttons
   14. Utilities
   15. Responsive
============================================================ */


/* ============================================================
   1. CSS VARIABLES — Light Mode (default)
   Semantic tokens: use these everywhere instead of raw hex.
   Change a color here → it updates across the whole site.
============================================================ */
:root {
  /* ── Backgrounds ─────────────────── */
  --bg:           #ffffff;          /* Page background */
  --bg-alt:       #f5f5f7;          /* Alternate section background */
  --surface:      #ffffff;          /* Cards, panels */
  --surface-2:    #f0f0f2;          /* Slightly elevated surfaces */

  /* ── Text ────────────────────────── */
  --text-1:       #1d1d1f;          /* Primary — Apple near-black */
  --text-2:       #6e6e73;          /* Secondary / muted */
  --text-3:       #aeaeb2;          /* Placeholder / disabled */

  /* ── Borders & Dividers ──────────── */
  --border:       #d2d2d7;
  --border-light: rgba(0, 0, 0, 0.07);

  /* ── Shadows ─────────────────────── */
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.08);
  --shadow-md:    0 8px 24px rgba(0,0,0,0.10);
  --shadow-lg:    0 16px 48px rgba(0,0,0,0.12);

  /* ── Brand colors (same in both modes) ── */
  --color-dark-navy:    #1a1a2e;
  --color-white:        #ffffff;
  --color-accent: #9999ff;        /* Premiere Pro signature purple-blue */
  --color-accent-hover: #7b7bff; /* Darker on hover */
  --color-accent-blue: #4b9cf5;  /* Premiere timeline highlight blue */
  --color-nav-overlay:  rgba(0, 0, 0, 0.60);
  --color-hero-overlay: rgba(11, 25, 44, 0.62);

  /* ── Typography ──────────────────── */
  /* -apple-system uses SF Pro on Apple devices — the native font */
  --font-main: -apple-system, BlinkMacSystemFont, "SF Pro Text",
               "Helvetica Neue", Arial, sans-serif;
  --font-size-base: 16px;
  --font-size-h1: clamp(28px, 5vw, 48px);
  --font-size-h2: clamp(22px, 3.5vw, 36px);
  --font-size-h3: clamp(16px, 2.5vw, 22px);
  --line-height:  1.7;

  /* ── Spacing ─────────────────────── */
  --section-padding:    clamp(48px, 8vw, 96px);
  --container-max:      1200px;
  --container-padding:  24px;
  --gap:                24px;

  /* ── Radius ──────────────────────── */
  --radius:    14px;               /* Apple uses rounder corners */
  --radius-sm: 8px;

  /* ── Motion ──────────────────────── */
  --transition: 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}


/* ============================================================
   2. DARK MODE — auto from system setting
   Overrides the semantic tokens above.
   The brand colors (navy, green) stay the same.
   Apple dark palette: true black bg, layered dark surfaces.
============================================================ */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:           #000000;
    --bg-alt:       #1c1c1e;
    --surface:      #1c1c1e;
    --surface-2:    #2c2c2e;

    --text-1:       #f5f5f7;
    --text-2:       #98989d;
    --text-3:       #636366;

    --border:       #38383a;
    --border-light: rgba(255, 255, 255, 0.08);

    --shadow-sm:    0 2px 8px rgba(0,0,0,0.40);
    --shadow-md:    0 8px 24px rgba(0,0,0,0.50);
    --shadow-lg:    0 16px 48px rgba(0,0,0,0.60);

    --color-nav-overlay: rgba(0, 0, 0, 0.80);
  }
}


/* ============================================================
   3. RESET
============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  /* Support both fixed and dynamic viewport on iOS Safari */
  height: -webkit-fill-available;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}


/* ============================================================
   4. BASE STYLES
============================================================ */
body {
  font-family: var(--font-main);
  font-size: var(--font-size-base);
  color: var(--text-1);
  background: var(--bg);
  line-height: var(--line-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Prevent layout shifts from scrollbar appearing */
  overflow-x: hidden;
}

h1 { font-size: var(--font-size-h1); font-weight: 700; line-height: 1.15; letter-spacing: -0.5px; }
h2 { font-size: var(--font-size-h2); font-weight: 600; line-height: 1.25; letter-spacing: -0.3px; }
h3 { font-size: var(--font-size-h3); font-weight: 600; line-height: 1.35; }

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

a:hover {
  text-decoration: underline;
}

/* Focus ring — keyboard accessibility */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}


/* ============================================================
   5. LAYOUT
============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

/* Light section adapts to dark mode automatically */
.light-section {
  background: var(--bg);
  color: var(--text-1);
  padding-block: var(--section-padding);
}

/* Dark sections (hero, dark backgrounds) stay dark in both modes */
.dark-section {
  background: var(--color-dark-navy);
  color: var(--color-white);
  padding-block: var(--section-padding);
}

.dark-section h2,
.dark-section h3 {
  color: var(--color-white);
}

/* Alternating light-alt section */
.alt-section {
  background: var(--bg-alt);
  color: var(--text-1);
  padding-block: var(--section-padding);
}

/* Green underline accent on section headings */
section h2 {
  margin-bottom: 8px;
}

section h2::after {
  content: '';
  display: block;
  width: 44px;
  height: 3px;
  background: var(--color-accent);
  margin-top: 10px;
  margin-bottom: 28px;
  border-radius: 2px;
}

.section-intro {
  max-width: 720px;
  margin-bottom: 40px;
  color: var(--text-2);
}

.section-footer {
  margin-top: 40px;
  text-align: center;
}


/* ============================================================
   6. HEADER / NAV
============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 64px;
  background: transparent;
  transition: background var(--transition), backdrop-filter var(--transition);
}

.site-header.scrolled {
  background: var(--color-nav-overlay);
  backdrop-filter: blur(20px);           /* Frosted glass — Apple's signature */
  -webkit-backdrop-filter: blur(20px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: -0.2px;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  align-items: center;
}

.site-nav a {
  color: var(--color-white);
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  opacity: 0.88;
  transition: opacity var(--transition), color var(--transition);
  /* Minimum 44px touch target height — Apple HIG */
  min-height: 44px;
  display: flex;
  align-items: center;
}

.site-nav a:hover {
  opacity: 1;
  text-decoration: none;
  color: var(--color-accent);
}

/* Hamburger button — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  /* 44×44 touch target */
  width: 44px;
  height: 44px;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

/* Animate hamburger → X when open */
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}


/* ============================================================
   7. HERO SECTION
============================================================ */
.hero {
  position: relative;
  /* 100dvh = dynamic viewport height — fixes the iOS Safari chrome issue */
  min-height: 100dvh;
  min-height: 100vh; /* fallback for browsers without dvh support */
  display: flex;
  align-items: center;
  color: var(--color-white);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('/images/hero-bg.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  z-index: 0;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-hero-overlay);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding-top: 80px;
  width: 100%;
}

.hero-text h1 {
  margin-bottom: 20px;
}

.hero-text p {
  margin-bottom: 10px;
  font-size: 17px;
  opacity: 0.88;
}

.hero-text .btn {
  margin-top: 28px;
}

.hero .video-facade {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 16 / 9;
}


/* ============================================================
   8. CLIENTS — Logo strip
============================================================ */
.clients {
  padding-block: 48px;
  background: var(--bg);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.clients h2 {
  text-align: center;
  color: var(--text-1);
}

.clients h2::after {
  margin-inline: auto;
}

.logo-track-wrapper {
  overflow: hidden;
  margin-top: 32px;
  mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
}

.logo-track {
  display: flex;
  gap: 56px;
  align-items: center;
  width: max-content;
  animation: scroll-logos 30s linear infinite;
}

.logo-track:hover {
  animation-play-state: paused;
}

.logo-track img {
  height: 44px;
  width: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.55;
  transition: filter var(--transition), opacity var(--transition);
}

.logo-track img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

@media (prefers-color-scheme: dark) {
  .logo-track img {
    filter: grayscale(100%) invert(1);
    opacity: 0.5;
  }
  .logo-track img:hover {
    filter: grayscale(0%) invert(0);
    opacity: 1;
  }
}

@keyframes scroll-logos {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}


/* ============================================================
   9. BLOG CARDS
============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gap);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 24px 20px;
  color: var(--text-1);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.card h3 {
  font-size: 16px;
  line-height: 1.45;
  color: var(--text-1);
}

.card h3 a {
  color: inherit;
  text-decoration: none;
}

.card h3 a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.card time {
  font-size: 13px;
  color: var(--text-2);
}

.read-more {
  font-size: 14px;
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: none;
  margin-top: auto;
}

.read-more:hover {
  text-decoration: underline;
}


/* ============================================================
   10. VIDEO SECTIONS
   ── Facade (thumbnail + play button)
   ── Carousel (Apple-style swipeable on mobile)
   ── Produced grid
============================================================ */

/* Facade */
.video-facade {
  position: relative;
  cursor: pointer;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
  /* Tap highlight color for iOS */
  -webkit-tap-highlight-color: transparent;
}

.video-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity var(--transition);
}

.video-facade:hover img {
  opacity: 0.82;
}

.play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.play-btn svg {
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.6));
  transition: transform var(--transition);
}

.video-facade:hover .play-btn svg,
.video-facade:active .play-btn svg {
  transform: scale(1.10);
}

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

/* ── Carousel wrapper ─────────────────────────────── */
.carousel-wrapper {
  position: relative;
}

.carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* THE KEY FIX: overflow-x: auto enables native touch swipe.
   Hidden scrollbar keeps it looking clean. */
.carousel-track {
  display: flex;
  gap: var(--gap);
  overflow-x: auto;                     /* ← was "hidden", now swipeable */
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;    /* iOS momentum scroll */
  scrollbar-width: none;                /* Hide in Firefox */
  flex: 1;
  /* Smooth deceleration — feels Apple-native */
  scroll-behavior: smooth;
  padding-bottom: 4px;                  /* Tiny room for shadow */
}

/* Hide scrollbar in Chrome/Safari */
.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-item {
  flex: 0 0 calc(33.333% - 16px);
  scroll-snap-align: start;
  min-width: 0;
}

/* Carousel arrow buttons */
.carousel-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--color-white);
  font-size: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.light-section .carousel-btn,
.alt-section .carousel-btn {
  background: rgba(0, 0, 0, 0.07);
  border-color: var(--border);
  color: var(--text-1);
}

.carousel-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: scale(1.05);
}

.light-section .carousel-btn:hover,
.alt-section .carousel-btn:hover {
  background: rgba(0, 0, 0, 0.14);
}

/* ── Scroll dot indicators ────────────────────────── */
/* Shown below carousel on mobile so users know to swipe */
.carousel-dots {
  display: none;                        /* Hidden on desktop, shown on mobile via media query */
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
}

.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
  transition: background var(--transition), transform var(--transition);
  cursor: pointer;
  border: none;
  padding: 0;
}

.carousel-dot.active {
  background: var(--color-accent);
  transform: scale(1.3);
}

/* ── Produced Videos Grid ─────────────────────────── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
}


/* ============================================================
   10b. PROJECT ROWS — Alternating video + text layout
        Used in Edited Videos section
============================================================ */

/* Software badge at top of section */
.software-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-accent);
  margin-bottom: 56px;
}

/* List container */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

/* Individual project row */
.project-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

/* Reversed row — text left, video right */
.project-row--reverse {
  direction: rtl;
}
.project-row--reverse > * {
  direction: ltr;
}

/* Video side */
.project-media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.project-media .video-facade {
  border-radius: var(--radius);
  width: 100%;
  aspect-ratio: 16/9;
}

.project-media .video-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Text side */
.project-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-client-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.project-highlight-badge {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 4px;
  padding: 3px 10px;
  align-self: flex-start;
}

.project-info h3 {
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  font-weight: 700;
  color: var(--text-1);
  margin: 0;
  line-height: 1.3;
}

.project-info p {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.75;
  margin: 0;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.project-tags span {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 12px;
}

/* ── Paired Showcase ──────────────────────────────────── */
.project-paired {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 40px;
}

.paired-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 36px;
}

.paired-header .project-client-tag {
  display: block;
  margin-bottom: 8px;
}

.paired-header h3 {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 12px;
}

.paired-header p {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.75;
  margin: 0;
}

.paired-videos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.paired-video {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.paired-video .video-facade {
  border-radius: var(--radius);
  width: 100%;
  aspect-ratio: 16/9;
}

.paired-video .video-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.paired-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  text-align: center;
  margin: 0;
}

/* Paid social sub-row */
.paid-social-subrow {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.paid-social-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  text-align: center;
  margin: 0 0 16px;
}

/* Smaller paired videos for paid social */
.paired-videos--small {
  max-width: 560px;
  margin: 0 auto;
}

/* ── Mobile: stack project rows ───────────────────────── */
@media (max-width: 768px) {
  .project-row {
    grid-template-columns: 1fr;
    gap: 24px;
    direction: ltr;
  }

  .project-row--reverse {
    direction: ltr;
  }

  .project-list {
    gap: 56px;
  }

  .project-paired {
    padding: 24px 20px;
  }

  .paired-videos {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .paired-videos--small {
    max-width: 100%;
  }

  .software-badge {
    margin-bottom: 36px;
  }
}


/* ============================================================
   11. SERVICES
============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--gap);
}

.service-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: background var(--transition), transform var(--transition);
}

.service-card:hover {
  background: rgba(255, 255, 255, 0.10);
  transform: translateY(-3px);
}

.service-card h3 {
  color: var(--color-accent);
  margin-bottom: 10px;
}

.service-card p {
  opacity: 0.80;
  font-size: 15px;
  line-height: 1.7;
}


/* ============================================================
   12. FOOTER
============================================================ */
.site-footer {
  background: #060f1a;
  color: rgba(255, 255, 255, 0.55);
  padding-block: 28px;
  font-size: 14px;
}

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

.site-footer nav {
  display: flex;
  gap: 20px;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: color var(--transition);
  /* Minimum 44px touch target */
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.site-footer a:hover {
  color: var(--color-accent);
  text-decoration: none;
}


/* ============================================================
   13. BUTTONS
============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Minimum 44px Apple touch target */
  min-height: 44px;
  padding: 0 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), color var(--transition),
              transform var(--transition), box-shadow var(--transition);
  border: 2px solid transparent;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: -0.1px;
}

.btn-primary {
  background: var(--color-accent);
  color: #0d0d1a;
}

.btn-primary:hover {
  background: #7b7bff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(153, 153, 255, 0.35);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn-outline:hover {
  background: var(--color-accent);
  color: #0d0d1a;
  text-decoration: none;
}


/* ============================================================
   14. UTILITIES
============================================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .logo-track { animation: none; }
}


/* ============================================================
   15. RESPONSIVE — Tablet & Mobile
============================================================ */

/* ── Tablet (≤ 1024px) ────────────────────────────── */
@media (max-width: 1024px) {
  .carousel-item {
    flex: 0 0 calc(50% - 12px);         /* 2 items at a time on tablet */
  }
}

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

  /* Hero: stack vertically */
  .hero-content {
    grid-template-columns: 1fr;
    padding-top: 96px;
    padding-bottom: 56px;
    gap: 32px;
  }

  /* Hamburger: show on mobile */
  .nav-toggle {
    display: flex;
  }

  /* Mobile nav: full-width dropdown with blur backdrop */
  .site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(11, 25, 44, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 8px 0 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    /* Slide in from top */
    transform: translateY(-8px);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
  }

  .site-nav.open {
    display: block;
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    align-items: stretch;
  }

  /* Large touch targets on mobile nav */
  .site-nav a {
    font-size: 16px;
    padding: 14px 24px;
    min-height: 52px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    opacity: 1;
  }

  .site-nav li:last-child a {
    border-bottom: none;
  }

  /* Carousel: Apple-style — show ~85% + peek at next card */
  .carousel {
    gap: 0;
    /* Extend to screen edges */
    margin-inline: calc(-1 * var(--container-padding));
  }

  /* Hide arrow buttons — swipe replaces them on mobile */
  .carousel-btn {
    display: none;
  }

  .carousel-track {
    padding-inline: var(--container-padding);
    scroll-padding-inline: var(--container-padding);
    gap: 12px;
  }

  .carousel-item {
    /* 85% width lets the next card peek in — signals to swipe */
    flex: 0 0 85%;
    scroll-snap-align: start;
  }

  /* Show dot indicators on mobile */
  .carousel-dots {
    display: flex;
  }

  /* Blog cards: single column */
  .card-grid {
    grid-template-columns: 1fr;
  }

  /* Footer: center-aligned stack */
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
}

/* ── Small mobile (≤ 480px) ───────────────────────── */
@media (max-width: 480px) {
  :root {
    --container-padding: 16px;
    --section-padding: 44px;
  }

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

  h1 { letter-spacing: -0.8px; }
}
