/* ————————————————————————————————————————
   Rohde — Creative Agency
   Paper white, ink black. The photography is the colour.
   Display: Source Serif 4 (variable, optical sizing)
   Body / captions: Helvetica-class grotesque
———————————————————————————————————————— */

@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-latin-opsz-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --ink: #0a0a0a;
  --grey: #6e6e6e;
  --hairline: #e4e2de;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --rail-w: clamp(300px, 34vw, 500px);
  --gap: clamp(16px, 2vw, 28px);
}

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

html {
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}

img, video { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 10;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  font-family: var(--sans);
  font-size: 14px;
  text-decoration: none;
}
.skip:focus-visible { left: 12px; }

/* ——— Left rail: the stacked wordmark-nav ——— */

.rail {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--rail-w);
  height: 100dvh;
  padding: clamp(28px, 3.4vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 5;
}

.rail-nav {
  list-style: none;
}

.word {
  font-family: var(--serif);
  font-weight: 620;
  font-size: clamp(48px, 5.6vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-block;
}

.wordmark { font-weight: 760; }

.navlink { text-decoration: none; }

.navlink[aria-current="true"] {
  text-decoration: underline;
  text-decoration-thickness: 2.5px;
  text-underline-offset: 0.13em;
}

.word:hover,
.word[aria-current="true"] {
  font-style: italic;
}

.rail-tag {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(20px, 1.8vw, 31px);
  line-height: 1.26;
  letter-spacing: -0.005em;
  margin-bottom: 16px;
}

.rail-mail {
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* ——— Main column ——— */

main {
  margin-left: var(--rail-w);
  padding: clamp(28px, 3.4vw, 56px) clamp(24px, 4vw, 72px) 0 clamp(8px, 1vw, 24px);
  max-width: calc(var(--rail-w) + 1240px);
}

section { scroll-margin-top: 24px; }

/* Media blocks */

.media { margin: 0; }

.media video { width: 100%; }

.media figcaption {
  font-size: 12.5px;
  color: var(--grey);
  letter-spacing: 0.015em;
  margin-top: 10px;
}

.media figcaption a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.media + .media,
.media + .pair,
.pair + .media,
.pair + .pair { margin-top: var(--gap); }

/* Cropped video frames: both reels carry baked-in letterbox bars.
   The container clips to the true picture area; margin-top (as % of
   container width) shifts the 9:16 frame up past the top bar. */
.crop { overflow: hidden; }
.crop video { width: 100%; }

/* Hero reel: full column width, height capped so the opening view fits the
   screen. The picture band sits centered in the source frame, so flex-centering
   the oversized video shows the band and crops it evenly when the cap bites. */
/* Trim a hairline of baked-in black border off a clip's edges */
.crop-trim video { transform: scale(1.015); }

.crop-hero {
  aspect-ratio: 720 / 529;                        /* picture: y 375–904 of 720x1280 */
  max-height: calc(100dvh - 190px);
  display: flex;
  align-items: center;
}

/* Stacked cell inside a pair (two smaller media beside one tall one) */
.stack {
  display: grid;
  gap: var(--gap);
  align-content: start;
}

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  align-items: start;
}

/* NB: tall portrait next to a smaller landscape, landscape sits low */

.single-narrow {
  max-width: 68%;
  margin-left: auto;
  margin-right: auto;
}

/* Project heads — centered italic serif, like a wall label */

.project { margin-top: clamp(90px, 11vw, 170px); }

.project-head {
  text-align: center;
  margin-bottom: clamp(28px, 3.5vw, 52px);
}

.project-head h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 480;
  font-size: clamp(24px, 2.4vw, 36px);
  letter-spacing: 0.005em;
  line-height: 1.15;
}

.project-head .meta {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--grey);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 10px;
}

.project-head h2 a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.14em;
}
.project-head h2 a:hover { text-decoration-thickness: 1px; }

.byline {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--grey);
  letter-spacing: 0.015em;
  margin-top: 6px;
}
.byline a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.byline a:hover { font-style: italic; }

/* ——— Studio ——— */

#agency { margin-top: clamp(110px, 14vw, 210px); }

/* Two shared rows: still beside the copy, still beside the services list —
   so the second picture's top edge sits level with the Services header */
.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  grid-template-areas:
    "pic1 copy"
    "pic2 facts";
  column-gap: clamp(28px, 4.5vw, 72px);
  row-gap: 40px;
  align-items: start;
}

.studio-pic1 { grid-area: pic1; }
.studio-pic2 { grid-area: pic2; margin-top: 25px; } /* border + padding above the Services label */
.studio-copy { grid-area: copy; max-width: 560px; }
.studio-grid .facts { grid-area: facts; margin-top: 0; }

.studio-copy p { margin-bottom: 1.4em; }

.studio-tag {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
}

.facts {
  border-top: 1px solid var(--hairline);
  padding-top: 24px;
  margin-top: 40px;
}

.facts dd {
  column-count: 2;
  column-gap: var(--gap);
}

.facts dt {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--grey);
  margin-bottom: 10px;
}

.facts dd {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.7;
}

/* ——— Contact ——— */

#contact {
  margin-top: clamp(110px, 14vw, 210px);
  text-align: center;
}

.contact-mail { margin-top: -6px; }

.contact-mail a {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 560;
  font-size: clamp(26px, 3.6vw, 58px);
  letter-spacing: -0.01em;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.14em;
}
.contact-mail a:hover { text-decoration-thickness: 1px; }

.contact-note {
  font-size: 13px;
  color: var(--grey);
  margin-top: 22px;
}

/* ——— Footer ——— */

.foot {
  border-top: 1px solid var(--hairline);
  margin-top: clamp(90px, 11vw, 170px);
  padding: 20px 0 28px;
}

.foot p {
  font-size: 12px;
  color: var(--grey);
  letter-spacing: 0.015em;
}

/* ——— Reveal on scroll ——— */

@media (prefers-reduced-motion: no-preference) {
  .media.will-reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }
  .media.revealed {
    opacity: 1;
    transform: none;
  }
}

/* ——— Mobile & tablet ——— */

@media (max-width: 900px) {
  .rail {
    position: static;
    width: 100%;
    height: auto;
    padding: 24px 20px 0;
    display: block;
  }

  .rail-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 22px;
  }

  .rail-nav li:first-child { flex-basis: 100%; }

  .word { font-size: clamp(64px, 19vw, 120px); }

  .rail-nav .navlink {
    font-size: clamp(22px, 6.4vw, 34px);
    font-weight: 560;
    line-height: 1.5;
    text-decoration-thickness: 1.5px;
    padding: 6px 0; /* keeps tap targets comfortable */
  }

  .rail-foot {
    margin-top: 14px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--hairline);
  }

  main {
    margin-left: 0;
    padding: 40px 20px 0;
  }

  .pair { grid-template-columns: 1fr; }


  .facts dd { column-count: 1; }

  .single-narrow { max-width: 100%; }

  .studio-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "copy" "facts" "pic1" "pic2";
  }
  .studio-pic2 { margin-top: 0; }

}
