/* ==========================================================================
   Decentralyne — landing
   Palette: warm oat ground, deep pine-teal ink, marigold accent.
   ========================================================================== */

:root {
  --ground:       #FBF4EC;
  --ground-raise: #FFFCF7;
  --ground-deep:  #F3E9DD;

  --ink:          #1F3D38;
  --ink-soft:     #59706A;
  --ink-faint:    #8C9E98;

  --accent:       #D97A28;
  --accent-deep:  #B85F17;
  --accent-soft:  #F0C48D;

  --rule:         #E4D8C8;

  --display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --body:    "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --shell:  min(1180px, 100% - 3rem);
  --narrow: min(660px, 100% - 3rem);
  --bay:    clamp(4.5rem, 10vw, 8.5rem);
}

* { box-sizing: border-box; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.62;
  font-weight: 380;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }

::selection { background: var(--accent-soft); color: var(--ink); }

:where(a, button, input):focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.7rem 1.1rem;
  background: var(--ink);
  color: var(--ground);
  z-index: 20;
  text-decoration: none;
}
.skip:focus { left: 0.75rem; top: 0.75rem; }

/* ── Masthead ───────────────────────────────────────────────────────── */

.masthead {
  width: var(--shell);
  margin: 0 auto;
  padding: 1.9rem 0 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  font-family: var(--display);
  font-size: 1.32rem;
  letter-spacing: -0.012em;
  color: var(--ink);
  text-decoration: none;
}

.masthead-cta {
  font-size: 0.895rem;
  color: var(--ink-soft);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--rule);
  transition: color 160ms ease, border-color 160ms ease;
}
/* Hover states are gated on a real pointer. On a touch screen :hover latches
   after a tap and stays on until you tap something else, so the Join button
   sat there marigold long after the press. */
@media (hover: hover) {
  .masthead-cta:hover { color: var(--accent-deep); border-color: var(--accent); }
}

/* ── Hero ───────────────────────────────────────────────────────────── */

.hero {
  width: var(--shell);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2.5rem, 6vw, 4.25rem);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero-copy { max-width: 34rem; }

.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.9rem, 1.6rem + 5.4vw, 5.15rem);
  line-height: 1.03;
  letter-spacing: -0.021em;
  font-weight: 380;
}

.hero h1 em {
  font-style: italic;
  font-weight: 340;
  color: var(--accent-deep);
}

.lede {
  margin-top: 1.6rem;
  max-width: 30rem;
  font-size: clamp(1.06rem, 1rem + 0.3vw, 1.19rem);
  line-height: 1.58;
  color: var(--ink-soft);
}

/* ── Sign-up ────────────────────────────────────────────────────────── */

.join { margin-top: 2.4rem; max-width: 29rem; }

.join-label {
  display: block;
  font-size: 0.775rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.65rem;
}

.join-row {
  display: flex;
  gap: 0.55rem;
  align-items: stretch;
}

.join-row input {
  flex: 1 1 auto;
  min-width: 0;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--ground-raise);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.82rem 1.15rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.join-row input::placeholder { color: var(--ink-faint); }
@media (hover: hover) {
  .join-row input:hover { border-color: var(--accent-soft); }
}
.join-row input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(217 122 40 / 0.16);
}

.join-row button {
  flex: 0 0 auto;
  font: inherit;
  font-weight: 560;
  font-size: 0.985rem;
  color: var(--ground-raise);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 0.82rem 1.65rem;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, transform 120ms ease;
}
@media (hover: hover) {
  .join-row button:hover {
    background: var(--accent-deep);
    border-color: var(--accent-deep);
  }
}
.join-row button:active { transform: translateY(1px); }

.join-note {
  margin-top: 0.95rem;
  font-size: 0.885rem;
  line-height: 1.5;
  color: var(--ink-faint);
  max-width: 26rem;
}

.join-status {
  margin-top: 0.8rem;
  font-size: 0.9rem;
  line-height: 1.45;
  min-height: 0;
}
.join-status:empty { display: none; }
.join-status[data-tone="ok"]   { color: var(--accent-deep); }
.join-status[data-tone="err"]  { color: #9C3B2E; }

/* ── Signature: many centers ───────────────────────────────────────── */

.field {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 30rem;
}

.field svg { display: block; width: 100%; height: auto; overflow: visible; }

.mc-node {
  transform-box: view-box;
  transform-origin: 0 0;
  transform: translate(calc(var(--x1) * 1px), calc(var(--y1) * 1px)) scale(1);
  animation: mc-settle 1500ms cubic-bezier(0.2, 0.86, 0.24, 1) var(--d) both;
}

@keyframes mc-settle {
  from { transform: translate(calc(var(--x0) * 1px), calc(var(--y0) * 1px)) scale(var(--s0)); }
  to   { transform: translate(calc(var(--x1) * 1px), calc(var(--y1) * 1px)) scale(1); }
}

.mc-dot { fill: var(--accent); }

.mc-halo {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.15;
  opacity: 0;
  animation: mc-halo 800ms ease-out both;
  animation-delay: calc(var(--d) + 1150ms);
}

@keyframes mc-halo {
  from { opacity: 0; transform: scale(0.55); }
  to   { opacity: 0.32; transform: scale(1); }
}

.mc-halo { transform-box: fill-box; transform-origin: center; }

@media (prefers-reduced-motion: reduce) {
  .mc-node { animation: none; }
  .mc-halo { animation: none; opacity: 0.32; }
}

/* ── Bands ──────────────────────────────────────────────────────────── */

.band { padding-block: var(--bay); }

.band-raised {
  background: var(--ground-raise);
  border-block: 1px solid var(--rule);
}

.band-close { background: var(--ground-deep); border-top: 1px solid var(--rule); }

.wrap { width: var(--shell); margin: 0 auto; }
.wrap-narrow { width: var(--narrow); margin: 0 auto; text-align: center; }

.section-head {
  font-family: var(--display);
  font-size: clamp(1.85rem, 1.2rem + 2.5vw, 2.95rem);
  line-height: 1.14;
  letter-spacing: -0.016em;
  max-width: 20ch;
}

.section-lede {
  margin-top: 1.15rem;
  max-width: 44ch;
  font-size: 1.075rem;
  color: var(--ink-soft);
}

.wrap-narrow .section-lede { margin-inline: auto; }

/* ── Beats ──────────────────────────────────────────────────────────── */

.beats {
  margin-top: clamp(2.5rem, 5vw, 3.75rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.75rem, 3.5vw, 3rem);
}

.beats-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.beat { padding-top: 1.15rem; border-top: 1px solid var(--rule); }

.beat h3 {
  font-family: var(--display);
  font-size: 1.22rem;
  line-height: 1.3;
  letter-spacing: -0.008em;
}

.beat p {
  margin-top: 0.6rem;
  font-size: 0.965rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ── Turn line ──────────────────────────────────────────────────────── */

.turn {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.4rem, 1rem + 1.6vw, 2.05rem);
  line-height: 1.32;
  letter-spacing: -0.01em;
  color: var(--accent-deep);
  max-width: 24ch;
}

.turn-quiet {
  color: var(--ink);
  font-style: normal;
  font-size: clamp(1.15rem, 1rem + 0.75vw, 1.5rem);
  max-width: 40ch;
}

/* ── Split: heading column beside content column ────────────────────── */

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.split .section-head { max-width: 14ch; }
.split .section-lede { max-width: 34ch; }

/* ── Surface list ───────────────────────────────────────────────────── */

.surface {
  margin: 0;
  padding: 0;
  list-style: none;
}

.surface li {
  padding: 1.05rem 0 1.05rem 1.9rem;
  border-bottom: 1px solid var(--rule);
  position: relative;
  font-size: 1.055rem;
  color: var(--ink-soft);
}
.surface li:first-child { border-top: 1px solid var(--rule); }

.surface li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.72em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.surface strong {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.13em;
  color: var(--ink);
}

/* ── Steps: numbered beats for "how the work reaches you" ───────────── */

.steps { counter-reset: step; }
.steps .beat { counter-increment: step; }

.steps .beat h3::before {
  content: counter(step);
  display: block;
  margin-bottom: 0.55rem;
  font-family: var(--body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent);
}

/* ── Roster: delivered work ─────────────────────────────────────────── */

.roster {
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(1.75rem, 3.5vw, 3rem);
}

.roster li { border-top: 1px solid var(--rule); }

.roster a,
.roster span {
  display: block;
  padding: 0.85rem 0;
  font-family: var(--display);
  font-size: 1.13rem;
  line-height: 1.3;
  letter-spacing: -0.008em;
  color: var(--ink);
  text-decoration: none;
}

.roster a { transition: color 150ms ease; }
@media (hover: hover) {
  .roster a:hover { color: var(--accent-deep); }
}

/* Marks the link as leaving the page. Decorative, so hidden from screen
   readers, which already announce the link. */
.roster a::after {
  content: "\2197";
  margin-left: 0.35em;
  font-family: var(--body);
  font-size: 0.68em;
  color: var(--ink-faint);
}
@media (hover: hover) {
  .roster a:hover::after { color: var(--accent); }
}

/* Veboe has no public URL, so it is text, not a link. */
.roster > li > span { color: var(--ink-soft); }

.roster .roster-note {
  display: inline;
  padding: 0;
  font-family: var(--body);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ── Secondary path: the client, not the member ─────────────────────── */

.hero-alt,
.close-alt {
  margin-top: 1.4rem;
  max-width: 29rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-faint);
}

.close-alt { margin-inline: auto; }

.hero-alt a,
.close-alt a {
  color: var(--ink-soft);
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
}

@media (hover: hover) {
  .hero-alt a:hover,
  .close-alt a:hover {
    color: var(--accent-deep);
    text-decoration-color: var(--accent);
  }
}

/* ── Close ──────────────────────────────────────────────────────────── */

.close-head {
  font-family: var(--display);
  font-size: clamp(2.1rem, 1.4rem + 3vw, 3.35rem);
  line-height: 1.1;
  letter-spacing: -0.019em;
}

.join-close { margin-inline: auto; margin-top: 2.1rem; text-align: left; }

/* ── Footer ─────────────────────────────────────────────────────────── */

.foot {
  width: var(--shell);
  margin: 0 auto;
  padding: 2.25rem 0 2.75rem;
  display: flex;
  gap: 0.6rem;
  align-items: center;
  font-size: 0.86rem;
  color: var(--ink-faint);
}

.foot-sep { color: var(--rule); }

/* ── Responsive ─────────────────────────────────────────────────────── */

@media (max-width: 940px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: clamp(2.5rem, 7vw, 4rem);
  }
  .hero-copy { order: 2; max-width: none; }
  .field { order: 1; max-width: 20rem; margin-bottom: 0.5rem; }
  .beats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .beats-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .roster { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .split { grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 2.75rem); }
  .split .section-head { max-width: 20ch; }
  .split .section-lede { max-width: 44ch; }
}

@media (max-width: 620px) {
  :root { --shell: min(1180px, 100% - 2.25rem); --narrow: min(660px, 100% - 2.25rem); }
  .masthead-cta { display: none; }
  .beats, .beats-four { grid-template-columns: 1fr; }
  .roster { grid-template-columns: 1fr; }
  .join-row { flex-wrap: wrap; }
  .join-row input { flex-basis: 100%; }
  .join-row button { width: 100%; }
  .field { max-width: 15rem; }
}
