/* Beree marketing — "link mechanics"
   The palette is a deep teal canvas with a single coral signal reserved for
   the short link itself and the actions that create one. Jade is data only. */

:root {
  --abyss:  #06231F;
  --kelp:   #0E3A34;
  --reef:   #14534A;
  --bone:   #F1EBE0;
  --mist:   #8FA9A3;
  --coral:  #FF5C39;
  --jade:   #4FD1A5;

  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body:    "Public Sans", ui-sans-serif, system-ui, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1140px;
  --r: 14px;
  --r-lg: 22px;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--abyss);
  color: var(--bone);
  font-family: var(--body);
  font-size: clamp(16px, 1.05vw, 17.5px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

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

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--coral); color: var(--abyss); padding: .75rem 1.25rem;
  font-weight: 600; border-radius: 0 0 var(--r) 0;
}
.skip:focus { left: 0; }

a { color: inherit; }

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

/* ── type ─────────────────────────────────────────────────────────── */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -.03em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 7.2vw, 5.6rem); }
h1 em { font-style: normal; color: var(--coral); }

h2 { font-size: clamp(1.9rem, 4.2vw, 3.2rem); }
h3 { font-size: 1.12rem; font-weight: 600; letter-spacing: -.015em; line-height: 1.25; }

p { margin: 0; }

code { font-family: var(--mono); font-size: .92em; color: var(--jade); }

.eyebrow {
  font-family: var(--mono);
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--coral);
  margin-bottom: 1.1rem;
}

.lede {
  font-size: clamp(1.05rem, 1.55vw, 1.28rem);
  color: var(--mist);
  max-width: 46ch;
  margin-top: 1.5rem;
}

/* ── buttons ──────────────────────────────────────────────────────── */

.btn {
  --btn-bg: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .78rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--btn-bg);
  font: 600 .95rem/1 var(--body);
  text-decoration: none;
  cursor: pointer;
  transition: transform .35s var(--ease), background-color .35s var(--ease),
              border-color .35s var(--ease), color .35s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-solid { --btn-bg: var(--coral); color: #24070027; color: #2A0A00; }
.btn-solid:hover { --btn-bg: #ff7154; }

.btn-line { border-color: color-mix(in oklab, var(--bone) 28%, transparent); color: var(--bone); }
.btn-line:hover { border-color: var(--bone); background: color-mix(in oklab, var(--bone) 8%, transparent); }

.btn-ghost { color: var(--mist); }
.btn-ghost:hover { color: var(--bone); }

.btn-lg { padding: 1rem 1.9rem; font-size: 1.02rem; }
.btn-block { display: flex; width: 100%; }

/* ── nav ──────────────────────────────────────────────────────────── */

.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 2rem;
  padding: 1.05rem clamp(1.25rem, 4vw, 2.5rem);
  background: color-mix(in oklab, var(--abyss) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease), background-color .4s var(--ease);
}
.nav.is-stuck { border-bottom-color: color-mix(in oklab, var(--bone) 12%, transparent); }

.wordmark {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--display); font-weight: 800; font-size: 1.28rem;
  letter-spacing: -.03em; text-decoration: none;
}
.wordmark svg { width: 30px; height: 30px; }
.wordmark rect { fill: var(--coral); }
.wordmark path { stroke: var(--abyss); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }

.nav nav { display: flex; gap: 1.7rem; margin-inline-start: auto; }
.nav nav a {
  font-size: .93rem; color: var(--mist); text-decoration: none;
  transition: color .3s var(--ease);
}
.nav nav a:hover { color: var(--bone); }
.nav-cta { display: flex; gap: .5rem; align-items: center; }

@media (max-width: 860px) {
  .nav nav { display: none; }
  .nav-cta { margin-inline-start: auto; }
  .btn-ghost { display: none; }
}

/* ── hero ─────────────────────────────────────────────────────────── */

.hero { position: relative; padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(4rem, 9vw, 8rem); overflow: hidden; }

.hero-grain {
  position: absolute; inset: -20% -10% auto; height: 90%;
  background:
    radial-gradient(60% 70% at 18% 0%, color-mix(in oklab, var(--reef) 62%, transparent), transparent 68%),
    radial-gradient(46% 60% at 88% 12%, color-mix(in oklab, var(--coral) 20%, transparent), transparent 70%);
  filter: blur(28px);
  animation: drift 22s var(--ease) infinite alternate;
  pointer-events: none;
}
@keyframes drift {
  from { transform: translate3d(-2%, 0, 0) scale(1); }
  to   { transform: translate3d(3%, 3%, 0) scale(1.08); }
}

.hero-wrap { position: relative; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.4rem; }
.fineprint { margin-top: 1.1rem; font-size: .88rem; color: var(--mist); }

/* ── the machine (signature) ──────────────────────────────────────── */

.machine {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  border-radius: var(--r-lg);
  background: color-mix(in oklab, var(--kelp) 92%, black);
  border: 1px solid color-mix(in oklab, var(--bone) 12%, transparent);
  box-shadow: 0 40px 90px -50px #000;
  overflow: hidden;
}

.machine-head {
  display: flex; align-items: center; gap: .5rem;
  padding: .8rem 1.1rem;
  border-bottom: 1px solid color-mix(in oklab, var(--bone) 10%, transparent);
  background: color-mix(in oklab, var(--abyss) 50%, transparent);
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: color-mix(in oklab, var(--bone) 22%, transparent); }
.machine-label {
  font-family: var(--mono); font-size: .76rem; color: var(--mist);
  margin-inline-start: .7rem; letter-spacing: .04em;
}
.replay {
  margin-inline-start: auto;
  display: inline-flex; align-items: center; gap: .4rem;
  background: none; border: 1px solid color-mix(in oklab, var(--bone) 18%, transparent);
  color: var(--mist); border-radius: 999px; padding: .3rem .75rem;
  font: 500 .76rem/1 var(--body); cursor: pointer;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.replay:hover { color: var(--bone); border-color: var(--bone); }
.replay svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.machine-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 260px);
  gap: clamp(1.2rem, 3vw, 2.4rem);
  padding: clamp(1.3rem, 3vw, 2.2rem);
  align-items: start;
}
@media (max-width: 820px) { .machine-body { grid-template-columns: 1fr; } }

.lanes { grid-column: 1; min-width: 0; }
.machine-side { grid-column: 2; }
@media (max-width: 820px) {
  .lanes, .machine-side { grid-column: 1; }
}

.lane { padding-block: .5rem; }
.lane-tag {
  display: inline-block;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--mist); margin-bottom: .5rem;
}

.url-long {
  font-family: var(--mono); font-size: clamp(.8rem, 1.5vw, .95rem);
  color: var(--mist); word-break: break-all; line-height: 1.5;
  min-height: 3em;
}
.url-long .gone { opacity: 0; transform: translateY(-6px); display: inline-block; transition: opacity .28s, transform .28s; }

.url-short {
  font-family: var(--mono); font-weight: 600;
  font-size: clamp(1.15rem, 3.1vw, 1.85rem);
  letter-spacing: -.02em; display: flex; align-items: center; min-height: 1.6em;
}
.url-short .host { color: var(--bone); }
.url-short .slug { color: var(--coral); }
.caret {
  width: 2px; height: 1.05em; background: var(--coral);
  margin-inline-start: 3px; animation: blink 1.05s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.machine.is-done .caret { animation: none; opacity: 0; }

.lane-out {
  border-top: 1px dashed color-mix(in oklab, var(--bone) 16%, transparent);
  padding-top: 1.1rem; margin-top: .8rem;
}

.machine-side { display: grid; gap: 1.1rem; }

.qr { margin: 0; display: grid; gap: .6rem; justify-items: start; }
.qr svg {
  width: 116px; height: 116px; border-radius: 10px;
  background: var(--bone); padding: 8px;
}
.qr rect.m { fill: var(--abyss); opacity: 0; transition: opacity .25s var(--ease); }
.qr.is-drawn rect.m { opacity: 1; }
.qr figcaption { font-size: .78rem; color: var(--mist); max-width: 24ch; line-height: 1.45; }

.ticker {
  border-top: 1px solid color-mix(in oklab, var(--bone) 10%, transparent);
  padding-top: 1rem; display: grid; gap: .15rem;
}
.ticker-n {
  font-family: var(--display); font-weight: 800; font-size: 2.4rem;
  line-height: 1; letter-spacing: -.04em; color: var(--jade);
  font-variant-numeric: tabular-nums;
}
.ticker-l { font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mist); }
.spark { width: 120px; height: 32px; margin-top: .4rem; }
.spark path { fill: none; stroke: var(--jade); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── sections ─────────────────────────────────────────────────────── */

.section { padding: clamp(4rem, 9vw, 7.5rem) 0; }

.sec-head { max-width: 54ch; margin-bottom: clamp(2.2rem, 5vw, 3.6rem); }
.sec-lede { color: var(--mist); margin-top: 1.1rem; font-size: 1.05rem; }

/* trace */
.trace { background: color-mix(in oklab, var(--kelp) 40%, var(--abyss)); }

.hops { list-style: none; margin: 0; padding: 0; border-top: 1px solid color-mix(in oklab, var(--bone) 12%, transparent); }
.hop {
  display: grid; grid-template-columns: 92px minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: 1.65rem 0;
  border-bottom: 1px solid color-mix(in oklab, var(--bone) 12%, transparent);
}
.hop-time {
  font-family: var(--mono); font-size: .84rem; color: var(--jade);
  padding-top: .2rem; font-variant-numeric: tabular-nums;
}
.hop-end .hop-time { color: var(--coral); font-size: 1.1rem; }
.hop-body p { color: var(--mist); margin-top: .45rem; max-width: 58ch; }
@media (max-width: 640px) { .hop { grid-template-columns: 1fr; gap: .35rem; } }

/* ledger */
.ledger { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid color-mix(in oklab, var(--bone) 12%, transparent); }
.ledger table { width: 100%; border-collapse: collapse; min-width: 620px; }
.ledger th, .ledger td { text-align: left; padding: 1.05rem 1.3rem; }
.ledger thead th {
  font: 500 .72rem/1 var(--mono); text-transform: uppercase; letter-spacing: .14em;
  color: var(--mist); border-bottom: 1px solid color-mix(in oklab, var(--bone) 14%, transparent);
}
.ledger tbody th { font-weight: 600; }
.ledger tbody td { color: var(--mist); }
.ledger tbody tr + tr th, .ledger tbody tr + tr td { border-top: 1px solid color-mix(in oklab, var(--bone) 8%, transparent); }
.num { font-family: var(--mono); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.ledger-us { background: color-mix(in oklab, var(--coral) 12%, transparent); }
.ledger-us th, .ledger-us td { border-top: 1px solid color-mix(in oklab, var(--coral) 40%, transparent); vertical-align: top; }
.ledger-us .plus { color: var(--coral); }
.num-hero {
  font-family: var(--display); font-weight: 800; font-size: 1.9rem;
  color: var(--coral); letter-spacing: -.03em;
}
.num-hero .per { display: block; font: 400 .72rem/1.4 var(--mono); color: var(--mist); letter-spacing: 0; margin-top: .3rem; }

.ledger-note { margin-top: 1.4rem; color: var(--mist); max-width: 62ch; font-size: .95rem; }

/* outcomes */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1px; background: color-mix(in oklab, var(--bone) 12%, transparent); border: 1px solid color-mix(in oklab, var(--bone) 12%, transparent); border-radius: var(--r-lg); overflow: hidden; }
.card { background: var(--abyss); padding: 1.9rem 1.7rem; transition: background-color .4s var(--ease); }
.card:hover { background: color-mix(in oklab, var(--kelp) 55%, var(--abyss)); }
.card p { color: var(--mist); margin-top: .6rem; font-size: .95rem; }

/* plans */
.plans { background: color-mix(in oklab, var(--kelp) 40%, var(--abyss)); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.3rem; align-items: start; }
.plan {
  border: 1px solid color-mix(in oklab, var(--bone) 14%, transparent);
  border-radius: var(--r-lg); padding: 2rem 1.8rem;
  background: color-mix(in oklab, var(--abyss) 70%, transparent);
  display: grid; gap: 1.2rem; align-content: start;
}
.plan-feature { border-color: var(--coral); background: color-mix(in oklab, var(--coral) 9%, var(--abyss)); position: relative; }
.plan-flag {
  position: absolute; top: -.72rem; left: 1.8rem;
  background: var(--coral); color: #2A0A00; border-radius: 999px;
  padding: .28rem .8rem; font: 600 .7rem/1 var(--mono);
  text-transform: uppercase; letter-spacing: .1em;
}
.plan-price { font-family: var(--display); font-weight: 800; font-size: 2.9rem; letter-spacing: -.04em; line-height: 1; }
.plan-price .per { display: block; font: 400 .82rem/1.4 var(--body); color: var(--mist); letter-spacing: 0; margin-top: .5rem; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.plan li { padding-inline-start: 1.5rem; position: relative; color: var(--mist); font-size: .95rem; }
.plan li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 8px; height: 8px; border-radius: 2px; background: var(--jade);
}
.plan-feature li::before { background: var(--coral); }
.plan-fine { font-size: .82rem; color: var(--mist); }

/* closer */
.closer { padding: clamp(4.5rem, 10vw, 8rem) 0; text-align: center; }
.closer h2 { font-size: clamp(2.2rem, 6.5vw, 4.6rem); margin-bottom: 2rem; }

/* footer */
.foot { border-top: 1px solid color-mix(in oklab, var(--bone) 12%, transparent); padding: 2.2rem 0; }
.foot-wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; font-size: .9rem; color: var(--mist); }
.foot nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.foot a { color: var(--mist); text-decoration: none; transition: color .3s var(--ease); }
.foot a:hover { color: var(--bone); }

/* ── reveal ───────────────────────────────────────────────────────── */

.reveal { opacity: 0; transform: translateY(22px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .75s var(--ease) calc(var(--d, 0) * 80ms),
              transform .75s var(--ease) calc(var(--d, 0) * 80ms);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-grain { animation: none; }
  .caret { animation: none; }
  .qr rect.m { opacity: 1; }
  .btn:hover { transform: none; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
