/* ensbucket.org — one stylesheet for the landing page and /privacy.
   Palette is the ENS Brand Guidelines (Oct 2024) exactly, same as the app's
   ENSBrand.swift. Type: Space Grotesk stands in for ABC Monument Grotesk,
   Fraunces for ABC Marist, IBM Plex Mono for Monument Mono — the brand faces
   are licensed and can't be redistributed; these are the OFL look-alikes the
   app already ships. */

@font-face { font-family: "Space Grotesk"; font-weight: 400; font-display: swap;
  src: url("/fonts/SpaceGrotesk-Regular.otf") format("opentype"); }
@font-face { font-family: "Space Grotesk"; font-weight: 500; font-display: swap;
  src: url("/fonts/SpaceGrotesk-Medium.otf") format("opentype"); }
@font-face { font-family: "Space Grotesk"; font-weight: 700; font-display: swap;
  src: url("/fonts/SpaceGrotesk-Bold.otf") format("opentype"); }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("/fonts/Fraunces-Roman.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 300 700; font-display: swap;
  src: url("/fonts/Fraunces-Italic.woff2") format("woff2"); }
@font-face { font-family: "Plex Mono"; font-weight: 400; font-display: swap;
  src: url("/fonts/IBMPlexMono-Regular.ttf") format("truetype"); }

:root {
  /* primary */
  --ens-blue: #0080BC;
  --light-blue: #CEE1E8;
  --dark-blue: #011A25;
  --white: #F6F6F6;
  /* extended — one per lifecycle stage, nothing else */
  --green: #007C23;      --light-green: #C5DDCC;
  --yellow: #FFF72F;     --light-yellow: #F8F6D6;
  --magenta: #F53293;    --light-magenta: #F2C4DA;
  --dark-brown: #EE4D1B;
  --midnight: #093C52;
  --gray: #4A5C63;       --gray-2: #E5E5E5;   --gray-3: #C4C7C8;

  --paper: var(--white);
  --ink: var(--dark-blue);
  --dim: var(--gray);
  --line: var(--gray-2);
  --wash: var(--light-blue);
  --path: var(--ens-blue);
  --grace-fill: var(--light-yellow);
  --auction-fill: var(--light-magenta);
  --active-fill: var(--light-green);
  --button: var(--dark-blue);

  --display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "Fraunces", Georgia, "Times New Roman", serif;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* the guideline pairing: Light Blue for text on a Dark Blue ground */
    --paper: var(--dark-blue);
    --ink: var(--white);
    --dim: #9DB4BE;
    --line: #12303F;
    --wash: var(--midnight);
    --path: var(--ens-blue);
    --grace-fill: #3A3A14;
    --auction-fill: #4A1531;
    --active-fill: #0E3A1F;
    --button: var(--ens-blue);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.45 var(--body);
  font-optical-sizing: auto; font-variation-settings: "SOFT" 30, "WONK" 0;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ens-blue); text-decoration-thickness: 1px; text-underline-offset: .14em; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, .display { font-family: var(--display); font-weight: 500; letter-spacing: -0.02em; margin: 0; }
p { margin: 0 0 1em; }
.num { font-family: var(--mono); font-size: .94em; }

/* ── header ─────────────────────────────────────────────── */
header {
  max-width: 1040px; margin: 0 auto; padding: 22px 28px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display);
  font-weight: 500; font-size: 18px; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
nav { display: flex; gap: 22px; font-family: var(--display); font-size: 15px; }
nav a { color: var(--ink); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
nav a:hover, nav a[aria-current="page"] { border-bottom-color: var(--ens-blue); }

main { max-width: 1040px; margin: 0 auto; padding: 0 28px; }

/* ── hero: copy left, the pathway right ─────────────────── */
.hero {
  display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 9fr);
  gap: 40px 56px; align-items: center; padding: 72px 0 40px;
}
.hero h1 {
  font-size: clamp(38px, 5.6vw, 64px); line-height: .96; letter-spacing: -0.03em;
  max-width: 12ch; margin-bottom: 22px;
}
.hero h1 em { font-style: normal; color: var(--ens-blue); }
.hero .lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.4; max-width: 34ch; margin-bottom: 30px; }
.hero .lede i { font-style: italic; font-variation-settings: "SOFT" 100, "WONK" 1; }

.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 500; font-size: 16px; color: var(--white);
  background: var(--ens-blue); padding: 13px 20px 13px 16px; border-radius: 10px; text-decoration: none;
  transition: background .12s ease;
}
.store:hover { background: #006B9E; text-decoration: none; }
.store svg { width: 18px; height: 18px; fill: currentColor; }
.cta .quiet { font-size: 15px; color: var(--dim); }

/* the pathway — brand "snippet": thick route, thin inner line, checkpoint nodes */
.path { width: 100%; height: auto; display: block; }
.path .route { fill: none; stroke: var(--path); stroke-width: 92; stroke-linecap: round; stroke-linejoin: round; }
.path .inner { fill: none; stroke: var(--paper); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.path .node { fill: var(--paper); stroke: var(--path); stroke-width: 0; }
.path .tick { font-family: var(--display); font-weight: 500; font-size: 22px; fill: var(--ink); }
.path .tick.dim { fill: var(--dim); font-weight: 400; font-size: 18px; }
.path .dots { fill: var(--path); opacity: .28; }

@media (prefers-reduced-motion: no-preference) {
  .path .route, .path .inner { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 1.4s cubic-bezier(.6,0,.2,1) .15s forwards; }
  .path .inner { animation-delay: .35s; }
  .path .node, .path .tick { opacity: 0; animation: appear .5s ease forwards; }
  .path .node { animation-delay: 1.1s; }
  .path .tick { animation-delay: 1.3s; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes appear { to { opacity: 1; } }
}

/* ── the clock: four stages, in order, so the list is the diagram ──────── */
.clock { padding: 40px 0 8px; border-top: 1px solid var(--line); }
.clock h2 { font-size: clamp(26px, 3vw, 34px); line-height: 1.05; margin-bottom: 8px; max-width: 22ch; }
.clock > p { color: var(--dim); max-width: 52ch; margin-bottom: 28px; }
.stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stage { position: relative; padding: 18px 18px 20px; border-radius: 12px; background: var(--wash); min-height: 164px; }
.stage[data-stage="active"]  { background: var(--active-fill); }
.stage[data-stage="grace"]   { background: var(--grace-fill); }
.stage[data-stage="auction"] { background: var(--auction-fill); }
.stage[data-stage="free"]    { background: var(--wash); }
.stage .when { font-family: var(--mono); font-size: 13px; color: var(--dim); margin: 0 0 10px; }
.stage h3 { font-size: 21px; line-height: 1.1; margin-bottom: 8px; }
.stage p { font-size: 15.5px; line-height: 1.4; margin: 0; }
.stage p b { font-weight: 500; font-family: var(--display); }

/* ── what the app does with the clock ───────────────────── */
.does { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px 40px; padding: 44px 0 20px; }
.does h3 { font-size: 20px; line-height: 1.15; margin-bottom: 8px; }
.does p { font-size: 16px; line-height: 1.45; color: var(--ink); margin: 0; }
.does p .num { color: var(--ens-blue); }

/* ── lookup ─────────────────────────────────────────────── */
.lookup { padding: 36px 0 12px; border-top: 1px solid var(--line); }
.lookup h2 { font-size: 22px; margin-bottom: 14px; }
.lookup form { display: flex; gap: 10px; max-width: 520px; }
.field { display: flex; align-items: center; flex: 1; min-width: 0; border: 1.5px solid var(--gray-3);
  border-radius: 10px; padding: 0 12px 0 14px; background: var(--paper); }
.field:focus-within { border-color: var(--ens-blue); box-shadow: 0 0 0 3px var(--wash); }
.field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink);
  font: 400 17px/1 var(--mono); padding: 13px 0; }
.field .tld { font-family: var(--mono); color: var(--dim); }
.lookup button { border: 0; cursor: pointer; font: 500 16px var(--display); color: var(--white);
  background: var(--button); padding: 0 18px; border-radius: 10px; }
.lookup button:hover { background: var(--ens-blue); }
.lookup .note { color: var(--dim); font-size: 15px; margin-top: 10px; }

/* ── privacy line + footer ──────────────────────────────── */
.local { padding: 28px 0 8px; font-size: 17px; max-width: 60ch; }
.local b { font-family: var(--display); font-weight: 500; }

footer {
  max-width: 1040px; margin: 40px auto 0; padding: 26px 28px 56px; border-top: 1px solid var(--line);
  color: var(--dim); font-size: 14px; line-height: 1.5;
}
footer p { max-width: 78ch; }
footer .powered { color: var(--ink); font-family: var(--display); font-weight: 500; margin-bottom: 8px; }

/* ── privacy page ───────────────────────────────────────── */
.doc { max-width: 720px; padding-top: 48px; }
.doc h1 { font-size: clamp(34px, 5vw, 46px); line-height: 1; margin-bottom: 10px; }
.doc .updated { color: var(--dim); font-size: 15px; margin-bottom: 28px; }
.doc .tldr { background: var(--wash); border-radius: 12px; padding: 16px 18px; margin-bottom: 34px; }
.doc h2 { font-size: 22px; margin: 34px 0 8px; }
.doc ul { padding-left: 20px; }
.doc li { margin-bottom: 6px; }
.doc .muted { color: var(--dim); font-family: var(--mono); font-size: .92em; }

/* ── small screens ──────────────────────────────────────── */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 48px; gap: 32px; }
  .hero h1 { max-width: none; }
  .path { max-width: 420px; }
  .stages { grid-template-columns: 1fr 1fr; }
  .does { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 520px) {
  header { padding: 18px 20px 0; }
  main, footer { padding-left: 20px; padding-right: 20px; }
  nav { gap: 16px; font-size: 14px; }
  .stages { grid-template-columns: 1fr; }
  .stage { min-height: 0; }
  .lookup form { flex-wrap: wrap; }
  .lookup button { flex: 1; padding: 13px 18px; }
}
