/* ============================================================================
   EZEME — the House of Ezeme
   One memorable element: THE REGISTER — a ruled ledger of houses and
   companies with hanging numerals. Everything else stays quiet.
   ========================================================================== */

@import url("tokens.css");

@font-face { font-display: swap; }

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

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

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--kaolin-100);
  font-family: var(--serif);
  font-size: var(--step-0);
  line-height: 1.62;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* --- Focus: always visible, never removed -------------------------------- */
:focus-visible {
  outline: 2px solid var(--camwood-400);
  outline-offset: 3px;
  border-radius: var(--radius);
}
.family-scope :focus-visible { outline-color: var(--kaolin-100); }

/* --- Typography ---------------------------------------------------------- */
h1, h2, h3 { font-weight: 500; line-height: 1.12; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: clamp(2.4rem, 6vw, var(--step-7)); }
h2 { font-size: clamp(1.5rem, 3.2vw, var(--step-4)); }
h3 { font-size: var(--step-1); line-height: 1.3; }

p { margin: 0 0 var(--space-m); max-width: var(--measure); }
p.lede { font-size: var(--step-2); line-height: 1.42; color: var(--kaolin-100); max-width: 34ch; }
p.note { font-size: var(--step--1); color: var(--muted-400); max-width: var(--measure); }

a { color: var(--kaolin-100); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }

.motto {
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--step-3);
  line-height: 1.28;
  letter-spacing: -0.01em;
  max-width: 26ch;
}
.motto .translation {
  display: block;
  font-style: normal;
  font-family: var(--sans);
  font-size: var(--step--1);
  color: var(--muted-400);
  margin-top: var(--space-s);
  letter-spacing: 0.01em;
}

/* Small functional text: sentence case, never tracked-out caps. */
.func {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 400;
  color: var(--muted-400);
  line-height: 1.5;
}

/* --- Layout -------------------------------------------------------------- */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
section { padding-block: var(--space-2xl); border-top: 1px solid var(--rule); }
section:first-of-type { border-top: 0; }
.split { display: grid; gap: var(--space-xl); grid-template-columns: 1fr; }
@media (min-width: 62rem) {
  .split { grid-template-columns: 15rem 1fr; }
  .split > .aside { position: sticky; top: var(--space-l); align-self: start; }
}

/* --- Masthead ------------------------------------------------------------ */
.masthead {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--space-m); padding-block: var(--space-m);
  border-bottom: 1px solid var(--rule);
}
.wordmark {
  font-family: var(--serif); font-size: var(--step-1);
  letter-spacing: -0.02em; font-weight: 600;
}
.wordmark:hover { text-decoration: none; }
.nav { display: flex; gap: var(--space-m); flex-wrap: wrap; }
.nav a { font-family: var(--sans); font-size: var(--step--1); color: var(--kaolin-300); }
.nav a:hover { color: var(--kaolin-100); }
.nav a[aria-current="page"] { color: var(--kaolin-100); }

/* --- The register: hanging numerals, hairline rules ---------------------- */
.register { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.register > li { border-bottom: 1px solid var(--rule); }
.register a, .register .row {
  display: grid; gap: var(--space-xs) var(--space-m);
  grid-template-columns: 3.25rem 1fr;
  padding-block: var(--space-m);
  align-items: baseline;
}
.register a:hover { text-decoration: none; background: var(--ink-800); }
.register a:hover .name { text-decoration: underline; text-underline-offset: 0.2em; }
.register .num {
  font-family: var(--sans); font-size: var(--step--1);
  color: var(--muted-400); font-variant-numeric: tabular-nums;
  padding-top: 0.35em;
}
.register .name { font-family: var(--serif); font-size: var(--step-2); letter-spacing: -0.01em; }
.register .fn { grid-column: 2; font-family: var(--sans); font-size: var(--step--1); color: var(--muted-400); }
@media (min-width: 48rem) {
  .register a, .register .row { grid-template-columns: 3.25rem 16rem 1fr; }
  .register .fn { grid-column: 3; }
}

/* --- Branch header ------------------------------------------------------- */
.branch-head { padding-block: var(--space-2xl) var(--space-l); }
.branch-head .ordinal {
  font-family: var(--sans); font-size: var(--step--1);
  color: var(--muted-400); font-variant-numeric: tabular-nums;
}
.branch-head h1 { margin-block: var(--space-xs) var(--space-m); }
.domains {
  font-family: var(--sans); font-size: var(--step-1);
  color: var(--kaolin-300); line-height: 1.45; max-width: 44ch;
}

/* --- Family surfaces ----------------------------------------------------- */
.family-flag {
  border-left: 2px solid var(--camwood-400);
  padding: var(--space-s) 0 var(--space-s) var(--space-m);
  margin-bottom: var(--space-xl);
}
.gate {
  border: 1px solid var(--rule-strong);
  padding: var(--space-xl);
  max-width: 34rem;
}

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-block; font-family: var(--sans); font-size: var(--step--1);
  padding: 0.6em 1.1em; border: 1px solid var(--rule-strong);
  border-radius: var(--radius); color: var(--kaolin-100);
  background: transparent; cursor: pointer;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn:hover { background: var(--ink-700); text-decoration: none; }
.btn.primary { background: var(--kaolin-100); color: var(--ink-900); border-color: var(--kaolin-100); font-weight: 500; }
.btn.primary:hover { background: #fff; }
.family-scope .btn.primary { background: var(--camwood-400); border-color: var(--camwood-400); color: #fff; }

/* --- Footer -------------------------------------------------------------- */
footer {
  border-top: 1px solid var(--rule); margin-top: var(--space-2xl);
  padding-block: var(--space-xl); color: var(--muted-400);
}
footer .cols { display: grid; gap: var(--space-l); grid-template-columns: 1fr; }
@media (min-width: 48rem) { footer .cols { grid-template-columns: repeat(3, 1fr); } }
footer h3 { font-family: var(--sans); font-size: var(--step--1); font-weight: 500; color: var(--kaolin-100); margin-bottom: var(--space-xs); }
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin-bottom: var(--space-2xs); }
footer a { color: var(--muted-400); font-size: var(--step--1); font-family: var(--sans); }
footer a:hover { color: var(--kaolin-100); }

/* --- One orchestrated moment: the register resolves into place on load --- */
@media (prefers-reduced-motion: no-preference) {
  .register > li {
    opacity: 0; transform: translateY(0.5rem);
    animation: settle 520ms var(--ease) forwards;
  }
  .register > li:nth-child(1) { animation-delay: 40ms; }
  .register > li:nth-child(2) { animation-delay: 100ms; }
  .register > li:nth-child(3) { animation-delay: 160ms; }
  .register > li:nth-child(4) { animation-delay: 220ms; }
  .register > li:nth-child(5) { animation-delay: 280ms; }
  .register > li:nth-child(n+6) { animation-delay: 340ms; }
  @keyframes settle { to { opacity: 1; transform: none; } }
}

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

/* The sign-in control: a way in to the private plans, not a showcase of them. */
.nav a.signin {
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: 0.32em 0.75em;
  margin-left: var(--space-xs);
}
.nav a.signin:hover { background: var(--ink-700); text-decoration: none; }
