/*
 * lofireels — one stylesheet for every page.
 *
 * The look is a lo-fi bedroom at golden hour: warm paper, a sunset gradient,
 * chunky rounded buttons that sit on a hard shadow like stickers. Dark mode is
 * the same room at 2 a.m. with the desk lamp on. Playful, never loud: the
 * reels people make are the colourful thing on the page.
 */
:root {
  color-scheme: light dark;
  --bg: #fff6ec;
  --bg-2: #ffeedd;
  --panel: #ffffff;
  --ink: #2b2340;
  --muted: #74698c;
  --line: #ecdccb;
  --shadow: #2b2340;
  --accent: #ff6f9f;
  --accent-ink: #ffffff;
  --lilac: #8f7bff;
  --mint: #2fbfa8;
  --sun: #ffb347;
  --ok: #1f9d77;
  --error: #d6405f;
  --sunset: linear-gradient(135deg, #ffb347 0%, #ff6f9f 48%, #8f7bff 100%);
  --radius: 18px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161327;
    --bg-2: #1d1934;
    --panel: #221e3b;
    --ink: #f3ecff;
    --muted: #a99fc4;
    --line: #342e55;
    --shadow: #0b0916;
    --accent: #ff7fab;
    --accent-ink: #1a1226;
    --lilac: #a395ff;
    --mint: #4fd8c2;
    --ok: #4fd8a8;
    --error: #ff8098;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 500px at 85% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(900px 500px at -10% 10%, color-mix(in srgb, var(--lilac) 14%, transparent), transparent 70%),
    var(--bg);
  color: var(--ink);
  font: 16px/1.6 ui-rounded, "SF Pro Rounded", "Nunito", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img, video { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--lilac); outline-offset: 2px; border-radius: 6px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(30px, 5.4vw, 52px); margin: 0 0 14px; }
h2 { font-size: clamp(22px, 3.2vw, 30px); margin: 36px 0 12px; }
h3 { font-size: 18px; margin: 0 0 8px; }

/* ── frame ───────────────────────────────────────────────────────────── */

.masthead {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 40px);
  flex-wrap: wrap;
}
.wordmark {
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.04em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.wordmark .disc {
  width: 28px; height: 28px; border-radius: 50%;
  background: radial-gradient(circle, var(--bg) 0 3px, var(--ink) 4px 6px, transparent 7px), var(--sunset);
  box-shadow: 2px 2px 0 var(--shadow);
  animation: spin 6s linear infinite;
}
.wordmark b span { color: var(--accent); }
.wordmark b { font-weight: 900; }
.masthead nav { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.masthead nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 99px;
}
.masthead nav a:hover { background: var(--bg-2); }
.masthead nav a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.masthead .more { margin-left: auto; }
.masthead .more a.cta { background: var(--accent); color: var(--accent-ink); box-shadow: 3px 3px 0 var(--shadow); }
.masthead .more a.cta:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--shadow); }

main { width: 100%; max-width: 1080px; margin: 0 auto; padding: 18px clamp(16px, 4vw, 40px) 64px; flex: 1; }
main.narrow { max-width: 720px; }

.siteftr {
  border-top: 2px dashed var(--line);
  padding: 26px clamp(16px, 4vw, 40px) 40px;
  color: var(--muted);
  font-size: 14px;
}
.siteftr > * { max-width: 1080px; margin-left: auto; margin-right: auto; }
.siteftr nav { display: flex; gap: 18px; flex-wrap: wrap; margin: 10px auto; }
.siteftr nav a { color: var(--ink); font-weight: 650; }
.feedback-line { font-size: 15px; color: var(--ink); }
.feedback-line a { font-weight: 800; }

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

.lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 640px; margin: 0 0 22px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px; font-weight: 800; color: var(--lilac); margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.hint { font-weight: 500; color: var(--muted); font-size: 13px; display: block; }
.error { color: var(--error); font-weight: 650; }
.ok { color: var(--ok); font-weight: 650; }
.note {
  background: color-mix(in srgb, var(--mint) 14%, var(--panel));
  border: 2px solid color-mix(in srgb, var(--mint) 50%, transparent);
  padding: 10px 14px; border-radius: 14px;
}
.gradient-text { background: var(--sunset); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ── controls ────────────────────────────────────────────────────────── */

button, .button {
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  border: 2px solid var(--shadow);
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 18px;
  border-radius: 14px;
  box-shadow: 3px 3px 0 var(--shadow);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
button:hover:not(:disabled), .button:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--shadow); }
button:active:not(:disabled), .button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.quiet, .button.quiet { background: var(--panel); color: var(--ink); }
button.big, .button.big { font-size: 19px; padding: 14px 26px; border-radius: 18px; }
button.link { background: none; border: 0; box-shadow: none; color: var(--accent); padding: 0; font-weight: 700; }
button.link:hover { transform: none; box-shadow: none; text-decoration: underline; }
.controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }

label { display: block; font-weight: 750; margin: 14px 0 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], textarea, select {
  font: inherit;
  width: 100%;
  padding: 11px 13px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: var(--panel);
  color: var(--ink);
}
input:focus, textarea:focus, select:focus { border-color: var(--lilac); outline: none; }
textarea { min-height: 130px; resize: vertical; }

.panel {
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(16px, 2.6vw, 24px);
}
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }

.pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 800;
  border: 2px solid var(--line);
  white-space: nowrap;
}
.pill.free { border-color: color-mix(in srgb, var(--mint) 60%, transparent); color: var(--mint); }
.pill.credit { border-color: color-mix(in srgb, var(--sun) 70%, transparent); color: color-mix(in srgb, var(--sun) 80%, var(--ink)); }
.pill.hot { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
.chip {
  font-size: 14px; padding: 6px 13px; border-radius: 99px; box-shadow: 2px 2px 0 var(--shadow);
  background: var(--panel); color: var(--ink);
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

.segmented { display: inline-flex; gap: 0; border: 2px solid var(--shadow); border-radius: 14px; overflow: hidden; box-shadow: 3px 3px 0 var(--shadow); }
.segmented button { border: 0; border-radius: 0; box-shadow: none; background: var(--panel); color: var(--ink); padding: 9px 16px; }
.segmented button + button { border-left: 2px solid var(--shadow); }
.segmented button[aria-pressed="true"] { background: var(--lilac); color: #fff; }
.segmented button:hover:not(:disabled) { transform: none; box-shadow: none; }
.toggle { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; margin: 0; cursor: pointer; }
.toggle input { width: 20px; height: 20px; accent-color: var(--accent); }

/* ── landing ─────────────────────────────────────────────────────────── */

.hero { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(20px, 5vw, 56px); align-items: center; padding: 18px 0 30px; }
.hero h1 { font-size: clamp(38px, 7vw, 72px); letter-spacing: -0.045em; }
.phone {
  aspect-ratio: 9 / 16;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  border-radius: 34px;
  border: 3px solid var(--shadow);
  box-shadow: 8px 8px 0 var(--shadow);
  background: var(--sunset);
  position: relative;
  overflow: hidden;
}
.phone .bars { position: absolute; inset: auto 18px 26px; display: flex; gap: 5px; align-items: flex-end; height: 70px; }
.phone .bars i { flex: 1; background: rgba(255, 255, 255, 0.85); border-radius: 4px; animation: bounce 1.5s ease-in-out infinite; }
.phone .bars i:nth-child(2n) { animation-delay: -0.4s; }
.phone .bars i:nth-child(3n) { animation-delay: -0.9s; }
.phone .cuts { position: absolute; inset: 22px 18px auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.phone .cuts span { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.55); }
.phone .cuts span.on { background: #fff; }
.phone .who {
  position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%);
  width: 46%; aspect-ratio: 3 / 4; border: 3px dashed rgba(255, 255, 255, 0.9); border-radius: 18px;
  display: grid; place-items: center; font-size: 54px;
}
.phone .who small { position: absolute; top: -26px; left: -3px; font: 800 11px/1 ui-rounded, system-ui; color: #fff; background: rgba(0,0,0,.35); padding: 5px 8px; border-radius: 8px; letter-spacing: .06em; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; counter-reset: step; margin-top: 26px; }
.steps .panel { position: relative; padding-top: 34px; }
.steps .panel::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -16px; left: 18px; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 900; color: #fff; background: var(--sunset);
  border: 2px solid var(--shadow); box-shadow: 2px 2px 0 var(--shadow);
}
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.features .panel h3 { display: flex; gap: 8px; align-items: center; }
.faq details { border-bottom: 2px dashed var(--line); padding: 12px 0; }
.faq summary { font-weight: 800; cursor: pointer; }
.faq p { margin: 8px 0 0; color: var(--muted); }

/* ── tracks ──────────────────────────────────────────────────────────── */

.tracks { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.track {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 16px;
}
.track.playing { border-color: var(--accent); }
.track.picked { border-color: var(--lilac); background: color-mix(in srgb, var(--lilac) 10%, var(--panel)); }
.track .meta { display: flex; flex-direction: column; min-width: 0; }
.track .meta b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track .play { width: 42px; height: 42px; padding: 0; justify-content: center; border-radius: 50%; font-size: 14px; background: var(--ink); color: var(--bg); }
.track .len { font-variant-numeric: tabular-nums; }
.track .pick { padding: 6px 12px; font-size: 14px; }
/* In the studio the list scrolls in place, so step 3 stays within reach. */
.stage .tracks { max-height: 460px; overflow-y: auto; padding: 4px 6px 4px 0; }
@media (max-width: 560px) {
  .track { grid-template-columns: auto 1fr auto; }
  .track .pill, .track .len { display: none; }
}

/* ── studio ──────────────────────────────────────────────────────────── */

.studio { display: grid; gap: 22px; }
.stage > header { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.stage > header h2 { margin: 0; }
.stage .num {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--sunset); color: #fff; font-weight: 900; border: 2px solid var(--shadow); box-shadow: 2px 2px 0 var(--shadow);
  flex: none; align-self: center;
}
.drop {
  border: 3px dashed var(--line);
  border-radius: var(--radius);
  padding: 26px;
  text-align: center;
  background: var(--bg-2);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.drop.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--bg-2)); }
.drop b { font-size: 18px; }
.clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 14px; }
.clip {
  position: relative;
  border: 2px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--panel);
  cursor: pointer;
  text-align: left;
  padding: 0;
  box-shadow: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  font-weight: 600;
}
.clip:hover:not(:disabled) { transform: none; box-shadow: none; border-color: var(--lilac); }
.clip[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.clip .thumb { aspect-ratio: 9 / 12; background: var(--bg-2); display: grid; place-items: center; font-size: 30px; overflow: hidden; width: 100%; }
.clip .thumb img { width: 100%; height: 100%; object-fit: cover; }
.clip .info { padding: 8px 10px; font-size: 13px; display: flex; flex-direction: column; gap: 2px; width: 100%; }
.clip .info b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.clip .tick {
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--panel); border: 2px solid var(--shadow); display: grid; place-items: center; font-size: 15px;
}
.clip[aria-pressed="true"] .tick { background: var(--accent); color: var(--accent-ink); }
.clip .bar { height: 6px; background: var(--line); width: 100%; }
.clip .bar span { display: block; height: 100%; background: var(--sunset); width: 0; transition: width 0.2s; }
.clip-wrap { position: relative; }
.clip-wrap .remove {
  position: absolute; top: 8px; left: 8px; width: 28px; height: 28px; padding: 0; justify-content: center; z-index: 1;
  border-radius: 50%; font-size: 13px; background: var(--panel); color: var(--ink); box-shadow: 1px 1px 0 var(--shadow);
}

.make { display: flex; flex-wrap: wrap; gap: 18px 26px; align-items: flex-end; }
.make .field { display: flex; flex-direction: column; gap: 6px; }
.make .field > span { font-weight: 800; font-size: 14px; }
.make .field input[type="text"] { min-width: 220px; }
.summary { font-size: 15px; }

.progress { height: 14px; border-radius: 99px; background: var(--line); overflow: hidden; border: 2px solid var(--shadow); }
.progress span { display: block; height: 100%; background: var(--sunset); width: 0; transition: width 0.6s ease; }

.reels { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.reel { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.reel:target { border-color: var(--accent); }
.reel video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 12px; background: #000; }
.reel .waiting {
  aspect-ratio: 9 / 16; border-radius: 12px; background: var(--sunset); color: #fff; display: grid; place-items: center;
  text-align: center; padding: 18px; font-weight: 800;
}
.reel .waiting .disc { width: 70px; height: 70px; border-radius: 50%; margin: 0 auto 12px; background: radial-gradient(circle, #fff 0 5px, #2b2340 6px 13px, #3a3157 14px 100%); animation: spin 2.2s linear infinite; }
.reel.failed .waiting { background: var(--bg-2); color: var(--error); }
.reel .caption { font-size: 13px; background: var(--bg-2); border-radius: 10px; padding: 8px 10px; color: var(--muted); word-break: break-word; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.plans .price { font-size: 32px; font-weight: 900; letter-spacing: -0.03em; margin: 4px 0 10px; }
.plans .panel.pro { border-color: var(--accent); box-shadow: 6px 6px 0 var(--shadow); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bounce { 0%, 100% { height: 20%; } 50% { height: 100%; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .phone { max-width: 220px; }
  .masthead .more { margin-left: 0; }
}
