/* ==========================================================================
   unlock/TURKU — Global stylesheet
   Plain CSS, no framework. Flat editorial palette pushed cinematic:
   big display type, generous negative space, letterbox media, scroll motion.
   ========================================================================== */

/* ---------------------------------------------------------------------------
   Design tokens
   --------------------------------------------------------------------------- */
:root {
  --color-bg: #C9C9C9;             /* Page background (warm light gray, not white) */
  --color-accent: #D4392D;        /* Primary accent — logo, headlines, links, labels */
  --color-text: #000000;          /* Body copy, nav links */
  --color-text-secondary: #464646;/* Secondary/muted text */
  --color-line: #AFAFAF;          /* Divider rules */
  --color-line-strong: #828282;   /* Stronger dividers where needed */
  --color-white: #FEFEFE;         /* Rare highlight/contrast use only */
  --color-ink: #141414;           /* Near-black for cinematic letterbox blocks */

  /* Layout / rhythm */
  --content-max: 740px;   /* reading column */
  --wide-max: 1040px;     /* cinematic media / interview column */
  --page-pad: 1.5rem;
  --font-sans: 'Stack Sans Text', 'Helvetica Neue', Arial, sans-serif;
  --font-script: 'Caveat', cursive;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);   /* expo-out, quick then gentle */
  --ease-cine: cubic-bezier(0.22, 1, 0.36, 1); /* slow, weighted settle */
}

/* Stack Sans Text and Caveat are both loaded from Google Fonts in the <head>
   of each page — no self-hosted font files needed. */

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden; /* guards against full-bleed media causing sideways scroll */
}

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

a:hover,
a:focus-visible {
  text-decoration: underline;
}

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

/* Visually hidden but still readable by screen readers / search engines —
   used for headings that exist for accessibility/SEO but aren't shown. */
.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;
}

/* Reading column */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding-left: var(--page-pad);
  padding-right: var(--page-pad);
}

/* Wider cinematic column (media, interviews) */
.container--wide {
  max-width: var(--wide-max);
}

/* ---------------------------------------------------------------------------
   Scroll-reveal motion
   reveal.js toggles .is-visible as elements enter the viewport.
   Base = a slow, weighted fade-up. Modifiers add cinematic character.
   Fully disabled for reduced-motion users.
   --------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition:
    opacity 1.05s var(--ease-cine),
    transform 1.15s var(--ease-cine);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Rack-focus — headline resolves out of a soft blur, like a lens pulling
   focus. Used on hero headline / page title. */
.reveal.reveal--focus {
  opacity: 0;
  filter: blur(16px);
  transform: translateY(16px) scale(1.03);
  transition:
    opacity 1.3s var(--ease-cine),
    transform 1.4s var(--ease-cine),
    filter 1.4s var(--ease-cine);
}

.reveal.reveal--focus.is-visible {
  opacity: 1;
  filter: blur(0);
  transform: none;
}

/* Curtain wipe — content is revealed by an opening clip, like a shot fading
   up from black. Used on the film stills. */
.reveal.reveal--wipe {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.25s var(--ease-cine);
}

.reveal.reveal--wipe.is-visible {
  clip-path: inset(0 0 0 0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal,
  .reveal.reveal--focus,
  .reveal.reveal--wipe {
    opacity: 1;
    filter: none;
    transform: none;
    clip-path: none;
    transition: none;
  }
}

/* ---------------------------------------------------------------------------
   Navigation
   --------------------------------------------------------------------------- */
.nav {
  border-bottom: 1px solid var(--color-accent);
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: navIntro 1s var(--ease-cine) both;
}

/* Gentle one-time settle of the top chrome on load */
@keyframes navIntro {
  from { opacity: 0; transform: translateY(-100%); }
  to   { opacity: 1; transform: translateY(0); }
}

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

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.1rem var(--page-pad);
  flex-wrap: wrap;
}

.logo {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.logo__img {
  height: 22px;
  width: auto;
  display: block;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.nav__link {
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--color-text);
  transition: color 0.25s ease;
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--color-accent);
}

.nav__link--emphasis {
  color: var(--color-accent);
  font-weight: 800;
}

.nav__link[aria-current="page"] {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------------------------------------------------------------------------
   Shared typographic helpers
   --------------------------------------------------------------------------- */
.eyebrow {
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin: 0 0 1.25rem;
}

/* Casual handwritten accent — used ONLY for interviewee names */
.script-name {
  font-family: var(--font-script);
  color: var(--color-accent);
  font-weight: 700;
  font-size: 1.6em;
  line-height: 1;
}

.divider {
  border: 0;
  border-top: 1px solid var(--color-line);
  margin: 3.5rem 0;
}

/* ---------------------------------------------------------------------------
   Homepage — cinematic hero
   --------------------------------------------------------------------------- */
.hero {
  min-height: 82vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 6rem;
  padding-bottom: 3rem;
  text-align: center;
}

.hero-heading {
  color: var(--color-accent);
  font-size: clamp(1.9rem, 4.6vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 0 auto 3rem;
  max-width: 22ch;
  text-wrap: balance;
}

.hero__body {
  text-align: left;
  max-width: 62ch;
  margin: 0 auto;
}

.hero__body p {
  margin: 0 0 1.5rem;
  line-height: 1.7;
  color: var(--color-text);
  font-size: 1.05rem;
}

/* Oversized lead paragraph for cinematic emphasis */
.hero__body p:first-child {
  font-size: 1.35rem;
  line-height: 1.55;
  color: var(--color-text);
}

/* ---------------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 1rem 2rem;
  border: 1px solid var(--color-accent);
  border-radius: 999px;
  cursor: pointer;
  transition:
    background 0.3s var(--ease-out),
    color 0.3s var(--ease-out),
    transform 0.3s var(--ease-out);
}

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

.btn--primary:hover,
.btn--primary:focus-visible {
  background: transparent;
  color: var(--color-accent);
  text-decoration: none;
  transform: translateY(-2px);
}

.hero__cta {
  text-align: center;
  margin-top: 3rem;
}

.hero__cta-tag {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.hero__cta-tag .badge-available {
  margin-bottom: 0;
}

/* Cinematic CTA — outlined "play" button with a fill that sweeps in on hover */
.btn--cine {
  position: relative;
  z-index: 0;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.05rem 2.3rem;
  background: transparent;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  transition:
    color 0.45s var(--ease-out),
    transform 0.45s var(--ease-out),
    box-shadow 0.45s var(--ease-out);
}

/* The swept fill */
.btn--cine::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--color-accent);
  transform: translateX(-101%);
  transition: transform 0.5s var(--ease-out);
}

.btn--cine:hover,
.btn--cine:focus-visible {
  color: var(--color-white);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -14px rgba(0, 0, 0, 0.55);
}

.btn--cine:hover::before,
.btn--cine:focus-visible::before {
  transform: translateX(0);
}

/* Play glyph inside a ring, with a soft attention pulse at rest */
.btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  flex: none;
  transform: translateX(1px); /* optically center the triangle */
  animation: ringPulse 2.6s var(--ease-out) infinite;
}

.btn__icon svg {
  display: block;
}

.btn--cine:hover .btn__icon,
.btn--cine:focus-visible .btn__icon {
  animation: none;
}

.btn__label {
  position: relative;
}

@keyframes ringPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 57, 45, 0.35); }
  50%      { box-shadow: 0 0 0 6px rgba(212, 57, 45, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .btn__icon { animation: none; }
  .btn--cine,
  .btn--cine::before { transition: none; }
}

/* ---------------------------------------------------------------------------
   Interviews page — cinematic episode blocks
   --------------------------------------------------------------------------- */
.episode-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Each episode gets its own tall, generous block */
.episode-card {
  padding: 6rem 0;
  border-top: 1px solid var(--color-line);
}

.episode-card:last-child {
  border-bottom: 1px solid var(--color-line);
}

.episode-card__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 1.25rem;
}

.episode-label {
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--color-accent);
}

.episode-card__desc {
  margin: 0 0 2rem;
  max-width: 58ch;
  line-height: 1.65;
  font-size: 1.25rem;
  color: var(--color-text);
}

/* Coming-soon badge — subtle bordered pill */
.badge-coming-soon {
  display: inline-block;
  text-transform: uppercase;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-line-strong);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  margin-bottom: 1.75rem;
}

/* Available badge — a filled accent pill for episodes that are live */
.badge-available {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-transform: uppercase;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--color-white);
  background: var(--color-accent);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  margin-bottom: 1.75rem;
}

.badge-available__dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--color-white);
  animation: livePulse 2s var(--ease-out) infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

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

/* Media block — stays within the content column, with soft rounded corners. */
.episode-media {
  margin-top: 1rem;
}

.media-placeholder {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 16px;
  border: 0;
  background:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 14px,
      rgba(0, 0, 0, 0.03) 14px,
      rgba(0, 0, 0, 0.03) 28px
    ),
    var(--color-ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  color: var(--color-bg);
  text-align: center;
  padding: 1rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.6s var(--ease-cine);
  animation: filmDrift 9s linear infinite; /* slow moving grain — cinematic life */
}

/* Diagonal grain slowly pans across the still */
@keyframes filmDrift {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 56px 56px, 0 0; }
}

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

.episode-card:hover .media-placeholder {
  transform: scale(1.02); /* slow push-in on hover, like a Ken Burns move */
}

.media-placeholder__icon {
  font-size: 2.4rem;
  line-height: 1;
  color: var(--color-accent);
}

.media-placeholder__text {
  text-transform: uppercase;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: var(--color-bg);
}

/* Real player — a published interview. Runs full-bleed like the stills,
   letterboxed against black so 16:9 footage keeps its cinematic frame. */
.episode-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  object-fit: cover;
  border-radius: 16px;
  overflow: hidden; /* clip video content to the rounded corners */
}

/* Click-to-play YouTube facade — our own cover art (desktop/mobile) sits in
   front of the embed until pressed, so nothing loads from YouTube up front. */
.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
}

.video-embed__poster,
.video-embed__poster img,
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.video-embed__poster img {
  object-fit: cover;
}

.video-embed__play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 4.5rem;
  height: 4.5rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent);
  color: var(--color-white);
  font-size: 1.4rem;
  cursor: pointer;
  transition: transform 0.3s var(--ease-cine);
}

.video-embed__play:hover,
.video-embed__play:focus-visible {
  transform: scale(1.08);
}

.video-embed__play-icon {
  transform: translateX(2px); /* optical centering — triangle glyph sits left-heavy */
}

.video-embed.is-playing .video-embed__poster,
.video-embed.is-playing .video-embed__play {
  display: none;
}

/* ---------------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--color-accent);
  margin-top: 5rem;
  padding: 3.5rem var(--page-pad) 4rem;
  text-align: center;
}

.footer__logo {
  display: flex;
  justify-content: center;
  margin-bottom: 1.75rem;
}

.footer__logo-img {
  height: 26px;
  width: auto;
  display: block;
}

.footer__credit {
  margin-top: 1.5rem;
}

.footer__eyebrow {
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin: 0 0 0.9rem;
}

.footer__partners {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer__partner {
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--color-accent);
}

.footer__partner-link {
  color: inherit;
  text-decoration: none;
}

.footer__partner-link:hover,
.footer__partner-link:focus-visible {
  text-decoration: underline;
}

/* ---------------------------------------------------------------------------
   Contact page — story/inquiry form
   --------------------------------------------------------------------------- */
.contact-form {
  width: 100%;
  max-width: 62ch;
  margin: 3.5rem auto 0;
  text-align: left;
}

.form-field {
  margin-bottom: 2.25rem;
  border: 0;
  padding: 0;
}

.form-label {
  display: block;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--color-text-secondary);
  margin-bottom: 0.75rem;
  padding: 0;
}

/* Underlined, transparent fields — echoes the flat editorial palette
   (no boxed inputs) rather than a generic boxed-form look. */
.form-input {
  display: block;
  width: 100%;
  font-family: var(--font-sans);
  font-size: 1.1rem;
  color: var(--color-text);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--color-line-strong);
  border-radius: 0;
  padding: 0.75rem 0.1rem;
  transition: border-color 0.3s var(--ease-out);
}

.form-input::placeholder {
  color: var(--color-text-secondary);
  opacity: 0.7;
}

.form-input:focus-visible {
  outline: none;
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: calc(0.75rem - 1px);
}

.form-textarea {
  resize: vertical;
  line-height: 1.6;
}

.form-field--radio {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.form-field--radio .form-label {
  width: 100%;
}

/* Pill toggle — same shape language as .badge-coming-soon / .badge-available */
.form-radio {
  display: inline-flex;
  align-items: center;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-line-strong);
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  transition:
    background 0.3s var(--ease-out),
    border-color 0.3s var(--ease-out),
    color 0.3s var(--ease-out);
}

.form-radio input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.form-radio:has(input:checked) {
  color: var(--color-white);
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.form-radio:has(input:focus-visible) {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.form-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.form-submit {
  margin-top: 0.5rem;
  background: var(--color-accent);
  color: var(--color-white);
  border: 1px solid var(--color-accent);
}

.form-submit:hover,
.form-submit:focus-visible {
  background: transparent;
  color: var(--color-accent);
  transform: translateY(-2px);
}

/* ---------------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .nav__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
  }

  .nav__links {
    gap: 0.9rem 1.1rem;
  }

  .hero {
    min-height: 76vh;
    padding-top: 3.5rem;
  }

  .hero__body p:first-child {
    font-size: 1.2rem;
  }

  .episode-card {
    padding: 3.5rem 0;
  }

  .episode-card__desc {
    font-size: 1.1rem;
  }

  /* Slightly taller frame on narrow screens so the still keeps presence */
  .media-placeholder {
    aspect-ratio: 16 / 9;
  }

  .video-embed__play {
    width: 3rem;
    height: 3rem;
    font-size: 1rem;
  }
}
