/* Colors, type and radius follow the brand kit: assets/brand/tokens.json */
:root {
  --limestone: #E9E2D3;
  --iron-black: #1C1B19;
  --raised-light: #F3EEE4;
  --raised-dark: #26241F;
  --muted-light: #5E574C;
  --muted-dark: #B3AB9C;
  --hairline-light: #CFC6B4;
  --hairline-dark: #3A372F;
  --rust: #A4532F;
  --rust-on-dark: #C46A41;
  --display: Didot, 'Bodoni 72', 'Bodoni Moda', 'Times New Roman', serif;
  --gutter: clamp(16px, 5vw, 88px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--iron-black);
  color: var(--limestone);
  font-family: var(--display);
  font-weight: 400;
  font-size: 18px;
  line-height: 28px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; font-weight: 400; }
img { display: block; max-width: 100%; }
/* No italic anywhere in the brand: the second half of a headline is set
   upright in Didot Regular and steps back in the muted brand color. */
em { font-style: normal; color: var(--muted-dark); }
.on-light em { color: var(--muted-light); }

h1, h2 { letter-spacing: -0.015em; line-height: 1.06; text-wrap: balance; }
h1 { font-size: clamp(42px, 7vw, 100px); }
h2 { font-size: clamp(30px, 4.2vw, 58px); }

/* Didot Bold, spaced capitals: labels only */
.label {
  font-weight: 700;
  font-size: 13px;
  line-height: 20px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted-dark);
}

/* Nav */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px var(--gutter);
  transition: background 0.4s ease, padding 0.4s ease;
}
.nav.is-solid { background: rgba(28, 27, 25, 0.95); padding-block: 14px; }
.logo img { height: 34px; width: auto; }
.nav-links { display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); font-weight: 700; font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; }
.nav-links a { padding: 12px 0; }
.nav-links a:not(.nav-cta) { opacity: 0.85; transition: opacity 0.2s; }
.nav-links a:not(.nav-cta):hover { opacity: 1; }
.nav-cta { border: 1px solid rgba(233, 226, 211, 0.6); padding: 11px 20px !important; transition: background 0.25s, color 0.25s; }
.nav-cta:hover, .nav-cta[aria-current="page"] { background: var(--limestone); color: var(--iron-black); }

/* Buttons: square corners */
.button {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  line-height: 20px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding: 16px 32px;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.button-light { background: var(--limestone); color: var(--iron-black); }
.button-light:hover { background: transparent; color: var(--limestone); border-color: var(--limestone); }
.button-dark { background: var(--iron-black); color: var(--limestone); }
.button-dark:hover { background: transparent; color: var(--iron-black); border-color: var(--iron-black); }
.button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* Hero: the banner photo, copy set in the sky above the house */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  justify-content: center;
  padding: clamp(120px, 17vh, 190px) var(--gutter) 48vh;
  overflow: hidden;
  background: #194783;
}
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 22, 44, 0.55) 0%, rgba(14, 22, 44, 0.18) 46%, rgba(14, 22, 44, 0) 62%); }
.hero-copy { position: relative; z-index: 1; max-width: 900px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; }
.hero-copy .label { color: var(--limestone); }
.hero h1, .hero-sub { text-shadow: 0 2px 24px rgba(8, 12, 26, 0.55); }
.hero-sub { max-width: 22em; font-size: clamp(26px, 3.2vw, 44px); line-height: 1.25; letter-spacing: -0.01em; }
.hero-scroll { position: absolute; z-index: 1; left: 50%; bottom: 24px; width: 44px; height: 56px; margin-left: -22px; display: flex; justify-content: center; }
.hero-scroll span { width: 1px; height: 100%; background: rgba(233, 226, 211, 0.8); transform-origin: top; animation: drop 2.6s ease-in-out infinite; }
@keyframes drop { 0% { transform: scaleY(0); } 55% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* Limestone sections */
.on-light { background: var(--limestone); color: var(--iron-black); }
.on-light .label { color: var(--muted-light); }

/* Criteria */
.criteria { padding: clamp(80px, 12vw, 160px) var(--gutter); }
.criteria-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: clamp(40px, 6vw, 96px); margin-top: clamp(40px, 6vw, 72px); }
.criterion { border-top: 1px solid var(--iron-black); padding-top: 28px; }
.criterion-figure { font-size: clamp(56px, 7vw, 120px); letter-spacing: -0.03em; line-height: 0.95; overflow-wrap: anywhere; }
.criterion-figure span { font-size: 0.5em; vertical-align: 0.6em; margin-left: 0.04em; }
.criterion .label { margin-top: 20px; }
.criteria-statement { margin-top: 28px; max-width: 18em; }
.criteria-note { margin-top: clamp(40px, 6vw, 72px); max-width: 30em; font-size: clamp(20px, 2vw, 26px); line-height: 1.4; }

/* How it works */
.how { padding: clamp(80px, 12vw, 160px) var(--gutter); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: clamp(48px, 7vw, 120px); }
.how-intro { display: flex; flex-direction: column; gap: 28px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.steps li { display: grid; grid-template-columns: 72px minmax(0, 1fr); column-gap: 20px; row-gap: 8px; padding: 30px 0; border-top: 1px solid var(--hairline-dark); }
.steps li:last-child { border-bottom: 1px solid var(--hairline-dark); }
.steps .label { grid-row: span 2; padding-top: 8px; }
.steps h3 { font-size: 28px; line-height: 34px; }
.steps p { color: var(--muted-dark); max-width: 34em; }

/* Film */
.film { background: #151412; padding: clamp(80px, 12vw, 160px) var(--gutter); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: clamp(40px, 6vw, 96px); align-items: center; }
.film-frame { aspect-ratio: 16 / 10; background: var(--raised-dark); border: 1px solid var(--hairline-dark); display: flex; align-items: center; justify-content: center; }
.film-copy { display: flex; flex-direction: column; gap: 18px; }
.film-copy h2 em { display: block; font-size: 0.5em; line-height: 1.3; letter-spacing: 0; margin-top: 10px; color: var(--muted-dark); }
.film-copy > p:not(.label) { color: var(--muted-dark); max-width: 32em; }
.specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 16px 0 0; padding-top: 24px; border-top: 1px solid var(--hairline-dark); }
.specs dt { font-weight: 700; font-size: 12px; line-height: 20px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted-dark); }
.specs dd { margin: 6px 0 0; font-size: clamp(18px, 1.8vw, 24px); }

/* The list */
.list { padding: clamp(80px, 12vw, 160px) var(--gutter); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: clamp(48px, 7vw, 120px); }
.list-intro { display: flex; flex-direction: column; gap: 28px; }
.list-intro p:last-child { color: var(--muted-light); max-width: 30em; }
.list-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 30px 28px; align-content: start; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .group-label { font-weight: 700; font-size: 12px; line-height: 20px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted-light); }
.optional, .req { font-weight: 400; letter-spacing: 0; text-transform: none; font-size: 15px; margin-left: 6px; }
.field input, .field select, .field textarea {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 48px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--iron-black);
  border-radius: 0;
  background-color: transparent;
  color: var(--iron-black);
  font-family: var(--display);
  font-size: 20px;
}
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--iron-black) 50%), linear-gradient(135deg, var(--iron-black) 50%, transparent 50%); background-position: calc(100% - 11px) 21px, calc(100% - 5px) 21px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 28px; cursor: pointer; }
.list-form select:invalid { color: var(--muted-light); }
.field.has-error input, .field.has-error select { border-color: var(--rust); }
.field.has-error label { color: var(--rust); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; margin-top: 12px; }
.form-status { color: var(--muted-light); min-height: 28px; }
.form-status.is-error { color: #8a3f1f; }
.list-form.is-done .field, .list-form.is-done .button, .card.is-done .group, .card.is-done .button { display: none; }
.list-form.is-done .form-status, .card.is-done .form-status { font-size: 28px; line-height: 34px; color: var(--iron-black); }

/* Connect page */
.page-head { padding: clamp(150px, 20vw, 220px) var(--gutter) clamp(64px, 9vw, 112px); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 28px; }
.page-head h1 { font-size: clamp(38px, 5.4vw, 72px); max-width: 16em; }
.page-head-rule { width: 72px; height: 1px; background: var(--rust-on-dark); }
.page-head p { max-width: 36em; color: var(--muted-dark); }
.connect { padding: clamp(40px, 7vw, 96px) var(--gutter) clamp(72px, 10vw, 140px); }
.card { max-width: 780px; margin: 0 auto; background: var(--raised-light); border: 1px solid var(--hairline-light); padding: clamp(24px, 5vw, 56px); display: flex; flex-direction: column; gap: 44px; }
.group { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.group legend { width: 100%; padding: 0 0 12px; margin-bottom: 22px; border-bottom: 1px solid var(--hairline-light); font-size: 28px; line-height: 34px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 22px 20px; }
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px; }
.option { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 16px; border: 1px solid var(--hairline-light); background: #fbf8f1; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.option:hover { border-color: var(--iron-black); }
.option:has(input:checked) { border-color: var(--iron-black); background: var(--limestone); }
.option input, .check input { width: 18px; height: 18px; margin: 0; accent-color: var(--iron-black); flex: none; }
.card .field { gap: 8px; }
.card .field input, .card .field select, .card .field textarea { height: 52px; padding: 0 14px; border: 1px solid var(--hairline-light); background-color: #fbf8f1; font-size: 18px; }
.card .field textarea { height: auto; padding: 12px 14px; resize: vertical; line-height: 28px; }
.card .field select { background-position: calc(100% - 20px) 23px, calc(100% - 14px) 23px; padding-right: 40px; }
.card .field input:focus, .card .field select:focus, .card .field textarea:focus { border-color: var(--iron-black); }
.card .field input::placeholder { color: #7a7265; }
.card .field.has-error input, .card .field.has-error select { border-color: var(--rust); }
.check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; padding: 6px 0; }
.check input { margin-top: 5px; }
.check.has-error, .group.has-error .group-label { color: #8a3f1f; }
.group.has-error .option { border-color: var(--rust); }
.card .form-foot { margin-top: 0; }

/* Footer */
.footer { padding: 64px var(--gutter) 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px 40px; border-top: 1px solid var(--hairline-dark); }
.footer-mark { display: flex; align-items: center; gap: 24px; }
.footer-mark .badge { width: 72px; height: 72px; }
.footer-mark .wordmark { height: 72px; width: auto; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 32px; font-weight: 700; font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted-dark); }
.footer-links a { padding: 12px 0; color: var(--limestone); }
.footer-links span { padding: 12px 0; }
.footer-legal { flex-basis: 100%; font-size: 15px; line-height: 24px; color: var(--muted-dark); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.is-in { opacity: 1; transform: none; }

@media (max-width: 640px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .logo img { height: 27px; }
  .hero { padding-bottom: 44vh; }
  .hero-photo { object-position: 50% 70%; }
  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-mark .wordmark { height: 54px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-scroll span { animation: none; }
}

/* Signature films */
.films { padding: clamp(80px, 12vw, 160px) var(--gutter); display: flex; flex-direction: column; gap: clamp(40px, 6vw, 72px); }
.films-intro { display: flex; flex-direction: column; gap: 24px; max-width: 40em; }
.films-intro p:last-child { color: var(--muted-dark); }
.films-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(480px, 100%), 1fr)); gap: clamp(28px, 4vw, 56px) clamp(24px, 3vw, 40px); }
.film-card { margin: 0; display: flex; flex-direction: column; gap: 16px; }
.film-player { position: relative; aspect-ratio: 16 / 9; background: var(--raised-dark); overflow: hidden; }
.film-player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.film-play { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; background: linear-gradient(180deg, rgba(28, 27, 25, 0) 55%, rgba(28, 27, 25, 0.45) 100%); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: opacity 0.3s; }
.film-play span { width: 84px; height: 84px; border: 1px solid var(--limestone); border-radius: 9999px; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); transition: background 0.25s; }
.film-play span::after { content: ''; display: block; width: 0; height: 0; margin-left: 5px; border-style: solid; border-width: 11px 0 11px 19px; border-color: transparent transparent transparent var(--limestone); }
.film-play:hover span { background: rgba(233, 226, 211, 0.18); }
.film-player.is-playing .film-play { opacity: 0; pointer-events: none; }
.film-card figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.film-town { font-size: 20px; }
