/* Tapelogs home page. The app's own palette and typefaces (self-hosted), square tape-case corners,
   and one signature detail: the rating wave. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-grotesk.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  /* ink ramp (the app's dark theme) */
  --bg: #1c1c1e;
  --surface: #262626;
  --surface-2: #2e2e30;
  --line: rgba(242, 242, 242, 0.1);
  --text: #f2f2f2;
  --text-2: #a9a9ac;
  --text-3: #7c7c80;
  --accent: #a09ee6;
  --accent-ink: #1c1c1e;
  --radius: 2px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { font-family: var(--font-display); font-weight: 600; font-size: 20px; text-decoration: none; letter-spacing: -0.01em; }
.top nav a { color: var(--text-2); font-size: 14px; text-decoration: none; transition: color 160ms var(--ease); }
.top nav a:hover, .top nav a:focus-visible { color: var(--text); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center; padding-block: 32px 96px; min-height: min(calc(100vh - 72px), 760px); }
h1, h2 { font-family: var(--font-display); font-weight: 600; color: var(--text); }
h1 { font-size: clamp(40px, 5.4vw, 64px); line-height: 1.04; letter-spacing: -0.025em; max-width: 14ch; }
.lead { margin-top: 24px; font-size: 20px; line-height: 1.5; color: var(--text-2); max-width: 36ch; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-top: 32px; }
.btn {
  display: inline-block; padding: 16px 24px; background: var(--text); color: var(--accent-ink);
  font-weight: 600; font-size: 16px; text-decoration: none; border-radius: var(--radius);
  transition: background-color 160ms var(--ease), transform 160ms var(--ease);
}
.btn:hover, .btn:focus-visible { background: #fff; }
.btn:active { transform: scale(0.98); }
.textlink { color: var(--text-2); font-size: 16px; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line); transition: color 160ms var(--ease); }
.textlink:hover, .textlink:focus-visible { color: var(--text); }
.note { margin-top: 24px; font-size: 14px; color: var(--text-3); }
a:focus-visible, button:focus-visible, .slider:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- phone ---------- */
.phone-stage { display: flex; justify-content: center; }
.phone {
  width: 312px; height: 636px; padding: 10px; background: #0f0f10; border: 1px solid var(--line);
  border-radius: 44px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.screen { height: 100%; background: var(--bg); border-radius: 34px; padding: 20px 18px; overflow: hidden; display: flex; flex-direction: column; gap: 16px; }
.screen-bar { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--text-3); height: 20px; }
.album { display: flex; gap: 12px; align-items: center; }
.album .cover { width: 72px; height: 72px; flex: none; border-radius: var(--radius); display: block; }
.album h3 { font-family: var(--font-display); font-weight: 600; font-size: 20px; line-height: 1.15; }
.album p { font-size: 12px; color: var(--text-2); }
.album .artist { font-size: 14px; color: var(--accent); }
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
.label { font-family: var(--font-display); font-weight: 600; font-size: 14px; }
.value { font-family: var(--font-display); font-weight: 600; font-size: 24px; color: var(--accent); font-variant-numeric: tabular-nums; }
.wave { display: block; width: 100%; height: 56px; overflow: visible; }
.wave .base { stroke: var(--line); stroke-width: 1; }
.wave .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.wave .dot { fill: var(--accent); stroke: var(--bg); stroke-width: 3; }
.mini-hist { display: flex; align-items: flex-end; gap: 4px; height: 44px; }
.mini-hist span { flex: 1; background: var(--surface-2); height: 4px; transform-origin: bottom; transition: height 700ms var(--ease), background-color 400ms var(--ease); }
.mini-hist span.peak { background: var(--accent); }
.review { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; opacity: 0; transform: translateY(8px); transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
.review.in { opacity: 1; transform: none; }
.review .who { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); margin-bottom: 4px; }
.avatar { width: 20px; height: 20px; background: var(--surface-2); border-radius: var(--radius); display: grid; place-items: center; font-size: 11px; color: var(--text); }
.review p { font-size: 12px; line-height: 1.45; color: var(--text); }

/* where to buy, inside the phone */
.mini-shops .label { display: block; margin-bottom: 8px; }
.mini-shops .cards { display: flex; gap: 8px; }
.mshop { flex: 1; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; opacity: 0; transform: translateY(8px); transition: opacity 400ms var(--ease), transform 400ms var(--ease); }
.mshop.in { opacity: 1; transform: none; }
.mshop b { display: block; font-size: 14px; font-weight: 600; }
.mshop.first b { color: var(--accent); }
.mshop span { font-size: 11px; color: var(--text-2); }

/* ---------- feature rows ---------- */
.rows { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 96px 0; border-bottom: 1px solid var(--line); }
.row:nth-child(even) .copy { order: 2; }
.eyebrow { font-size: 14px; color: var(--accent); margin-bottom: 12px; }
h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -0.02em; max-width: 16ch; }
.row p.body { margin-top: 20px; font-size: 18px; line-height: 1.55; color: var(--text-2); max-width: 40ch; }
.figure { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.caption { margin-top: 16px; font-size: 12px; color: var(--text-3); }

/* rate card (interactive) */
.rate-value { font-family: var(--font-display); font-weight: 600; font-size: 72px; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.rate-sub { font-size: 14px; color: var(--text-2); margin: 8px 0 24px; }
.slider { touch-action: none; cursor: pointer; padding: 8px 0; }
.slider .wave { height: 88px; }
.scale { position: relative; height: 16px; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; margin-top: 8px; }
.scale span { position: absolute; top: 0; transform: translateX(-50%); }

/* diary card */
.diary-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-3); margin-bottom: 16px; }
.diary-head .net { color: var(--text-2); transition: color 300ms var(--ease); }
.diary-head .net.on { color: var(--accent); }
.logs { list-style: none; }
.log { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); opacity: 0; transform: translateY(8px); transition: opacity 400ms var(--ease), transform 400ms var(--ease); }
.log:first-child { border-top: 0; }
.log.in { opacity: 1; transform: none; }
.log .cover { width: 40px; height: 40px; border-radius: var(--radius); display: block; }
.log .t { font-size: 14px; font-weight: 500; }
.log .a { font-size: 12px; color: var(--text-2); }
.log .r { font-size: 14px; color: var(--text); font-variant-numeric: tabular-nums; text-align: right; }
.log .s { display: block; font-size: 11px; color: var(--text-3); transition: color 300ms var(--ease); }
.log .s.done { color: var(--accent); }

/* audience card */
.hist { display: flex; align-items: flex-end; gap: 8px; height: 160px; }
.hist .bar { flex: 1; background: var(--surface-2); height: 4px; transition: height 800ms var(--ease), background-color 400ms var(--ease); }
.hist .bar.peak { background: var(--accent); }
.hist-scale { position: relative; height: 16px; font-size: 11px; color: var(--text-3); margin-top: 8px; font-variant-numeric: tabular-nums; }
.hist-scale span { position: absolute; top: 0; transform: translateX(-50%); }
.aud-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; }
.aud-head .big { font-family: var(--font-display); font-weight: 600; font-size: 48px; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.aud-head .sub { font-size: 14px; color: var(--text-2); }

/* taste card */
.taste-rows { display: grid; gap: 16px; margin-bottom: 24px; }
.taste-row { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; font-size: 13px; color: var(--text-2); }
.track { position: relative; height: 2px; background: var(--line); }
.track i { position: absolute; top: -5px; width: 12px; height: 12px; margin-left: -6px; transition: left 900ms var(--ease); left: 0; }
.track .you { background: var(--accent); }
.track .friend { background: var(--text); }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-3); margin-bottom: 24px; }
.legend b { display: inline-block; width: 8px; height: 8px; margin-right: 8px; background: var(--text); }
.legend b.you-key { background: var(--accent); }
.match { display: flex; align-items: baseline; justify-content: space-between; }
.match .big { font-family: var(--font-display); font-weight: 600; font-size: 48px; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.match .sub { font-size: 14px; color: var(--text-2); }
.bar-track { height: 4px; background: var(--line); margin-top: 12px; }
.bar-track i { display: block; height: 4px; width: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform 1000ms var(--ease); }

/* shops card */
.shops { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.shop { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; opacity: 0; transform: translateY(12px); transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
.shop.in { opacity: 1; transform: none; }
.shop b { display: block; font-weight: 600; font-size: 16px; }
.shop span { font-size: 12px; color: var(--text-2); }
.shop.first b { color: var(--accent); }
.wish { margin-top: 16px; display: flex; justify-content: space-between; font-size: 14px; color: var(--text-2); border-top: 1px solid var(--line); padding-top: 16px; }
.wish em { font-style: normal; color: var(--accent); }

/* also */
.also { padding-block: 96px; border-bottom: 1px solid var(--line); }
.also h2 { margin-bottom: 40px; }
.also ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0 64px; }
.also li { padding: 20px 0; border-top: 1px solid var(--line); color: var(--text-2); font-size: 16px; }
.also li b { display: block; color: var(--text); font-weight: 500; margin-bottom: 4px; }

/* get it */
.get { padding-block: 96px; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.get h2 { max-width: 18ch; }

/* footer */
footer { border-top: 1px solid var(--line); padding-block: 32px 48px; font-size: 14px; color: var(--text-3); }
footer .links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 16px; }
footer a { color: var(--text-2); text-decoration: none; transition: color 160ms var(--ease); }
footer a:hover, footer a:focus-visible { color: var(--text); }

/* link bounce (profile, review and invite links) */
.bounce { max-width: 480px; margin: 12vh auto; text-align: center; padding: 0 24px; }
.bounce .tag { color: var(--accent); font-size: 14px; margin-bottom: 12px; }
.bounce h1 { font-size: 36px; max-width: none; margin-bottom: 12px; letter-spacing: -0.02em; }
.bounce p { color: var(--text-2); margin-bottom: 32px; }
.bounce .btn { display: block; margin-top: 12px; }
.bounce .btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.bounce .code { margin-top: 16px; font-size: 14px; color: var(--text-2); letter-spacing: 0.04em; }
.bounce .small { margin-top: 32px; font-size: 14px; color: var(--text-3); }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 48px; min-height: 0; padding-block: 16px 64px; }
  h1 { max-width: none; }
  .row { grid-template-columns: 1fr; gap: 32px; padding: 64px 0; }
  .row:nth-child(even) .copy { order: 0; }
  .also ul { grid-template-columns: 1fr; }
  .figure { padding: 24px; }
  .taste-row { grid-template-columns: 96px 1fr; }
}

/* ---------- reduced motion: show the finished state ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 1ms !important; transition-delay: 0ms !important; }
}
.hero .btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
