/* Linkd (2026-11-29): the brand layer, loaded after brand.css. One bright field (the logo's red-pink), deep wine,
   white pages. The knot is the picture: big in the hero (the original in one loop, its pair in the other, buys running
   the ribbon), small in the steps, rising in the closing band. Cards are calm: a hairline and a soft shadow.
   Motion: the beads, the coins' rings, the steps' dots, sections rising in, the closing knot. All of it stops with the
   site's motion switch. */

/* ---------- buttons and cards ---------- */
.btn { transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast), border-color var(--t-fast); font-weight: 650; }
.btn.primary { background: var(--sun); color: #FFFFFF; border: 1.5px solid var(--sun); box-shadow: 0 10px 22px -12px rgba(240, 40, 90, 0.75); }
.btn.primary:hover { background: #DB1B4C; border-color: #DB1B4C; transform: translateY(-1px); }
.btn.primary:active { transform: translateY(1px); box-shadow: none; }
.btn.ghost { background: transparent; }
.night .btn.ghost { border-color: rgba(255, 245, 247, 0.35); color: var(--cream); }
.night .btn.ghost:hover { border-color: var(--cream); background: rgba(255, 245, 247, 0.06); }

.step3, .tile, .vamp-card, .ledger, .launch-steps .card { border: 1px solid var(--line); box-shadow: var(--print); background: var(--paper-2); }
.tile { transition: transform var(--t) var(--spring), box-shadow var(--t) var(--ease), border-color var(--t); }
.tile:hover { transform: translateY(-4px); border-color: rgba(240, 40, 90, 0.55); box-shadow: 0 22px 40px -24px rgba(52, 2, 15, 0.45); }
.tile-nums div { background: var(--paper); border: 1px solid var(--line); }
.vs-card.copy { background: var(--paper-3); border: 1.5px dashed var(--line-2); box-shadow: none; }
.vs-card.shadow { background: var(--night); border: 0; box-shadow: 0 24px 48px -28px rgba(52, 2, 15, 0.65); }
.vs-card.shadow .big, .maths .big { color: #FF8AA6; }
.b-free { border: 1px solid var(--line-2); }
.seg { border: 1px solid var(--line-2); background: var(--paper-2); }
.seg button[aria-pressed="true"] { background: var(--navy); color: var(--cream); }
.night .seg { background: var(--night-3); border-color: rgba(255, 245, 247, 0.18); }
.night .seg button { color: var(--cream-muted); }
.night .seg button:hover { color: var(--cream); }
.night .seg button[aria-pressed="true"] { background: var(--cream); color: var(--navy); }
.board-bar .input { border-color: var(--line-2); }
.eyebrow { background: var(--sun-soft); color: var(--sun-deep); }
.night .eyebrow { background: rgba(255, 245, 247, 0.08); color: var(--cream); border: 1px solid rgba(255, 245, 247, 0.16); }

/* ---------- the header ---------- */
#top { background: var(--night); border-bottom: 1px solid rgba(227, 181, 192, 0.14); }
#top .nav a[aria-current] { color: var(--navy); background: var(--cream); }
#top .nav a:hover:not([aria-current]) { background: rgba(255, 245, 247, 0.1); }
#top .btn.primary { background: var(--sun); color: #FFFFFF; border-color: var(--sun); box-shadow: none; }
.brand-mark svg { border-radius: 9px; }
.demo-strip { background: var(--paper-3); color: var(--navy); }
.demo-strip b { color: var(--sun-deep); }

/* ---------- the hero: the knot on its field ---------- */
/* relaunch 2 (2026-12-01, "Link · Night"): the hero is the PFP's night, the links red-pink and white */
.field-hero { position: relative; overflow: hidden; background: #16020A; color: #FFFFFF; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.hero-copy { display: grid; justify-items: center; text-align: center; align-content: center; padding-top: clamp(32px, 4.4vw, 64px); }
.field-hero .eyebrow { background: rgba(240, 40, 90, 0.16); color: #FFFFFF; border: 1px solid rgba(240, 40, 90, 0.4); margin-bottom: 18px; }
.field-hero .live-dot { background: var(--sun) !important; }
.field-hero h1 { font-size: clamp(50px, 9vw, 132px); line-height: 0.9; letter-spacing: -0.058em; font-weight: 780; color: #FFFFFF; max-width: 11em; }
.field-hero h1 .w { display: inline-block; }
.field-hero h1 em { font-style: normal; color: var(--sun); }
.field-hero .sub { margin-top: clamp(18px, 2vw, 24px); font: 650 clamp(20px, 2.3vw, 30px)/1.2 var(--font-display); letter-spacing: -0.025em; }
.field-hero .lede { margin: 12px auto 0; color: #FFFFFF; font-weight: 500; max-width: 35em; font-size: clamp(16.5px, 1.4vw, 19px); }
.field-hero .ctas { margin-top: clamp(22px, 2.6vw, 30px); display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.field-hero .ctas .btn.primary { background: var(--sun); color: #FFFFFF; border-color: var(--sun); box-shadow: 0 14px 30px -14px rgba(240, 40, 90, 0.7); }
.field-hero .ctas .btn.primary:hover { background: var(--sun-2); border-color: var(--sun-2); }
.field-hero .ctas .btn.ghost { color: #FFFFFF; border: 1.5px solid rgba(255, 255, 255, 0.4); }
.field-hero .ctas .btn.ghost:hover { border-color: #FFFFFF; background: rgba(255, 255, 255, 0.1); }
[data-motion="on"] .hero-copy > * { animation: up 0.8s var(--ease) both; }
[data-motion="on"] .hero-copy > :nth-child(2) { animation-delay: 0.06s; }
[data-motion="on"] .hero-copy > :nth-child(3) { animation-delay: 0.12s; }
[data-motion="on"] .hero-copy > :nth-child(4) { animation-delay: 0.18s; }
[data-motion="on"] .hero-copy > :nth-child(5) { animation-delay: 0.24s; }
@keyframes up { from { opacity: 0; transform: translateY(22px); } }

.stage { display: grid; justify-items: center; align-content: center; padding: clamp(14px, 2.6vw, 34px) 0 clamp(36px, 5vw, 64px); }
/* wide screens: words left, the knot right, so the whole mechanic shows on the first screen */
@media (min-width: 1100px) {
  .hero-grid { grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr); gap: clamp(24px, 3vw, 48px); align-items: center; min-height: min(760px, calc(100svh - var(--top-h))); }
  .hero-copy { justify-items: start; text-align: left; padding: 40px 0; }
  .field-hero h1 { font-size: clamp(64px, 6vw, 88px); }
  .field-hero .lede { margin-left: 0; }
  .field-hero .ctas { justify-content: flex-start; }
  .stage { padding: 32px 0 40px; }
}
/* the Linkd mark, two locked links tilted: each coin sits in its link's free hole (KNOT_STAGE 30 104 340 192) */
.stage-art { position: relative; width: min(700px, 100%); aspect-ratio: 340 / 192; margin-bottom: 40px; }
.stage-knot { position: absolute; inset: 0; }
.stage-knot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.bead { fill: #FFFFFF; stroke: rgba(240, 40, 90, 0.85); stroke-width: 5; }
.loop-coin { position: absolute; top: 50%; width: 10%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: #FFFFFF; color: var(--navy); box-shadow: 0 18px 40px -14px rgba(52, 2, 15, 0.6); }
.loop-coin.left, .loop-tag.left { left: 27.76%; }
.loop-coin.left { top: 59.79%; }
.loop-coin.right, .loop-tag.right { left: 72.24%; }
.loop-coin.right { top: 40.21%; }
.loop-coin img { width: 100%; height: 100%; object-fit: cover; display: block; }
.loop-coin b { font: 750 clamp(15px, 2.6vw, 30px)/1 var(--font-display); letter-spacing: -0.03em; }
.loop-coin.ghost { background: rgba(240, 40, 90, 0.16); border: 3px dashed #FFFFFF; color: #FFFFFF; box-shadow: none; }
[data-motion="on"] .loop-coin.hit { animation: hit 0.9s var(--ease); }
@keyframes hit { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.95); } 100% { box-shadow: 0 0 0 30px rgba(255, 255, 255, 0); } }
.loop-tag { position: absolute; top: 97%; transform: translateX(-50%); display: grid; justify-items: center; gap: 3px; white-space: nowrap; text-align: center; color: #FFFFFF; }
.loop-tag b { font: 750 clamp(17px, 2.1vw, 26px)/1 var(--font-display); letter-spacing: -0.03em; }
.loop-tag a { color: #FFFFFF; }
.loop-tag a:hover b { text-decoration: underline; text-underline-offset: 4px; }
.loop-tag span { font: 600 11px/1.3 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }

.stage-plate { --ink: var(--navy); --ink-2: #5C2433; --muted: #8A6670; --line: rgba(52, 2, 15, 0.12); --line-2: rgba(52, 2, 15, 0.26);
  width: min(660px, 100%); display: grid; justify-items: center; gap: 10px; text-align: center; padding: 18px 20px 20px; border-radius: 22px; background: #FFFFFF; color: var(--navy); box-shadow: 0 34px 60px -36px rgba(52, 2, 15, 0.75); }
.sp-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px 18px; font: 500 12.5px/1.4 var(--font-mono); color: var(--muted); }
.sp-stats b { color: var(--navy); font-weight: 650; }
.sp-cap { min-height: 20px; font: 600 14px/1.45 var(--font-text); color: var(--ink-2); max-width: 100%; }
.sp-cap .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--sun); margin-right: 8px; vertical-align: 1px; }
.sp-cap b { color: var(--sun-deep); margin-right: 2px; }
.sp-cap .ago { color: var(--muted); }
[data-motion="on"] .sp-cap.flash { animation: capin 0.5s var(--ease); }
@keyframes capin { from { opacity: 0; transform: translateY(6px); } }
.sp-act { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; align-items: center; }
.stage-plate .btn { height: 44px; }
.stage-plate .btn.ghost { color: var(--navy); border-color: var(--line-2); }
.stage-plate .btn.ghost:hover { border-color: var(--navy); background: rgba(52, 2, 15, 0.04); }
.sp-nav { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); background: #FFFFFF; color: var(--navy); cursor: pointer; }
.sp-nav:hover { background: var(--sun); border-color: var(--sun); color: #FFFFFF; }
.sp-nav.prev .icon { transform: rotate(180deg); }

/* ---------- the numbers, the trust lines ---------- */
.statbar { background: var(--paper); color: var(--navy); border: 0; }
.statbar > .wrap:first-child { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line-2); }
.statbar .stat { border-right: 1px solid var(--line); padding: 26px 20px; }
.statbar .stat:last-child { border-right: 0; }
.statbar .stat-value { color: var(--navy); }
.statbar .label, .statbar .stat-hint { color: var(--muted); }
.statbar .trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; padding: 18px 0 24px; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.statbar .trust span { display: inline-flex; align-items: center; gap: 7px; }
.statbar .trust .icon { color: var(--sun); }

/* ---------- the band of real moves ---------- */
.ticker { background: var(--night); color: var(--cream); }
.tick { color: #F4D9E0; }
.tick b { color: #FFFFFF; }
.tick .dot { background: var(--sun); box-shadow: 0 0 0 3px rgba(240, 40, 90, 0.3); }

/* ---------- the steps ---------- */
.step3 .row { justify-content: space-between; align-items: center; }
.step3 .pic { height: 78px; }
.step3 .pic svg { height: 76px; width: auto; }
.step3 .n { background: var(--navy); color: var(--cream); border-radius: 50%; }
.step3:nth-child(2) .n { background: var(--sun); color: #FFFFFF; }

/* ---------- the pairs, ranked, on deep wine ---------- */
.night-block { position: relative; background: var(--night); }
.shadow-row { grid-template-columns: 38px 70px minmax(0, 1.1fr) 112px minmax(0, 1.3fr) 0.8fr 0.7fr; background: var(--night-2); border: 1px solid rgba(227, 181, 192, 0.14); }
.shadow-row:hover { border-color: var(--sun); transform: translateY(-2px); }
.s-phase { display: flex; align-items: center; gap: 10px; min-width: 0; }
.s-phase svg { display: block; flex: none; }
.s-ph { display: grid; gap: 3px; }
.s-ph b { font-size: 14px; }
.bar { background: rgba(255, 245, 247, 0.1); }
.bar i { background: linear-gradient(90deg, var(--sun), #FF9DB4); }
.maths > div { background: var(--night-2); border-color: rgba(227, 181, 192, 0.14); }
.night .faq details { background: var(--night-2); border-color: rgba(227, 181, 192, 0.14); transition: border-color var(--t) var(--ease); }
.night .faq details[open] { border-color: var(--sun); }

/* ---------- the closing band: the knot ---------- */
.cta-band { position: relative; overflow: hidden; isolation: isolate; background: var(--sun); color: #FFFFFF; }
.cta-band .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; gap: clamp(22px, 2.4vw, 30px); padding: clamp(72px, 9vw, 132px) 0; }
.cta-band .wrap > div { max-width: min(560px, 48%); }
.cta-band h2 { color: #FFFFFF; font-size: clamp(50px, 7.6vw, 118px); line-height: 0.92; }
.cta-band p { color: #FFFFFF; font-weight: 500; }
.cta-band .btn.primary { background: #FFFFFF; color: var(--navy); border-color: #FFFFFF; box-shadow: 0 14px 28px -14px rgba(52, 2, 15, 0.6); }
.cta-band .btn.primary:hover { background: #FFF0F3; }
/* the whole knot sits inside the band, lined up with the page's right edge (the user: the mark is never cut by a frame) */
.rise { position: absolute; z-index: 0; right: max(var(--gut), calc((100% - var(--wrap)) / 2)); top: 50%; width: clamp(240px, 38vw, 540px); translate: 0 -50%; pointer-events: none; }
.rise svg { display: block; width: 100%; height: auto; }
@supports (animation-timeline: view()) {
  [data-motion="on"] .rise { animation: knotin linear both; animation-timeline: view(); animation-range: entry 0% entry 100%; }
}
@keyframes knotin { from { transform: translateY(36px) rotate(-6deg); } to { transform: none; } }

/* ---------- things rise into place ---------- */
[data-motion="on"] .rv { opacity: 0; transform: translateY(30px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
[data-motion="on"] .rv.in { opacity: 1; transform: none; }

/* ---------- footer ---------- */
#foot { border-top: 1px solid rgba(227, 181, 192, 0.14); }

/* ---------- smaller screens ---------- */
@media (max-width: 980px) {
  .shadow-row { grid-template-columns: 30px 60px minmax(0, 1fr) 100px minmax(0, 1fr); }
  .statbar > .wrap:first-child { grid-template-columns: 1fr 1fr; }
  .statbar .stat:nth-child(2) { border-right: 0; }
  .statbar .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .stage-art { margin-bottom: 40px; }
  .loop-tag { top: 99%; }
  .loop-tag span { font-size: 9.5px; letter-spacing: 0.05em; }
  .sp-nav { display: none; }
  .sp-stats { font-size: 11.5px; gap: 2px 10px; }
  .sp-cap { font-size: 12.5px; }
  .stage-plate .btn { height: 42px; padding: 0 16px; font-size: 14px; }
  .cta-band .wrap { padding-bottom: calc(min(320px, 100vw - 2 * var(--gut)) * 168 / 288 + 72px); }
  .cta-band .wrap > div { max-width: none; }
  .rise { top: auto; bottom: 40px; right: auto; left: 50%; width: min(320px, calc(100% - 2 * var(--gut))); translate: -50% 0; }
  [data-motion="on"] .rise { animation-range: entry 0% entry 100%; }
}
@media (max-width: 560px) {
  .shadow-row { grid-template-columns: 54px minmax(0, 1fr) auto; }
  .shadow-row .s-held { grid-column: 1 / -1; }
  .s-phase .s-ph .label { display: none; }
}
/* phones: the footer ends above the fixed tab bar, so its last line (the motion switch) can be reached */
@media (max-width: 860px) { .foot { padding-bottom: calc(92px + env(safe-area-inset-bottom)); } }

/* ---------- the CA, made clear: a bar across the top of every page, and a solid card ---------- */
.ca-bar { background: var(--sun); color: #FFFFFF; border-bottom: 1px solid rgba(52, 2, 15, 0.3); }
.ca-bar-in { display: flex; align-items: center; justify-content: center; gap: 10px 14px; min-height: 44px; padding-top: 6px; padding-bottom: 6px; }
.ca-bar-label { font: 750 13px/1 var(--font-display); letter-spacing: 0.02em; padding: 6px 10px; border-radius: var(--r-pill); background: var(--navy); color: #FFFFFF; white-space: nowrap; }
.ca-bar-addr { font-size: 15px; font-weight: 600; letter-spacing: 0.02em; color: #FFFFFF; user-select: all; min-width: 0; }
.ca-bar-addr .short { display: none; }
.ca-bar-copy { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: var(--r-pill); border: 0; background: #FFFFFF; color: var(--navy); font: 700 14px/1 var(--font-text); cursor: pointer; white-space: nowrap; }
.ca-bar-copy.done { background: var(--navy); color: #FFFFFF; }
.ca-bar-out { display: inline-flex; align-items: center; gap: 5px; color: #FFFFFF; font: 600 13px/1 var(--font-text); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
@media (max-width: 760px) {
  .ca-bar-addr .full { display: none; }
  .ca-bar-addr .short { display: inline; }
  .ca-bar-out { display: none; }
  .ca-bar-in { gap: 8px; }
}
.ca-wrap { padding-bottom: 26px; }
.ca-plate { margin-top: 0; }
.ca-plate.has-ca { display: grid; gap: 12px; padding: 20px 22px; border-radius: var(--r-lg); border: 1px solid var(--line-2); background: #FFFFFF; color: var(--navy); box-shadow: var(--print); }
.ca-plate .ca-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; flex-basis: 100%; }
.ca-plate .ca-head .label { color: var(--navy); font-size: 12px; }
.ca-official { display: inline-flex; align-items: center; gap: 6px; font: 600 13px/1 var(--font-text); color: var(--good); }
.ca-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.ca-plate .ca-addr { flex: 1 1 420px; min-width: 0; padding: 14px 16px; border-radius: var(--r); background: var(--paper-3); color: var(--navy); font-size: clamp(15px, 1.6vw, 21px); font-weight: 650; letter-spacing: 0.02em; word-break: break-all; user-select: all; }
.ca-acts { display: flex; gap: 10px; flex-wrap: wrap; }
.ca-plate .ca-copy { height: 52px; padding: 0 22px; font-size: 16px; }
.ca-plate .ca-copy.done { background: var(--navy); border-color: var(--navy); }
.ca-plate .ca-pump { height: 52px; background: #FFFFFF; color: var(--navy); border-color: var(--line-2); }
.night .ca-plate.has-ca { color: var(--navy); }
@media (max-width: 560px) {
  .ca-acts { width: 100%; }
  .ca-plate .ca-copy { flex: 1; }
}
/* the stats strip's four-column grid is for the numbers only */
.statbar .ca-wrap { display: block; }

/* phones: the knot and the card under it stay inside the page; rows of choices scroll instead of wrapping */
.stage { grid-template-columns: minmax(0, 1fr); min-width: 0; }
@media (max-width: 640px) {
  .stage-art { width: 100%; margin-inline: 0; }
  .stage-plate { width: 100%; }
  .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .seg button { white-space: nowrap; flex: none; }
}

.loop-tag a { display: grid; justify-items: center; }

/* ---------- the way in (js/intro.mjs, js/boot.js): first look at the front page, motion on ---------- */
html.intro-wait body { background: #16020A; }
html.intro-run .field-hero { background: #16020A; }
html.intro-wait #top, html.intro-wait #main, html.intro-wait #foot, html.intro-wait .tabbar { visibility: hidden; }
/* the hero's words wait for the night to open; the coins in the pills arrive after the mark lands */
html.intro-run:not(.intro-open) .hero-copy > * { animation-play-state: paused; }
html.intro-run .loop-coin { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
html.intro-run .loop-tag { opacity: 0; }
html.intro-run .stage-knot { visibility: hidden; }
.loop-coin { transition: opacity 0.35s var(--ease), transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
.loop-tag { transition: opacity 0.5s var(--ease) 0.15s; }
.intro { position: fixed; inset: 0; z-index: 100; overflow: hidden; background: #16020A; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.intro .half { position: absolute; left: 50%; top: 50%; width: 160vmax; height: 400vmax; background: #16020A; }
.intro .half.a { transform-origin: 100% 50%; transform: translate(-100%, -50%) rotate(-28deg); }
.intro .half.b { transform-origin: 0 50%; transform: translate(0, -50%) rotate(-28deg); }
.ix-wrap { position: absolute; transform-origin: 0 0; }
.ix-wrap .ix { display: block; width: 100%; height: 100%; overflow: visible; }
.ix-tag { position: absolute; top: calc(97% + 6px); transform: translateX(-50%); opacity: 0; white-space: nowrap; font: 650 clamp(11px, 1.4vw, 14px)/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: #FFFFFF; }
.ix-tag.l { left: 27.76%; }
.ix-tag.r { left: 72.24%; color: #FF8AA6; }
.ix-word { position: absolute; left: 50%; top: calc(100% + clamp(44px, 6vw, 64px)); transform: translateX(-50%); opacity: 0; font: 760 clamp(30px, 4.4vw, 52px)/1 var(--font-display); letter-spacing: -0.045em; color: #FFFFFF; white-space: nowrap; }
.intro-skip { position: absolute; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); padding: 9px 16px; border-radius: 999px; border: 1px solid rgba(255, 245, 247, 0.22); background: transparent; color: rgba(255, 245, 247, 0.7); font: 600 12px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; }
.intro-skip:hover { color: #FFFFFF; border-color: rgba(255, 245, 247, 0.5); }
