/* ==========================================================================
   Dexxy Studio — Design Prototype Stylesheet
   Every color / spacing token is a CSS custom property so the client's
   final brand values can be dropped in (and later mapped 1:1 to WP
   Customizer settings / theme.json) without touching layout rules.
   ========================================================================== */

:root {
  /* Brand tokens — customizable */
  --color-bg: #0e0c0a;
  --color-bg-alt: #151210;
  --color-surface: #1a1613;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-text: #f2ede6;
  --color-text-muted: #a89f95;
  --color-accent: #c9974f;
  --color-accent-soft: rgba(201, 151, 79, 0.15);

  --font-display: "Manrope", "Inter", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-script: "Caveat", cursive;

  --container-width: 1200px;
  --radius: 4px;
  --transition: 0.25s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  /* Ambient gold wash — subtle, static, sits behind every section so the
     page never goes flat-black between the hero photo and the footer. */
  background:
    radial-gradient(900px 560px at 12% 0%, rgba(201, 151, 79, 0.07), transparent 60%),
    radial-gradient(760px 520px at 92% 38%, rgba(201, 151, 79, 0.05), transparent 62%),
    radial-gradient(900px 600px at 50% 100%, rgba(201, 151, 79, 0.045), transparent 65%),
    var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

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

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  color: var(--color-accent);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  display: block;
  margin-bottom: 12px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  font-weight: 800;
  line-height: 1.08;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1;
}
.btn .btn-arrow {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* ---------- Icons ---------- */
.dexxy-icon {
  width: 20px;
  height: 20px;
  display: block;
}

.btn-primary {
  background: var(--color-accent);
  color: #17140f;
}
.btn-primary:hover { background: #e0ab5f; }

.btn-outline {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--color-text);
}
.btn-outline:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14, 12, 10, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.12em;
  color: var(--color-text);
}
.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.logo .logo-sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.55rem;
  letter-spacing: 0.5em;
  color: var(--color-accent-soft-text, var(--color-text-muted));
  margin-top: -4px;
  text-transform: uppercase;
}

.nav-panel {
  display: contents; /* on desktop the panel itself has no box — its children just sit in header flow */
}

.nav-primary {
  display: flex;
  gap: 36px;
  list-style: none;
}
.nav-primary a {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color var(--transition);
  padding-bottom: 6px;
  border-bottom: 2px solid transparent;
}
.nav-primary a:hover,
.nav-primary a.active {
  color: var(--color-text);
  border-bottom-color: var(--color-accent);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
}
.lang-switch ul {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.lang-switch li {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
}
.lang-switch li + li::before {
  content: "|";
  color: var(--color-text-muted);
}
.lang-switch a,
.lang-switch button {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-transform: uppercase;
}
.lang-switch li.current-lang a,
.lang-switch a.active,
.lang-switch button.active { color: var(--color-accent); }

.lang-switch-mobile { display: none; }

/* ---------- Mobile nav toggle (hamburger / close icon) ---------- */
.nav-toggle {
  display: none;
  position: relative;
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: var(--radius);
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  transform: translateX(-50%);
  transition: transform var(--transition), opacity var(--transition), top var(--transition);
}
.nav-toggle-bars { top: 50%; margin-top: -0.75px; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { top: 0; transform: translateX(-50%) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { top: 0; transform: translateX(-50%) rotate(-45deg); }

/* ---------- Hero (full-bleed background) ---------- */
.hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--color-border);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-copy {
  max-width: 560px;
}

.hero-copy h1 {
  font-size: clamp(2.3rem, 4.4vw, 3.6rem);
  margin-bottom: 20px;
  text-wrap: balance;
}
.hero-copy h1 .accent { color: var(--color-accent); }

.hero-copy p {
  color: var(--color-text-muted);
  max-width: 40ch;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.social-rail {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}
.social-rail a {
  width: 38px;
  height: 38px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: all var(--transition);
}
.social-rail a:hover { color: var(--color-accent); border-color: var(--color-accent); }
.social-rail a .dexxy-icon,
.footer-social a .dexxy-icon { width: 16px; height: 16px; }

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(135deg, #2b241d, #0f0d0b 70%);
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px 500px at 6% 30%, rgba(201, 151, 79, 0.22), transparent 62%),
    linear-gradient(
      90deg,
      rgba(14, 12, 10, 0.96) 0%,
      rgba(14, 12, 10, 0.82) 32%,
      rgba(14, 12, 10, 0.4) 62%,
      rgba(14, 12, 10, 0.12) 100%
    );
  animation: hero-glow-pulse 9s ease-in-out infinite;
}

@keyframes hero-glow-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.82; }
}
.hero-media .placeholder-label {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding: 20px;
}

.showreel {
  position: absolute;
  right: 40px;
  bottom: 40px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-text);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.play-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
}
.play-circle .dexxy-icon { width: 16px; height: 16px; margin-left: 2px; }

.scroll-indicator {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 2;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

/* ---------- Section shared ---------- */
.section {
  padding: 100px 0;
  border-top: 1px solid var(--color-border);
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 48px;
  gap: 24px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.section-link {
  color: var(--color-text-muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color var(--transition);
}
.section-link:hover { color: var(--color-accent); }

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
}
.service-card {
  background: var(--color-surface);
  padding: 36px 28px;
  transition: background var(--transition);
  display: block; /* normalizes rendering when the card is an <a> (has a link) vs a plain <div> */
  text-decoration: none;
  color: inherit;
}
.service-card:hover { background: #201a15; }
.service-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 24px;
  color: var(--color-accent);
  display: flex;
  align-items: center;
}
.service-icon .dexxy-icon { width: 34px; height: 34px; }
.service-card h3 { font-size: 1.15rem; margin-bottom: 12px; }
.service-card p { color: var(--color-text-muted); font-size: 0.92rem; margin-bottom: 20px; }
.service-arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  transition: all var(--transition);
}
.service-arrow .dexxy-icon { width: 16px; height: 16px; }
.service-card:hover .service-arrow { border-color: var(--color-accent); transform: translateX(4px); }

/* ---------- Portfolio ---------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}
.portfolio-item {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(160deg, #2c241a, #100d0b);
  border: 1px solid var(--color-border);
}
.portfolio-link-wrap { display: block; text-decoration: none; color: inherit; }

/* Studio watermark badge: same fixed corner on every scrolling/portfolio
   photo, regardless of the image's own composition. */
.watermark-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 96px;
  height: auto;
  opacity: 0.82;
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.6));
}
.gallery-marquee-item { position: relative; }
.gallery-marquee-item .watermark-badge { width: 72px; }

/* ---------- Foley Examples page ---------- */
.foley-intro { color: var(--color-text-muted); max-width: 70ch; margin-bottom: 40px; font-size: 1rem; }
.foley-grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .foley-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .foley-grid { grid-template-columns: 1fr; } }
.portfolio-item .play-circle {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.4);
}
.portfolio-caption { margin-top: 14px; }
.portfolio-caption h4 { font-size: 0.95rem; text-transform: none; font-family: var(--font-body); font-weight: 600; }
.portfolio-caption p { font-size: 0.8rem; color: var(--color-text-muted); }

/* Portfolio cards reuse the .marquee-item sliding mechanism but keep their
   own aspect-ratio + caption instead of the plain-photo tile shape.
   Selector is doubled up (.marquee-item.portfolio-marquee-item) so its
   specificity beats the later, more general .marquee-item rule regardless
   of source order — a plain single-class override here previously lost
   the cascade and squeezed/clipped these cards to a 4:3 box. */
.marquee-item.portfolio-marquee-item {
  width: 260px;
  aspect-ratio: auto;
  border: none;
  overflow: visible;
  display: block;
  text-decoration: none;
  color: inherit;
}
.portfolio-marquee .marquee-track { padding: 4px 24px; }

/* ---------- About / CTA ---------- */
.about-cta {
  display: grid;
  grid-template-columns: 1fr 1.3fr 0.9fr;
  gap: 0;
  border: 1px solid var(--color-border);
}
.about-media {
  background: linear-gradient(160deg, #241d16, #0c0a08);
  min-height: 420px;
  position: relative;
}
.about-copy {
  padding: 56px 48px;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.about-copy h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); margin-bottom: 20px; }
.about-copy p { color: var(--color-text-muted); margin-bottom: 28px; max-width: 46ch; }
.signature { font-family: var(--font-script); font-size: 2.4rem; color: var(--color-accent); }
.signature-role { color: var(--color-text-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px; }

.cta-box {
  padding: 56px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--color-surface);
}
.cta-box .service-icon { margin-bottom: 24px; }
.cta-box h3 { font-size: 1.3rem; margin-bottom: 14px; }
.cta-box p { color: var(--color-text-muted); margin-bottom: 28px; font-size: 0.92rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 72px 0 28px;
  background: var(--color-bg);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-grid h4 {
  font-family: var(--font-body);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 20px;
  font-weight: 600;
}
.footer-grid ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-grid a, .footer-grid li { color: var(--color-text-muted); font-size: 0.9rem; }
.footer-grid a:hover { color: var(--color-accent); }
.footer-brand p { color: var(--color-text-muted); font-size: 0.9rem; margin-top: 14px; max-width: 32ch; }
.footer-social { display: flex; gap: 12px; margin-top: 20px; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-muted);
  transition: all var(--transition);
}
.footer-social a:hover { color: var(--color-accent); border-color: var(--color-accent); }
.contact-list li { display: flex; align-items: center; gap: 10px; }
.contact-list .dexxy-icon { width: 16px; height: 16px; color: var(--color-accent); flex-shrink: 0; }
.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: 24px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.82rem;
}

/* ---------- Studio Gallery (auto-sliding photo marquee) ---------- */
.gallery-section {
  overflow: hidden;
}
.gallery-section .section-head { margin-bottom: 40px; }
.gallery-marquee-item {
  width: 420px;
  aspect-ratio: 16 / 11;
}
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  gap: 18px;
  padding: 0 18px;
  animation: dexxy-marquee 36s linear infinite;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
}
.marquee:hover .marquee-track {
  animation-play-state: paused;
}
.marquee.is-dragging .marquee-track {
  cursor: grabbing;
}
.marquee-track img {
  -webkit-user-drag: none;
  user-drag: none;
}

.lightbox-trigger {
  cursor: zoom-in;
}

.dexxy-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8, 6, 5, 0.92);
  padding: 40px;
}
.dexxy-lightbox[aria-hidden="false"] {
  display: flex;
}
.dexxy-lightbox-frame {
  position: relative;
  display: inline-block;
  max-width: min(1100px, 92vw);
  max-height: 88vh;
}
.dexxy-lightbox-img {
  display: block;
  max-width: min(1100px, 92vw);
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.dexxy-lightbox-watermark {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 130px;
  height: auto;
  opacity: 0.85;
  pointer-events: none;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.6));
}
.dexxy-lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: rgba(0,0,0,0.4);
  color: var(--color-text);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.dexxy-lightbox-close:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.credit-trigger {
  cursor: pointer;
}

.dexxy-credit-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8, 6, 5, 0.92);
  padding: 40px;
}
.dexxy-credit-modal[aria-hidden="false"] {
  display: flex;
}
.dexxy-credit-modal-frame {
  position: relative;
  display: flex;
  width: min(640px, 92vw);
  max-height: 82vh;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.dexxy-credit-modal-photo {
  flex: 0 0 42%;
  background-size: cover;
  background-position: center;
  min-height: 260px;
}
.dexxy-credit-modal-body {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
}
.dexxy-credit-modal-name {
  margin: 0 0 18px;
  font-size: 1.3rem;
}
.dexxy-credit-modal-songs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dexxy-credit-modal-songs li {
  border-top: 1px solid var(--color-border);
}
.dexxy-credit-modal-songs li:first-child {
  border-top: none;
}
.dexxy-credit-modal-songs a {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 28px 12px 0;
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.92rem;
}
.dexxy-credit-modal-songs a:hover {
  color: var(--color-accent);
}
.dexxy-credit-modal-song-role {
  font-size: 0.76rem;
  font-weight: 400;
  color: var(--color-text-muted);
}
.dexxy-credit-modal-songs a::after {
  content: "\2197";
  color: var(--color-accent);
  position: absolute;
  right: 0;
  top: 12px;
}
.dexxy-credit-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: rgba(0,0,0,0.4);
  color: var(--color-text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}
.dexxy-credit-modal-close:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
@media (max-width: 600px) {
  .dexxy-credit-modal-frame {
    flex-direction: column;
    max-height: 86vh;
  }
  .dexxy-credit-modal-photo {
    flex: 0 0 160px;
  }
  .dexxy-credit-modal-body {
    padding: 24px;
  }
}
.marquee-item {
  flex-shrink: 0;
  width: 320px;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
}
.marquee-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Slides left-to-right: track starts shifted a full copy-width to the left
   and animates back to its natural position, so motion reads as items
   entering from the left edge and drifting right. */
@keyframes dexxy-marquee {
  from { transform: translateX(-50%); }
  to { transform: translateX(0%); }
}

@media (max-width: 720px) {
  .marquee-item { width: 220px; }
  .gallery-marquee-item {
    width: 260px;
    background: #0c0a08;
  }
  .gallery-marquee-item img {
    object-fit: contain;
  }
}

/* ---------- Motion: load-in reveal + scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: dexxy-rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes dexxy-rise {
  to { opacity: 1; transform: translateY(0); }
}

/* Below-the-fold elements: hidden until .is-visible is added by
   IntersectionObserver in js/main.js, then they play the same rise. */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.services-grid .reveal-on-scroll:nth-child(2),
.portfolio-grid .reveal-on-scroll:nth-child(2) { transition-delay: 0.08s; }
.services-grid .reveal-on-scroll:nth-child(3),
.portfolio-grid .reveal-on-scroll:nth-child(3) { transition-delay: 0.16s; }
.services-grid .reveal-on-scroll:nth-child(4),
.portfolio-grid .reveal-on-scroll:nth-child(4) { transition-delay: 0.24s; }
.services-grid .reveal-on-scroll:nth-child(5),
.portfolio-grid .reveal-on-scroll:nth-child(5) { transition-delay: 0.32s; }
.services-grid .reveal-on-scroll:nth-child(6) { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .reveal-on-scroll { opacity: 1; transform: none; }
  .hero-media::after { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero { min-height: 70vh; }
  .hero-media::after {
    background: linear-gradient(180deg, rgba(14,12,10,.55) 0%, rgba(14,12,10,.88) 65%, rgba(14,12,10,.98) 100%);
  }
  .social-rail { display: none; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .portfolio-grid { grid-template-columns: repeat(3, 1fr); }
  .about-cta { grid-template-columns: 1fr; }
  .about-media { min-height: 260px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .site-header .container { height: 68px; }
  .logo-mark { width: 32px; height: 32px; }
  .logo-text { font-size: 1.3rem; }

  .header-right { gap: 10px; }
  .lang-switch-desktop { display: none; }
  .header-cta {
    padding: 8px 14px;
    font-size: 0.72rem;
  }

  .nav-toggle { display: flex; align-items: center; justify-content: center; }

  /* The nav panel becomes a full-width dropdown below the sticky header,
     hidden by default and revealed by js/main.js toggling [data-open] on
     the header. No-JS fallback: panel stays in normal flow (see below). */
  .nav-panel {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
    max-height: calc(100vh - 68px);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  }
  .site-header[data-nav-open="true"] .nav-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .site-header { position: sticky; } /* establishes the containing block for .nav-panel */

  .nav-primary {
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 4px;
  }
  .nav-primary a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.9rem;
  }
  .nav-primary li:last-child a { border-bottom: none; }

  .lang-switch-mobile {
    display: flex;
    padding: 18px 24px 22px;
    border-top: 1px solid var(--color-border);
    font-size: 0.85rem;
  }

  .services-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .header-cta { padding: 7px 12px; font-size: 0.68rem; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .about-media { min-height: 340px; background-position: center top !important; }

  /* On a narrow/tall phone viewport, background-size:cover on .hero-media
     has to zoom in hard to fill the full stacked-content height, cropping
     the wide studio shot down to a tight detail. Trimming the copy block's
     own vertical rhythm keeps the section shorter so cover crops less and
     more of the same wide shot from desktop stays visible. */
  .hero-copy h1 { font-size: 2rem; margin-bottom: 12px; }
  .hero-copy .eyebrow { margin-bottom: 8px; }
  .hero-copy p { margin-bottom: 18px; font-size: 0.92rem; }
  .hero-actions { margin-bottom: 16px; gap: 10px; flex-wrap: nowrap; }
  .hero-actions .btn { padding: 11px 14px; font-size: 0.72rem; flex: 1; justify-content: center; }
  .scroll-indicator { display: none; }
  .hero-media { background-position: center 30% !important; }
}

/* ---------------------------------------------------------------------
 * Audio Restoration — editorial page: before/after waveform, description
 * with a few keywords picked out, and a row of use-case icons.
 * ------------------------------------------------------------------- */
.ar-hero {
  position: relative;
  padding-top: 260px;
  padding-bottom: 96px;
  background-color: var(--color-bg);
  background-size: cover;
  background-position: center 25%;
  overflow: hidden;
}
.ar-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14,12,10,0.15) 0%, rgba(14,12,10,0.25) 35%, rgba(14,12,10,0.75) 62%, var(--color-bg) 88%);
}
.ar-hero-inner {
  position: relative;
  z-index: 1;
}

.ar-waveform {
  position: relative;
  padding: 28px 24px 22px;
  margin-bottom: 48px;
  background: rgba(26, 22, 19, 0.4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  backdrop-filter: blur(6px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}
.ar-wave-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}
.ar-wave-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ar-wave-label-post { text-align: right; }
.ar-wave-label-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text);
}
.ar-wave-label-post .ar-wave-label-tag { color: var(--color-accent); }
.ar-wave-label-sub {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}
.ar-wave-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 130px;
}
.ar-bar {
  flex: 1 1 0;
  min-width: 2px;
  border-radius: 2px 2px 0 0;
}
.ar-bar-pre {
  background: var(--color-text-muted);
  opacity: 0.45;
}
.ar-bar-post {
  background: linear-gradient(180deg, var(--color-accent) 0%, rgba(201,151,79,0.35) 100%);
  box-shadow: 0 0 10px rgba(201,151,79,0.35);
}
.ar-wave-arrow {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0 6px;
  align-self: center;
  border-radius: 50%;
  background: var(--color-accent-soft);
  color: var(--color-accent);
}
.ar-wave-arrow .dexxy-icon { width: 16px; height: 16px; }

.ar-content {
  max-width: 760px;
}
.ar-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.ar-eyebrow-icon {
  width: 20px;
  height: 20px;
  color: var(--color-accent);
}
.ar-content h1 { margin-bottom: 22px; }
.ar-description :where(p) {
  color: var(--color-text-muted);
  font-size: 1.02rem;
  line-height: 1.7;
  margin-bottom: 16px;
}
.ar-description :where(p):last-child { margin-bottom: 0; }
.ar-highlight {
  color: var(--color-accent);
  font-style: normal;
}

.ar-usecases {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-top: 40px;
}
.ar-usecase {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 18px 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}
.ar-usecase-icon {
  width: 22px;
  height: 22px;
  color: var(--color-accent);
}
.ar-usecase span {
  font-size: 0.74rem;
  line-height: 1.3;
  color: var(--color-text-muted);
}

.ar-example {
  display: flex;
  align-items: stretch;
  gap: 22px;
  margin-top: 20px;
  padding: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.2s ease;
}
.ar-example:hover {
  border-color: var(--color-accent);
}
.ar-example-thumb {
  position: relative;
  flex: 0 0 220px;
  min-height: 130px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ar-example-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 4px 8px;
}
.ar-example-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
}
.ar-example-body h3 {
  font-size: 1.05rem;
  margin: 2px 0 2px;
  color: var(--color-text);
}
.ar-example-body p {
  font-size: 0.86rem;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}
.ar-example-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-accent);
}
.ar-example-cta .dexxy-icon { width: 14px; height: 14px; }

@media (max-width: 900px) {
  .ar-usecases { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .ar-hero { padding-top: 48px; padding-bottom: 64px; }
  .ar-waveform { padding: 20px 16px 16px; margin-bottom: 32px; }
  .ar-wave-bars { height: 90px; }
  .ar-wave-label-sub { display: none; }
  .ar-usecases { grid-template-columns: repeat(2, 1fr); }
  .ar-example { flex-direction: column; }
  .ar-example-thumb { flex-basis: auto; min-height: 160px; }
}
