/* Assemblage — the production page (direction B, burgundy-led; layout F, W63). Loaded after base.css.
   The drifting pieces of layout F are parked in studies/f-pieces-left.html until Tim wants them live. */

:root {
  --slow: cubic-bezier(0.45, 0, 0.55, 1); /* even, with no felt start or stop */
  --deep: #1A070D;       /* page: burgundy-black */
  --sheet: #12050A;      /* form sheet on the burgundy band */
  --wine: #6B1F35;       /* brighter burgundy for light and quiet buttons */
  --field: #7D5B5E;      /* dusty rose: 3.4:1 against --sheet, 3.3:1 against --deep; cream text 4.8:1 on it */
  --gold-hi: #F2D58C;
  --gold-lo: #A97C2F;
}

body { background: var(--deep); }

.wrap { max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); }

/* Wordmark: gold, for its own sake. Solid gold where text clipping is unsupported. */
.wordmark {
  font-size: clamp(1.2rem, 1.9vw, 1.6rem);
  letter-spacing: 0.36em;
  color: var(--gold);
}
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .wordmark {
    background: linear-gradient(100deg, var(--gold-lo) 0%, var(--gold) 22%, var(--gold-hi) 46%, var(--gold) 64%, var(--gold-lo) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

/* Ambient light: burgundy glows that drift over minutes, not seconds. Nothing moves fast enough
   to catch the eye; over 15–20 s you notice the page is not quite as it was. Fixed behind the
   whole page, like the HF Ambiance stage. Off entirely for reduced motion. */
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ambient span {
  position: absolute;
  border-radius: 50%;
  will-change: transform, opacity;
}
.ambient span:nth-child(1) {
  width: 95vmax; height: 95vmax; left: 38%; top: -40vmax;
  background: radial-gradient(closest-side, rgba(107, 31, 53, 0.85), rgba(74, 21, 37, 0.35) 55%, rgba(74, 21, 37, 0) 100%);
}
.ambient span:nth-child(2) {
  width: 80vmax; height: 80vmax; left: -38vmax; top: 35%;
  background: radial-gradient(closest-side, rgba(74, 21, 37, 0.9), rgba(74, 21, 37, 0) 100%);
}
.ambient span:nth-child(3) {
  width: 55vmax; height: 55vmax; left: 52%; top: 18%;
  background: radial-gradient(closest-side, rgba(212, 168, 83, 0.07), rgba(212, 168, 83, 0) 100%);
}
@media (prefers-reduced-motion: no-preference) {
  .ambient span:nth-child(1) { animation: ambient-a 84s var(--slow) infinite alternate; }
  .ambient span:nth-child(2) { animation: ambient-b 106s var(--slow) infinite alternate; }
  .ambient span:nth-child(3) { animation: ambient-c 72s var(--slow) infinite alternate; }
}
@keyframes ambient-a {
  from { transform: translate3d(0, 0, 0) scale(1); opacity: 1; }
  to { transform: translate3d(-22vw, 14vh, 0) scale(1.18); opacity: 0.7; }
}
@keyframes ambient-b {
  from { transform: translate3d(0, 0, 0) scale(1.1); opacity: 0.65; }
  to { transform: translate3d(26vw, -18vh, 0) scale(0.95); opacity: 1; }
}
@keyframes ambient-c {
  from { transform: translate3d(0, 0, 0); opacity: 0.4; }
  to { transform: translate3d(-30vw, 22vh, 0); opacity: 1; }
}

/* Opening (Tim, 2026-11-17): the wordmark, the film's viewer (a cream "start here" panel until pressed), then the lead
   and the gold button to the form. No headline, no gold line, no thumbnail. On a phone the viewer runs edge to edge;
   on a wide screen it sits beside the words. */
.opening { position: relative; overflow: hidden; }
.opening .wrap {
  display: grid;
  gap: 1.1rem;
  padding-top: clamp(22px, 4vw, 44px);
  padding-bottom: clamp(56px, 10vh, 112px);
}
.opening .film { margin: 0.6rem calc(-1 * var(--gutter)) 0.3rem; }      /* edge to edge on phones */
.pitch { display: grid; gap: 1.1rem; }
.pitch .lead { max-width: 30rem; font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--cream); }
.pitch > div { padding-top: 0.2rem; }

@media (min-width: 900px) {
  .opening .wrap { min-height: min(100svh, 880px); align-content: center; row-gap: 1.6rem; }
  .opening .wordmark { align-self: start; }
  .opening.has-film .wrap {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    grid-template-rows: auto 1fr auto 1fr;
    column-gap: clamp(2.5rem, 5vw, 5rem);
  }
  .opening.has-film .wordmark { grid-column: 1 / -1; grid-row: 1; }
  .opening.has-film .pitch { grid-column: 1; grid-row: 3; }
  .opening.has-film .film { grid-column: 2; grid-row: 2 / 5; align-self: center; margin: 0; }
  .opening .film-stage { border-radius: var(--radius); }
}

/* The old title card, kept so the frozen studies C, E and F still look as Tim saw them. Not used by index.html. */
.title-card { align-self: end; display: grid; gap: 1.4rem; position: relative; padding-top: clamp(72px, 16vh, 140px); }
.title-card h1 { font-size: clamp(2.6rem, 7.2vw, 6.25rem); line-height: 1.02; max-width: 14em; }
.title-card h1 span { display: block; }
.title-card h1 .turn { color: var(--gold); }
.title-card .lead { max-width: 30rem; font-size: clamp(1.1rem, 1.5vw, 1.25rem); color: var(--cream); }
@media (min-width: 900px) { .title-card { padding-top: clamp(120px, 20vh, 220px); } }

/* Working together: small gold numerals on gold hairlines; two columns on desktop. */
.together { padding: clamp(72px, 11vw, 144px) 0; }
.together .wrap { display: grid; gap: clamp(2.5rem, 5vw, 4rem); }
.together .head { display: grid; gap: 1.25rem; max-width: 36rem; }
.together h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
.together .head p { font-size: 1.15rem; color: var(--cream-soft); }
.sequence { list-style: none; padding: 0; display: grid; max-width: 46rem; counter-reset: shot; }
.sequence li {
  counter-increment: shot;
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  column-gap: 1rem;
  row-gap: 0.25rem;
  padding: 1.4rem 0 1.5rem;
  background: linear-gradient(90deg, rgba(212, 168, 83, 0.55), rgba(212, 168, 83, 0.08)) top / 100% 1px no-repeat;
}
.sequence li::before {
  content: "0" counter(shot);
  grid-row: 1 / 3;
  margin-top: 0.1rem;
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--gold);
}
.sequence strong { font-family: var(--serif); font-weight: 400; font-size: 1.45rem; line-height: 1.2; }
.sequence span { color: var(--cream-soft); }
.together .after { display: grid; gap: 1.1rem; max-width: 40rem; color: var(--cream-soft); }
.together .after .involved { font-family: var(--serif); font-size: clamp(1.4rem, 2.2vw, 1.75rem); line-height: 1.3; color: var(--cream); }

@media (min-width: 900px) {
  .together .wrap { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: start; column-gap: clamp(3rem, 7vw, 7rem); }
  .together .head { position: sticky; top: 40px; }
  .together .after { grid-column: 2; }
}

/* Closing: the burgundy band, the form on a dark sheet. */
.inquiry {
  background: linear-gradient(180deg, rgba(74, 21, 37, 0) 0%, rgba(74, 21, 37, 0.92) 22%, var(--burgundy) 100%);
}
.inquiry .wrap {
  display: grid;
  gap: 2.25rem clamp(2rem, 6vw, 6rem);
  padding-top: clamp(96px, 14vw, 176px);
  padding-bottom: clamp(72px, 10vw, 128px);
}
.inquiry .intro { display: grid; gap: 1.4rem; align-content: start; }
.inquiry h2 { font-size: clamp(2.4rem, 5.4vw, 4.5rem); max-width: 9em; }
.inquiry .intro p { max-width: 24rem; }
.sheet { background: var(--sheet); border-radius: calc(var(--radius) * 2); padding: clamp(20px, 4vw, 44px); max-width: 40rem; width: 100%; }

.preview-note, .not-sent { background: var(--burgundy); }
.btn--quiet { background: var(--wine); }
@media (hover: hover) and (pointer: fine) {
  .btn--quiet:hover { background: #7E2840; }
}
.field [aria-invalid="true"] { background: #A04456; }

.footer { background: var(--burgundy); }
.footer .wrap {
  display: flex; justify-content: center;
  padding-top: 1.5rem; padding-bottom: 3rem;
}

@media (min-width: 900px) {
  .inquiry .wrap { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
  .inquiry .intro { position: sticky; top: 40px; }
  .sheet { justify-self: end; }
}
