/* Marble Music marketing site
   Tokens from docs/design-system.html, look from the candy app icon. */

:root {
  --ink: #2b2d4a;
  --ink-2: #4b4e6d;
  --muted: #6f7290;
  --hairline: rgba(43, 45, 74, 0.10);
  --sheet: #f4f4fb;
  --paper: #ffffff;
  --accent: #7c5ce6;
  --accent-2: #9b84ee;
  --accent-soft: #e8e1fb;
  --accent-ink: #ffffff;
  --record: #ff5c8a;
  --canvas-top: #8f93d6;
  --canvas-mid: #9d9fdd;
  --canvas-bottom: #c4c0ee;
  --note-c: #f5a9c9;
  --note-d: #f3d27a;
  --note-e: #f6b4a6;
  --note-f: #a9e3c7;
  --note-g: #a9cff5;
  --note-a: #c3b7f2;
  --danger: #e5484d;
  --shadow: 0 24px 60px rgba(43, 45, 74, 0.16);
  --shadow-sm: 0 8px 24px rgba(43, 45, 74, 0.12);
  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-xl: 40px;
  --max: 1120px;
  --header-h: 72px;
  --glass: rgba(255, 255, 255, 0.38);
  --glass-line: rgba(255, 255, 255, 0.55);
  --font: "DM Sans", -apple-system, "Segoe UI", system-ui, sans-serif;
  --display: "Fredoka", "DM Sans", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--sheet);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: #5b3fc4; }
h1, h2, h3, .display {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  text-wrap: balance;
  margin: 0;
}
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
.lede { font-size: 1.2rem; color: var(--ink-2); max-width: 38em; }
.muted { color: var(--muted); }

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}
.skip {
  position: absolute;
  left: 12px; top: 8px;
  background: var(--ink); color: #fff;
  padding: 8px 14px; border-radius: 999px;
  transform: translateY(-140%);
  z-index: 100;
}
.skip:focus { transform: none; }

/* ---------- header ---------- */
.site-header {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 50;
  height: auto;
  background: transparent;
  border: 0;
  pointer-events: none;
}
.header-inner {
  position: relative;
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  pointer-events: none;
}
.site-header .wrap {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 10px 30px rgba(43, 45, 74, 0.14);
}
.brand {
  pointer-events: auto;
  position: absolute;
  left: 0;
  top: 2px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  text-decoration: none;
  filter: drop-shadow(0 6px 14px rgba(43, 45, 74, 0.28));
}
.brand img {
  width: 40px;
  height: 40px;
  border-radius: 0;
}
.brand:hover { opacity: 0.92; }
.nav {
  display: flex; gap: 2px; margin: 0 auto; align-items: center;
}
.nav a {
  color: var(--ink-2); text-decoration: none;
  font-weight: 600; font-size: 14.5px;
  padding: 8px 12px;
  border-radius: 999px;
}
.nav a:hover { color: var(--ink); background: none; }
.nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
}
.nav-toggle {
  display: none;
  margin-left: auto;
  flex: none;
  width: 40px; height: 40px; border: 0;
  background: transparent;
  border-radius: 999px; cursor: pointer; color: var(--ink);
}
.nav-toggle:hover { background: rgba(43, 45, 74, 0.06); }
@media (max-width: 820px) {
  .site-header { top: 10px; }
  .header-inner {
    width: calc(100% - 24px);
    justify-content: flex-end;
  }
  .brand { top: 0; }
  .site-header .wrap {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    border-radius: 24px;
    padding: 4px;
    margin-inline: 0;
  }
  .site-header .wrap:has(.nav.open) { width: min(280px, calc(100% - 72px)); }
  .nav-toggle {
    display: grid;
    place-items: center;
    align-self: flex-end;
    margin-left: auto;
  }
  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    position: static;
    background: transparent;
    box-shadow: none;
    border: 0;
    padding: 4px 4px 8px;
    margin-left: 0;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; }
  .nav .btn { text-align: center; margin-top: 4px; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 20px;
  border-radius: 999px; border: 0;
  font: 600 15px/1 var(--font);
  text-decoration: none; cursor: pointer;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), background 160ms;
}
.btn:hover { color: inherit; }
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: none;
}
.btn-primary:hover { background: #1a1c38; color: #fff; }
.nav a.btn-primary {
  color: #fff;
  background: var(--accent);
  height: 40px;
  padding: 0 16px;
  font-size: 14px;
  margin-left: 6px;
}
.nav a.btn-primary:hover {
  color: #fff;
  background: #6a4bd6;
}
.btn-ghost {
  background: #fff; color: var(--ink);
  box-shadow: 0 0 0 1.5px var(--hairline);
}
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent); }
.btn-store {
  background: var(--ink); color: #fff;
  height: 56px; padding: 0 18px 0 16px;
  border-radius: 14px; gap: 12px; text-align: left;
}
.btn-store:hover { background: #1a1c38; color: #fff; }
.btn-store .kicker { display: block; font-size: 10px; font-weight: 600; letter-spacing: 0.04em; opacity: 0.7; text-transform: uppercase; }
.btn-store .name { display: block; font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }
.btn-store.soon { opacity: 0.88; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--canvas-top) 0%, var(--canvas-mid) 42%, var(--canvas-bottom) 100%);
  color: #fff;
  padding: 108px 0 56px;
  display: flex; align-items: stretch;
}

.hero .wrap {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 48px;
  align-items: center;
  padding-bottom: 0;
}
.hero-copy { padding: 16px 0 24px; }
.hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  color: #fff;
  margin: 0 0 16px;
  text-shadow: 0 8px 30px rgba(43, 45, 74, 0.18);
}
.hero .lede { color: rgba(255,255,255,0.92); font-weight: 500; }
.hero .btn-row { margin-top: 28px; }

/* phone mock */
.phone-stage {
  position: relative;
  height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding-top: 0;
}
.phone {
  position: relative;
  width: 292px;
  background: #1c1e36;
  border-radius: 42px;
  padding: 12px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.18),
    0 30px 60px rgba(43,45,74,0.32),
    inset 0 1px 0 rgba(255,255,255,0.2);
  z-index: 2;
}
.phone img {
  width: 100%;
  aspect-ratio: 390 / 844;
  object-fit: cover;
  object-position: top;
  border-radius: 32px;
  background: var(--canvas-mid);
}
.phone-glow {
  position: absolute;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.5), transparent 70%);
  top: 8%; right: -40px;
  z-index: 0;
}

/* ---------- sections ---------- */
section { padding: 88px 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(28px, 4vw, 44px); margin-bottom: 10px; }
.section-head p + p { color: var(--ink-2); margin-top: 12px; }
.band-white { background: #fff; }
.band-lavender {
  background: linear-gradient(180deg, #ece8fb, #f7f5ff);
}
.band-ink {
  background: #1f2140;
  color: #f2f2f0;
}
.band-ink h2, .band-ink .lede { color: #fff; }
.band-ink .muted { color: rgba(242,242,240,0.62); }

/* steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  counter-reset: step;
}
.step {
  background: #fff;
  border-radius: var(--r-lg);
  padding: 28px 24px 26px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--hairline);
  position: relative;
}
.step h3 { font-size: 22px; margin: 10px 0 8px; }
.step p { color: var(--ink-2); }
.step .n {
  width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 600; color: #fff;
  background: var(--accent);
}
.step:nth-child(2) .n { background: #f0b429; }
.step:nth-child(3) .n { background: var(--record); }
.step img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 16px;
  background: var(--accent-soft);
}

/* features */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.feature {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 28px;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  align-items: start;
}
.feature h3 { font-size: 20px; margin-bottom: 6px; }
.feature p { color: var(--ink-2); font-size: 15.5px; }
.feature .ico {
  width: 64px; height: 64px; border-radius: 18px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
}
.feature .ico svg { width: 30px; height: 30px; }

/* materials */
.materials {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.mat {
  background: #fff;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-sm);
}
.mat img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.mat .body { padding: 16px 18px 20px; }
.mat h3 { font-size: 18px; }
.mat p { color: var(--muted); font-size: 14.5px; margin-top: 4px; }
.chip {
  display: inline-block;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  margin-bottom: 8px;
}

/* looks */
.looks {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 0.9fr;
  gap: 16px;
}
.look {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  min-height: 420px;
  background: #c9c6e8;
  box-shadow: var(--shadow);
}
.look img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top;
  position: absolute; inset: 0;
}
.look figcaption {
  position: absolute; left: 16px; bottom: 16px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(8px);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700; font-size: 14px;
  color: var(--ink);
}

/* split */
.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.split img {
  width: min(100%, 380px);
  max-height: 560px;
  object-fit: cover;
  object-position: top;
  justify-self: center;
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.split.flip { grid-template-columns: 0.95fr 1.05fr; }
.split.flip .copy { order: 1; }

/* promise / price */
.promise {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: center;
}
.price-card {
  background: #fff;
  color: var(--ink);
  border-radius: 28px;
  padding: 32px;
  box-shadow: var(--shadow);
}
.price-card h3 { font-size: 26px; margin-bottom: 8px; }
.price-card ul { list-style: none; padding: 0; margin: 18px 0 0; }
.price-card li {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 0;
  border-top: 1px solid var(--hairline);
  font-weight: 500;
}
.price-card li svg { flex: none; color: var(--accent); margin-top: 2px; }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 760px; }
.faq details {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 4px 18px;
}
.faq summary {
  cursor: pointer;
  font-weight: 650;
  padding: 16px 0;
  list-style: none;
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 22px; color: var(--accent); font-weight: 500;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-2); padding-bottom: 16px; }

/* legal / prose */
.prose { max-width: 720px; }
.prose h1 { font-size: clamp(32px, 5vw, 48px); margin: 8px 0 12px; }
.prose h2 { font-size: 24px; margin: 36px 0 10px; }
.prose h3 { font-size: 18px; margin: 24px 0 8px; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 1.2em; }
.prose .meta { color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.legal-hero { padding: 120px 0 88px; }

/* press */
.press-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.press-card {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 20px;
  padding: 18px;
}
.press-card img { border-radius: 14px; margin-bottom: 12px; }
.press-card a { font-weight: 650; font-size: 14px; }

/* 404 */
.lost {
  min-height: calc(100svh - 220px);
  display: grid; place-items: center;
  text-align: center;
  padding: 120px 20px 64px;
}
.lost img {
  width: 180px; height: 180px; margin: 0 auto 24px;
  object-fit: cover; border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

/* footer */
.site-footer {
  background: #1f2140;
  color: rgba(242,242,240,0.72);
  padding: 56px 0 28px;
  font-size: 14.5px;
}
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--accent-2); }
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.foot-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 600; font-size: 18px; color: #fff;
  margin-bottom: 10px;
}
.foot-brand img { width: 36px; height: 36px; border-radius: 9px; }
.site-footer h4 {
  margin: 0 0 12px;
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(242,242,240,0.45);
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 8px 0; }
.foot-end {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 20px; font-size: 13px;
}

/* CTA band */
.cta {
  text-align: center;
  padding: 72px 0;
}
.cta h2 { font-size: clamp(28px, 4vw, 44px); margin-bottom: 10px; }
.cta .btn-row { justify-content: center; margin-top: 24px; }

/* page title */
.page-hero {
  background: linear-gradient(180deg, var(--canvas-top), var(--canvas-bottom));
  color: #fff;
  padding: 120px 0 48px;
}
.page-hero h1 { font-size: clamp(36px, 5vw, 56px); }
.page-hero .lede { color: rgba(255,255,255,0.92); }

/* gallery of screens */
.screen-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.screen-row figure {
  margin: 0;
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-sm);
}
.screen-row img { width: 100%; aspect-ratio: 390/844; object-fit: cover; object-position: top; }
.screen-row figcaption {
  padding: 12px 14px 16px;
  font-size: 13.5px; font-weight: 650; color: var(--ink-2);
}

/* stats */
/* Store badges. Apple's own artwork (img/app-store-badge.svg), so only the
   box is ours: no recolouring, and the clear space Apple asks for is the
   margin below. */
.store-badges {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 28px;
}
.store-badges a {
  display: inline-flex;
  border-radius: 8px;
  transition: transform 160ms var(--ease), opacity 160ms var(--ease);
}
.store-badges a:hover { opacity: 0.92; transform: translateY(-1px); }
.store-badges a:active { transform: scale(0.98); }
.store-badges a:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.store-badges img { height: 52px; width: auto; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 36px;
}
.stat {
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 18px;
  padding: 16px 18px;
  backdrop-filter: blur(8px);
}
.stat b { display: block; font-family: var(--display); font-size: 22px; color: #fff; }
.stat span { font-size: 13.5px; color: rgba(255,255,255,0.82); }

/* contact */
.contact-card {
  background: #fff;
  border-radius: 24px;
  padding: 28px;
  border: 1px solid var(--hairline);
  max-width: 560px;
}
.contact-card a.big {
  display: inline-block;
  font-family: var(--display);
  font-size: 22px;
  margin: 8px 0 16px;
}
.support-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  align-items: start;
}

@media (max-width: 980px) {
  .hero .wrap, .split, .split.flip, .promise, .looks, .materials, .features, .steps, .foot-grid, .press-grid, .screen-row {
    grid-template-columns: 1fr;
  }
  .split.flip .copy { order: 0; }
  /* one column: headline, lede, then the phone inside the first screen;
     the three stat tiles repeat the box list, so they go on small screens */
  .hero { min-height: 0; padding: 88px 0 40px; }
  .hero .wrap { gap: 20px; }
  /* stacked over the phone, so the headline, lede and badge centre on it */
  .hero-copy { padding: 0; text-align: center; }
  .hero-copy .lede { margin-inline: auto; }
  .hero .store-badges { justify-content: center; }
  .hero .stats { display: none; }
  .phone-stage { justify-content: center; padding: 0; }
  .phone { width: 220px; border-radius: 34px; padding: 9px; }
  .phone img { border-radius: 26px; }
  .page-hero .lede { max-width: none; }
  .look { min-height: 520px; }
  .feature { grid-template-columns: 56px 1fr; }
  section { padding: 64px 0; }
  .stats { grid-template-columns: 1fr; }
  .support-grid { grid-template-columns: 1fr; }
}
@media (min-width: 700px) and (max-width: 980px) {
  .materials, .steps, .screen-row { grid-template-columns: 1fr 1fr; }
  .features { grid-template-columns: 1fr 1fr; }
  .looks { grid-template-columns: 1fr 1fr; }
  .look:first-child { grid-column: 1 / -1; }
}
