/*
  findspotifytwin.com. Near-black ground, one lime accent, white pill actions,
  one wide grotesk. Written phone-first: the base rules are the phone layout and
  the min-width blocks widen it.
*/

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --bg: #0a0a0a;
  --surface: #161616;
  --ink: #ffffff;
  --muted: #a8a8a8;
  --accent: #c4f65a;
  --danger: #ff8a7a;
  --line: rgb(255 255 255 / 0.12);
  --line-strong: rgb(255 255 255 / 0.24);
  --gut: 24px;
  --nav: 56px;
  --r-lg: 24px;
  --r-md: 16px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav) + 16px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 "Archivo", system-ui, sans-serif; overflow-x: clip; }
h1, h2, h3, p, ul, ol, dl, dd, fieldset, legend { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.icon { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

h1, h2, .wide { font-weight: 800; font-stretch: 118%; letter-spacing: -0.02em; line-height: 1.04; text-wrap: balance; }
h1 { font-size: clamp(34px, 9.8vw, 76px); color: var(--accent); }
h2 { font-size: clamp(28px, 7.4vw, 48px); }
h3 { font-size: 18px; font-weight: 700; font-stretch: 108%; line-height: 1.3; }
.muted { color: var(--muted); }
.lead { font-size: clamp(17px, 1.2vw + 13px, 20px); line-height: 1.45; }
.kicker { font-size: 14px; font-weight: 700; font-stretch: 118%; }

.wrap { width: min(100% - 2 * var(--gut), 1120px); margin-inline: auto; }
.section { padding: 64px 0; }
.section > .wrap > h2 { margin-bottom: 32px; max-width: 18ch; }
.section > .wrap > h2 .muted { display: block; }

/* ---------- Bar ---------- */

.nav { position: fixed; inset: 0 0 auto 0; z-index: 10; height: var(--nav); background: var(--bg); border-bottom: 1px solid var(--line); }
.nav > .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-stretch: 118%; font-size: 17px; text-decoration: none; white-space: nowrap; }
.logo svg { width: 24px; height: 24px; }
/* On a phone the bar is just the name; the same links sit in the footer. */
.nav__links { display: none; gap: 20px; font-size: 15px; font-weight: 500; }
.nav__links a { text-decoration: none; }
.nav__links a:hover { text-decoration: underline; text-underline-offset: 5px; }

/* ---------- Buttons, links, fields ---------- */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 28px; border: 0; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 17px; text-decoration: none; cursor: pointer; transition: transform 120ms ease-out, background-color 120ms ease-out; }
.btn:hover { background: #e4e4e4; }
.btn:active { transform: scale(0.985); }
.btn[disabled] { opacity: 0.55; cursor: default; }
.btn--quiet { background: rgb(255 255 255 / 0.1); color: var(--ink); }
.btn--quiet:hover { background: rgb(255 255 255 / 0.16); }
.btn--wide { width: 100%; }
.textlink { padding: 0; border: 0; background: none; font-size: 14px; font-weight: 500; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 5px; cursor: pointer; }
.textlink:hover { text-decoration-color: var(--ink); }

.field { display: grid; gap: 8px; font-size: 14px; font-weight: 500; }
.field > span { color: var(--muted); }
.field input, .field select { width: 100%; height: 52px; padding: 0 20px; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 999px; font-size: 16px; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 24px) 23px, calc(100% - 18px) 23px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 44px; }
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgb(196 246 90 / 0.2); }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--danger); }
.field input::placeholder { color: rgb(255 255 255 / 0.38); }
.status { min-height: 21px; font-size: 14px; line-height: 21px; color: var(--muted); }
.status[data-error] { color: var(--danger); }
.checkrow { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; cursor: pointer; }
.checkrow input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); }

/* ---------- Ripples ---------- */

.ripples { position: relative; overflow: hidden; }
.ripples > canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }

/* ---------- The first screen: a story card ---------- */

.hero { position: relative; min-height: 100svh; display: grid; padding: calc(var(--nav) + 24px) 0 40px; overflow: clip; }
.hero > .ripples { position: absolute; inset: 0; }
.hero__copy { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; }
.hero__copy .lead { max-width: 42ch; }
.linkform { display: grid; gap: 12px; width: min(100%, 540px); margin-top: 6px; }
.linkform .field { text-align: center; }
.linkform .field input { text-align: center; background: rgb(10 10 10 / 0.82); }
.hero__alt { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; }
.promises { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.promises li, .pill { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; font-size: 13px; font-weight: 600; white-space: nowrap; background: rgb(10 10 10 / 0.78); border: 1px solid var(--line-strong); border-radius: 999px; }
.promises .icon, .pill .icon { width: 16px; height: 16px; color: var(--accent); }
.livecount { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.livecount .icon { color: var(--accent); }

/* ---------- Cards ---------- */

.card { display: grid; gap: 16px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.card__head { display: grid; gap: 4px; }
.card__head h3 { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; font-stretch: 118%; }
.card__head h3 .icon { color: var(--accent); }
.card__head p { font-size: 14px; color: var(--muted); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.fields .field--full { grid-column: 1 / -1; }
.listing { display: grid; gap: 16px; max-width: 640px; margin-inline: auto; }
.listing__intro { display: grid; gap: 8px; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.inline { display: flex; gap: 8px; }
.inline input { flex: 1 1 0; min-width: 0; }
.inline .btn { flex: none; padding: 0 20px; font-size: 15px; }

.more > summary { cursor: pointer; font-size: 14px; font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 5px; }
.more[open] > summary { margin-bottom: 14px; }

/* ---------- Songs ---------- */

.songs > li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.songs > li:first-child { border-top: 0; padding-top: 0; }
.songs__rank { flex: none; width: 1.2ch; font-size: 14px; font-variant-numeric: tabular-nums; color: var(--accent); }
.songs__cover { flex: none; display: grid; place-items: center; width: 52px; height: 52px; overflow: hidden; border-radius: 10px; color: var(--muted); background: rgb(255 255 255 / 0.08); }
.songs__cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.songs__text { flex: 1 1 auto; min-width: 0; display: grid; }
.songs__title { font-weight: 600; overflow-wrap: anywhere; }
.songs__artist { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.songs__plays { flex: none; text-align: right; font-size: 13px; color: var(--muted); }
.songs__plays strong { display: block; font-size: 22px; font-weight: 800; font-stretch: 118%; line-height: 1.1; color: var(--accent); }
.bigtime { display: grid; justify-items: center; gap: 8px; text-align: center; }
.bigtime strong { font-size: clamp(44px, 12vw, 68px); font-weight: 800; font-stretch: 118%; line-height: 1; letter-spacing: -0.03em; color: var(--accent); font-variant-numeric: tabular-nums; }
.column { display: grid; gap: 16px; align-content: start; }

/* ---------- Steps, reasons, guide ---------- */

.tiles { display: grid; gap: 12px; }
.tile { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 16px; row-gap: 4px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.tile__badge { grid-row: 1 / span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--bg); font-weight: 800; font-stretch: 118%; }
.tile p { grid-column: 2; color: var(--muted); }
.rows { border-top: 1px solid var(--line); }
.rows > li { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.rows__num { flex: none; width: 1.4ch; font-size: 24px; font-weight: 800; font-stretch: 118%; line-height: 1.2; color: var(--accent); }
.rows p { color: var(--muted); }
.split { display: grid; gap: 24px; }

.bigstat { font-size: clamp(36px, 10.4vw, 132px); line-height: 1; font-variant-numeric: tabular-nums; }
.statement h2 { margin: 24px 0 12px; font-size: clamp(34px, 10.4vw, 96px); color: var(--accent); max-width: none; }
.statement .source { margin-top: 16px; font-size: 13px; color: var(--muted); max-width: 52ch; }

.faq > div { display: grid; gap: 6px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.faq > div:first-child { border-top: 1px solid var(--line); }
.faq p { color: var(--muted); max-width: 64ch; }

/* ---------- Result page ---------- */

.result { position: relative; padding: calc(var(--nav) + 8px) 0 48px; overflow: clip; }
.result > .ripples { position: absolute; inset: 0 0 auto 0; height: 46svh; opacity: 0.9; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.result > .wrap { position: relative; display: grid; gap: 24px; }
.story { display: grid; justify-items: center; gap: 14px; padding-top: 22svh; text-align: center; }
.story .lead { max-width: 40ch; }
.clues { display: grid; }
.clues > div { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.clues > div:first-child { border-top: 0; padding-top: 0; }
.clues .icon { color: var(--accent); }
.clues dt { flex: 1 1 auto; font-size: 14px; color: var(--muted); }
.clues dd { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.matches { display: grid; gap: 12px; }
.match__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.match__score { font-size: 32px; font-weight: 800; font-stretch: 118%; line-height: 1; color: var(--accent); }
.match__tier { font-size: 13px; font-weight: 700; }
.actions { display: grid; gap: 10px; }
.wanted { display: block; width: min(100%, 300px); margin-inline: auto; border-radius: var(--r-md); border: 1px solid var(--line); }
.grid2 { display: grid; gap: 16px; }

/* ---------- Footer ---------- */

.foot { padding: 32px 0 40px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.foot > .wrap { display: grid; gap: 10px; }
.foot__links { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--ink); }

/* ---------- Wider screens ---------- */

@media (min-width: 720px) {
  :root { --gut: 48px; --nav: 64px; }
  .nav__links { display: flex; }
  .section { padding: 104px 0; }
  .linkform__row { display: flex; gap: 10px; }
  .linkform__row .field { flex: 1 1 0; }
  .linkform__row .btn { align-self: end; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tile { grid-template-columns: minmax(0, 1fr); row-gap: 8px; padding: 24px; }
  .tile__badge { grid-row: auto; margin-bottom: 8px; }
  .tile p { grid-column: auto; }
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; align-items: start; }
  .card { padding: 28px; }
  .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result > .ripples { height: min(60svh, 560px); }
}
@media (min-width: 1024px) {
  .tiles--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
