/* Ringtone Maker — site styles.
   Brand colours mirror AppTheme.swift: brand #E82E7D, secondary #F79466. */

:root {
  --brand: #e82e7d;
  --brand-2: #f79466;
  --grad: linear-gradient(100deg, #e82e7d, #f79466);

  --bg: #ffffff;
  --bg-soft: #faf7f9;
  --surface: #ffffff;
  --line: #eae4e8;
  --ink: #17131a;
  --ink-2: #5d5563;
  --ink-3: #8b8292;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(23, 19, 26, .04), 0 12px 32px rgba(23, 19, 26, .06);
  --wrap: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131016;
    --bg-soft: #1a161d;
    --surface: #1c181f;
    --line: #2e2833;
    --ink: #f4f1f6;
    --ink-2: #b8b0bf;
    --ink-3: #8b8292;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.narrow { width: min(100% - 40px, 760px); margin-inline: auto; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- header */

header.site {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}

.nav { display: flex; align-items: center; gap: 22px; height: 62px; }

.brand { display: flex; align-items: center; gap: 11px; font-weight: 700;
         color: var(--ink); letter-spacing: -.015em; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; display: block; }

.nav .links { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.nav .links a {
  color: var(--ink-2); font-size: 15px; font-weight: 500;
  padding: 7px 12px; border-radius: 999px;
}
.nav .links a:hover { color: var(--ink); background: var(--bg-soft); text-decoration: none; }
.nav .links a[aria-current="page"] { color: var(--brand); background: rgba(232, 46, 125, .09); }

/* ------------------------------------------------------------------ hero */

.hero { padding: 84px 0 72px; text-align: center; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% 50% auto; translate: 50% 0;
  width: 780px; height: 520px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(232, 46, 125, .16), transparent 72%);
  pointer-events: none;
}
.hero > * { position: relative; }

.hero .icon {
  width: 108px; height: 108px; border-radius: 26px; display: block;
  margin: 0 auto 26px; box-shadow: 0 18px 44px rgba(232, 46, 125, .3);
}

h1 {
  font-size: clamp(34px, 6vw, 55px); line-height: 1.06;
  letter-spacing: -.033em; margin: 0 0 16px; font-weight: 800;
}
.grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.lede {
  font-size: clamp(17px, 2.3vw, 20px); color: var(--ink-2);
  max-width: 620px; margin: 0 auto 32px;
}

.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 26px; border-radius: 999px; font-weight: 650; font-size: 16px;
  border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 10px 26px rgba(232, 46, 125, .34);
}
.btn-primary:hover { box-shadow: 0 14px 32px rgba(232, 46, 125, .42); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }

.pill {
  display: inline-block; margin-bottom: 20px; padding: 6px 15px; border-radius: 999px;
  font-size: 13px; font-weight: 650; letter-spacing: .02em;
  color: var(--brand); background: rgba(232, 46, 125, .1);
  border: 1px solid rgba(232, 46, 125, .2);
}

/* -------------------------------------------------------------- sections */

section.band { padding: 68px 0; }
section.band.soft { background: var(--bg-soft); border-block: 1px solid var(--line); }

h2.section {
  font-size: clamp(25px, 3.6vw, 33px); letter-spacing: -.024em;
  margin: 0 0 10px; font-weight: 750; text-align: center;
}
p.section-sub {
  color: var(--ink-2); text-align: center; margin: 0 auto 42px; max-width: 560px;
}

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 7px; font-size: 18px; letter-spacing: -.012em; font-weight: 680; }
.card p { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.6; }

.ico {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  margin-bottom: 15px; background: rgba(232, 46, 125, .1); font-size: 20px;
}

/* privacy call-out */
.note {
  border-radius: var(--radius); padding: 34px; text-align: center;
  background: var(--grad); color: #fff; box-shadow: 0 16px 40px rgba(232, 46, 125, .28);
}
.note h2 { margin: 0 0 10px; font-size: clamp(22px, 3vw, 29px); letter-spacing: -.02em; }
.note p { margin: 0 auto; max-width: 620px; opacity: .94; }

/* ----------------------------------------------------------- legal pages */

.doc-head { padding: 52px 0 26px; border-bottom: 1px solid var(--line); }
.doc-head h1 { font-size: clamp(29px, 4.6vw, 42px); margin-bottom: 10px; }
.doc-head .updated { color: var(--ink-3); font-size: 15px; margin: 0; }

.meta {
  margin: 26px 0 0; padding: 18px 22px; border-radius: 14px;
  background: var(--bg-soft); border: 1px solid var(--line);
  font-size: 15px; color: var(--ink-2);
}
.meta div + div { margin-top: 5px; }
.meta b { color: var(--ink); font-weight: 620; }

.doc { padding: 12px 0 76px; }
.doc h2 {
  font-size: 22px; letter-spacing: -.015em; font-weight: 700;
  margin: 42px 0 12px; padding-top: 10px; scroll-margin-top: 78px;
}
.doc h2:first-of-type { margin-top: 30px; }
.doc h3 { font-size: 17.5px; font-weight: 660; margin: 26px 0 8px; }
.doc p { margin: 0 0 14px; color: var(--ink-2); }
.doc ul, .doc ol { margin: 0 0 16px; padding-left: 22px; color: var(--ink-2); }
.doc li { margin-bottom: 7px; }
.doc li::marker { color: var(--brand); }
.doc strong { color: var(--ink); font-weight: 640; }

.tldr {
  border-left: 3px solid var(--brand); background: var(--bg-soft);
  padding: 18px 22px; border-radius: 0 14px 14px 0; margin: 0 0 26px;
}
.tldr p { margin: 0; color: var(--ink-2); }

.toc {
  margin: 26px 0 34px; padding: 20px 24px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--surface);
}
.toc h4 { margin: 0 0 12px; font-size: 12.5px; text-transform: uppercase;
          letter-spacing: .09em; color: var(--ink-3); font-weight: 700; }
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; }
.toc li { margin-bottom: 6px; font-size: 15px; break-inside: avoid; }
.toc a { color: var(--ink-2); }
.toc a:hover { color: var(--brand); }
@media (max-width: 640px) { .toc ol { columns: 1; } }

/* ------------------------------------------------------------------ FAQ */

details.faq {
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  padding: 0 20px; margin-bottom: 10px;
}
details.faq summary {
  cursor: pointer; padding: 16px 0; font-weight: 620; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+"; color: var(--brand); font-size: 21px; font-weight: 400; line-height: 1;
}
details.faq[open] summary::after { content: "\2212"; }
details.faq .body { padding-bottom: 16px; color: var(--ink-2); }
details.faq .body :first-child { margin-top: 0; }
details.faq .body :last-child { margin-bottom: 0; }

/* --------------------------------------------------------------- footer */

footer.site {
  border-top: 1px solid var(--line); background: var(--bg-soft);
  padding: 46px 0 40px; color: var(--ink-3); font-size: 15px;
}
footer.site .cols { display: flex; gap: 30px; flex-wrap: wrap; justify-content: space-between; }
footer.site .links { display: flex; gap: 20px; flex-wrap: wrap; }
footer.site a { color: var(--ink-2); }
footer.site a:hover { color: var(--brand); }
footer.site .fine { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line);
                    display: flex; gap: 14px; justify-content: space-between; flex-wrap: wrap; }

@media (max-width: 560px) {
  .nav { height: auto; padding: 12px 0; flex-wrap: wrap; gap: 10px; }
  .nav .links { margin-left: 0; width: 100%; }
  .hero { padding: 56px 0 48px; }
  .card { padding: 22px; }
}

/* ----------------------------------------------------------- more apps */

.apps {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
}

.apps .app {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 4px; padding: 22px 14px 18px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.apps .app:hover {
  text-decoration: none; transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
  box-shadow: 0 1px 2px rgba(23,19,26,.05), 0 16px 34px rgba(232,46,125,.14);
}

.apps .app img {
  width: 60px; height: 60px; border-radius: 14px; margin-bottom: 10px;
  box-shadow: 0 5px 14px rgba(23,19,26,.16);
}

.apps .app-name {
  font-size: 14.5px; font-weight: 620; line-height: 1.35; color: var(--ink);
}
.apps .app-genre { font-size: 12.5px; color: var(--ink-3); }

/* offset anchored sections so the sticky header doesn't cover the heading */
#apps { scroll-margin-top: 70px; }
