/* ========================================================================
   FILMS — Future Film Foundation cinematic world.
   Everything from here down is deliberately outside the Marina Kazakova
   purple/editorial system: black / white / grey only, large type, thin
   rules, crosses — a separate "cinematic world" nested inside the site,
   built from the FFF presentation's own character (not its slides).
   ======================================================================== */

/* ---- Intro block override: this page's own title/tagline/body block
   (shared .direction-intro from direction-page.css) reads black-on-white
   everywhere else on the site — on Films it's inverted to a black block
   with white text. Still the site's normal purple accent on hover here
   (only the .fff cinematic world below goes fully black/white/grey). ---- */
.direction-intro {
  background: var(--color-black);
  color: var(--color-text-inverse);
}

.direction-intro__back,
.direction-link {
  color: var(--color-text-inverse);
}

.direction-link {
  border-color: var(--color-border-inverse);
}

.direction-link:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
}

/* ---- Outline-only letterforms (STUDIO & .FOUNDATION, the 3 discipline
   terms) ----
   -webkit-text-stroke on transparent-fill text was rendering stray
   fragments inside the letterforms on some devices — a real rendering
   bug in that specific CSS property, confirmed still present after
   removing text-transform and lowering the weight (neither is the
   actual cause). A text-shadow-ring fake stroke was tried next but
   text-shadow paints a solid dilated silhouette, not a hollow outline,
   so it just filled the letters solid instead.
   This uses real vector stroking instead: the visible text stays a
   normal (invisible, color:transparent) inline-block for accessibility
   and layout sizing exactly as before, and an absolutely-positioned SVG
   <text> — a completely different, correctly-hollow rendering path —
   draws the actual outline on top, sized to match its wrapper exactly
   (no manual width/viewBox math, no separate responsive scaling to keep
   in sync with the rest of the heading/list). */
.fff-outline-wrap {
  position: relative;
  display: inline-block;
  color: transparent;
  /* Switching stroke techniques (CSS -> SVG) made no difference, which
     means both were stroking the same corrupted glyph-outline data —
     something specific to how this Mac's Chrome rasterizes the
     Montserrat *web font* at this weight/size when it's stroked at all,
     not the stroking method. This is the one remaining variable fully
     in our control: a system font needs no network fetch and isn't
     Montserrat's font file, so it can't hit whatever's wrong with that
     one specifically. */
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.fff-outline-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.fff-outline-svg text {
  font-family: inherit;
  font-weight: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  fill: none;
  stroke: var(--color-white);
  stroke-width: 1.5px;
  paint-order: stroke fill;
  transition: stroke var(--dur-base) var(--ease-editorial);
}

.fff {
  background: var(--color-black);
  color: var(--color-white);
}

.fff section { position: relative; }

/* Restrained reveal system: fade + light slide-up + mask-wipe only.
   No bounce, no spring, no parallax — see prefers-reduced-motion in
   base.css, which already zeroes every transition/animation duration. */
.reveal-up {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms var(--ease-editorial), transform 700ms var(--ease-editorial);
}
.reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-fade {
  opacity: 0;
  transition: opacity 900ms var(--ease-editorial);
}
.reveal-fade.is-visible { opacity: 1; }

.reveal-mask {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 900ms var(--ease-editorial);
}
.reveal-mask.is-visible {
  clip-path: inset(0 0 0% 0);
}

/* ---- 02 — FFF HERO VIDEO ---- */
.fff-hero {
  height: 100vh;
  min-height: 640px;
  max-height: 980px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.fff-hero__media {
  position: absolute;
  inset: 0;
}

.fff-hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fff-hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.55) 60%, rgba(0, 0, 0, 0.8) 100%);
}

.fff-hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-inline: var(--container-pad);
}

.fff-hero__wordmark {
  width: clamp(220px, 20vw, 340px);
  height: auto;
  filter: brightness(0) invert(1);
}

.fff-hero__tagline {
  margin-top: var(--space-3);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-body-lg);
  letter-spacing: var(--ls-wide);
  color: var(--color-white);
  opacity: 0.9;
}

.fff-hero__scroll-cue {
  position: absolute;
  left: 50%;
  bottom: var(--space-4);
  transform: translateX(-50%);
  z-index: 1;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--color-white);
  opacity: 0.5;
}

/* ---- 03 — STUDIO & FOUNDATION (compact editorial transition, not a full slide) ---- */
.fff-transition {
  padding-block: var(--space-6);
  overflow: hidden;
}

/* Oversized, near-full-bleed FFF monogram behind the text — the signature
   graphic device from the FFF presentation (huge, barely-there dark grey
   letterforms filling the frame), not a small decorative corner mark. */
.fff-transition__mark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150vw;
  min-width: 1400px;
  transform: translate(-50%, -50%);
  opacity: 0.08;
  pointer-events: none;
}

.fff-transition__inner {
  position: relative;
  max-width: 46rem;
}

.fff-transition__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-display-md);
  line-height: 0.98;
  letter-spacing: var(--ls-tight);
  margin-bottom: var(--space-3);
}

.fff-transition__body {
  font-size: var(--fs-body-lg);
  line-height: var(--lh-relaxed);
  max-width: 34rem;
  opacity: 0.85;
}

/* ---- 04 — НАШ ПОДХОД / 3 DISCIPLINES ---- */
.fff-disciplines {
  background: var(--color-black);
  padding-block: var(--space-7);
}

.fff-disciplines__intro {
  max-width: 42rem;
  font-size: var(--fs-body-lg);
  line-height: var(--lh-relaxed);
  opacity: 0.85;
}

.fff-disciplines__rule {
  height: 1px;
  background: var(--color-border-inverse);
  margin-block: var(--space-5);
}

/* Stacked vertically — one discipline per line, thin rule between each —
   matching the presentation's own layout, not a horizontal wrapped row. */
.fff-disciplines__formula {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: var(--ls-tight);
}

.fff-disciplines__term {
  padding-block: 0.35em;
  border-top: 1px solid var(--color-border-inverse);
  font-size: clamp(1.9rem, 1rem + 4vw, 4.6rem);
  line-height: 1.15;
  cursor: default;
}
.fff-disciplines__formula li.fff-disciplines__term:last-child {
  border-bottom: 1px solid var(--color-border-inverse);
}

/* Interactive accent stays the Marina Kazakova purple even inside this
   otherwise black/white/grey world — the one deliberate exception. */
.fff-disciplines__term:hover .fff-outline-svg text {
  stroke: var(--color-accent);
}

.fff-disciplines__x {
  display: inline-block;
  margin-right: 0.25em;
  color: var(--color-white);
  opacity: 0.45;
}
.fff-disciplines__term:hover .fff-disciplines__x {
  color: var(--color-accent);
  opacity: 1;
}

/* ---- 05 — STUDIO ---- */
.fff-studio {
  background: var(--color-black);
  color: var(--color-white);
  padding-top: var(--space-7);
}

.fff-studio__eyebrow {
  opacity: 0.55;
  margin-bottom: var(--space-3);
}

.fff-studio__title {
  max-width: 52rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-heading);
  line-height: var(--lh-snug);
  margin-bottom: var(--space-3);
}

.fff-studio__lead {
  max-width: 40rem;
  font-size: var(--fs-body-lg);
  line-height: var(--lh-relaxed);
  opacity: 0.75;
  margin-bottom: var(--space-6);
}

.fff-studio__columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-border-inverse);
}

.fff-studio__col {
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border-inverse);
}

.fff-studio__col-num,
.fff-studio__col-title,
.fff-studio__col-text {
  transition: color var(--dur-fast) var(--ease-editorial), opacity var(--dur-fast) var(--ease-editorial);
}

/* Hovering anywhere in a column turns the whole 01 / title / text group
   the brand purple — reads as one hoverable block, not three. */
.fff-studio__col:hover .fff-studio__col-num,
.fff-studio__col:hover .fff-studio__col-title,
.fff-studio__col:hover .fff-studio__col-text {
  color: var(--color-accent);
  opacity: 1;
}

.fff-studio__col-num {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  opacity: 0.45;
  margin-bottom: var(--space-2);
}

.fff-studio__col-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-body-lg);
  letter-spacing: var(--ls-tight);
  text-transform: uppercase;
  margin-bottom: 0.5em;
}

.fff-studio__col-text {
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
  opacity: 0.75;
  max-width: 24rem;
}

/* Horizontal strip of film stills — the "genuine web section" texture
   for Studio, not a presentation screenshot. */
.fff-studio__strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  margin-top: var(--space-6);
  background: var(--color-black);
}

.fff-studio__frame {
  aspect-ratio: 3 / 4;
  overflow: hidden;
}
.fff-studio__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms var(--ease-editorial);
}
.fff-studio__frame:hover img {
  transform: scale(1.045);
}

/* ---- 06 — СМОТРЕТЬ НАШИ ФИЛЬМЫ ---- */
.fff-films {
  background: var(--color-white);
  color: var(--color-black);
  padding-block: var(--space-7);
}

.fff-films__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-display-md);
  letter-spacing: var(--ls-tight);
  text-transform: uppercase;
  margin-bottom: var(--space-5);
}

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

.fff-film-card {
  display: block;
  color: var(--color-black);
}

.fff-film-card__num {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  opacity: 0.45;
  margin-bottom: var(--space-2);
}

.fff-film-card__figure {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--color-pale-grey-soft);
}
.fff-film-card__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease-editorial);
}
.fff-film-card:hover .fff-film-card__figure img {
  transform: scale(1.045);
}

.fff-film-card__play {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  width: 2.2em;
  height: 2.2em;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-small);
  color: var(--color-white);
  background: rgba(11, 11, 12, 0.55);
  border-radius: 50%;
  transition: background var(--dur-fast) var(--ease-editorial), color var(--dur-fast) var(--ease-editorial), transform var(--dur-fast) var(--ease-editorial);
}
.fff-film-card:hover .fff-film-card__play {
  background: var(--color-accent);
  color: var(--color-black);
  transform: scale(1.08);
}

.fff-film-card__title {
  margin-top: var(--space-3);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-body-lg);
  line-height: var(--lh-snug);
}

.fff-film-card__meta {
  margin-top: 0.5em;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  line-height: var(--lh-normal);
  opacity: 0.6;
}

/* ---- 07 — FINAL: Explore → Create → Share ---- */
.fff-final {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-block: var(--space-7);
}

.fff-final__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
}

.fff-final__scrim {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 100% at 50% 40%, rgba(11, 11, 12, 0.55) 0%, rgba(11, 11, 12, 0.92) 100%);
}

.fff-final__content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.fff-final__line {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 1.2rem + 4vw, 5rem);
  line-height: 1;
  letter-spacing: var(--ls-tight);
  text-transform: uppercase;
}

.fff-final__arrow {
  display: inline-block;
  margin-inline: 0.15em;
  opacity: 0.5;
  font-weight: 400;
}

.fff-final__names {
  margin-top: var(--space-4);
  font-size: var(--fs-body-lg);
  letter-spacing: var(--ls-normal);
  opacity: 0.85;
}

.fff-final__contacts {
  margin-top: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  letter-spacing: var(--ls-normal);
  text-transform: uppercase;
}
.fff-final__contacts a { opacity: 0.7; transition: opacity var(--dur-fast) var(--ease-editorial), color var(--dur-fast) var(--ease-editorial); }
.fff-final__contacts a:hover { opacity: 1; color: var(--color-accent); }
.fff-final__sep { margin-inline: 0.6em; opacity: 0.35; }

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

/* ========================================================================
   LAPTOP / LOW-HEIGHT DESKTOP — see direction-page.css / profile.css for
   the breakpoint's rationale. The hero video was the standout offender
   here: height:100vh means it alone fills the entire small-laptop screen
   before any content shows. The disciplines block's generous vertical
   rhythm (padding-block + rule margins, stacked against Studio's own top
   padding) also reads as excess "air" at this size. Structure, text and
   colours are untouched — only vertical scale.
   ======================================================================== */
@media (min-width: 1100px) and (max-width: 1440px) and (max-height: 900px) {
  .fff-hero { height: 64vh; min-height: 460px; max-height: 640px; }
  .fff-final { min-height: 52vh; padding-block: 5rem; }

  .fff-transition { padding-block: 3.6rem; }
  .fff-disciplines { padding-block: 5rem; }
  .fff-disciplines__rule { margin-block: 2.2rem; }
  .fff-studio { padding-top: 5rem; }
  .fff-films { padding-block: 5rem; }
}
