/* ─────────────────────────────────────────────────────────────────────
   INTENTION — Sound design with purpose
   Custom CSS (layered on top of Tailwind utilities)
   Palette: 70/20/10 — ink #0A0A0B / cream #F2EBE0 / ember #FF6B1A
───────────────────────────────────────────────────────────────────── */

:root {
  --ink: #0A0A0B;
  --ink-2: #0F0F11;
  --cream: #F2EBE0;
  --cream-dim: #A8A199;
  --ember: #FF6B1A;
  --ember-dim: #C44E0A;
  --ash: #1F1F22;
  --mute: #6B6B70;
}

html {
  scroll-padding-top: 80px;
}

body {
  background-color: var(--ink);
}

/* Smoother native form rendering */
input,
button,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* ────────────────  Film grain overlay  ──────────────── */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.4 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 200px 200px;
  animation: grain-shift 8s steps(8) infinite;
}

@keyframes grain-shift {
  0%   { transform: translate(0, 0); }
  10%  { transform: translate(-3%, -2%); }
  20%  { transform: translate(2%, 4%); }
  30%  { transform: translate(-4%, 3%); }
  40%  { transform: translate(3%, -3%); }
  50%  { transform: translate(-2%, 2%); }
  60%  { transform: translate(4%, -4%); }
  70%  { transform: translate(-3%, 3%); }
  80%  { transform: translate(2%, -2%); }
  100% { transform: translate(0, 0); }
}

/* ────────────────  Logo  ──────────────── */
.nav-logo {
  height: 26px;
  width: auto;
  display: block;
  transition: filter 200ms ease, transform 200ms ease;
  filter: drop-shadow(0 0 18px rgba(255, 107, 26, 0));
}

.nav-logo:hover {
  filter: drop-shadow(0 0 18px rgba(255, 107, 26, 0.35));
  transform: scale(1.03);
}

@media (min-width: 768px) {
  .nav-logo { height: 30px; }
}

.footer-logo {
  height: 22px;
  width: auto;
  display: block;
  opacity: 0.75;
  transition: opacity 200ms ease;
}

.footer-logo:hover { opacity: 1; }

/* ────────────────  Scroll-reveal video section  ────────────────
   Vanilla port of the smooth-scroll-hero idea: a tall scroll container
   wraps a sticky 100vh stage. JS writes --rs (0 → 1) onto .reveal-stage
   based on how far the section has scrolled into view; the clip-path
   expands and the video's zoom relaxes toward 1× as --rs grows. */

.reveal-section {
  position: relative;
  width: 100%;
  height: calc(1500px + 100vh);  /* scrollHeight + viewport, matches the original */
  background: var(--ink);
}

.reveal-stage {
  --rs: 0;                         /* set by JS each scroll tick */
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background: var(--ink);
  will-change: clip-path;
  /* clip-path: a polygon starting as a centered window (25%..75%) and expanding
     to the full viewport (0..100%) as --rs goes 0 → 1. Multiplications avoid
     conditional logic — clean linear interp. */
  clip-path: polygon(
    calc(25% - 25% * var(--rs)) calc(25% - 25% * var(--rs)),
    calc(75% + 25% * var(--rs)) calc(25% - 25% * var(--rs)),
    calc(75% + 25% * var(--rs)) calc(75% + 25% * var(--rs)),
    calc(25% - 25% * var(--rs)) calc(75% + 25% * var(--rs))
  );
}

.reveal-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  /* Zoom relaxes from 1.7× to 1.0× as we scroll — that gives the parallax feel
     even though the element is stationary. */
  transform: scale(calc(1.7 - 0.7 * var(--rs)));
  transform-origin: center;
  will-change: transform;
}

.reveal-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 70% at 50% 50%, transparent 55%, rgba(10, 10, 11, 0.65) 100%),
    linear-gradient(to bottom, rgba(10, 10, 11, 0.25) 0%, transparent 30%, transparent 70%, rgba(10, 10, 11, 0.5) 100%);
  z-index: 2;
}

.reveal-slate-tl,
.reveal-slate-tr {
  position: absolute;
  top: 24px;
  z-index: 3;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cream-dim);
  /* Slates fade in slightly behind the reveal so they don't fight the visual */
  opacity: calc(0.3 + 0.7 * var(--rs));
  transition: opacity 100ms linear;
}

.reveal-slate-tl {
  left: 24px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.reveal-slate-tr {
  right: 24px;
}

.reveal-caption {
  position: absolute;
  left: 50%;
  bottom: clamp(48px, 8vh, 96px);
  transform: translateX(-50%);
  z-index: 3;
  text-align: center;
  /* Caption appears only after the reveal has mostly resolved (rs > 0.55-ish).
     Multiplied + clamped so it fades from 0 → 1 between --rs 0.55 and 0.9. */
  opacity: calc((var(--rs) - 0.55) * 2.85);
  transform: translateX(-50%) translateY(calc((1 - var(--rs)) * 16px));
  transition: opacity 80ms linear;
}

.reveal-caption-eyebrow {
  display: block;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 0.6rem;
}

.reveal-caption-headline {
  font-family: "Syncopate", system-ui, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--cream);
  font-size: clamp(1.6rem, 4.5vw, 3.5rem);
  letter-spacing: -0.01em;
  line-height: 0.95;
}

/* Reduced motion: hold the video full-frame with no zoom or clip — the visual
   still reads, but without scroll-coupled animation. */
@media (prefers-reduced-motion: reduce) {
  .reveal-section { height: 100vh; }
  .reveal-stage   { clip-path: none; }
  .reveal-video   { transform: none; }
  .reveal-caption { opacity: 1; transform: translateX(-50%); }
}

/* ────────────────  Section rhythm  ──────────────── */
.section-pad {
  padding-top: clamp(5rem, 10vw, 9rem);
  padding-bottom: clamp(5rem, 10vw, 9rem);
}

.section-marker {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--mute);
  border-top: 1px solid var(--ash);
  padding-top: 1rem;
  display: inline-block;
}

/* ────────────────  Hero atmosphere  ──────────────── */

/* Radial glow behind hero text */
.hero-glow {
  position: absolute;
  inset: -10%;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 30% 60%, rgba(255, 107, 26, 0.18), transparent 65%),
    radial-gradient(40% 40% at 80% 30%, rgba(255, 107, 26, 0.08), transparent 70%);
  filter: blur(20px);
}

/* Faint grid lines (technical / studio feel) */
.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(242, 235, 224, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(242, 235, 224, 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 80%);
}

/* On-air pulsing dot */
.on-air-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--ember);
  box-shadow: 0 0 12px var(--ember);
  animation: pulse-dot 1.8s ease-in-out infinite;
}

.on-air-dot.small {
  width: 6px;
  height: 6px;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.85); }
}

/* ────────────────  Ember mark (display-letter accent) ──────────────── */
/* Styled accent block inside the display headline.
   Sized in em so it scales with the heading's font-size. */
.ember-mark {
  display: inline-block;
  width: 0.38em;
  height: 0.38em;
  background: var(--ember);
  border-radius: 2px;
  vertical-align: 0.18em; /* sits near baseline of caps */
  margin-inline: 0.05em;
  box-shadow: 0 0 24px rgba(255, 107, 26, 0.55);
  animation: ember-breathe 2.6s ease-in-out infinite;
}

@keyframes ember-breathe {
  0%, 100% { opacity: 1;    transform: scale(1); }
  50%      { opacity: 0.7;  transform: scale(0.92); }
}

/* ────────────────  Waveform  ──────────────── */
.waveform {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3px;
  height: 80px;
  width: 100%;
  padding-block: 4px;
}

.waveform .bar {
  flex: 1 1 0;
  min-width: 2px;
  background: linear-gradient(to top, var(--ember) 0%, #FFA46B 100%);
  border-radius: 1px;
  box-shadow: 0 0 12px rgba(255, 107, 26, 0.65);
  transform-origin: bottom;
  animation: bar-pulse var(--bar-duration, 1.6s) ease-in-out infinite;
  animation-delay: var(--bar-delay, 0s);
  opacity: 1;
}

@keyframes bar-pulse {
  0%, 100% { transform: scaleY(var(--bar-min, 0.3)); }
  50%      { transform: scaleY(var(--bar-max, 1));   }
}

/* On hero load: cascade reveal from center outward */
.waveform.boot .bar {
  animation:
    bar-rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both,
    bar-pulse var(--bar-duration, 1.6s) ease-in-out 1s infinite;
  animation-delay: var(--bar-delay, 0s);
}

@keyframes bar-rise {
  from { transform: scaleY(0); opacity: 0; }
  to   { transform: scaleY(var(--bar-max, 1)); opacity: 0.85; }
}

/* ────────────────  Buttons  ──────────────── */
.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: "Space Mono", ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
  border-radius: 2px;
  transition: transform 200ms ease, background-color 200ms ease, color 200ms ease, box-shadow 250ms ease, border-color 200ms ease;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--ember);
  color: var(--ink);
  border: 1px solid var(--ember);
  box-shadow: 0 0 0 rgba(255, 107, 26, 0);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--cream);
  border-color: var(--cream);
  color: var(--ink);
  box-shadow: 0 0 24px rgba(255, 107, 26, 0.35);
  transform: translateY(-1px);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
}

.btn-ghost {
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--ash);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--cream);
  color: var(--cream);
  transform: translateY(-1px);
}

.btn-ghost:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 3px;
}

.arrow {
  display: inline-block;
  transition: transform 200ms ease;
}

.btn-primary:hover .arrow,
.btn-ghost:hover .arrow {
  transform: translateX(4px);
}

/* ────────────────  Learn list  ──────────────── */
.learn-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--ash);
  transition: padding-left 300ms ease, background-color 300ms ease;
}

.learn-row:hover {
  padding-left: 1rem;
  background: linear-gradient(to right, rgba(255, 107, 26, 0.04), transparent 70%);
}

.learn-num {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--cream-dim);
  padding-top: 4px;
}

.learn-title {
  font-family: "Sora", system-ui, sans-serif;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--cream);
  line-height: 1.35;
}

@media (min-width: 768px) {
  .learn-title { font-size: 1.25rem; }
}

.learn-desc {
  margin-top: 0.4rem;
  color: var(--cream-dim);
  line-height: 1.55;
  max-width: 52ch;
}

.learn-row-accent {
  border-bottom: 1px solid var(--ash);
}

.learn-row-accent .learn-num {
  font-size: 1.5rem;
  line-height: 1;
  padding-top: 0;
}

/* ────────────────  Photo frame  ──────────────── */
.photo-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--ink);
  border: 1px solid var(--ash);
  overflow: hidden;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  display: block;
  transition: transform 700ms ease, filter 700ms ease;
  filter: saturate(1.05) contrast(1.05);
}

.photo-frame:hover img {
  transform: scale(1.02);
}

.photo-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 107, 26, 0.08), transparent 60%),
    var(--ink-2);
  text-align: center;
  padding: 2rem;
}

/* Cinematic frame overlay (subtle corners and metadata) */
.photo-frame::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(242, 235, 224, 0.15);
  pointer-events: none;
  z-index: 2;
}

.photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 11, 0.7) 0%, transparent 40%, transparent 70%, rgba(10, 10, 11, 0.4) 100%);
  pointer-events: none;
  z-index: 1;
}

.photo-meta {
  position: absolute;
  bottom: 20px;
  left: 24px;
  right: 24px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

/* ────────────────  Work gallery  ──────────────── */
.work-tile {
  display: block;
  position: relative;
}

.work-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--ink);
  border: 1px solid var(--ash);
}

/* Cinematic crop-marks inside the frame */
.work-photo::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(242, 235, 224, 0.12);
  pointer-events: none;
  z-index: 2;
}

/* Subtle bottom-up gradient for caption legibility */
.work-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 11, 0.65) 0%, transparent 35%);
  pointer-events: none;
  z-index: 1;
}

.work-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 800ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 600ms ease;
  filter: saturate(1.05) contrast(1.05);
}

.work-tile:hover .work-photo img {
  transform: scale(1.04);
  filter: saturate(1.15) contrast(1.1);
}

/* Border ember-pulse on hover */
.work-tile:hover .work-photo {
  border-color: rgba(255, 107, 26, 0.5);
  box-shadow: 0 0 28px -8px rgba(255, 107, 26, 0.4);
  transition: border-color 300ms ease, box-shadow 300ms ease;
}

.work-meta {
  margin-top: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.work-tc {
  color: var(--ember);
}

.work-label {
  color: var(--cream);
}

/* ────────────────  Stats grid  ──────────────── */
.stat {
  border-top: 1px solid var(--ash);
  padding-top: 0.75rem;
}

.stat-label {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mute);
}

.stat-value {
  font-family: "Syncopate", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(1rem, 2vw, 1.25rem);
  text-transform: uppercase;
  color: var(--cream);
  margin-top: 0.35rem;
  line-height: 1;
  letter-spacing: 0.04em;
}

/* ────────────────  Demo reel iframe  ──────────────── */
.reel-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--ink);
  border: 1px solid var(--ash);
  overflow: hidden;
}

.reel-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ────────────────  Register section  ──────────────── */
.register-streak {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 80px;
  background: linear-gradient(to bottom, var(--ember), transparent);
  opacity: 0.6;
}

.price-card {
  background: linear-gradient(180deg, var(--ink-2) 0%, var(--ink) 100%);
  border: 1px solid var(--ash);
  border-radius: 4px;
  padding: clamp(1.75rem, 4vw, 2.5rem);
  position: relative;
  overflow: hidden;
}

.price-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--ember), transparent);
}

/* Subtle ember glow on hover */
.price-card:hover {
  border-color: rgba(255, 107, 26, 0.4);
  box-shadow: 0 20px 60px -20px rgba(255, 107, 26, 0.25);
  transition: border-color 300ms ease, box-shadow 300ms ease;
}

.input {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--ash);
  color: var(--cream);
  padding: 0.85rem 1rem;
  border-radius: 2px;
  transition: border-color 200ms ease, box-shadow 200ms ease;
  font-family: "Sora", system-ui, sans-serif;
  font-size: 0.95rem;
}

.input::placeholder {
  color: var(--mute);
}

.input:focus {
  outline: none;
  border-color: var(--ember);
  box-shadow: 0 0 0 3px rgba(255, 107, 26, 0.15);
}

.input[aria-invalid="true"] {
  border-color: var(--ember);
}

/* ────────────────  FAQ  ──────────────── */
.faq-item {
  border-bottom: 1px solid var(--ash);
}

.faq-item details {
  position: relative;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  font-family: "Sora", system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--cream);
  transition: color 200ms ease;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:hover {
  color: var(--ember);
}

@media (min-width: 768px) {
  .faq-item summary { font-size: 1.15rem; }
}

/* Plus/minus icon */
.faq-icon {
  position: relative;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  background: var(--cream-dim);
  transition: transform 250ms ease, background 200ms ease;
}

.faq-icon::before {
  top: 6px;
  left: 0;
  right: 0;
  height: 2px;
}

.faq-icon::after {
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
}

.faq-item summary:hover .faq-icon::before,
.faq-item summary:hover .faq-icon::after {
  background: var(--ember);
}

.faq-item details[open] .faq-icon::after {
  transform: rotate(90deg);
  opacity: 0;
}

.faq-body {
  padding: 0 0 1.75rem 0;
  color: var(--cream-dim);
  line-height: 1.65;
  max-width: 65ch;
  animation: faq-open 350ms ease both;
}

@keyframes faq-open {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ────────────────  Scroll reveal  ──────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children within a parent that reveals */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal-stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 80ms; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 160ms; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 240ms; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 320ms; }

/* ────────────────  Reduced motion  ──────────────── */
@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-stagger > * {
    opacity: 1;
    transform: none;
  }

  .grain {
    display: none;
  }

  .waveform .bar {
    transform: scaleY(0.6);
    animation: none;
  }
}

/* ────────────────  Small responsive tweaks  ──────────────── */
@media (max-width: 640px) {
  .waveform { height: 60px; }
  .photo-meta { font-size: 9px; }
  .learn-row { grid-template-columns: 40px 1fr; gap: 1rem; padding: 1.25rem 0; }
}
