/* Aubade — hero

   The plate is a single clear glass form turning slowly against a dawn
   gradient, blue at top right, peach at bottom left. The form holds the
   middle third of the frame (31-69% across) and reads 0.8:1 — nothing can
   be set over it. Everything outside it is clean, 10-15:1 for a dark ink,
   so the copy takes the left column and the crop nudges the form right to
   clear it. The letters still carry a light halo for the edges they pass.
   Nothing is laid over the footage. */

:root {
  --paper: #E3DCEB;   /* the gradient's mid tone: page ground and poster fallback */
  --ink:   #1E2A3C;   /* the navy inside the glass */
  --dim:   rgba(30, 42, 60, .82);
  --hair:  rgba(30, 42, 60, .28);
  --halo:  0 0 1px rgba(240, 236, 240, .9), 0 0 14px rgba(240, 236, 240, .85),
           0 0 30px rgba(240, 236, 240, .6);

  --gutter: clamp(1.25rem, 4vw, 4rem);
  --ease:   cubic-bezier(.2, .7, .2, 1);

  --display: "Instrument Serif", Georgia, serif;
  --text:    "Figtree", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

:where(a):focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--paper);
  border-radius: 6px;
}

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 0% 50%;
  z-index: 0;
}

.topbar, .hero__copy { position: relative; z-index: 1; }

/* ---------- top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1rem, 2.4vh, 1.6rem) var(--gutter);
  text-shadow: var(--halo);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--display);
  font-size: 2rem;
  line-height: 1;
}
.mark { width: 30px; height: 30px; flex: none; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 2.4vw, 2.4rem);
  font-size: .95rem;
  font-weight: 600;
}
.nav__links { display: contents; }
.nav__link { color: var(--dim); transition: color .25s var(--ease); }
.nav__link:hover, .nav__link[aria-current="page"] { color: var(--ink); }

/* Sign in is filled with the plate's white so it reads on any part of the
   flow: the control's own footprint, not a layer over the footage. */
.nav__signin {
  padding: .55rem 1.15rem;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--hair);
  text-shadow: none;
  transition: border-color .25s var(--ease);
}
.nav__signin:hover { border-color: var(--ink); }

/* ---------- copy ---------- */

/* centred both ways in the space under the bar */
.hero__copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem var(--gutter) clamp(3rem, 10vh, 6rem);
  max-width: min(30rem, 36%);
  text-shadow: var(--halo);
}

.title {
  margin: 0;
  max-width: 11ch;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.8rem, 4.6vw, 4.6rem);
  line-height: 1;
  letter-spacing: -.015em;
  text-wrap: balance;
}

.lede {
  margin: 1.25rem 0 0;
  max-width: 34ch;
  color: var(--dim);
  font-size: clamp(1.05rem, 1.35vw, 1.3rem);
  font-weight: 500;
  line-height: 1.5;
}

.btn {
  display: inline-flex;
  margin-top: 1.9rem;
  padding: .7rem 1.35rem;
  border-radius: 999px;
  font-size: .95rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-shadow: none;
  transition: background-color .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { background: #33315A; }
.btn:active { transform: translateY(1px); }

/* ---------- entrance ---------- */

@media (prefers-reduced-motion: no-preference) {
  .brand, .nav__link, .nav__signin, .title, .lede, .btn {
    opacity: 0;
    animation: rise .9s var(--ease) forwards;
  }
  .nav__link:nth-child(1) { animation-delay: .08s; }
  .nav__link:nth-child(2) { animation-delay: .12s; }
  .nav__link:nth-child(3) { animation-delay: .16s; }
  .nav__link:nth-child(4) { animation-delay: .2s; }
  .nav__signin { animation-delay: .24s; }
  .title { animation-delay: .35s; }
  .lede  { animation-delay: .5s; }
  .btn   { animation-delay: .62s; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- phones ----------
   The links get a row of their own under the brand. */

/* Tablets: the window onto the plate is narrower, so slide the crop further
   left to keep the form off the copy. */
@media (max-width: 899px) {
  .hero__video { object-position: 12% 50%; }
  .hero__copy  { max-width: 34rem; }
}

@media (max-width: 599px) {
  /* Cropped to fill, the form is wider than the screen and lands on the copy.
     So on phones it stops filling: the plate drops to its own 16:9 and sits
     low in the frame, at the size it was shot. The page carries the plate's
     own dawn gradient behind it and the plate's edges are feathered into it,
     so there is no seam to see and still nothing laid over the footage. */
  .hero {
    background:
      radial-gradient(135% 62% at 88% 2%, rgba(150, 208, 246, .5), transparent 60%),
      linear-gradient(180deg, #CCD5EE 0%, #DFDAEC 28%, #EFE2E6 52%, #FBEAE2 78%, #F6DACB 100%);
  }
  .hero__video {
    position: static;
    order: 1;          /* the plate is first in the markup; here it reads last */
    flex: 0 0 auto;
    width: 100%;
    height: min(56.25vw, 30svh);
    margin-block: auto;      /* ...so the form sits centred in what is left */
    object-position: 50% 50%;
    -webkit-mask-image: radial-gradient(31% 72% at 50% 50%, #000 60%, transparent 100%);
    mask-image: radial-gradient(31% 72% at 50% 50%, #000 60%, transparent 100%);
  }
  .hero__copy {
    flex: 0 1 auto;          /* stop the copy swallowing the slack... */
    justify-content: flex-start;
    max-width: 19rem;
    padding: 1rem var(--gutter) 1.25rem;
  }
  .topbar {
    display: grid;
    grid-template-columns: 1fr auto;
    row-gap: .9rem;
  }
  .nav { display: contents; }
  .brand       { grid-row: 1; grid-column: 1; font-size: 1.8rem; }
  .mark        { width: 26px; height: 26px; }
  .nav__signin { grid-row: 1; grid-column: 2; padding: .45rem 1rem; font-size: .9rem; }
  .nav__links  { grid-row: 2; grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; font-size: .88rem; }
  .btn { margin-top: 1.5rem; padding: .62rem 1.2rem; font-size: .92rem; }
}

/* ---------- short, wide screens (a phone on its side) ----------
   There is barely any height, so the type steps down and the gaps close up. */

@media (max-height: 460px) and (orientation: landscape) {
  /* Here the plate fills the width exactly, so the form is pinned to the
     middle third and the copy has to clear 31% of the viewport. */
  .hero__copy { padding-block: .75rem 1.25rem; max-width: 25%; }
  .title { font-size: clamp(1.6rem, 4.4vh, 2.2rem); max-width: 9ch; }
  .lede  { margin-top: .5rem; font-size: .88rem; line-height: 1.4; }
  .btn   { margin-top: .85rem; padding: .6rem 1.15rem; font-size: .9rem; }
  .topbar { padding-block: .5rem; }
}

/* ---------- the smallest phones ----------
   Two rows of links and a tall measure leave little room, so the type steps
   down and the plate takes a shorter band. The form still clears it whole. */

@media (max-width: 360px) {
  .title { font-size: 2.4rem; }
  .lede  { font-size: .95rem; }
  .btn   { margin-top: 1.25rem; }
  .hero__copy  { padding-block: .75rem 1rem; }
  .hero__video { height: min(56.25vw, 26svh); }
}
