/* =========================================================
   Pigeon Production — style.css
   Bright and clean: Syne (a modern sans-serif with character) for the
   name and titles, Manrope for small text, and one warm brown accent.
   Change the colours below to retheme the whole site.
   ========================================================= */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f4f0;      /* warm off-white band (contact) */
  --ink: #141414;          /* main text */
  --ink-soft: #6e6a64;     /* secondary text */
  --line: #e8e5df;         /* hairlines */
  --accent: #b5562f;       /* the warm brown accent */

  --display: "Syne", "Helvetica Neue", Arial, sans-serif;
  --sans: "Manrope", system-ui, -apple-system, sans-serif;

  --pad: clamp(1.1rem, 4vw, 4.5rem);
  --max: 1440px;
  --gap: 10px;             /* the gap between videos */
  --radius: 14px;          /* rounded corners (reel, contact, pop-up) */
  --radius-sm: 10px;       /* rounded corners on video thumbnails */
  --inset: clamp(.6rem, 1.4vw, 1.25rem);  /* small frame around the reel and contact */
  --header-h: 84px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

/* ---------- Language switching ---------- */
html[data-lang="en"] [lang="fr"],
html[data-lang="fr"] [lang="en"] { display: none !important; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-inline: var(--pad);
  background: var(--bg);
}

.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.wordmark em { font-style: normal; font-weight: 400; color: var(--accent); }

nav { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.2rem); }

nav a {
  position: relative;
  font-size: .76rem;
  font-weight: 400;
  letter-spacing: .24em;
  text-transform: uppercase;
  padding-block: .4rem;
}
nav a::after {
  content: "";
  position: absolute;
  left: 0; right: .24em; bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
}
nav a:hover::after { transform: scaleX(1); }

.lang-switch {
  background: none;
  border: 0;
  cursor: pointer;
  font-size: .74rem;
  letter-spacing: .14em;
  color: var(--ink-soft);
  padding: .4rem 0 .4rem .4rem;
}
.lang-switch .sep { margin: 0 .35rem; opacity: .5; }
html[data-lang="en"] .lang-switch [data-set="en"],
html[data-lang="fr"] .lang-switch [data-set="fr"] { color: var(--accent); font-weight: 600; }

/* ---------- Opening reel ---------- */
.hero {
  position: relative;
  height: clamp(440px, calc(100svh - var(--header-h)), 920px);
  overflow: hidden;
  margin-inline: var(--inset);
  border-radius: var(--radius);
  isolation: isolate;
  background: #1c1b1a;
  color: #fff;
  display: grid;
  place-items: center;
  text-align: center;
}

.montage img,
.reel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  color: transparent;
}

.montage { position: absolute; inset: 0; }

/* placeholder medley: quick cuts with a slow push-in */
.montage img { opacity: 0; transition: opacity .08s linear; }
.montage img.on { opacity: 1; animation: push .7s linear both; }
@keyframes push { from { transform: scale(1.12); } to { transform: scale(1.02); } }

.reel { opacity: 0; transition: opacity .8s; }
.hero.has-reel .reel { opacity: 1; }
.hero.has-reel .montage { display: none; }

/* soft shade so the white title always reads */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(0,0,0,.18), rgba(0,0,0,.12) 40%, rgba(0,0,0,.42));
}

.hero-text { position: relative; z-index: 2; padding-inline: var(--pad); }

.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.6rem, 8vw, 7.5rem);
  line-height: .95;
  letter-spacing: -.035em;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .25);
}
.hero h1 em { font-style: normal; font-weight: 400; }

.scroll-cue {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 2.2rem;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  border-right: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: rotate(45deg);
}

/* ---------- Shared section bits ---------- */
section:not(.hero) { padding-inline: var(--pad); max-width: var(--max); margin-inline: auto; }

.label {
  text-align: center;
  font-family: var(--sans);
  font-weight: 500;
  font-size: .78rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  margin-bottom: 2.4rem;
}
.label::after {
  content: "";
  display: block;
  width: 28px;
  height: 1px;
  margin: 1rem auto 0;
  background: var(--accent);
}

/* ---------- Horizontal work grid ---------- */
.work { padding-block: clamp(3.5rem, 9vh, 6rem) clamp(4.5rem, 11vh, 7rem); }

/* What I do: Concept / Filming / Editing, at the top of Work */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 1040px;
  margin: 0 auto clamp(3.5rem, 9vh, 6rem);
  text-align: center;
}
.steps li { padding: .4rem clamp(1rem, 3vw, 2.5rem); }
.steps li + li { border-left: 1px solid var(--line); }
.steps h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: -.01em;
  margin-bottom: .4rem;
}
.steps p { color: var(--ink-soft); font-size: .95rem; max-width: 26ch; margin-inline: auto; }

.grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--gap);
}
.grid > .card { grid-column: span 2; }                        /* 3 per row */
/* leftovers on the last row stay the same size and sit centred */
.grid > .card:last-child:nth-child(3n+1) { grid-column: 3 / span 2; }
.grid > .card:nth-last-child(2):nth-child(3n+1) { grid-column: 2 / span 2; }

/* ---------- Cards (shared) ---------- */
.card {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-sm);
  isolation: isolate;               /* keeps corners round during the zoom */
  background: #eceae5;
  cursor: pointer;
}
.card-tall { aspect-ratio: 9 / 16; }

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;            /* also trims YouTube's black bars */
  color: transparent;           /* hides alt text if a thumbnail fails */
  transition: transform 1.1s var(--ease);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20, 18, 16, .55);
  opacity: 0;
  transition: opacity .45s var(--ease);
}

.card-info {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  text-align: center;
  color: #fff;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.card-info h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.1rem, 1.6vw, 1.45rem);
  line-height: 1.15;
  letter-spacing: -.01em;
  max-width: 20ch;
}
.card-info h3::after {
  content: "";
  display: block;
  width: 24px;
  height: 2px;
  margin: .7rem auto 0;
  background: var(--accent);
}
.card-tall .card-info h3 { font-size: clamp(1rem, 1.4vw, 1.25rem); }

.card:hover img, .card:focus-visible img { transform: scale(1.05); }
/* Shorts thumbnails: nudge in a touch so no black edge ever shows */
.card-tall img { transform: scale(1.05); }
.card-tall:hover img, .card-tall:focus-visible img { transform: scale(1.1); }
.card:hover::after, .card:focus-visible::after,
.card:hover .card-info, .card:focus-visible .card-info { opacity: 1; transform: none; }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.contact-form { position: relative; }

/* phones and tablets can't hover: show titles along the bottom */
@media (hover: none) {
  .card::after { opacity: 1; background: linear-gradient(to top, rgba(0,0,0,.6), rgba(0,0,0,0) 55%); }
  .card-info { opacity: 1; transform: none; place-items: end start; text-align: left; }
  .card-info h3 { max-width: none; }
  .card-info h3::after { margin-left: 0; }
}

/* ---------- Vertical videos (inside Work) ---------- */
.grid-tall {
  margin-top: clamp(2rem, 4vw, 3.5rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 250px));
  justify-content: center;
  gap: var(--gap);
}

/* ---------- Contact ---------- */
section.contact {
  max-width: none;
  margin-inline: var(--inset);
  border-radius: var(--radius);
  padding-block: clamp(5rem, 13vh, 8rem);
  background: var(--bg-soft);
}
.contact-form {
  max-width: 760px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 2.2rem;
}
.field { display: flex; flex-direction: column; gap: .35rem; }
.field-full { grid-column: 1 / -1; }
.field label {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.field input,
.field textarea {
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid #cfc9c0;
  border-radius: 0;
  padding: .65rem 0;
  outline: none;
  transition: border-color .3s;
}
.field textarea { resize: vertical; min-height: 7.5rem; line-height: 1.5; }
.field input:focus,
.field textarea:focus { border-bottom-color: var(--accent); }

.form-end {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.2rem 1.6rem;
  margin-top: .4rem;
}
.form-status { font-size: .92rem; color: var(--ink-soft); }
.contact-form.sent .form-status { color: var(--accent); }

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  padding: 1.05rem 2.2rem;
  cursor: pointer;
  transition: background .3s, transform .3s var(--ease);
}
.btn:hover { background: var(--accent); transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn:disabled { opacity: .6; cursor: default; transform: none; }

.hp { position: absolute; left: -9999px; }

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  justify-content: space-between;
  padding: 1.8rem var(--pad);
  font-size: .74rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.site-footer a:hover { color: var(--accent); }

/* ---------- Pop-up video player ---------- */
.player {
  border: 0;
  padding: 0;
  background: transparent;
  width: min(1100px, 92vw);
  max-width: none;
  max-height: none;
  margin: auto;
  overflow: visible;
}
.player.is-tall { width: min(420px, 90vw, calc(82vh * 9 / 16)); }
.player::backdrop { background: rgba(255, 255, 255, .94); backdrop-filter: blur(6px); }
.frame {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .18);
}
.player.is-tall .frame { aspect-ratio: 9 / 16; }
.frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.close {
  position: absolute;
  top: -3rem; right: 0;
  background: none;
  border: 0;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
}
.close:hover { color: var(--accent); }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-text { animation: rise 1s var(--ease) .1s both; }
  .scroll-cue { animation: nudge 2.2s ease-in-out infinite; }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } }
  @keyframes nudge { 0%, 100% { translate: 0 0; } 50% { translate: 0 6px; } }
}
@media (prefers-reduced-motion: reduce) {
  .montage img.on { animation: none; }
}

/* ---------- Tablet ---------- */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid > .card,
  .grid > .card:last-child:nth-child(3n+1),
  .grid > .card:nth-last-child(2):nth-child(3n+1) { grid-column: span 2; }
  .grid > .card:last-child:nth-child(odd) { grid-column: 2 / span 2; }
}

/* ---------- Phone ---------- */
@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .wordmark { font-size: 1.15rem; }
  nav a { display: none; }
  .hero { height: 72svh; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .grid > .card,
  .grid > .card:last-child:nth-child(odd) { grid-column: auto; }
  .grid-tall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
  .steps h3 { font-size: 1.2rem; margin-bottom: .2rem; }
  .steps li + li { border-left: 0; }
  .contact-form { grid-template-columns: minmax(0, 1fr); }
  .btn { width: 100%; }
  .site-footer { flex-direction: column; gap: .5rem; }
}
@media (max-width: 640px) {
  nav a[href="#contact"] { display: inline-block; }
}

/* =========================================================
   Motion & feedback
   Small, quick touches so the page answers every hover, click
   and scroll. All of it switches off for visitors who turn on
   "reduce motion" in their device settings.
   ========================================================= */

/* ---------- Header ---------- */
/* a hairline fades in under the header once you start scrolling */
.site-header { transition: box-shadow .35s var(--ease); }
.site-header.scrolled { box-shadow: 0 1px 0 var(--line); }

.wordmark { transition: opacity .25s; }
.wordmark:hover { opacity: .7; }

/* the underline also stays on the section you're looking at */
nav a.is-current::after,
nav a:focus-visible::after { transform: scaleX(1); }
nav a:focus-visible { outline: none; }

.lang-switch { transition: color .25s; }
.lang-switch:hover { color: var(--ink); }
.lang-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* quick cross-fade when switching EN / FR */
html.lang-swap main,
html.lang-swap .site-footer { animation: langFade .45s var(--ease); }
@keyframes langFade { from { opacity: .3; } }

/* ---------- Opening reel ---------- */
/* the title drifts and fades gently as you scroll past (set by the script) */
.hero h1 {
  transform: translateY(calc(var(--hp, 0) * 70px));
  opacity: calc(1 - var(--hp, 0) * .85);
}
.scroll-cue { transition: opacity .3s; }
.scroll-cue:hover { opacity: .6; }

/* ---------- Scroll reveal ---------- */
/* sections slide up softly as they come into view (classes added by the script) */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Video cards ---------- */
/* a quick press-in when clicked */
.card:active img { transform: scale(1.02); transition-duration: .2s; }
.card-tall:active img { transform: scale(1.07); }

/* ---------- Contact form ---------- */
.field label { transition: color .3s; }
.field:focus-within label { color: var(--accent); }
/* the accent line draws across from the left when a field is selected */
.field input,
.field textarea {
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1px no-repeat;
  background-origin: border-box;
  transition: border-color .3s, background-size .5s var(--ease);
}
.field input:focus,
.field textarea:focus { background-size: 100% 1px; }

.btn:active { transform: translateY(0) scale(.97); transition-duration: .1s; }

/* ---------- Footer ---------- */
.site-footer a { transition: color .25s; }
.site-footer a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- Pop-up video player ---------- */
.player[open] { animation: popIn .4s var(--ease); }
.player[open]::backdrop { animation: fadeIn .35s ease; }
.player.closing { animation: popOut .22s ease forwards; }
.player.closing::backdrop { animation: fadeOut .22s ease forwards; }
@keyframes popIn { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes popOut { to { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }

.close { transition: color .25s, transform .4s var(--ease); }
.close:hover { transform: rotate(90deg); }
.close:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero h1 { transform: none; opacity: 1; }
  .player[open], .player[open]::backdrop,
  .player.closing, .player.closing::backdrop,
  html.lang-swap main, html.lang-swap .site-footer { animation: none; }
  .close:hover { transform: none; }
}
