/* ============================================================
   Ember — shared stylesheet
   Plain CSS, no build step. Mobile-first. One light theme.
   Self-hosted variable fonts (Fredoka + Nunito, OFL) and the app palette.
   ============================================================ */

/* ---- self-hosted variable fonts (SIL OFL, served from 'self') ---- */
@font-face {
  font-family: 'Fredoka';
  src: url('assets/fonts/Fredoka.woff2') format('woff2-variations'),
       url('assets/fonts/Fredoka.ttf') format('truetype-variations');
  font-weight: 300 700;
  font-stretch: 75% 125%;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('assets/fonts/Nunito.woff2') format('woff2-variations'),
       url('assets/fonts/Nunito.ttf') format('truetype-variations');
  font-weight: 200 1000;
  font-display: swap;
}

/* ---- reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
img, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }

/* ---- tokens ---- */
:root {
  /* --- Ember app semantic palette (verbatim from the product theme) --- */
  --ink:             #2E1B3F;  /* all primary text */
  --bg:              #F7F4FB;  /* working background, the app's default surface */
  --surface-alt:     #FBF9FE;  /* alternate working surface */
  --card:            #FFFFFF;  /* card fill */
  --brand-primary:   #7C3AED;  /* links, eyebrow labels, primary actions */
  --brand-secondary: #8B5CF6;  /* gradient partner for primary */
  --brand-tertiary:  #9A5CF0;
  --ember-amber:      #F5A623;
  --ember-gold:       #FCC65A;  /* ember gradient start */
  --ember-coral:      #FB8B4C;  /* ember gradient end */
  --ember-deep-coral: #E9654E;
  --finale-bg-start: #FFF7E8;  /* completion screen, warm cream */
  --finale-bg-end:   #F28E2C;  /* completion screen, warm orange */
  --finale-fg:       #5A2E0B;  /* text on the completion screen */

  /* derived ink levels, on the --ink ramp */
  --ink-2:   #574566;
  --ink-3:   #6E5C86;

  /* decorative ember gradient + solid spark (never text on a light surface) */
  --ember:   linear-gradient(160deg, var(--ember-gold), var(--ember-coral));
  --spark:   var(--ember-coral);       /* focus ring + hairlines */

  /* surfaces, lines, shadows */
  --line:    rgba(46,27,63,.10);
  --line-2:  rgba(46,27,63,.14);
  --shadow:  0 24px 46px -28px rgba(76,29,157,.34), 0 2px 4px rgba(76,29,157,.05);
  --shadow-sm: 0 12px 24px -18px rgba(76,29,157,.3);

  /* links fall back to the app's primary violet */
  --link:    var(--brand-primary);
  --link-h:  #6D28D9;

  --maxw: 1080px;
  --measure: 66ch;

  --font-display: 'Fredoka', ui-rounded, 'SF Pro Rounded', system-ui, sans-serif;
  --font-sans:    'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ---- base ---- */
body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(16px, 1rem + .15vw, 17.5px);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  text-wrap: pretty;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -.01em; color: var(--ink); }
h1 { font-size: clamp(2.05rem, 1.3rem + 3.4vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 1.1rem + 1.9vw, 2.35rem); }
h3 { font-size: clamp(1.12rem, 1rem + .5vw, 1.3rem); }
p  { color: var(--ink-2); }
strong { color: var(--ink); font-weight: 700; }

a { color: var(--link); text-decoration-color: color-mix(in oklch, var(--link) 45%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--link-h); text-decoration-color: currentColor; }

/* ---- focus + skip link ---- */
:focus-visible { outline: 3px solid var(--spark); outline-offset: 2px; border-radius: 4px; }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--card); color: var(--ink); padding: 10px 16px;
  border-radius: 12px; box-shadow: var(--shadow); font-weight: 600;
  transition: top .18s ease;
}
.skip:focus { top: 12px; }

/* ---- layout ---- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }
main > section { padding-block: clamp(56px, 9vw, 104px); }
.eyebrow {
  display: inline-block; line-height: 1.3;
  font-family: var(--font-display); font-weight: 700;
  font-size: .74rem; letter-spacing: .15em; text-transform: uppercase;
  color: var(--link);
}
.eyebrow .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ember); margin-right: 9px; vertical-align: 0.12em; }
.lede { font-size: clamp(1.05rem, 1rem + .5vw, 1.28rem); color: var(--ink-2); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand:hover { color: var(--ink); }
.brand .ember { height: 34px; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 14px;
  border-radius: 12px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .96rem;
}
.site-nav a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); }

/* ============================================================
   Buttons + store badges
   ============================================================ */
.badges { display: flex; flex-wrap: wrap; gap: 14px; }
.badge {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 9px 20px 9px 18px;
  background: #0C0912; color: #fff; border: 1px solid rgba(255,255,255,.16);
  border-radius: 15px; text-decoration: none;
  box-shadow: 0 14px 26px -16px rgba(0,0,0,.6);
  transition: transform .16s ease, box-shadow .16s ease;
}
.badge:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 20px 32px -16px rgba(0,0,0,.66); }
.badge .glyph { width: 26px; height: 28px; flex: none; }
.badge .badge-txt { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.badge .badge-txt .sm { font-size: .64rem; line-height: 1.15; letter-spacing: .04em; opacity: .82; text-transform: none; }
.badge .badge-txt .lg { font-family: var(--font-display); font-size: 1.18rem; line-height: 1.08; font-weight: 600; letter-spacing: -.01em; }

/* ============================================================
   Hero (warm light wash)
   ============================================================ */
.hero { background: radial-gradient(120% 95% at 50% 0%, #FFF7E8 0%, #FBF9FE 46%, #F7F4FB 100%); color: var(--ink-2); text-align: center; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: min(1100px, 90%); height: 1px; background: linear-gradient(90deg, transparent, rgba(46,27,63,.14) 20%, rgba(46,27,63,.14) 80%, transparent); }
.hero .wrap { display: flex; flex-direction: column; align-items: center; max-width: 820px; padding-block: clamp(48px, 8vw, 84px); }
.hero .ember { height: clamp(150px, 30vw, 200px); margin-bottom: 6px; }
.hero .eyebrow { color: var(--brand-primary); }
.hero h1 { color: var(--ink); max-width: 15ch; margin-top: 14px; }
.hero .lede { color: var(--ink-2); max-width: 46ch; margin-top: 20px; }
.hero .badges { justify-content: center; margin-top: 34px; }
.hero .hero-note { margin-top: 18px; font-size: .86rem; color: var(--ink-3); }

/* ============================================================
   The problem, named
   ============================================================ */
.problem { text-align: center; }
.problem .wrap { max-width: 880px; }
.problem p { font-size: clamp(1.15rem, 1rem + .8vw, 1.5rem); color: var(--ink-2); line-height: 1.5; margin-top: 22px; }
.problem .name { color: var(--ink); font-weight: 700; background: linear-gradient(180deg, transparent 62%, color-mix(in srgb, var(--spark) 42%, transparent) 62%); padding: 0 2px; }

/* ============================================================
   How it works
   ============================================================ */
.how .head { max-width: 620px; }
.how .lede { margin-top: 14px; }
.cards { display: grid; gap: 20px; margin-top: 40px; grid-template-columns: 1fr; }
.card {
  background: linear-gradient(180deg, #FFFFFF, var(--surface-alt)); border: 1px solid var(--line); border-radius: 28px;
  padding: 28px; box-shadow: 0 26px 46px -30px rgba(76,29,157,.36), 0 2px 6px -2px rgba(76,29,157,.08), inset 0 1px 0 rgba(255,255,255,.85);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: 0 40px 62px -30px rgba(76,29,157,.44), 0 2px 6px -2px rgba(76,29,157,.08), inset 0 1px 0 rgba(255,255,255,.9); }
.card .glyph-badge {
  width: 54px; height: 54px; border-radius: 17px; display: grid; place-items: center;
  background: linear-gradient(160deg, #FCC65A, #FB8B4C);
  border: none; color: #fff; margin-bottom: 20px;
  box-shadow: 0 12px 20px -8px rgba(251,139,76,.55), inset 0 1px 2px rgba(255,255,255,.5);
}
.card .glyph-badge svg { width: 26px; height: 26px; }
.card .step { font-family: var(--font-display); font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.card h3 { margin-top: 5px; }
.card p { margin-top: 9px; color: var(--ink-2); font-size: .98rem; line-height: 1.55; }

/* ============================================================
   Feature blocks (alternating left / right)
   ============================================================ */
.features .wrap { display: flex; flex-direction: column; gap: clamp(52px, 8vw, 96px); }
.feature { display: grid; gap: 26px; align-items: center; }
.feature .f-copy h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.15rem); max-width: 16ch; margin-top: 15px; }
.feature .f-copy p { margin-top: 15px; font-size: clamp(1.04rem, 1rem + .35vw, 1.18rem); color: var(--ink-2); max-width: 46ch; }
.feature .f-note { margin-top: 20px; display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: .95rem; color: var(--ink); }
.feature .f-note .tick { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--spark) 16%, var(--card)); color: var(--ember-deep-coral); }
.feature .f-note .tick svg { width: 13px; height: 13px; }
.f-art { position: relative; border-radius: 28px; border: 1px solid var(--line); overflow: hidden; aspect-ratio: 5 / 4; display: grid; place-items: center; padding: 7%; box-shadow: 0 34px 60px -34px rgba(76,29,157,.4), 0 6px 18px -12px rgba(76,29,157,.16); }
.f-art.calm   { background: linear-gradient(158deg, #FBF9FE, #EDE7F8); }
.f-art.violet { background: linear-gradient(158deg, #F4EDFE, #E3D5F7); }
.f-art.spark  { background: linear-gradient(158deg, #FDEFE6, #FBD9C4); }
.f-art.warm   { background: linear-gradient(158deg, #FFF3DE, #FFDCB4); }
.f-art .ember { position: absolute; inset: 8%; height: auto; width: auto; }
.f-art .ember img { height: auto; width: auto; max-height: 100%; max-width: 100%; }
.f-art .f-svg { width: 100%; height: auto; }
@media (min-width: 860px) {
  .feature { grid-template-columns: 1fr 1fr; gap: clamp(48px, 6vw, 84px); }
  .feature.flip .f-art { order: 2; }
}

/* rest-band CTA badges + privacy-line link */
.rest-band .badges { justify-content: center; margin-top: 32px; }
.privline .more { display: inline-block; margin-top: 18px; font-weight: 700; font-size: .96rem; text-decoration: none; font-family: var(--font-display); }
.privline .more:hover { text-decoration: underline; }

/* ============================================================
   The rest reward (warm tinted surface, the peak)
   ============================================================ */
.rest-band { background: linear-gradient(180deg, #F7F4FB 0%, #FFF7E8 16%, #FFE7C4 60%, #F28E2C 100%); color: var(--finale-fg); text-align: center; }
.rest-band .wrap { max-width: 760px; display: flex; flex-direction: column; align-items: center; }
.rest-band .ember { height: clamp(114px, 20vw, 148px); margin-bottom: 20px; }
.rest-band .ember-aura { background: radial-gradient(closest-side, rgba(252,198,90,.36), rgba(251,139,76,.1) 55%, transparent 72%); }
.rest-band .eyebrow { color: var(--finale-fg); }
.rest-band h2 { color: var(--finale-fg); max-width: 16ch; margin-top: 8px; }
.rest-band .big { font-family: var(--font-display); font-weight: 600; color: var(--finale-fg); font-size: clamp(1.75rem, 1.15rem + 2.8vw, 2.9rem); line-height: 1.12; max-width: 15ch; text-wrap: balance; }
.rest-band p { color: var(--finale-fg); max-width: 48ch; margin-top: 22px; font-size: clamp(1.02rem, 1rem + .4vw, 1.2rem); }
.rest-band .glow-word { color: transparent; background: linear-gradient(160deg, #E9654E, #B23A16); -webkit-background-clip: text; background-clip: text; }

/* ============================================================
   What Ember is not
   ============================================================ */
.notlist .head { max-width: 620px; }
.notlist .lede { margin-top: 14px; }
.nots { list-style: none; padding: 0; display: grid; gap: 16px; margin-top: 38px; grid-template-columns: 1fr; }
.nots li { display: flex; gap: 16px; align-items: flex-start; background: linear-gradient(180deg, #FFFFFF, var(--surface-alt)); border: 1px solid var(--line); border-radius: 22px; padding: 22px 24px; box-shadow: 0 20px 40px -28px rgba(76,29,157,.34), inset 0 1px 0 rgba(255,255,255,.85); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.nots li:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: 0 30px 54px -28px rgba(76,29,157,.42), inset 0 1px 0 rgba(255,255,255,.9); }
.nots .mark { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(160deg, #F3ECFE, #E4D6F8); border: 1px solid color-mix(in srgb, var(--brand-primary) 22%, transparent); color: var(--brand-primary); box-shadow: inset 0 1px 2px rgba(255,255,255,.85); }
.nots .mark svg { width: 15px; height: 15px; }
.nots b { font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: 1.08rem; display: block; margin-bottom: 3px; }
.nots span.t { color: var(--ink-2); font-size: .96rem; line-height: 1.5; }

/* ============================================================
   Privacy in one line
   ============================================================ */
.privline .wrap {
  max-width: 800px; text-align: center;
  background: var(--surface-alt); border: 1px solid var(--line);
  border-radius: 24px; padding: clamp(32px, 5vw, 48px);
  box-shadow: var(--shadow-sm);
}
.privline p { font-size: clamp(1.08rem, 1rem + .6vw, 1.35rem); color: var(--ink); line-height: 1.5; }
.privline .lock { width: 40px; height: 40px; margin: 0 auto 18px; color: var(--link); }

/* ============================================================
   Closing CTA
   ============================================================ */
.closing { text-align: center; }
.closing .wrap { max-width: 640px; display: flex; flex-direction: column; align-items: center; }
.closing h2 { max-width: 16ch; }
.closing p { margin-top: 14px; }
.closing .badges { justify-content: center; margin-top: 30px; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { border-top: 1px solid var(--line); background: var(--surface-alt); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; padding-block: 34px; }
.site-footer .brand { font-size: 1.15rem; }
.site-footer .foot-links { display: flex; flex-wrap: wrap; gap: 6px 4px; }
.site-footer .foot-links a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 12px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .94rem; }
.site-footer .foot-links a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); }
.site-footer .copy { color: var(--ink-3); font-size: .9rem; width: 100%; }

/* ============================================================
   Ember mascot
   ============================================================ */
.ember { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.ember img { display: block; height: 100%; width: auto; position: relative; z-index: 1; filter: drop-shadow(0 10px 16px rgba(46,27,63,.2)); }
.ember .ember-aura { position: absolute; left: 50%; top: 55%; width: 134%; height: 120%; transform: translate(-50%,-50%); border-radius: 50%; z-index: 0; pointer-events: none; background: radial-gradient(closest-side, rgba(252,198,90,.6), rgba(251,139,76,.16) 55%, transparent 74%); animation: breathe 6.5s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: .5; } 50% { opacity: .92; } }

/* ============================================================
   Document pages (privacy / terms)
   ============================================================ */
.doc { padding-block: clamp(40px, 6vw, 72px); }
.doc .wrap { max-width: 760px; }
.doc-head { margin-bottom: 30px; }
.doc-head h1 { margin-bottom: 10px; }
.doc-head .updated { color: var(--ink-3); font-size: .92rem; }
.draft-note {
  display: flex; gap: 12px; align-items: flex-start;
  background: color-mix(in srgb, var(--spark) 12%, var(--card));
  border: 1px solid color-mix(in srgb, var(--spark) 30%, transparent);
  border-radius: 16px; padding: 16px 18px; margin: 22px 0 8px; color: var(--ink-2);
  font-size: .95rem;
}
.draft-note svg { width: 20px; height: 20px; flex: none; color: var(--ember-deep-coral); margin-top: 2px; }
.draft-note b { color: var(--ink); }

.toc { background: var(--surface-alt); border: 1px solid var(--line); border-radius: 18px; padding: 20px 24px; margin: 28px 0 40px; }
.toc h2 { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-family: var(--font-display); margin-bottom: 12px; }
.toc ol { margin: 0; padding-left: 1.3em; columns: 2; column-gap: 32px; }
.toc li { margin-bottom: 7px; break-inside: avoid; }
.toc a { text-decoration: none; font-weight: 600; }
.toc a:hover { text-decoration: underline; }

.doc .measure { max-width: var(--measure); }
.doc section { margin-bottom: 40px; scroll-margin-top: 88px; }
.doc section > h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.7rem); margin-bottom: 14px; padding-top: 6px; }
.doc h3 { margin: 22px 0 8px; }
.doc p { margin-bottom: 14px; max-width: var(--measure); }
.doc ul { max-width: var(--measure); margin: 0 0 16px; padding-left: 1.25em; }
.doc li { margin-bottom: 8px; color: var(--ink-2); }
.doc .ph { background: color-mix(in srgb, var(--spark) 16%, transparent); border-radius: 5px; padding: 1px 6px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.doc a.back { display: inline-block; margin-top: 8px; font-weight: 600; font-size: .9rem; text-decoration: none; }
.doc a.back:hover { text-decoration: underline; }

.callout {
  background: var(--card); border: 1px solid var(--line-2);
  border-radius: 20px; padding: clamp(22px, 3.5vw, 30px); margin: 8px 0 40px;
  box-shadow: var(--shadow-sm); scroll-margin-top: 88px;
}
.callout .tag { display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-primary); margin-bottom: 12px; }
.callout .tag .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ember); margin-right: 8px; vertical-align: 0.12em; }
.callout h2 { font-size: clamp(1.3rem, 1.1rem + .9vw, 1.6rem); margin-bottom: 12px; }
.callout p:last-child { margin-bottom: 0; }

/* ============================================================
   Responsive
   ============================================================ */
@media (min-width: 640px) {
  .wrap { padding-inline: 32px; }
  .nots { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 760px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 960px) {
  .how .head, .notlist .head { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
  .how .head .lede, .notlist .head .lede { max-width: 34ch; margin-top: 0; }
}

/* ---- motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
