/* ==========================================================================
   Kid Kamera Productions — Design Tokens & Base Styles
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Color */
  --bg: #0a0a0a;
  --bg-elevated: #131313;
  --surface: #161616;
  --surface-2: #1e1e1e;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --fg: #f6f5f2;
  --fg-muted: #9a988f;
  --fg-faint: #66645d;
  --accent: #e7e3d8;
  --accent-hover: #ffffff;
  --accent-soft: rgba(255, 255, 255, 0.08);
  --accent-soft-strong: rgba(255, 255, 255, 0.16);
  --on-accent: #0a0a0a;
  --danger: #e5645f;
  --success: #86b089;

  /* Radius */
  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 14px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 200ms;
  --dur-base: 320ms;
  --dur-slow: 600ms;

  /* Layout */
  --container: 1280px;
  --gutter: clamp(20px, 5vw, 64px);

  /* Spacing (8px system) */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;
  --space-8: 128px;

  /* Type scale (fluid) */
  --fs-hero: clamp(2.75rem, 5.2vw + 1rem, 6.25rem);
  --fs-h1: clamp(2.25rem, 2.6vw + 1rem, 3.5rem);
  --fs-h2: clamp(1.75rem, 1.6vw + 1rem, 2.5rem);
  --fs-h3: clamp(1.3rem, 0.8vw + 1rem, 1.75rem);
  --fs-h4: clamp(1.1rem, 0.4vw + 1rem, 1.25rem);
  --fs-body-lg: clamp(1.0625rem, 0.3vw + 1rem, 1.25rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-label: 0.75rem;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --z-nav: 100;
  --z-overlay: 200;
  --z-modal: 300;
  --z-toast: 400;
}

/* ==========================================================================
   Reset
   ========================================================================== */

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p, figure { margin: 0; }
input, textarea, select { font: inherit; color: inherit; }

::selection { background: var(--accent); color: var(--on-accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--fg-faint); }

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, .font-display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}

.lede {
  font-size: var(--fs-body-lg);
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 60ch;
}

.text-muted { color: var(--fg-muted); }
.text-accent { color: var(--accent); }

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--space-8);
}

@media (max-width: 768px) {
  .section { padding-block: var(--space-6); }
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  max-width: 640px;
}

.section-head.split {
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-end;
  max-width: none;
  gap: var(--space-4);
}

@media (max-width: 640px) {
  .section-head.split { flex-direction: column; align-items: flex-start; }
}

.grain {
  position: relative;
}

.grain::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: 0.9em 1.7em;
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

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

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

.btn-ghost { background: transparent; color: var(--fg-muted); padding: 0.6em 0; }
.btn-ghost:hover { color: var(--fg); }

.btn-lg { padding: 1.1em 2.2em; font-size: var(--fs-body); }

.btn svg { width: 1.1em; height: 1.1em; flex-shrink: 0; transition: transform var(--dur-base) var(--ease-out); }
.btn:hover svg.icon-shift { transform: translateX(3px); }

/* ==========================================================================
   Navigation
   ========================================================================== */

.nav {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: var(--z-nav);
  padding: var(--space-3) 0;
  transition: background var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out), padding var(--dur-base) var(--ease-out);
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: var(--border);
  padding-block: var(--space-2);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  position: relative;
  z-index: 2;
}

.logo-mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.logo-text-fallback {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-text-fallback .logo-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.logo-text-fallback .logo-sub {
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  color: var(--fg-muted);
  margin-top: 3px;
}

/* Any logo image stays hidden until it successfully loads — so a missing
   file never shows a broken-image icon or alt text; the wordmark shows instead. */
img.logo-img:not(.is-loaded) { display: none !important; }
.logo img.logo-img { height: 60px; width: auto; }
.logo img.logo-img.is-loaded { display: block; }
img.logo-img.is-loaded ~ .logo-text-fallback { display: none; }

.nav.is-scrolled .logo img.logo-img { height: 50px; transition: height var(--dur-base) var(--ease-out); }
.footer .logo img.logo-img { height: 84px; }
@media (max-width: 560px) { .logo img.logo-img { height: 48px; } }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.nav-links a {
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--fg-muted);
  position: relative;
  padding-block: 4px;
  transition: color var(--dur-base) var(--ease-out);
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transition: right var(--dur-base) var(--ease-out);
}

.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--fg); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { right: 0; }

.nav-cta { display: flex; align-items: center; gap: var(--space-3); }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  z-index: 2;
}

.nav-toggle .bars { position: relative; width: 20px; height: 14px; }
.nav-toggle .bars span {
  position: absolute; left: 0; right: 0; height: 1.5px; background: var(--fg);
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out), top var(--dur-base) var(--ease-out);
}
.nav-toggle .bars span:nth-child(1) { top: 0; }
.nav-toggle .bars span:nth-child(2) { top: 6px; }
.nav-toggle .bars span:nth-child(3) { top: 12px; }

.nav-toggle[aria-expanded="true"] .bars span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-6) var(--gutter);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.mobile-menu.is-open { visibility: visible; opacity: 1; pointer-events: auto; }

.mobile-menu ul { display: flex; flex-direction: column; gap: var(--space-2); }
.mobile-menu a {
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 500;
  color: var(--fg);
  opacity: 0.4;
  transition: opacity var(--dur-base) var(--ease-out);
}
.mobile-menu a[aria-current="page"], .mobile-menu a:hover { opacity: 1; color: var(--accent); }

.mobile-menu-footer {
  margin-top: var(--space-6);
  display: flex;
  gap: var(--space-4);
  color: var(--fg-muted);
  font-size: var(--fs-small);
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-cta .btn { display: none; }
  .nav-toggle { display: flex; }
}

body.menu-open { overflow: hidden; }

/* ==========================================================================
   Media Placeholder System
   ========================================================================== */

.media {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #161616, #262626);
  border-radius: var(--radius-md);
}

.media[data-tone="1"] { background: linear-gradient(135deg, #171717 0%, #2b2b2b 55%, #151515 100%); }
.media[data-tone="2"] { background: linear-gradient(135deg, #121212 0%, #242424 55%, #0f0f0f 100%); }
.media[data-tone="3"] { background: linear-gradient(135deg, #1b1b1b 0%, #303030 55%, #171717 100%); }
.media[data-tone="4"] { background: linear-gradient(135deg, #141414 0%, #232323 55%, #101010 100%); }
.media[data-tone="5"] { background: linear-gradient(135deg, #191919 0%, #2d2d2d 55%, #151515 100%); }
.media[data-tone="6"] { background: linear-gradient(135deg, #101010 0%, #202020 55%, #0e0e0e 100%); }

.media::before {
  content: '';
  position: absolute; inset: 0;
  opacity: 0.35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.media img, .media video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease-out), transform 700ms var(--ease-out);
}

.media img.is-loaded, .media video.is-loaded { opacity: 1; }

.media .play-mark {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(245,243,238,0.35);
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,10,10,0.35);
  backdrop-filter: blur(6px);
  opacity: 0.85;
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
  pointer-events: none;
}

.media .play-mark svg { width: 16px; height: 16px; margin-left: 2px; fill: var(--fg); }

/* ==========================================================================
   Marquee
   ========================================================================== */

.marquee {
  border-block: 1px solid var(--border);
  overflow: hidden;
  padding-block: var(--space-3);
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: var(--space-5);
  animation: marquee 32s linear infinite;
}

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

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

.marquee-track span {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  gap: var(--space-5);
  white-space: nowrap;
}

.marquee-track span::after {
  content: '✻';
  color: var(--accent);
  font-style: normal;
  font-size: 0.8em;
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* ==========================================================================
   Grid Systems
   ========================================================================== */

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }

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

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

/* ==========================================================================
   Work Cards
   ========================================================================== */

.work-card { display: block; cursor: pointer; }

.work-card .media { aspect-ratio: 4 / 3; }

.work-card .media img, .work-card .media video { transition: transform 700ms var(--ease-out), opacity var(--dur-slow) var(--ease-out); }

.work-card:hover .media img, .work-card:hover .media video { transform: scale(1.06); }
.work-card:hover .play-mark { transform: translate(-50%, -50%) scale(1.08); background: var(--accent); }
.work-card:hover .play-mark svg { fill: var(--on-accent); }

.work-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: var(--space-2);
  gap: var(--space-2);
}

.work-card-title { font-family: var(--font-display); font-size: var(--fs-h4); font-weight: 500; }
.work-card-tag { font-size: var(--fs-label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-muted); white-space: nowrap; }

/* Featured (home) larger variant */
.work-card.featured .media { aspect-ratio: 16/10; }

/* ==========================================================================
   Cards general (services, journal, testimonials)
   ========================================================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  transition: border-color var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}

.card:hover { border-color: var(--border-strong); }

.card-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  margin-bottom: var(--space-3);
}
.card-icon svg { width: 22px; height: 22px; }

/* Service pricing cards */
.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  position: relative;
}

.plan-card.featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--accent-soft), var(--surface) 40%);
}

.plan-badge {
  position: absolute;
  top: -13px; left: var(--space-4);
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 600;
}

.plan-price {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  margin-block: var(--space-1);
}
.plan-price span { font-size: var(--fs-small); color: var(--fg-muted); font-family: var(--font-body); }

.plan-features { display: flex; flex-direction: column; gap: var(--space-2); margin-block: var(--space-2); }
.plan-features li { display: flex; align-items: flex-start; gap: var(--space-2); font-size: var(--fs-small); color: var(--fg-muted); }
.plan-features li svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; color: var(--accent); }

/* Testimonials */
.testimonial-track {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: var(--space-2);
}
.testimonial-track::-webkit-scrollbar { display: none; }

.testimonial-card {
  scroll-snap-align: start;
  flex: 0 0 clamp(280px, 80vw, 420px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.testimonial-quote-mark { color: var(--accent); font-family: var(--font-display); font-size: 2.5rem; line-height: 0.5; }
.testimonial-quote { font-size: var(--fs-body-lg); line-height: 1.6; }
.testimonial-person { display: flex; align-items: center; gap: var(--space-2); margin-top: auto; }
.testimonial-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.testimonial-name { font-weight: 600; font-size: var(--fs-small); }
.testimonial-role { font-size: var(--fs-small); color: var(--fg-muted); }

.carousel-controls { display: flex; gap: var(--space-2); margin-top: var(--space-4); }
.carousel-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  transition: border-color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}
.carousel-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.carousel-btn svg { width: 18px; height: 18px; }

/* Journal cards */
.journal-card .media { aspect-ratio: 4/3; margin-bottom: var(--space-3); }
.journal-meta { display: flex; gap: var(--space-2); align-items: center; font-size: var(--fs-label); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--space-1); }
.journal-title { font-family: var(--font-display); font-size: var(--fs-h4); font-weight: 500; margin-bottom: var(--space-1); }
.journal-excerpt { color: var(--fg-muted); font-size: var(--fs-small); }

/* ==========================================================================
   Stats / Counters
   ========================================================================== */

.stats-row { display: flex; gap: var(--space-6); flex-wrap: wrap; }
.stat .stat-num { font-family: var(--font-display); font-size: var(--fs-h1); color: var(--accent); }
.stat .stat-label { font-size: var(--fs-small); color: var(--fg-muted); letter-spacing: 0.05em; text-transform: uppercase; }

/* ==========================================================================
   Process Timeline (horizontal)
   ========================================================================== */

.timeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-3);
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 20px; left: 5%; right: 5%;
  height: 1px;
  background: var(--border-strong);
}

.timeline-step { position: relative; display: flex; flex-direction: column; gap: var(--space-2); }
.timeline-num {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--accent);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  z-index: 1;
}
.timeline-step h4 { font-size: var(--fs-h4); font-weight: 600; }
.timeline-step p { font-size: var(--fs-small); color: var(--fg-muted); }

@media (max-width: 900px) {
  .timeline { grid-template-columns: 1fr; gap: var(--space-4); }
  .timeline::before { top: 0; bottom: 0; left: 20px; width: 1px; height: auto; right: auto; }
  .timeline-step { flex-direction: row; align-items: flex-start; }
}

/* Vertical timeline (about page) */
.vtimeline { position: relative; padding-left: var(--space-5); border-left: 1px solid var(--border-strong); display: flex; flex-direction: column; gap: var(--space-5); }
.vtimeline-item { position: relative; }
.vtimeline-item::before {
  content: '';
  position: absolute;
  left: calc(var(--space-5) * -1 - 5px);
  top: 4px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
}
.vtimeline-year { font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; display: block; }

/* ==========================================================================
   Accordion (FAQ)
   ========================================================================== */

.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: var(--space-3);
  text-align: left;
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  font-weight: 500;
  cursor: pointer;
}
.accordion-trigger svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform var(--dur-base) var(--ease-out); color: var(--accent); }
.accordion-item[data-open="true"] .accordion-trigger svg { transform: rotate(45deg); }

.accordion-panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height var(--dur-slow) var(--ease-out);
}
.accordion-panel-inner { padding-bottom: var(--space-3); color: var(--fg-muted); max-width: 65ch; }

/* ==========================================================================
   Forms
   ========================================================================== */

.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: var(--space-3); }
.field label { font-size: var(--fs-small); font-weight: 500; }
.field .required { color: var(--accent); }
.field .hint { font-size: 0.8rem; color: var(--fg-faint); }

.field input, .field textarea, .field select {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.85em 1em;
  color: var(--fg);
  transition: border-color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
  width: 100%;
  min-height: 48px;
}

.field textarea { min-height: 140px; resize: vertical; }

.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-elevated);
}

.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 0.8rem; display: none; }
.field.has-error .field-error { display: block; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }

.form-status {
  display: none;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--fs-small);
  margin-top: var(--space-3);
}
.form-status.is-visible { display: flex; }
.form-status.success { background: rgba(127,174,130,0.12); color: var(--success); border: 1px solid rgba(127,174,130,0.3); }
.form-status svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ==========================================================================
   Modal / Lightbox
   ========================================================================== */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(6,6,6,0.9);
  backdrop-filter: blur(6px);
  z-index: var(--z-modal);
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-base) var(--ease-out);
}
.modal-overlay.is-open { opacity: 1; visibility: visible; }

.modal-box {
  width: 100%;
  max-width: 880px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transform: translateY(16px) scale(0.98);
  transition: transform var(--dur-base) var(--ease-out);
}
.modal-overlay.is-open .modal-box { transform: translateY(0) scale(1); }

.modal-close {
  position: absolute;
  top: var(--space-3); right: var(--space-3);
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.modal-close svg { width: 16px; height: 16px; }
.modal-close:hover { border-color: var(--accent); color: var(--accent); }

.modal-media { display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-4); }
.modal-media .media { width: 100%; aspect-ratio: 16/9; border-radius: var(--radius-md); }
.modal-video {
  display: block;
  max-width: 100%;
  max-height: 68vh;
  width: auto;
  border-radius: var(--radius-md);
  background: #000;
}
.modal-project-title { font-family: var(--font-display); font-size: var(--fs-h2); margin-bottom: var(--space-2); }
.modal-project-meta { display: flex; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-3); }
.modal-project-meta div { font-size: var(--fs-small); }
.modal-project-meta span { display: block; color: var(--fg-muted); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 2px; }

/* ==========================================================================
   Filter Tabs
   ========================================================================== */

.filter-tabs { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.filter-tab {
  padding: 0.6em 1.3em;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--fg-muted);
  transition: all var(--dur-base) var(--ease-out);
}
.filter-tab[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.filter-tab:hover:not([aria-pressed="true"]) { border-color: var(--accent); color: var(--fg); }

/* ==========================================================================
   Hero (index)
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  background: #0a0a0a;
}

.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media .media { position: absolute; inset: 0; border-radius: 0; height: 100%; }

.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0.35) 0%, rgba(10,10,10,0.55) 55%, rgba(10,10,10,0.95) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: var(--space-8) var(--gutter) var(--space-6);
  max-width: var(--container);
  margin-inline: auto;
  width: 100%;
}

.hero-eyebrow { margin-bottom: var(--space-3); }

.hero-title {
  font-size: var(--fs-hero);
  font-weight: 600;
  max-width: 16ch;
}

.hero-title .line { display: block; overflow: hidden; }
.hero-title .line span { display: inline-block; will-change: transform; }

.hero-sub { margin-top: var(--space-3); }

.hero-actions { display: flex; gap: var(--space-3); margin-top: var(--space-5); flex-wrap: wrap; }

.hero-controls {
  position: absolute;
  bottom: var(--space-4);
  right: var(--gutter);
  z-index: 2;
  display: flex;
  gap: var(--space-2);
}

.hero-mute-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(245,243,238,0.3);
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,10,10,0.4);
  backdrop-filter: blur(6px);
}
.hero-mute-btn svg { width: 18px; height: 18px; }

.scroll-cue {
  position: absolute;
  bottom: var(--space-4);
  left: var(--gutter);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.scroll-cue .line-wrap { width: 1px; height: 36px; background: rgba(255,255,255,0.15); position: relative; overflow: hidden; }
.scroll-cue .line-wrap::after {
  content: ''; position: absolute; top: -100%; left: 0; width: 100%; height: 100%;
  background: var(--accent);
  animation: scrollcue 2.2s ease-in-out infinite;
}
@keyframes scrollcue { 0% { top: -100%; } 50% { top: 0; } 100% { top: 100%; } }

@media (max-width: 700px) {
  .hero-content { padding-top: var(--space-7); }
  .scroll-cue { display: none; }
}

/* Page hero (inner pages) */
.page-hero {
  padding-block: calc(var(--space-8) + 40px) var(--space-6);
  border-bottom: 1px solid var(--border);
}
.page-hero .hero-title-sm {
  font-size: clamp(2.5rem, 5vw + 0.5rem, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 20ch;
  margin-top: var(--space-3);
}
.page-hero .hero-title-sm em { font-style: italic; font-weight: 400; color: var(--accent); }

/* ==========================================================================
   Reveal Animations (JS hooks)
   ========================================================================== */

/* Reveals only hide when JS is active (html.js). If JS or the GSAP CDN
   fails to load, content stays fully visible — the page can never render blank. */
.js .reveal { opacity: 0; transform: translateY(28px); }
.js .reveal.is-visible { opacity: 1; transform: translateY(0); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }

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

/* ==========================================================================
   CTA Band
   ========================================================================== */

.cta-band {
  text-align: center;
  padding-block: var(--space-7);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cta-band h2 { font-size: var(--fs-h1); max-width: 16ch; margin-inline: auto; }
.cta-band .lede { margin-inline: auto; text-align: center; }
.cta-band .hero-actions { justify-content: center; }

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

.footer { padding-block: var(--space-7) var(--space-4); border-top: 1px solid var(--border); }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--space-5); margin-bottom: var(--space-6); }
.footer-brand p { color: var(--fg-muted); margin-top: var(--space-2); max-width: 32ch; font-size: var(--fs-small); }
.footer-col h5 { font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: var(--space-2); }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: var(--fs-small); color: var(--fg-muted); transition: color var(--dur-base) var(--ease-out); }
.footer-col a:hover { color: var(--accent); }
.footer-socials { display: flex; gap: var(--space-2); margin-top: var(--space-3); }
.footer-socials a { width: 38px; height: 38px; border: 1px solid var(--border-strong); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.footer-socials a svg { width: 16px; height: 16px; }
.footer-socials a:hover { border-color: var(--accent); color: var(--accent); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  font-size: var(--fs-small);
  color: var(--fg-faint);
  flex-wrap: wrap;
  gap: var(--space-2);
}

.back-to-top {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
}
.back-to-top svg { width: 16px; height: 16px; }
.back-to-top:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-top { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Article (Journal Post)
   ========================================================================== */

.article-hero-media { aspect-ratio: 21/9; margin-bottom: var(--space-5); }

.article-body { max-width: 68ch; margin-inline: auto; font-size: var(--fs-body-lg); color: var(--fg-muted); line-height: 1.75; }
.article-body h2 { font-size: var(--fs-h3); color: var(--fg); margin-top: var(--space-6); margin-bottom: var(--space-2); }
.article-body p { margin-bottom: var(--space-3); }
.article-body ul, .article-body ol { margin: 0 0 var(--space-3); padding-left: 1.4em; display: flex; flex-direction: column; gap: 8px; }
.article-body li::marker { color: var(--accent); }

.article-body blockquote {
  border-left: 2px solid var(--accent);
  padding-left: var(--space-3);
  margin: var(--space-5) 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-h4);
  color: var(--fg);
}

.article-body .media { aspect-ratio: 16/9; margin: var(--space-5) 0; }

.article-meta-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  justify-content: center;
  font-size: var(--fs-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-2);
}

.article-share { display: flex; gap: var(--space-2); justify-content: center; margin-top: var(--space-6); }
.article-share a {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
}
.article-share a:hover { border-color: var(--accent); color: var(--accent); }
.article-share a svg { width: 16px; height: 16px; }

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  border-top: 1px solid var(--border);
  padding-top: var(--space-5);
  margin-top: var(--space-7);
}
.post-nav-link { display: flex; flex-direction: column; gap: 6px; padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-md); transition: border-color var(--dur-base) var(--ease-out); }
.post-nav-link:hover { border-color: var(--accent); }
.post-nav-link.next { text-align: right; align-items: flex-end; }
.post-nav-label { font-size: var(--fs-label); letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-faint); }
.post-nav-title { font-family: var(--font-display); font-size: var(--fs-h4); }

@media (max-width: 640px) {
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-link.next { text-align: left; align-items: flex-start; }
}

/* ==========================================================================
   Utility
   ========================================================================== */

.mt-1{margin-top:var(--space-1)} .mt-2{margin-top:var(--space-2)} .mt-3{margin-top:var(--space-3)}
.mt-4{margin-top:var(--space-4)} .mt-5{margin-top:var(--space-5)} .mt-6{margin-top:var(--space-6)}
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.visually-hidden { position: absolute; left: -9999px; }

/* ==========================================================================
   MOTION LAYER + BOLD TYPE (v2)
   ========================================================================== */

/* --- Bigger, more cinematic hero type --- */
:root { --fs-hero: clamp(3rem, 9.5vw + 0.5rem, 9rem); }

.hero-title { max-width: 18ch; line-height: 0.98; letter-spacing: -0.02em; }
.hero-title em, .title-italic { font-style: italic; font-weight: 400; }

/* Halden-style "click anywhere" cue + whole-hero affordance */
.hero.is-clickable { cursor: pointer; }
.hero-hint {
  position: absolute;
  top: calc(var(--space-8) + 4px);
  right: var(--gutter);
  z-index: 2;
  font-size: var(--fs-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
  display: flex; align-items: center; gap: var(--space-2);
}
.hero-hint::after { content: ''; width: 22px; height: 1px; background: var(--fg-faint); }
.hero-content, .hero-actions, .hero-mute-btn, .hero-hint a { position: relative; z-index: 3; }
@media (max-width: 700px) { .hero-hint { display: none; } }

/* --- Word-mask heading reveal (JS-split) --- */
.js .reveal-head .rh-w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.js .reveal-head .rh-w > span { display: inline-block; will-change: transform; }
.reveal-head .rh-w { white-space: pre; }

/* --- Parallax media --- */
.parallax-wrap { overflow: hidden; }
.parallax-wrap .media, .parallax-media { will-change: transform; }

/* --- Magnetic buttons --- */
.magnetic { will-change: transform; }

/* ==========================================================================
   Kinetic Statement Section (BUILDR-inspired, mono colourway)
   ========================================================================== */

.statement {
  padding-block: clamp(var(--space-7), 14vw, 220px);
  overflow: hidden;
  border-block: 1px solid var(--border);
}

.statement-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 1.5vw, 20px);
  text-align: center;
}

.statement-line {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 13vw, 12rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2.5vw, 44px);
  flex-wrap: wrap;
  white-space: nowrap;
}

.statement-line em { font-style: italic; font-weight: 400; color: var(--accent); }

.statement-media {
  display: inline-block;
  width: clamp(96px, 20vw, 320px);
  aspect-ratio: 16 / 9;
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
  align-self: center;
  border: 1px solid var(--border-strong);
  will-change: transform;
}

.statement-media .media { height: 100%; border-radius: 0; }

.statement-sub {
  margin-top: var(--space-4);
  max-width: 46ch;
  text-align: center;
  color: var(--fg-muted);
  font-size: var(--fs-body-lg);
}

/* ==========================================================================
   Bento Brand Grid (Prime Zone-inspired)
   ========================================================================== */

.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(150px, auto);
  gap: var(--space-3);
}

.bento-tile {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
  background: var(--surface);
}
.bento-tile:hover { border-color: var(--border-strong); }

.bento-tile.tile-logo {
  background: #000;
  align-items: center;
  justify-content: center;
  grid-column: span 1;
  grid-row: span 1;
}
.bento-tile.tile-logo img { width: 100%; max-width: 150px; height: auto; }
.bento-tile.tile-logo .logo-text-fallback { align-items: center; text-align: center; }
.bento-tile.tile-logo .logo-text-fallback .logo-name { font-size: 1.5rem; }
.bento-tile.tile-logo .logo-text-fallback .logo-sub { letter-spacing: 0.3em; }

.bento-tile.tile-wide { grid-column: span 2; }
.bento-tile.tile-tall { grid-row: span 2; }
.bento-tile.tile-media { padding: 0; min-height: 150px; }

.bento-tile.tile-statement {
  grid-column: span 2;
  justify-content: center;
}
.bento-tile.tile-statement h3 {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  line-height: 1.05;
}
.bento-tile.tile-statement h3 em { font-style: italic; color: var(--accent); font-weight: 400; }

.bento-tile .bento-num { font-family: var(--font-display); font-size: var(--fs-h1); color: var(--accent); line-height: 1; }
.bento-tile .bento-label { font-size: var(--fs-small); color: var(--fg-muted); }
.bento-tile .bento-eyebrow { font-size: var(--fs-label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-muted); }

@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-tile.tile-wide, .bento-tile.tile-statement { grid-column: span 2; }
  .bento-tile.tile-tall { grid-row: span 1; }
}
@media (max-width: 520px) {
  .bento { grid-template-columns: 1fr; }
  .bento-tile.tile-wide, .bento-tile.tile-statement, .bento-tile.tile-logo { grid-column: span 1; }
}

/* Reduced motion: neutralise transform-based motion utilities */
@media (prefers-reduced-motion: reduce) {
  .js .reveal-head .rh-w > span { transform: none !important; }
  .statement-media, .parallax-media, .magnetic { transform: none !important; }
}
