/* ==========================================================================
   Instamour — Modern redesign
   Design system: typography, spacing, colors, components
   ========================================================================== */

/* --- Design tokens --- */
:root {
  /* Light mode (default) */
  --color-bg: #fafbfc;
  --color-bg-elevated: #ffffff;
  --color-bg-muted: #f0f2f5;
  --color-text: #1a1d23;
  --color-text-muted: #5c6370;
  --color-text-inverse: #ffffff;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-accent-muted: #dbeafe;
  --color-border: #e5e7eb;
  --color-border-strong: #d1d5db;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 24px 56px rgba(0, 0, 0, 0.1);

  /* Typography */
  --font-heading: "Outfit", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  --text-hero: clamp(2.5rem, 6vw, 4rem);

  --leading-tight: 1.2;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --section-padding: clamp(3rem, 8vw, 5rem);
  --container-max: 1200px;
  --container-narrow: 720px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 150ms;
  --duration-normal: 280ms;
  --duration-slow: 400ms;
}

/* Dark mode */
[data-theme="dark"] {
  --color-bg: #0f1116;
  --color-bg-elevated: #181b23;
  --color-bg-muted: #23262e;
  --color-text: #f1f3f5;
  --color-text-muted: #9ca3af;
  --color-text-inverse: #0f1116;
  --color-accent: #3b82f6;
  --color-accent-hover: #60a5fa;
  --color-accent-muted: #1e3a5f;
  --color-border: #2d3139;
  --color-border-strong: #3d424b;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 24px 56px rgba(0, 0, 0, 0.35);
}

/* --- Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}
a:hover {
  color: var(--color-accent-hover);
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* --- Skip link --- */
.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-4);
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--color-accent);
  color: var(--color-text-inverse);
  font-weight: 600;
  border-radius: 6px;
  transform: translateY(-120%);
  transition: transform var(--duration-normal) var(--ease-out);
}
.skip-link:focus {
  transform: translateY(0);
}

/* --- Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: var(--space-4) 0;
  background: transparent;
  transition: background var(--duration-normal) var(--ease-out),
    box-shadow var(--duration-normal) var(--ease-out);
}

.site-header.is-scrolled {
  background: var(--color-bg-elevated);
  box-shadow: var(--shadow-sm);
}

/* Homepage: when header is over the dark hero, use light nav (fixes light-mode contrast) */
.has-hero .site-header:not(.is-scrolled) .nav-list a {
  color: rgba(255, 255, 255, 0.9);
}
.has-hero .site-header:not(.is-scrolled) .nav-list a:hover,
.has-hero .site-header:not(.is-scrolled) .nav-list a[aria-current="page"] {
  color: #ffffff;
}
.has-hero .site-header:not(.is-scrolled) .theme-toggle {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}
.has-hero .site-header:not(.is-scrolled) .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
}
.has-hero .site-header:not(.is-scrolled) .nav-toggle {
  color: #ffffff;
}
.has-hero .site-header:not(.is-scrolled) .nav-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
}
.has-hero .site-header:not(.is-scrolled) .header-actions .btn--primary {
  background: #ffffff;
  color: var(--color-accent);
  border-color: transparent;
}
.has-hero .site-header:not(.is-scrolled) .header-actions .btn--primary:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-accent-hover);
}

.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.site-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--color-text);
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
}
.site-logo:hover {
  color: var(--color-text);
}
.site-logo img {
  height: 36px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: var(--text-sm);
}
.nav-list a:hover,
.nav-list a[aria-current="page"] {
  color: var(--color-text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.header-actions--desktop {
  display: none;
}
.header-actions--mobile {
  display: none;
}
@media (min-width: 769px) {
  .header-actions--desktop {
    display: flex;
  }
}
@media (max-width: 768px) {
  .header-actions--mobile {
    display: flex;
    margin-top: auto;
    padding-top: var(--space-6);
    border-top: 1px solid var(--color-border);
  }
}

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-bg-elevated);
  color: var(--color-text);
  cursor: pointer;
  transition: background var(--duration-fast), border-color var(--duration-fast);
}
.theme-toggle:hover {
  background: var(--color-bg-muted);
  border-color: var(--color-border-strong);
}
.theme-toggle svg {
  width: 20px;
  height: 20px;
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* CTA button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  line-height: 1;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background var(--duration-fast), transform var(--duration-fast);
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-text-inverse);
}
.btn--primary:hover {
  background: var(--color-accent-hover);
  color: var(--color-text-inverse);
  transform: translateY(-1px);
}

.btn--secondary {
  background: var(--color-bg-muted);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn--secondary:hover {
  background: var(--color-border);
  border-color: var(--color-border-strong);
}

.btn--large {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  padding-bottom: var(--space-16);
  position: relative;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.hero__bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26, 29, 35, 0.88) 0%, rgba(26, 29, 35, 0.6) 50%, rgba(26, 29, 35, 0.4) 100%);
  pointer-events: none;
}

[data-theme="dark"] .hero__bg-overlay {
  background: linear-gradient(135deg, rgba(15, 17, 22, 0.9) 0%, rgba(15, 17, 22, 0.65) 50%, rgba(15, 17, 22, 0.5) 100%);
}

.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  align-items: center;
}

@media (min-width: 960px) {
  .hero .container {
    grid-template-columns: 1fr minmax(280px, 380px);
  }
}

.hero__content {
  max-width: 640px;
}

.hero__mockup-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  justify-self: center;
}

.hero__mockup {
  display: none;
  position: relative;
}

@media (min-width: 960px) {
  .hero__mockup {
    display: block;
    opacity: 0;
    animation: fadeUp 0.8s var(--ease-out) 0.3s forwards;
  }
}

.hero__mockup-inner {
  position: relative;
  width: 100%;
  max-width: 280px;
  padding: 12px 10px 36px;
  background: linear-gradient(160deg, #1a1d23 0%, #2d3139 100%);
  border-radius: 36px;
  box-shadow: var(--shadow-xl), 0 0 0 3px var(--color-border);
}

[data-theme="dark"] .hero__mockup-inner {
  background: linear-gradient(160deg, #181b23 0%, #23262e 100%);
  box-shadow: var(--shadow-xl), 0 0 0 3px var(--color-border);
}

.hero__mockup-inner img,
.hero__mockup-video {
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
}
.hero__mockup-video {
  position: relative;
  aspect-ratio: 9 / 16;
  width: 100%;
  min-height: 320px;
  max-height: 520px;
  background: #000;
}
.hero__mockup-video video::-webkit-media-controls,
.hero__mockup-video video::-webkit-media-controls-panel {
  display: none !important;
}
.hero__mockup-poster {
  position: absolute;
  inset: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  overflow: hidden;
}
.hero__mockup-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__mockup-play {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  transition: background var(--duration-fast), transform var(--duration-fast);
}
.hero__mockup-poster:hover .hero__mockup-play {
  background: rgba(37, 99, 235, 0.9);
  transform: scale(1.05);
}
.hero__mockup-video.is-playing .hero__mockup-poster {
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-normal);
}
.hero__mockup-video iframe,
.hero__mockup-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 24px;
  object-fit: cover;
}
.hero__mockup-video iframe[src] {
  z-index: 1;
}

/* Hero phone video controls (under the phone) */
.hero__mockup-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
}
@media (min-width: 960px) {
  .hero__mockup-actions {
    display: flex;
  }
}
@media (max-width: 959px) {
  .hero__mockup-actions {
    display: none;
  }
}
.hero__video-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.hero__video-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.06);
}
.hero__video-btn:active {
  transform: scale(0.98);
}
.hero__video-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4);
}
.hero__video-btn svg {
  width: 24px;
  height: 24px;
  position: absolute;
}
.hero__video-btn .icon-pause,
.hero__video-btn .icon-unmuted {
  display: none;
}
.hero__video-btn.is-playing .icon-play {
  display: none;
}
.hero__video-btn.is-playing .icon-pause {
  display: block;
}
.hero__video-btn.is-unmuted .icon-muted {
  display: none;
}
.hero__video-btn.is-unmuted .icon-unmuted {
  display: block;
}
.hero__video-btn {
  position: relative;
}

/* About page: founder video controls (dark buttons on light background) */
.founder-video-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-6);
}
.founder__video-btn {
  border-color: var(--color-border-strong);
  background: var(--color-bg-elevated);
  color: var(--color-text);
}
.founder__video-btn:hover {
  background: var(--color-bg-muted);
  border-color: var(--color-border-strong);
  color: var(--color-text);
}
.founder__video-btn:focus {
  box-shadow: 0 0 0 3px var(--color-accent-muted);
}

/* About page: hero with content left + founder video (phone + buttons) right, like homepage */
.hero--about .hero .container {
  grid-template-columns: 1fr;
  justify-items: center;
}
@media (min-width: 960px) {
  .hero--about .hero .container {
    grid-template-columns: 1fr minmax(280px, 380px);
    justify-items: stretch;
    align-items: start;
    gap: var(--space-10);
  }
  .hero--about .hero__mockup-wrap {
    justify-self: center;
    align-self: center;
  }
}
.hero--about .hero__content {
  max-width: 560px;
  margin-inline: auto;
  text-align: center;
}
@media (min-width: 960px) {
  .hero--about .hero__content {
    margin-inline: 0;
    text-align: left;
  }
}
.hero--about .hero__content h1,
.hero--about .hero__tagline {
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 960px) {
  .hero--about .hero__content h1,
  .hero--about .hero__tagline {
    margin-left: 0;
    margin-right: 0;
  }
}
.hero--about .hero__badge {
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 960px) {
  .hero--about .hero__badge {
    margin-left: 0;
    margin-right: 0;
  }
}
/* Founder video buttons in hero use light style (same as homepage hero buttons) */
.hero--about .hero__mockup-actions .hero__video-btn {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.hero--about .hero__mockup-actions .hero__video-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.8);
  color: #fff;
}
.hero--about .hero__mockup-actions .hero__video-btn:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4);
}
/* About hero: give the content a card so it doesn’t feel like floating text */
.hero--about .hero__content--card {
  background: rgba(26, 29, 35, 0.75);
  backdrop-filter: blur(12px);
  padding: var(--space-10) var(--space-8);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
}
[data-theme="dark"] .hero--about .hero__content--card {
  background: rgba(15, 17, 22, 0.8);
  border-color: rgba(255, 255, 255, 0.08);
}
.hero--about .hero__tagline {
  margin-bottom: var(--space-8);
}
.hero--about .hero__cta {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.6);
}
.hero--about .hero__cta:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: #ffffff;
}
.hero--about {
  min-height: 75vh;
  min-height: 75dvh;
}

/* About page: founder video (same click-to-play as homepage) */
.founder-video-section {
  margin-top: var(--space-12);
}
.founder-video-section h2 {
  margin-bottom: var(--space-8);
}
.founder-video-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: var(--space-6);
}
.founder-video-wrap .hero__mockup-inner {
  max-width: 280px;
}

/* Hero always has dark background (video + overlay), so use light text in both themes */
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  margin-bottom: var(--space-6);
  background: rgba(255, 255, 255, 0.2);
  color: #e0e7ff;
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: 100px;
  width: fit-content;
  opacity: 0;
  animation: fadeUp 0.6s var(--ease-out) 0.1s forwards;
}

.hero h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-hero);
  line-height: var(--leading-tight);
  letter-spacing: -0.03em;
  color: #ffffff;
  margin: 0 0 var(--space-6);
  opacity: 0;
  animation: fadeUp 0.6s var(--ease-out) 0.2s forwards;
}

.hero__tagline {
  font-size: var(--text-xl);
  line-height: var(--leading-relaxed);
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 var(--space-10);
  max-width: 520px;
  opacity: 0;
  animation: fadeUp 0.6s var(--ease-out) 0.3s forwards;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  opacity: 0;
  animation: fadeUp 0.6s var(--ease-out) 0.4s forwards;
}

/* Hero CTAs on dark background: ensure buttons are readable in light and dark mode */
.hero__ctas .btn--primary {
  background: var(--color-accent);
  color: #ffffff;
  border-color: transparent;
}
.hero__ctas .btn--primary:hover {
  background: var(--color-accent-hover);
  color: #ffffff;
}
.hero__ctas .btn--secondary {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.7);
}
.hero__ctas .btn--secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: #ffffff;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Sections --- */
.section {
  padding-block: var(--section-padding);
}

.section--alt {
  background: var(--color-bg-muted);
}

.section__header {
  text-align: center;
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: var(--space-12);
}

.section__label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-3);
}

.section__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(var(--text-3xl), 4vw, var(--text-4xl));
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin: 0 0 var(--space-4);
}

.section__desc {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin: 0;
  line-height: var(--leading-relaxed);
}

/* Tutorial video (responsive 16:9) */
.tutorial-video {
  margin-top: var(--space-8);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.tutorial-video__wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-lg);
}
.tutorial-video__wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Feature grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--space-6);
}

@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
  }
}

.feature-card {
  padding: var(--space-8);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  transition: box-shadow var(--duration-normal) var(--ease-out),
    transform var(--duration-normal) var(--ease-out);
}
.feature-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-5);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-muted);
  color: var(--color-accent);
  border-radius: 12px;
}
.feature-card__icon svg {
  width: 24px;
  height: 24px;
}

.feature-card__img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: var(--space-5);
  background: var(--color-bg-muted);
}

.feature-card.has-img .feature-card__icon {
  display: none;
}

.feature-card h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-xl);
  margin: 0 0 var(--space-3);
  color: var(--color-text);
}

.feature-card p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Image / gallery section --- */
.media-section {
  padding-block: var(--section-padding);
  position: relative;
  overflow: hidden;
}

.media-section__bg {
  position: absolute;
  inset: 0;
  background: url("https://images.pexels.com/photos/3184418/pexels-photo-3184418.jpeg?auto=compress&cs=tinysrgb&w=1920") center center / cover no-repeat;
  pointer-events: none;
}

.media-section__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(26,29,35,0.75) 0%, rgba(26,29,35,0.9) 100%);
}

[data-theme="dark"] .media-section__bg::after {
  background: linear-gradient(to bottom, rgba(15,17,22,0.8) 0%, rgba(15,17,22,0.95) 100%);
}

.media-section .container {
  position: relative;
  z-index: 1;
}

.media-section .section__label,
.media-section .section__title,
.media-section .section__desc {
  color: var(--color-text-inverse);
}

.media-section .section__desc {
  opacity: 0.9;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-12);
}

@media (min-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
  }
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  transition: transform var(--duration-normal) var(--ease-out);
}

.gallery-grid a:hover img,
.gallery-grid img:hover {
  transform: scale(1.02);
}

/* --- CTA block (tribute) --- */
.cta-block {
  text-align: center;
  padding: var(--space-16) var(--space-6);
  background: linear-gradient(135deg, var(--color-accent) 0%, #1d4ed8 100%);
  color: var(--color-text-inverse);
  border-radius: 24px;
}

.cta-block--tribute {
  background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
}

.cta-block--tribute .cta-block__text {
  opacity: 0.9;
}

.cta-block__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(var(--text-2xl), 3vw, var(--text-4xl));
  margin: 0 0 var(--space-4);
  color: inherit;
}

.cta-block__text {
  font-size: var(--text-lg);
  margin: 0 0 var(--space-8);
  opacity: 0.95;
  max-width: 480px;
  margin-inline: auto;
}

.cta-block .btn--primary {
  background: #fff;
  color: var(--color-accent);
}
.cta-block .btn--primary:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-accent-hover);
}

/* --- Footer --- */
.site-footer {
  padding-block: var(--space-12);
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-elevated);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-text);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav a {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.footer-nav a:hover {
  color: var(--color-text);
}

.footer-bottom {
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* --- Mobile nav --- */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  border-radius: 8px;
}
.nav-toggle:hover {
  background: var(--color-bg-muted);
}
.nav-toggle svg {
  width: 24px;
  height: 24px;
}

/* Desktop: nav-drawer is just a flex container for list + actions */
.nav-drawer {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(300px, 85vw);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-16) var(--space-6);
    background: var(--color-bg-elevated);
    box-shadow: var(--shadow-xl);
    transform: translateX(100%);
    transition: transform var(--duration-normal) var(--ease-out);
  }

  .nav.is-open .nav-drawer {
    transform: translateX(0);
  }

  .nav-list {
    padding-top: var(--space-12);
    flex: 0 0 auto;
  }

  .nav-list li {
    border-bottom: 1px solid var(--color-border);
  }

  .nav-list a {
    display: block;
    padding: var(--space-4);
    font-size: var(--text-base);
  }
}

/* --- Page (About, Contact) --- */
.page-header {
  padding-top: 120px;
  padding-bottom: var(--space-12);
  text-align: center;
}

.page-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-4);
  color: var(--color-text);
}

.page-intro {
  font-size: var(--text-xl);
  color: var(--color-text-muted);
  max-width: 560px;
  margin-inline: auto;
}

.content-block {
  padding-bottom: var(--section-padding);
}

.content-block p {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
  margin: 0 0 var(--space-6);
}

.content-block h2 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-2xl);
  margin: var(--space-10) 0 var(--space-4);
  color: var(--color-text);
}

/* Contact form */
.form-group {
  margin-bottom: var(--space-6);
}

.form-group label {
  display: block;
  font-weight: 500;
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-base);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-bg-elevated);
  color: var(--color-text);
  transition: border-color var(--duration-fast);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-muted);
}

.form-group textarea {
  min-height: 160px;
  resize: vertical;
}

.contact-form {
  max-width: 480px;
  margin-inline: auto;
}

.contact-form .btn {
  width: 100%;
  margin-top: var(--space-2);
}
