/* ==========================================================================
   ALVEUS GROUP — design system. "RAW · STRUCTURED · RARE."

   The light house. Both houses live in the dark — Ramus Regalis in the
   forest, Alveus Events by the fire. The group above them lives in
   daylight: clean sand under a warm copper air, earth for ink, black
   reserved for doors. The dark enters the page exactly three times —
   the two house cards, one manifesto band, and the close of the footer.

   The signature moves twice, both almost imperceptibly: concentric rings
   turning behind the hero lockup (the structure that holds the houses),
   and every so often a sheen of light drifting across the sand, like
   light over linen. Nothing else moves without being asked.

   Faces per the book: Technor Variable (headings, titles, the logo name),
   Avenir for body — substituted with Mulish until Avenir is licensed.
   ========================================================================== */

:root {
  /* ---- Brand pillars (from the brand book) ---- */
  --matte-black: #101010;
  --earth:       #3d2a25;
  --copper:      #93511d;
  --sand:        #f0e1ce;

  /* ---- Working ramps ---- */
  --ground:        #f4e6cf;                      /* the page ground — sand warmed with copper */
  --sand-warm:     #eedcc0;                      /* deeper copper-warmed passages */
  --sand-bright:   #faf5ee;                      /* highlights on dark          */
  --earth-deep:    #1a1210;                      /* ink — matte black, warmed   */
  --copper-bright: #c07e3c;                      /* fine copper on light        */
  --copper-soft:   #dda468;                      /* copper on dark              */
  --black-lift:    #191512;                      /* raised surfaces on black    */

  /* ---- On light ---- */
  --text:     var(--earth-deep);
  --muted:    rgba(26, 18, 16, 0.76);
  --quiet:    rgba(26, 18, 16, 0.52);
  --hairline: rgba(26, 18, 16, 0.15);
  --fill:     rgba(26, 18, 16, 0.05);

  /* ---- On dark (cards, manifesto, footer) ---- */
  --sand-on-dark:     var(--sand);
  --muted-on-dark:    rgba(240, 225, 206, 0.68);
  --quiet-on-dark:    rgba(240, 225, 206, 0.45);
  --hairline-on-dark: rgba(240, 225, 206, 0.12);
  --fill-on-dark:     rgba(240, 225, 206, 0.05);

  --display: "Technor", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Mulish", "Avenir", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Structured, not sharp: soft corners reserved for objects, not layout. */
  --radius: 22px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --wrap: 720px;
  --wrap-wide: 1120px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 116px; /* sticky header clearance for anchor jumps */
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--body);
  font-size: 15.5px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

::selection { background: var(--copper); color: var(--sand-bright); }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }

.skip {
  position: absolute; left: -9999px; top: 12px; z-index: 100;
  padding: 10px 18px; background: var(--earth-deep); color: var(--sand-bright);
  font-family: var(--display); font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase;
  border-radius: 999px;
}
.skip:focus { left: 12px; }

/* ---- Type --------------------------------------------------------------- */
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: 0.015em;
  margin: 0 0 0.55em;
  color: var(--earth-deep);
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h1 em, h2 em { font-style: normal; color: var(--copper); }

p { margin: 0 0 1em; }

/* Tracked-out Technor microlabels — the book sets its titles this way.
   Section labels carry a short copper rule; the hero label stands alone. */
.label {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--copper);
  margin: 0 0 2em;
}
.label.wide { letter-spacing: 0.5em; }
.wrap > .label:not(.wide)::before {
  content: "";
  display: inline-block;
  width: 28px; height: 1px;
  background: var(--copper);
  margin-right: 16px;
  vertical-align: middle;
}

.lede {
  font-size: clamp(1.02rem, 1.5vw, 1.15rem);
  line-height: 1.9;
  color: var(--muted);
  max-width: 33em;
}
.section-lede { color: var(--muted); max-width: 34em; line-height: 1.9; }

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

/* ---- Buttons — slim pills, quiet until touched --------------------------- */
.btn {
  display: inline-block;
  padding: 15px 32px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--display);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.4s var(--ease), color 0.4s var(--ease),
              border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.btn.copper {
  background: linear-gradient(135deg, var(--copper-bright), var(--copper));
  color: var(--sand-bright);
}
.btn.copper:hover {
  background: linear-gradient(135deg, var(--copper-soft), var(--copper-bright));
  box-shadow: 0 14px 34px -14px rgba(147, 81, 29, 0.5);
}
.btn.ghost {
  background: transparent;
  border-color: rgba(26, 18, 16, 0.3);
  color: var(--earth-deep);
}
.btn.ghost:hover { border-color: var(--copper); color: var(--copper); }
.btn.small { padding: 11px 26px; font-size: 0.6rem; }

/* ---- Header ------------------------------------------------------------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 10px clamp(22px, 4vw, 52px);
  background: rgba(244, 230, 207, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
}

/* The brand is a door: the mark opens the directory of every house site. */
.brand-menu { position: relative; }
.brand-menu > summary {
  display: flex; align-items: center; gap: 12px;
  list-style: none; cursor: pointer;
  /* Clear space per the brand book: half the icon height kept free. */
  padding: 12px 12px 12px 0;
}
.brand-menu > summary::-webkit-details-marker { display: none; }
/* 48px tall ⇒ ~110px wide — above the book's 100px lockup minimum. */
.brand-menu > summary img { height: 48px; width: auto; display: block; transition: opacity 0.3s var(--ease); }
.brand-menu > summary:hover img { opacity: 0.75; }
.brand-caret {
  width: 6px; height: 6px; margin-left: 2px;
  border-right: 1px solid var(--quiet);
  border-bottom: 1px solid var(--quiet);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.3s var(--ease);
}
.brand-menu[open] .brand-caret { transform: rotate(225deg) translateY(-1px); }

/* The directory stays dark — the doors to the houses, and the white marks
   live on dark ground per the book. */
.house-directory {
  position: absolute; left: 0; top: calc(100% + 10px);
  min-width: 340px;
  background: rgba(16, 16, 16, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius);
  box-shadow: 0 40px 80px -28px rgba(44, 30, 26, 0.55);
  padding: 20px 0 10px;
  overflow: hidden;
}
.dir-label {
  font-family: var(--display); font-weight: 500;
  font-size: 0.56rem; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--quiet-on-dark);
  margin: 0 24px 12px;
}
.dir-entry {
  display: flex; align-items: center; gap: 16px;
  padding: 13px 24px;
  text-decoration: none; color: var(--sand-on-dark);
  border-top: 1px solid var(--hairline-on-dark);
  transition: background 0.3s var(--ease);
}
.dir-entry:hover { background: var(--fill-on-dark); }
.dir-entry img { width: 52px; height: 40px; object-fit: contain; flex: none; }
.dir-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dir-name {
  font-family: var(--display); font-weight: 500;
  font-size: 0.84rem; letter-spacing: 0.14em; text-transform: uppercase;
}
.dir-line { font-size: 0.76rem; color: var(--quiet-on-dark); white-space: nowrap; }
.dir-arrow { margin-left: auto; color: var(--copper-soft); }
.dir-entry.current .dir-name { color: var(--copper-soft); }

.head-nav { display: flex; gap: clamp(18px, 3.4vw, 40px); }
.head-nav a {
  font-family: var(--display); font-size: 0.62rem; font-weight: 500;
  letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  padding-bottom: 3px;
  background: linear-gradient(var(--copper), var(--copper)) left bottom / 0 1px no-repeat;
  transition: color 0.35s var(--ease), background-size 0.35s var(--ease);
}
.head-nav a:hover { color: var(--earth-deep); background-size: 100% 1px; }

/* ---- Hero ---------------------------------------------------------------- */
/* Daylight: sand, with a warm copper air breathing at the top of the page. */
.hero {
  /* Tall enough that the 740px medallion always sits whole, with air above
     and below — on short windows the page scrolls; the circle never breaks. */
  min-height: max(calc(100svh - 68px), 930px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 70px 24px 90px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(80% 62% at 50% -14%, rgba(147, 81, 29, 0.22) 0%, rgba(147, 81, 29, 0.07) 42%, transparent 68%),
    linear-gradient(180deg, var(--sand-warm) 0%, var(--ground) 55%);
}

/* The signature — the medallion. A FIXED 740px object: the words are
   composed inside it once, and that relationship never changes with the
   window (phones crop the sides symmetrically, which reads as intent).
   The dashed minute track holds still; a single copper tick jumps from
   dash to dash. */
.hero-rings {
  position: absolute;
  left: 50%; top: 50%;
  width: 740px; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  color: var(--copper);
  opacity: 0.4;
  pointer-events: none;
}
.hero-rings svg { width: 100%; height: 100%; display: block; }
/* One mechanism, two hands: the tick laps the dial in 60s; the drip under
   the cue fires only as the tick crosses the bottom (30s) and as it
   completes the lap (60s) — they meet, then both go quiet. */
.ring-tick {
  transform-origin: 400px 400px;
  animation: ring-turn 60s steps(128, end) infinite;
}
@keyframes ring-turn { to { transform: rotate(360deg); } }

/* Everything the hero says sits INSIDE the medallion — the words live
   in the centre of the structure, never across its lines. */
.hero-inner { position: relative; max-width: 620px; display: flex; flex-direction: column; align-items: center; }
/* Stacked lockup: 104px keeps it above the book's 100px minimum. */
.hero-mark { height: clamp(104px, 12vw, 112px); width: auto; margin-bottom: 24px; }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.3rem); }
.hero .label { margin-bottom: 2em; }
.hero .lede { font-size: 1rem; max-width: 30em; margin-bottom: 1.4em; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.hero-cue {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  text-decoration: none; color: var(--quiet);
  font-family: var(--display); font-size: 0.56rem; letter-spacing: 0.44em; text-transform: uppercase;
  white-space: nowrap;
}
.hero-cue i {
  width: 1px; height: 40px;
  background: linear-gradient(180deg, var(--copper), transparent);
  /* 30s period. The drip draws in early (26.4s), then HOLDS fully drawn so
     that at the stroke of 30s — the instant the tick lands at the bottom of
     the dial — both lines stand together. Only then, as the next period
     begins, does the drip melt away while the tick moves on. */
  animation: cue-drip 30s var(--ease) infinite;
  transform: scaleY(0);
}
@keyframes cue-drip {
  /* Stand together a full second after the meet, then melt. */
  0%, 3.4%  { transform: scaleY(1); transform-origin: bottom; }
  8.4%      { transform: scaleY(0); transform-origin: bottom; }
  8.5%, 88% { transform: scaleY(0); transform-origin: top; }
  93%, 100% { transform: scaleY(1); transform-origin: top; }
}

/* ---- Ledger — one quiet line of record ----------------------------------- */
.ledger {
  padding: clamp(44px, 6vw, 64px) 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.ledger-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.ledger .entry {
  padding: 10px clamp(20px, 3vw, 40px);
  border-left: 1px solid var(--hairline);
  display: flex; flex-direction: column; gap: 10px;
}
.ledger .entry:first-child { border-left: none; padding-left: 28px; }
.ledger .figure {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  line-height: 1; color: var(--earth-deep);
}
.ledger .entry .label { margin: 0; color: var(--quiet); font-size: 0.56rem; }

/* ---- Beats ----------------------------------------------------------------- */
.beat { padding: clamp(110px, 14vw, 190px) 0; }

/* Charter: no boxes — a numbered reading, ruled with hairlines. */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(36px, 5vw, 64px);
  margin-top: clamp(40px, 5vw, 64px);
}
.pillar { border-top: 1px solid var(--hairline); padding-top: 30px; }
.pillar .numeral {
  display: block;
  font-family: var(--display); font-weight: 300;
  font-size: 2.6rem; line-height: 1;
  color: var(--copper);
  margin-bottom: 22px;
}
.pillar-h {
  font-family: var(--display);
  font-size: 0.9rem; font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--earth-deep);
  margin-bottom: 1em;
}
.pillars p { color: var(--muted); font-size: 0.92rem; line-height: 1.9; margin: 0; }

/* ---- The houses — two dark doors in the light ------------------------------ */
.houses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(24px, 3vw, 36px);
  margin-top: clamp(40px, 5vw, 64px);
}
/* Matte-black cards on the sand: lit doorways into each house's own world.
   White logos on dark ground, per the book. */
.house {
  display: flex; flex-direction: column; gap: 20px;
  padding: clamp(32px, 3.8vw, 52px);
  background:
    radial-gradient(120% 90% at 85% -10%, rgba(147, 81, 29, 0.38), transparent 55%),
    linear-gradient(160deg, #221a15 0%, var(--matte-black) 58%);
  border-radius: var(--radius);
  box-shadow: 0 40px 80px -36px rgba(44, 30, 26, 0.45);
  text-decoration: none; color: var(--sand-on-dark);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.house:hover { transform: translateY(-5px); box-shadow: 0 52px 96px -38px rgba(44, 30, 26, 0.55); }
.house-status {
  align-self: flex-start;
  font-family: var(--display); font-weight: 500;
  font-size: 0.56rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--copper-soft);
}
.house-logo { align-self: flex-start; width: auto; }
.house-logo.rr { height: 96px; }
.house-logo.ae { height: 60px; margin: 18px 0; }
.house p { color: var(--muted-on-dark); font-size: 0.94rem; line-height: 1.85; margin: 0; }
.house-foot {
  margin-top: auto; padding-top: 18px;
  border-top: 1px solid var(--hairline-on-dark);
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.house-motto {
  font-family: var(--display); font-weight: 500;
  font-size: 0.64rem; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--quiet-on-dark);
}
.house-visit {
  font-family: var(--display); font-weight: 500;
  font-size: 0.6rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--copper-soft);
  transition: color 0.3s var(--ease), letter-spacing 0.3s var(--ease);
}
.house:hover .house-visit { color: var(--sand-bright); letter-spacing: 0.28em; }

/* ---- Manifesto — the one dark band ------------------------------------------ */
.manifesto {
  text-align: center;
  background:
    radial-gradient(90% 75% at 50% 122%, var(--copper-bright) 0%, #6d3f1a 32%, #241710 62%, var(--matte-black) 88%);
}
.manifesto .wrap { display: flex; flex-direction: column; align-items: center; }
.manifesto h2 { color: var(--sand-bright); }
.manifesto .section-lede { color: rgba(240, 225, 206, 0.75); margin: 0 auto; }
.manifesto-mark { height: 58px; width: auto; margin-bottom: 34px; opacity: 0.95; }

/* ---- Correspondence — hairline fields, no box -------------------------------- */
.correspondence {
  margin-top: clamp(44px, 6vw, 64px);
  display: flex; flex-direction: column; gap: 34px;
  max-width: 560px;
}
.fld { display: flex; flex-direction: column; gap: 10px; }
.fld label {
  font-family: var(--display); font-weight: 500;
  font-size: 0.58rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--quiet);
}
.fld input, .fld textarea {
  font-family: var(--body); font-size: 1.02rem; line-height: 1.7;
  color: var(--earth-deep);
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(26, 18, 16, 0.26);
  border-radius: 0;
  padding: 6px 2px 12px;
  resize: vertical;
  transition: border-color 0.35s var(--ease);
}
.fld input::placeholder, .fld textarea::placeholder { color: rgba(26, 18, 16, 0.35); }
.fld input:focus, .fld textarea:focus { outline: none; border-color: var(--copper); }
.correspondence .btn { align-self: flex-start; margin-top: 6px; }
.form-status { margin: 0; color: var(--copper); font-size: 0.95rem; min-height: 1.4em; }

/* ---- Footer — the close, in the dark ---------------------------------------- */
.site-foot {
  background: var(--matte-black);
  padding: clamp(60px, 8vw, 100px) 24px 48px;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  text-align: center;
}
.site-foot > img { height: 58px; width: auto; opacity: 0.9; }
.foot-houses { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.foot-houses a {
  font-family: var(--display); font-weight: 500;
  font-size: 0.62rem; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--muted-on-dark); text-decoration: none;
  transition: color 0.3s var(--ease);
}
.foot-houses a:hover { color: var(--copper-soft); }
.foot-houses span { color: var(--quiet-on-dark); }
.site-foot p { margin: 0; color: var(--quiet-on-dark); font-size: 0.8rem; letter-spacing: 0.04em; }
.site-foot .foot-legal { font-size: 0.72rem; opacity: 0.8; }
.foot-tag {
  font-family: var(--display); font-weight: 500;
  font-size: 0.56rem; letter-spacing: 0.44em; text-transform: uppercase;
  color: var(--copper-soft);
  margin-top: 4px;
}

/* ---- Reveals ---------------------------------------------------------------------- */
/* Only hide when JS is present to show again; --rd staggers siblings. */
html[data-js] .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1.1s var(--ease) var(--rd, 0s), transform 1.1s var(--ease) var(--rd, 0s);
}
html[data-js] .reveal.lit { opacity: 1; transform: none; }

/* ---- Responsive ------------------------------------------------------------------- */
@media (max-width: 760px) {
  .head-nav { display: none; }
  /* 44px tall ⇒ ~101px wide — still at the lockup minimum on small screens. */
  .brand-menu > summary img { height: 44px; }
  .house-directory { min-width: 280px; }
  .dir-line { white-space: normal; }
  .ledger .entry { border-left: none; border-top: 1px solid var(--hairline); padding: 20px 28px; }
  .ledger .entry:first-child { border-top: none; }
}

/* ---- Reduced motion ---------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ring-tick, .hero-cue i { animation: none; }
  html[data-js] .reveal { opacity: 1; transform: none; transition: none; }
}
