/* ==========================================================================
   FLANNER WEDDING FILMS
   Design system + page styles. See BRAND.md for the reasoning behind the
   tokens below — this file is the implementation of that document.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1 · TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Colour — warm monochrome. Nothing here competes with skin tones or
     natural light in the footage. The site is the frame; the film is the
     picture. */
  --ink:            #0D0C0B;   /* near-black, warm */
  --ink-raised:     #16130F;   /* one step up from black, for panels */
  --paper:          #F3EFE9;   /* warm off-white — the light half of the site */
  --paper-hi:       #FBF9F6;   /* brightest surface */
  --muted-dark:     #8C8378;   /* secondary text on ink */
  --muted-light:    #6E665C;   /* secondary text on paper */
  --line-dark:      rgba(243, 239, 233, 0.14);
  --line-light:     #DED7CB;
  --accent:         #A98F72;   /* clay. Focus rings and hairline accents only. */

  /* Type */
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Rhythm */
  --edge:        clamp(1.25rem, 4vw, 2.5rem);
  --section-gap: clamp(6rem, 14vw, 11rem);
  --container:   80rem;
}

/* --------------------------------------------------------------------------
   2 · RESET
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, p, figure, blockquote, dl, dd { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

a {
  color: inherit;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

::selection { background: var(--paper); color: var(--ink); }

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

/* --------------------------------------------------------------------------
   3 · PRIMITIVES
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: max(var(--edge), env(safe-area-inset-left));
}

/* The uppercase micro-label. The one recurring piece of "UI voice" on the
   site — it does all the structural signposting so the headlines never have
   to explain themselves. */
.label {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-dark);
}

.letter .label,
.contact .label { color: var(--muted-light); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.8125rem;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Film grain. Static, subtle, and only over the dark half of the page. */
.grain { position: relative; }
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  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='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
.grain > * { position: relative; z-index: 2; }

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 900ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-in { opacity: 1; transform: none; }

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

/* --------------------------------------------------------------------------
   4 · NAV
   -------------------------------------------------------------------------- */
.nav {
  padding-block: clamp(1.25rem, 3vw, 2rem);
  padding-top: max(clamp(1.25rem, 3vw, 2rem), env(safe-area-inset-top));
}

.nav__inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
}

/* The wordmark. Type only — an opening title card, not a logo. */
.wordmark {
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--paper);
  white-space: nowrap;
  transition: opacity 200ms ease;
}
.wordmark:hover { opacity: 0.7; }

.nav__links {
  display: none;
  gap: 2rem;
}

.nav__links a,
.nav__cta {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-dark);
  white-space: nowrap;
  transition: color 200ms ease;
}
.nav__links a:hover,
.nav__cta:hover { color: var(--paper); }

@media (min-width: 40em) {
  .nav__links { display: flex; }
}

/* --------------------------------------------------------------------------
   5 · HERO  (text only — no image, by design)
   -------------------------------------------------------------------------- */
.hero {
  padding-top: clamp(3rem, 9vw, 6rem);
  padding-bottom: var(--section-gap);
}

.hero__title {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.75rem, 7.6vw, 6.5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* The entity-defining sentence. Wider measure than a normal paragraph so it
   reads as a statement rather than body copy. */
.hero__sub {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  max-width: 42rem;
  color: var(--muted-dark);
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   6 · THE FILMS
   -------------------------------------------------------------------------- */
.film {
  padding-bottom: var(--section-gap);
  scroll-margin-top: 2rem;
}

.film__head {
  display: grid;
  gap: clamp(2rem, 5vw, 3rem);
  padding-bottom: clamp(2rem, 5vw, 3rem);
  border-bottom: 1px solid var(--line-dark);
}

@media (min-width: 46em) {
  .film__head {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}

/* Sits below the hero H1 in the hierarchy, so a step down in scale. */
.film__title {
  margin-top: 0.75rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 4.6vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.meta {
  display: grid;
  gap: 0.875rem;
  font-size: 0.8125rem;
}

.meta__row {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 1rem;
}

.meta dt {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-dark);
}

.meta dd {
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}

/* One block per film: its label, then the player. */
.film__item {
  display: grid;
  gap: clamp(1rem, 2.2vw, 1.5rem);
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

/* Runtime, trailing the film's title. */
.film__dur {
  margin-left: 0.75rem;
  color: var(--muted-dark);
  font-variant-numeric: tabular-nums;
  opacity: 0.75;
}

.player {
  background: #000;
  border: 1px solid var(--line-dark);
}

.player wistia-player { display: block; }

/* For a 9:16 clip — keeps a vertical reel from spanning the full width. */
.player--vertical {
  max-width: 26rem;
  justify-self: start;
}

/* --------------------------------------------------------------------------
   6 · THE LETTER
   -------------------------------------------------------------------------- */
.letter {
  background: var(--paper);
  color: var(--ink);
  padding-block: var(--section-gap);
  scroll-margin-top: 2rem;
}

.letter__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: clamp(1.25rem, 2.5vw, 1.75rem);
  border-bottom: 1px solid var(--line-light);
}

/* EN | SL switch. Text-only, pipe separator, grey-to-ink for the active
   state — the same toggle pattern as the rest of the system. */
.lang {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.lang__btn {
  appearance: none;
  background: none;
  border: 0;
  /* Padding + negative block margin: a 27×29px tap target without moving the
     text off the label's baseline. */
  padding: 0.5rem 0.25rem;
  margin-block: -0.5rem;
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-light);
  cursor: pointer;
  touch-action: manipulation;
  transition: color 200ms ease;
}

.lang__btn:hover,
.lang__btn.is-active { color: var(--ink); }

.lang__sep {
  font-size: 0.6875rem;
  color: var(--muted-light);
}

/* Sized for a real message, not a pull quote — it runs ~180 words, so this
   sits at reading size rather than display size. */
.letter__quotes { margin-top: clamp(2rem, 5vw, 3.5rem); }

.letter__body {
  display: grid;
  gap: 1.1em;
  max-width: 46rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.25rem, 2.4vw, 1.875rem);
  line-height: 1.42;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}

/* `display: grid` would otherwise beat the hidden attribute. */
.letter__body[hidden] { display: none; }

.letter__sign {
  display: grid;
  gap: 0.375rem;
  margin-top: 1.25rem;
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-light);
}

.letter__note {
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted-light);
}

/* --------------------------------------------------------------------------
   7 · CONTACT
   -------------------------------------------------------------------------- */
.contact {
  background: var(--paper);
  color: var(--ink);
  padding-bottom: var(--section-gap);
  scroll-margin-top: 2rem;
}

.contact::before {
  content: "";
  display: block;
  border-top: 1px solid var(--line-light);
  margin-bottom: var(--section-gap);
}

.contact__title {
  margin-top: clamp(1rem, 2.5vw, 1.5rem);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 6.4vw, 5rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.contact__body {
  margin-top: clamp(1.5rem, 3vw, 2rem);
  max-width: 34rem;
  color: var(--muted-light);
  text-wrap: pretty;
}

.contact__links {
  display: grid;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  border-top: 1px solid var(--line-light);
}

.contact__links li { border-bottom: 1px solid var(--line-light); }

.contact__links a {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.375rem;
  padding-block: 1.5rem;
  transition: opacity 200ms ease;
}
.contact__links a:hover { opacity: 0.6; }

@media (min-width: 44em) {
  .contact__links a {
    grid-template-columns: 10rem 1fr;
    gap: 1rem;
    align-items: baseline;
  }
}

.contact__label {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-light);
}

.contact__value {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.6vw, 1.875rem);
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.contact__note {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-light);
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   8 · FOOTER
   -------------------------------------------------------------------------- */
.foot {
  background: var(--ink);
  color: var(--paper);
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  padding-bottom: max(clamp(2.5rem, 5vw, 3.5rem), env(safe-area-inset-bottom));
}

.foot__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.foot__mark {
  font-family: var(--serif);
  font-size: 1rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.foot__mark span {
  font-family: var(--sans);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--muted-dark);
  margin-left: 0.5rem;
}

.foot__meta {
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-dark);
}
