/* ============================================================
   alxrgreat
   ------------------------------------------------------------
   Two fluted shafts stand at the edges of the viewport, drawn
   entirely in gradients. Each flute is a concave groove: the
   wall turned toward the light catches it, the wall turned away
   falls into shadow, and the arris between them takes a thin
   highlight. Over that sits the shaft's own cylindrical falloff
   and a vertical mask that swells around 40% height — entasis,
   the convex curve Greek builders gave their columns so they
   would not read as concave.

   The page is sized to fit one screen at every common viewport;
   nothing here is meant to scroll.

   Ground is porphyry — the deep purple-red stone reserved for
   emperors, and used for royal portraits by Alexander's
   successors. Every colour is a custom property, so the whole
   scheme can be moved without touching a rule.
   ============================================================ */

/* ---------- fonts ---------------------------------------- */
/* Self-hosted: a Google Fonts CDN call would ship visitor IPs
   to a third country on every load, which EU courts have held
   against site operators. Both are variable, one file per
   family, latin subset, OFL. */

@font-face {
  font-family: 'Bodoni Moda';
  src: url('/fonts/bodoni-moda-latin.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Space Grotesk';
  src: url('/fonts/space-grotesk-latin.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- tokens --------------------------------------- */

:root {
  color-scheme: dark;

  /* Porphyry. Ratios against --ground, all AA or better:
     text 15.3:1, soft 10.7:1, mute 6.4:1, gold 9.1:1. */
  --ground:       #1a1117;
  --ground-lift:  #241820;   /* the signup panel sits on this */
  --ground-sunk:  #130c11;   /* the input well */

  --text:         #f0e9e0;
  --text-soft:    #cfc3b8;
  --text-mute:    #a2958c;
  --hair:         rgba(240, 233, 224, 0.16);

  /* On this ground gold is legible as text at 9.1:1, so unlike
     the light scheme there is no separate darker gold. */
  --gold:         #d6b25c;
  --gold-bright:  #e4c477;   /* button hover — lighter, since the label is dark */
  --gold-hair:    rgba(214, 178, 92, 0.42);
  --gold-glow:    rgba(214, 178, 92, 0.14);

  --error:        #f0907f;

  --serif: 'Bodoni Moda', 'Didot', 'Bodoni MT', Georgia, serif;
  --sans:  'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  --shaft: clamp(64px, 9.5vw, 168px);  /* width of one shaft */
  --flutes: 5;                         /* flutes across its visible face */

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- reset ---------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.7;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, p { margin: 0; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 1px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: 0; left: 50%;
  transform: translate(-50%, -120%);
  z-index: 10;
  padding: 0.7rem 1.2rem;
  background: var(--ground-lift);
  border: 1px solid var(--gold-hair);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: transform 200ms var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }

/* ---------- the shafts ----------------------------------- */

.entasis {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.pillar {
  position: absolute;
  top: 0;
  bottom: 0;
  width: var(--shaft);

  /* The shaft as a whole is a cylinder: lit across the inner
     face, falling away to shadow at both edges. */
  background-image: linear-gradient(90deg,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.26) 14%,
    rgba(214, 178, 92, 0.26) 42%,
    rgba(240, 233, 224, 0.17) 56%,
    rgba(0, 0, 0, 0.2) 76%,
    rgba(0, 0, 0, 0.55) 100%);

  /* Entasis, and the shaft running out of frame at both ends. */
  -webkit-mask-image: linear-gradient(to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.45) 13%,
    rgba(0, 0, 0, 0.95) 40%,
    rgba(0, 0, 0, 0.75) 66%,
    rgba(0, 0, 0, 0.28) 88%,
    transparent 100%);
  mask-image: linear-gradient(to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.45) 13%,
    rgba(0, 0, 0, 0.95) 40%,
    rgba(0, 0, 0, 0.75) 66%,
    rgba(0, 0, 0, 0.28) 88%,
    transparent 100%);
}

/* The flutes sit on their own layer so they can be faded out
   independently at the shaft's edges. That falloff is what makes
   the stone read as round: on a real column the grooves flatten
   and disappear as the surface turns away from you. Left flat,
   they read as painted stripes. The parent's vertical mask
   applies to this layer too. */
.pillar::before {
  content: '';
  position: absolute;
  inset: 0;
  /* One flute, left to right: the shadowed wall just past an
     arris, the hollow turning back toward the light, then the
     arris itself taking a thin warm highlight. */
  background-image: repeating-linear-gradient(90deg,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.24) 30%,
    rgba(214, 178, 92, 0.16) 62%,
    rgba(214, 178, 92, 0.36) 84%,
    rgba(244, 228, 194, 0.5) 94%,
    rgba(0, 0, 0, 0.5) 100%);
  background-size: calc(var(--shaft) / var(--flutes)) 100%;
  -webkit-mask-image: linear-gradient(90deg,
    transparent 0%, rgba(0, 0, 0, 0.55) 18%, #000 42%,
    rgba(0, 0, 0, 0.8) 66%, transparent 94%);
  mask-image: linear-gradient(90deg,
    transparent 0%, rgba(0, 0, 0, 0.55) 18%, #000 42%,
    rgba(0, 0, 0, 0.8) 66%, transparent 94%);
}

.pillar--left  { left: 0; }
/* Mirrored so both shafts turn their lit face toward the centre,
   which reads as one light source in front of the colonnade. */
.pillar--right { right: 0; transform: scaleX(-1); }

/* The shadow each shaft casts onto the wall behind it, and the
   wash that keeps the type clear of all of it. */
.entasis__light {
  position: absolute;
  inset: 0;
  background:
    /* the shafts throw the room into shadow at both edges */
    linear-gradient(90deg,
      rgba(0, 0, 0, 0.5) 0%,
      rgba(0, 0, 0, 0) calc(var(--shaft) + 10vw)),
    linear-gradient(270deg,
      rgba(0, 0, 0, 0.5) 0%,
      rgba(0, 0, 0, 0) calc(var(--shaft) + 10vw)),
    /* warm light falling from above, and a lift behind the type
       so it never sits on flat black */
    radial-gradient(78% 58% at 50% 4%,
      rgba(214, 178, 92, 0.13) 0%,
      rgba(214, 178, 92, 0) 68%),
    radial-gradient(70% 58% at 50% 44%,
      rgba(88, 58, 74, 0.5) 0%,
      rgba(52, 33, 44, 0.22) 48%,
      rgba(26, 17, 23, 0) 78%);
}

/* ---------- layout --------------------------------------- */
/* Everything below is sized against vh as well as vw so the page
   shrinks to fit rather than growing a scrollbar. */

.shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 38rem;
  margin: 0 auto;
  padding: clamp(1rem, 2.6vh, 2rem) clamp(1.5rem, 6vw, 2.5rem);
}

main { flex: 1; display: flex; flex-direction: column; justify-content: center; }

.masthead { padding-block-end: clamp(0.7rem, 2.2vh, 1.5rem); }

.wordmark {
  font-size: clamp(0.66rem, 1.5vh, 0.72rem);
  font-weight: 500;
  letter-spacing: 0.34em;
  color: var(--text-mute);
}

/* Still used on the prose pages. */
.rule {
  width: 34px;
  height: 0;
  margin: 0 0 clamp(0.9rem, 2.6vh, 1.6rem);
  border: 0;
  border-top: 1px solid var(--gold);
}

/* Alexander in profile wearing the horn of Ammon — the only
   figurative thing on the page. Sized by height, not width: it is
   taller than it is wide, and height is the scarce axis here. */
.mark { margin-block-end: clamp(0.3rem, 1.1vh, 0.8rem); }

.mark__art {
  display: block;
  height: clamp(48px, min(7vw, 8.5vh), 88px);
  width: auto;
  color: var(--gold);
}

.eyebrow {
  margin-block-end: clamp(0.35rem, 1.2vh, 0.7rem);
  color: var(--gold);
  font-size: clamp(0.64rem, 1.5vh, 0.72rem);
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

/* min() against vh is what keeps the headline from forcing a
   scrollbar on short, wide viewports. */
.headline {
  font-family: var(--serif);
  font-weight: 500;
  font-optical-sizing: auto;
  font-size: clamp(1.75rem, min(5.7vw, 5.6vh), 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.prose {
  margin-block-start: clamp(0.7rem, 2vh, 1.2rem);
  max-width: 31rem;
  color: var(--text-soft);
  font-size: clamp(0.875rem, min(1.05rem, 2vh), 1rem);
  line-height: 1.65;
}
.prose p + p { margin-block-start: 0.85em; }

/* The greeting reads as an address to the reader rather than body
   copy, so it takes the brighter ink the prose does not. */
.prose__welcome { color: var(--text); }

/* ---------- form ----------------------------------------- */

/* The form used to be a label and an underline sitting in the
   same column as the prose, which read as more body text. It is
   now a panel with its own surface, heading and filled button. */
.signup {
  margin-block-start: clamp(0.9rem, 2.6vh, 1.75rem);
  padding: clamp(0.85rem, 2.2vh, 1.35rem) clamp(1.05rem, 3vw, 1.65rem)
           clamp(0.75rem, 1.9vh, 1.15rem);
  background: var(--ground-lift);
  border: 1px solid var(--gold-hair);
  box-shadow:
    0 1px 0 rgba(240, 233, 224, 0.06) inset,
    0 18px 46px -20px rgba(0, 0, 0, 0.75),
    0 0 60px -30px var(--gold-glow);
}

.signup__title {
  font-family: var(--serif);
  font-weight: 500;
  font-optical-sizing: auto;
  font-size: clamp(1.15rem, min(3vw, 3.2vh), 1.5rem);
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--text);
  margin-block-end: clamp(0.5rem, 1.5vh, 0.85rem);
}

.field__label {
  display: block;
  font-size: clamp(0.64rem, 1.5vh, 0.72rem);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.field__input {
  display: block;
  width: 100%;
  margin-block-start: clamp(0.3rem, 0.9vh, 0.5rem);
  padding: clamp(0.55rem, 1.6vh, 0.8rem) 0.85rem;
  border: 1px solid var(--hair);
  border-radius: 2px;
  background: var(--ground);
  color: var(--text);
  font-family: var(--sans);
  font-size: clamp(0.9rem, 2vh, 1rem);
  line-height: 1.4;
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
.field__input::placeholder { color: var(--text-mute); opacity: 1; }
.field__input:hover { border-color: rgba(240, 233, 224, 0.32); }

.field__input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(214, 178, 92, 0.22);
}
.field__input:focus-visible { outline: none; }

.field__input[aria-invalid='true'] { border-color: var(--error); }

.field__error {
  margin-block-start: 0.5rem;
  color: var(--error);
  font-size: 0.82rem;
  line-height: 1.45;
}
.field__error--consent { margin-block-start: 0.4rem; }

.consent {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-block-start: clamp(0.7rem, 2vh, 1.15rem);
}

.consent__box {
  flex: none;
  width: 1rem;
  height: 1rem;
  margin: 0.28rem 0 0;
  accent-color: var(--gold);
  cursor: pointer;
}

.consent__label {
  color: var(--text-soft);
  font-size: clamp(0.8rem, 1.8vh, 0.875rem);
  line-height: 1.55;
  cursor: pointer;
}

/* Solid gold, full width. A ghost button was part of why the
   whole block read as prose. The label is the ground colour on
   gold, 9.1:1. Hover LIGHTENS: with a dark label, darkening the
   fill closes the contrast gap instead of opening it. */
.submit {
  display: block;
  width: 100%;
  margin-block-start: clamp(0.8rem, 2.4vh, 1.35rem);
  padding: clamp(0.7rem, 1.9vh, 0.95rem) 1.5rem;
  position: relative;
  border: 1px solid var(--gold);
  border-radius: 2px;
  background: var(--gold);
  color: var(--ground);
  font-family: var(--sans);
  font-size: clamp(0.68rem, 1.5vh, 0.76rem);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 200ms var(--ease), border-color 200ms var(--ease);
}

.submit:hover:not(:disabled) {
  background-color: var(--gold-bright);  /* 10.96:1 with the dark label */
  border-color: var(--gold-bright);
}

.submit:disabled {
  cursor: default;
  background-color: rgba(214, 178, 92, 0.4);
  border-color: transparent;
}

.submit__spinner {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(26, 17, 23, 0.35);
  border-top-color: var(--ground);
  border-radius: 50%;
  opacity: 0;
  animation: spin 800ms linear infinite;
}

.submit.is-loading .submit__label { opacity: 0; }
.submit.is-loading .submit__spinner { opacity: 1; }

@keyframes spin { to { transform: rotate(360deg); } }

.privacy-note {
  margin-block-start: clamp(0.7rem, 1.9vh, 1.1rem);
  max-width: 29rem;
  color: var(--text-mute);
  font-size: clamp(0.72rem, 1.6vh, 0.8rem);
  line-height: 1.6;
}
.privacy-note a { text-underline-offset: 0.2em; text-decoration-color: var(--hair); }
.privacy-note a:hover { text-decoration-color: var(--gold); }

/* ---------- success -------------------------------------- */

.done__title {
  font-family: var(--serif);
  font-weight: 500;
  font-optical-sizing: auto;
  font-size: clamp(1.5rem, min(4.4vw, 4.4vh), 2.2rem);
  line-height: 1.2;
}

.done__body {
  margin-block-start: 0.9rem;
  max-width: 29rem;
  color: var(--text-soft);
  font-size: clamp(0.85rem, 1.9vh, 0.95rem);
}

.done__email { color: var(--text); }

/* ---------- prose pages (privacy, 404) ------------------- */
/* These are the one place scrolling is expected. */

.shell--doc { max-width: 42rem; min-height: 100vh; }

.masthead--doc { padding-block-end: clamp(2.5rem, 9vh, 5rem); }
.masthead--doc .wordmark { text-decoration: none; }

.doc { display: block; color: var(--text-soft); font-size: 0.95rem; line-height: 1.75; }

.doc__title {
  font-family: var(--serif);
  font-weight: 500;
  font-optical-sizing: auto;
  font-size: clamp(2.1rem, 6.5vw, 3.1rem);
  line-height: 1.14;
  letter-spacing: -0.012em;
  color: var(--text);
}

.doc__lede {
  margin-block-start: 1.4rem;
  max-width: 34rem;
  font-size: 1.0125rem;
}

.doc h2 {
  margin-block: clamp(2.75rem, 7vh, 4rem) 0.9rem;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.doc p, .doc ul { max-width: 34rem; }
.doc p + p,
/* a paragraph following the list needs the same gap; without this the
   prose collides with the last bullet */
.doc ul + p { margin-block-start: 1.1rem; }

.doc ul {
  margin-block: 1.1rem 0;
  padding-inline-start: 1.1rem;
  list-style: none;
}
.doc li { position: relative; margin-block-start: 0.5rem; }
.doc li::before {
  content: '';
  position: absolute;
  left: -1.1rem;
  top: 0.82em;
  width: 4px;
  height: 1px;
  background: var(--text-mute);
}

.doc strong { color: var(--text); font-weight: 500; }

.doc a { text-underline-offset: 0.2em; text-decoration-color: var(--hair); }
.doc a:hover { text-decoration-color: var(--gold); }

/* ---------- footer --------------------------------------- */

.footer {
  display: flex;
  gap: clamp(0.75rem, 2.5vw, 1.5rem);
  align-items: center;
  justify-content: space-between;
  padding-block-start: clamp(1rem, 3vh, 2.25rem);
  color: var(--text-mute);
  font-size: clamp(0.66rem, 1.5vh, 0.74rem);
  letter-spacing: 0.1em;
}
.footer a { text-decoration: none; }
.footer__name, .footer__link { white-space: nowrap; }
/* Direct children only, so the social links keep their own hover.
   Matching on the element rather than a class means privacy.html and
   404.html, which have plain footer links, still get it. */
.footer > a:hover { color: var(--text-soft); }

/* ---------- socials -------------------------------------- */

.social {
  display: flex;
  gap: clamp(0.3rem, 1.4vw, 0.6rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.social__link {
  display: grid;
  place-items: center;
  /* 36px: comfortably past the 24px WCAG 2.2 minimum target, and big
     enough to hit on a phone without a stylus. */
  width: 36px;
  height: 36px;
  border: 1px solid var(--gold-hair);
  border-radius: 50%;
  color: var(--gold);
  transition: background-color 200ms var(--ease), border-color 200ms var(--ease),
              color 200ms var(--ease);
}

.social__icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Same inversion as the submit button: gold fills, the mark goes dark.
   9.1:1 either way round. */
.social__link:hover,
.social__link:focus-visible {
  background-color: var(--gold);
  border-color: var(--gold);
  color: var(--ground);
}

/* ---------- motion --------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: reveal 1100ms var(--ease) var(--delay, 0ms) forwards;
}

@keyframes reveal {
  to { opacity: 1; transform: none; }
}

/* The shafts arrive on their own, slower and without movement. */
.pillar {
  opacity: 0;
  animation: rise 2200ms var(--ease) 200ms forwards;
}

@keyframes rise {
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .pillar { opacity: 1; transform: none; animation: none; }
  .pillar--right { transform: scaleX(-1); }
  .submit__spinner { animation-duration: 2400ms; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* ---------- wide screens: the mark moves beside the text ---- */
/* Detailed artwork needs about 160px to read, and there is no
   vertical room for that. There is plenty of horizontal room —
   the content column is 38rem inside a 1440px viewport — so on
   a wide screen the mark sits alongside instead of above, and
   costs no height at all. */

@media (min-width: 62rem) and (min-height: 33rem) {
  .shell { max-width: 63rem; }

  /* Two items, one row. An earlier version put all five children in
     the grid and spanned the mark with grid-row: 1 / -1 — with no
     explicit rows that resolves to row 1 only, and the eyebrow's row
     was stretched to the mark's height, wasting ~150px. */
  /* .split only. Applied to every main it also caught 404.html and the
     confirmation pages, whose rule, headline and prose then auto-placed
     into two columns and threw the headline off to the right. */
  main.split {
    display: grid;
    grid-template-columns: auto minmax(0, 38rem);
    column-gap: clamp(1.75rem, 3.4vw, 3.25rem);
    align-items: start;
    align-content: center;
    justify-content: center;
  }

  .mark {
    margin-block-end: 0;
    /* sit the helmet's crown with the eyebrow, not above it */
    margin-block-start: 0.4rem;
  }

  .mark__art { height: clamp(132px, min(15vw, 23vh), 224px); }
}

/* ---------- narrow screens ------------------------------- */

@media (max-width: 40rem) {
  /* Narrower shafts, and set further back, so they frame the
     text on a phone instead of crowding it. */
  :root { --shaft: clamp(32px, 12vw, 68px); --flutes: 3; }
  .pillar { opacity: 0; animation: rise-faint 2200ms var(--ease) 200ms forwards; }
  @keyframes rise-faint { to { opacity: 0.55; } }

  /* Phone viewports are short enough that the vh clamps bottom
     out and the page overflows by a few dozen pixels. Pull the
     floors down so it still lands on one screen. */
  .shell { padding-block: clamp(0.7rem, 1.7vh, 1.2rem); }
  .masthead { padding-block-end: clamp(0.45rem, 1.9vh, 1.1rem); }
  .headline { font-size: clamp(1.65rem, 8.2vw, 2.4rem); }
  .prose { font-size: 0.85rem; line-height: 1.5; }
  .signup { margin-block-start: clamp(0.6rem, 1.8vh, 1.2rem); }

  .privacy-note { font-size: 0.7rem; line-height: 1.5; margin-block-start: 0.6rem; }
  /* vh as well as vw, so a tall phone gets a mark big enough to
     make out and a short one still fits on a single screen */
  .mark__art { height: clamp(38px, min(13vw, 6.2vh), 64px); }
  .eyebrow { margin-block-end: 0.3rem; letter-spacing: 0.2em; }
  .footer { padding-block-start: clamp(1rem, 3vh, 2rem); }
}

@media (max-width: 30rem) {
  .submit { width: 100%; }
  /* One row rather than two stacked lines: the icons then cost less
     height than the old wordmark-over-Privacy stack did. */
  .footer { flex-wrap: nowrap; gap: 0.5rem; padding-block-start: clamp(0.8rem, 2.4vh, 1.6rem); }
  .social__link { width: 32px; height: 32px; }
  .social__icon { width: 15px; height: 15px; }
}

/* Very short viewports — landscape phones, split screens. Let it
   scroll rather than clipping the form out of reach. */
@media (max-height: 34rem) {
  .shell { min-height: 0; }
}
