/* The MusicCrate homepage. Same paper, ink and terracotta as the app (ios/App/UI/Theme.swift). */
@font-face { font-family: 'Bricolage'; src: url('../fonts/bricolage.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
:root {
  --bg: #F6F1EA; --card: #FFFCF7; --ink: #2A241E; --ink-2: #544A40; --muted: #72675B; --line: rgba(42, 36, 30, .09);
  --accent: #C8663A; --accent-ink: #A64B22; --keep: #3A7236; --skip: #A64B22;
  --store-bg: #1D1A17; --store-ink: #FFFCF7; --bezel: #14110F;
  --shadow: 0 40px 80px -30px rgba(60, 44, 28, .35), 0 12px 24px -12px rgba(60, 44, 28, .18);
  --card-shadow: 0 1px 2px rgba(60, 44, 28, .08), 0 18px 36px -14px rgba(60, 44, 28, .28);
  --wash: #E9C9AE;
}
@media (prefers-color-scheme: dark) { :root {
  --bg: #16130F; --card: #27221D; --ink: #F2ECE4; --ink-2: #C9BFB3; --muted: #9C9185; --line: rgba(242, 236, 228, .12);
  --accent: #D9774A; --accent-ink: #E8936A; --keep: #7DBF78; --skip: #E8936A;
  --store-bg: #F2ECE4; --store-ink: #16130F; --bezel: #050403;
  --shadow: 0 40px 80px -30px rgba(0, 0, 0, .7), 0 12px 24px -12px rgba(0, 0, 0, .5);
  --card-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 36px -14px rgba(0, 0, 0, .6);
  --wash: #4A2E1E;
}}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.5 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif; letter-spacing: -.01em; overflow-x: clip; }
h1, h2, .title, .song-title, .pl-title { font-family: 'Bricolage', -apple-system, sans-serif; letter-spacing: -.025em; }
a { color: var(--accent-ink); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
main { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* hero */
.hero { text-align: center; padding: 72px 0 0; position: relative; }
.hero::before { content: ''; position: absolute; inset: 0 calc(50% - 50vw) auto; height: 900px; z-index: -1; pointer-events: none;
  background: radial-gradient(50% 45% at 50% 62%, color-mix(in srgb, var(--wash) 70%, transparent), transparent 70%); transition: background .6s; }
.icon { border-radius: 20px; box-shadow: 0 10px 24px -8px rgba(150, 60, 20, .45); }
h1 { font-size: clamp(48px, 9vw, 84px); font-weight: 800; line-height: 1; margin: 20px 0 12px; }
.lede { font-size: clamp(20px, 2.6vw, 24px); color: var(--ink-2); margin: 0 0 28px; }
.store { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border-radius: 999px;
  background: var(--store-bg); color: var(--store-ink); font-weight: 600; text-decoration: none; transition: transform .2s; }
.store:hover { transform: translateY(-1px); }
.meta { color: var(--muted); font-size: 15px; margin: 12px 0 0; }

/* phone */
.phone-wrap { margin: 56px auto 0; width: fit-content; }
.phone { width: 320px; height: 670px; border-radius: 54px; padding: 11px; background: var(--bezel); box-shadow: var(--shadow); margin: 0 auto; }
.screen { position: relative; width: 100%; height: 100%; border-radius: 44px; overflow: hidden; background: var(--bg); }
.deck-screen { background: radial-gradient(90% 55% at 50% 38%, color-mix(in srgb, var(--wash) 55%, var(--bg)), var(--bg) 75%); transition: background .5s; }
figcaption { color: var(--muted); font-size: 15px; margin-top: 20px; text-align: center; }

.bar { position: absolute; top: 48px; left: 14px; right: 14px; display: flex; align-items: center; justify-content: space-between; }
.title { font-size: 16px; font-weight: 650; }
.round { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 0; padding: 0; cursor: pointer;
  background: color-mix(in srgb, var(--card) 80%, transparent); box-shadow: 0 6px 16px -8px rgba(60, 44, 28, .35); color: var(--ink); }
.round svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.bar .round svg circle { fill: currentColor; stroke: none; }

.deck { position: absolute; left: 18px; right: 18px; top: 112px; height: 400px; touch-action: none; }
.card { position: absolute; inset: 0 0 auto; border-radius: 22px; background: var(--card); box-shadow: var(--card-shadow); overflow: hidden;
  user-select: none; -webkit-user-select: none; transform-origin: 50% 110%; will-change: transform; }
.card.top { cursor: grab; }
.card.top:active { cursor: grabbing; }
.card svg.art { display: block; width: 100%; aspect-ratio: 1; }
.card .text { padding: 12px 14px 16px; text-align: left; }
.song-title { font-size: 20px; font-weight: 700; line-height: 1.15; }
.song-artist { color: var(--ink-2); font-size: 15px; margin-top: 2px; }
.stamp { position: absolute; top: 18px; padding: 2px 12px; border: 3px solid; border-radius: 10px; font: 800 24px 'Bricolage', sans-serif;
  background: color-mix(in srgb, var(--bg) 85%, transparent); opacity: 0; pointer-events: none; }
.stamp.keep { left: 16px; color: var(--keep); transform: rotate(-12deg); }
.stamp.skip { right: 16px; color: var(--skip); transform: rotate(12deg); }

.controls { position: absolute; bottom: 30px; left: 0; right: 0; display: flex; align-items: center; justify-content: center; gap: 18px; }
.round.big { width: 60px; height: 60px; }
.round.big svg { width: 24px; height: 24px; stroke-width: 2.6; }
.skip { color: var(--skip); }
.keep { color: var(--keep); }
.keep svg { fill: currentColor; stroke: none; }
.undo { width: 46px; height: 46px; color: var(--ink-2); }
.undo:disabled { opacity: .4; cursor: default; }

/* features */
.feature { text-align: center; padding-top: 140px; }
h2 { font-size: clamp(32px, 5vw, 48px); font-weight: 750; line-height: 1.08; margin: 0 auto 14px; max-width: 18ch; }
.feature p { color: var(--ink-2); font-size: 19px; max-width: 34rem; margin: 0 auto; }
.feature .phone-wrap { margin-top: 56px; }
@media (min-width: 900px) {
  .feature { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 64px; text-align: left; }
  .feature h2, .feature p { margin-left: 0; }
  .feature .learn, .feature .phone-wrap { margin-top: 0; }
  .feature.flip .copy { order: 2; }
}
.learn { margin: 56px auto 0; width: min(340px, 82%); }
.big-card { position: relative; border-radius: 26px; background: var(--card); box-shadow: var(--shadow); overflow: hidden; text-align: left; transform: rotate(-2deg); }
.big-card svg.art { display: block; width: 100%; aspect-ratio: 1; }
.big-card .progress { height: 4px; background: var(--line); }
.big-card .progress i { display: block; height: 100%; width: 38%; background: var(--accent); }
.big-card .text { padding: 16px 18px 20px; }
.big-card .song-title { font-size: 24px; }
.big-card .why { color: var(--accent-ink); font-size: 15px; margin-top: 8px; }

.list-screen { padding: 60px 18px 0; text-align: left; }
.play { display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; border-radius: 999px; margin: 4px 0 12px;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 15px; }
.play svg { width: 13px; height: 13px; fill: currentColor; }
.pl-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.grid4 { width: 92px; height: 92px; border-radius: 14px; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; flex: none; box-shadow: var(--card-shadow); }
.grid4 svg { width: 100%; height: 100%; display: block; }
.pl-title { font-size: 30px; font-weight: 800; line-height: 1; }
.pl-sub { color: var(--muted); font-size: 13px; margin-top: 6px; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.row svg { width: 44px; height: 44px; border-radius: 8px; flex: none; }
.row .t { font-size: 15px; font-weight: 600; line-height: 1.2; }
.row .a { font-size: 13px; color: var(--muted); }

/* footer */
footer { max-width: 1040px; margin: 140px auto 0; padding: 40px 16px 56px; text-align: center; border-top: 1px solid var(--line); }
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; margin: 28px 0 0; }
footer nav a { color: var(--ink-2); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
footer nav a:hover { color: var(--ink); }
footer p { color: var(--muted); font-size: 13px; margin: 12px 0 0; }

@media (max-width: 420px) {
  .phone { width: 296px; height: 620px; border-radius: 50px; }
  .screen { border-radius: 40px; }
  .deck { height: 370px; }
}
@media (prefers-reduced-motion: no-preference) {
  .phone-wrap, .learn { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(16px); } }
}
