/* flamie.app: one stylesheet for the home page and the legal/support pages. */
:root {
  color-scheme: light dark;
  --bg: #fff8ef;
  --bg-alt: #fdeedb;
  --card: #ffffff;
  --fg: #2b1d14;
  --muted: #7a6455;
  --line: #f0dcc6;
  --accent: #ee7f3b;
  --accent-deep: #c9561c;
  --gold: #f7cd5a;
  --ember: #4a2c1c;
  --night: #24160f;
  --shadow: 0 18px 50px -24px rgba(110, 50, 10, .35);
  --radius: 22px;
  --font: "Nunito", ui-rounded, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c120c;
    --bg-alt: #26180f;
    --card: #2d1d13;
    --fg: #fbeee0;
    --muted: #c4a892;
    --line: #3d2a1d;
    --accent: #f59a52;
    --accent-deep: #f7b26a;
    --shadow: 0 18px 50px -24px rgba(0, 0, 0, .7);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-deep); }
img, svg { display: block; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--fg); font-weight: 900; font-size: 22px; letter-spacing: -.02em; }
.brand img { width: 30px; height: 30px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 999px;
  background: var(--fg); color: var(--bg);
  font-weight: 800; font-size: 15px; text-decoration: none;
}
.pill:hover { opacity: .88; }

/* App Store button */
.store-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 20px 10px 16px; border-radius: 14px;
  background: #000; color: #fff; text-decoration: none;
  border: 1px solid #a6a6a6;
}
.store-btn svg { width: 26px; height: 26px; fill: #fff; }
.store-btn span { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.store-btn small { font-size: 11px; font-weight: 600; }
.store-btn strong { font-size: 21px; font-weight: 700; letter-spacing: -.01em; font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; }

/* Hero */
.hero { text-align: center; padding: 56px 0 24px; overflow: hidden; }
.hero h1 { font-size: clamp(40px, 8vw, 76px); line-height: 1.02; letter-spacing: -.035em; font-weight: 900; margin: 0 auto 16px; max-width: 12ch; }
.hero h1 em { font-style: normal; background: linear-gradient(180deg, var(--gold), var(--accent) 70%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lede { font-size: clamp(18px, 2.4vw, 21px); color: var(--muted); max-width: 34ch; margin: 0 auto 26px; }
.hero .fine { font-size: 14px; font-weight: 700; color: var(--muted); margin-top: 14px; }

.stage-area { position: relative; max-width: 860px; margin: 40px auto 0; height: 600px; }
.phone {
  position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  width: 290px; height: 600px; border-radius: 48px;
  background: #111; padding: 11px; box-shadow: 0 40px 80px -30px rgba(90, 35, 5, .55);
}
.screen {
  position: relative; height: 100%; border-radius: 38px; overflow: hidden;
  background: radial-gradient(120% 70% at 50% 62%, #6b3a1f 0%, #3a2216 55%, #1e130d 100%);
  color: #fbeee0; transition: background .6s;
  display: flex; flex-direction: column; align-items: center;
}
.screen .status { width: 100%; display: flex; justify-content: space-between; padding: 14px 26px 0; font: 600 13px -apple-system, sans-serif; }
.screen .island { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 92px; height: 26px; border-radius: 20px; background: #000; }
.screen .app-title { margin-top: 22px; font-weight: 900; letter-spacing: .08em; font-size: 15px; opacity: .9; }
.screen .chip { margin-top: 10px; font-size: 12px; font-weight: 800; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); }
.screen .flame-wrap { position: relative; width: 190px; height: 230px; margin-top: 18px; display: grid; place-items: end center; }
.screen .glow { position: absolute; inset: 20% 0 0; border-radius: 50%; background: radial-gradient(closest-side, rgba(247, 180, 80, .55), transparent); filter: blur(8px); transition: opacity .6s, transform .6s; }
.screen .logs { position: absolute; bottom: -6px; width: 150px; height: 22px; }
.screen .score { margin-top: 26px; font-size: 64px; font-weight: 900; line-height: 1; letter-spacing: -.03em; }
.screen .score small { font-size: 22px; opacity: .7; }
.screen .stage-name { font-weight: 800; font-size: 15px; opacity: .8; margin-top: 2px; }
.screen .voice { margin: 14px 22px 0; font-size: 13px; line-height: 1.4; text-align: center; opacity: .85; min-height: 3.6em; }

#hero-flame { width: 150px; transform-origin: 50% 100%; transition: transform .6s cubic-bezier(.3, 1.4, .5, 1); animation: flicker 2.6s ease-in-out infinite; }
@keyframes flicker { 0%, 100% { rotate: 0deg; } 30% { rotate: -1.6deg; } 65% { rotate: 1.4deg; } }
#hero-flame stop { transition: stop-color .6s; }
#hero-flame .face > * { transition: opacity .3s; }

.screen[data-stage="roaring"] #hero-flame { transform: scale(1); }
.screen[data-stage="steady"] #hero-flame { transform: scale(.88); }
.screen[data-stage="flickering"] #hero-flame { transform: scale(.74); animation-duration: 1.1s; }
.screen[data-stage="embers"] #hero-flame { transform: scale(.56); }
.screen[data-stage="smoke"] #hero-flame { transform: scale(.42); }
.screen[data-stage="cold"] #hero-flame { transform: scale(.38); animation: none; }
.screen[data-stage="steady"] .glow { opacity: .75; }
.screen[data-stage="flickering"] .glow { opacity: .5; transform: scale(.85); }
.screen[data-stage="embers"] .glow { opacity: .35; transform: scale(.7); }
.screen[data-stage="smoke"] .glow, .screen[data-stage="cold"] .glow { opacity: .08; }
.screen[data-stage="smoke"], .screen[data-stage="cold"] { background: radial-gradient(120% 70% at 50% 62%, #3b3330 0%, #241d1a 55%, #141110 100%); }

.screen[data-stage="flickering"] .o1 { stop-color: #f5a447; } .screen[data-stage="flickering"] .o2 { stop-color: #e2582c; }
.screen[data-stage="embers"] .o1 { stop-color: #e9713a; } .screen[data-stage="embers"] .o2 { stop-color: #b4321f; }
.screen[data-stage="embers"] .i1 { stop-color: #fbcf8a; } .screen[data-stage="embers"] .i2 { stop-color: #f59d4f; }
.screen[data-stage="smoke"] .o1 { stop-color: #a58f80; } .screen[data-stage="smoke"] .o2 { stop-color: #8a4b33; }
.screen[data-stage="smoke"] .i1 { stop-color: #d9c3b0; } .screen[data-stage="smoke"] .i2 { stop-color: #c08a62; }
.screen[data-stage="cold"] .o1 { stop-color: #9aa3ad; } .screen[data-stage="cold"] .o2 { stop-color: #6b737d; }
.screen[data-stage="cold"] .i1 { stop-color: #dfe4ea; } .screen[data-stage="cold"] .i2 { stop-color: #b8c0c9; }

.face .m-flat, .face .m-sleep, .face .eyes-shut { opacity: 0; }
.screen[data-stage="flickering"] .m-smile { opacity: 0; } .screen[data-stage="flickering"] .m-flat { opacity: 1; }
.screen[data-stage="embers"] .m-smile, .screen[data-stage="smoke"] .m-smile, .screen[data-stage="cold"] .m-smile { opacity: 0; }
.screen[data-stage="embers"] .m-flat, .screen[data-stage="smoke"] .m-flat { opacity: 1; }
.screen[data-stage="embers"] .eyes-open, .screen[data-stage="smoke"] .eyes-open, .screen[data-stage="cold"] .eyes-open { opacity: 0; }
.screen[data-stage="embers"] .eyes-shut, .screen[data-stage="smoke"] .eyes-shut, .screen[data-stage="cold"] .eyes-shut { opacity: 1; }
.screen[data-stage="cold"] .m-sleep { opacity: 1; }
.smoke-wisp { position: absolute; bottom: 120px; width: 14px; height: 40px; border-radius: 50%; background: rgba(220, 210, 200, .25); filter: blur(4px); opacity: 0; }
.screen[data-stage="smoke"] .smoke-wisp { animation: wisp 3s ease-in infinite; }
.smoke-wisp:nth-child(2) { left: 46%; animation-delay: 1s !important; } .smoke-wisp:nth-child(3) { left: 54%; animation-delay: 2s !important; }
@keyframes wisp { 0% { opacity: 0; transform: translateY(0) scale(.6); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(-80px) scale(1.4); } }

/* Notification cards around the phone */
.note {
  position: absolute; width: 250px; text-align: left;
  background: color-mix(in srgb, var(--card) 90%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 18px; padding: 11px 14px;
  box-shadow: var(--shadow); font-size: 14px; line-height: 1.35;
  animation: bob 6s ease-in-out infinite;
}
.note .meta { display: flex; justify-content: space-between; font-size: 11px; font-weight: 800; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; margin-bottom: 3px; }
.note .meta span:first-child { display: flex; align-items: center; gap: 6px; }
.note .meta img { width: 16px; height: 16px; border-radius: 4px; }
.note b { display: block; font-weight: 800; }
.note.n1 { left: 0; top: 40px; }
.note.n2 { right: 0; top: 150px; animation-delay: -2s; }
.note.n3 { left: 20px; top: 330px; animation-delay: -4s; }
.note.n4 { right: 24px; top: 430px; animation-delay: -1s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* Sections */
section.block { padding: 88px 0; }
section.block.alt { background: var(--bg-alt); }
.kicker { font-size: 13px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-deep); margin: 0 0 8px; }
h2.big { font-size: clamp(32px, 5vw, 50px); line-height: 1.05; letter-spacing: -.03em; font-weight: 900; margin: 0 0 14px; }
.center { text-align: center; }
.sub { color: var(--muted); font-size: 19px; max-width: 40ch; margin: 0 auto; }

.stages { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-top: 40px; }
.stage-btn {
  appearance: none; border: 2px solid var(--line); background: var(--card); color: var(--fg);
  border-radius: 20px; padding: 16px 6px 12px; cursor: pointer; font: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: border-color .2s, transform .2s;
}
.stage-btn:hover { transform: translateY(-2px); }
.stage-btn[aria-pressed="true"] { border-color: var(--accent); }
.stage-btn svg { height: 54px; width: 44px; transform-origin: 50% 100%; }
.stage-btn strong { font-size: 15px; font-weight: 900; }
.stage-btn small { font-size: 12px; color: var(--muted); font-weight: 700; }

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.card .ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: var(--bg-alt); margin-bottom: 14px; }
.card h3 { margin: 0 0 6px; font-size: 21px; font-weight: 900; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--muted); }
.card .pts { display: inline-block; margin-top: 12px; font-weight: 900; color: var(--accent-deep); font-size: 15px; }

.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.split ul { padding: 0; margin: 20px 0 0; list-style: none; }
.split li { padding-left: 32px; position: relative; margin: 12px 0; }
.split li::before { content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%; background: linear-gradient(var(--gold), var(--accent)); }
.tag { display: inline-block; font-size: 12px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--fg); color: var(--bg); vertical-align: middle; margin-left: 6px; }

.shield {
  border-radius: 34px; padding: 34px 28px; text-align: center; color: #fbeee0;
  background: radial-gradient(110% 80% at 50% 30%, #6b3a1f, #2a1912);
  box-shadow: var(--shadow); max-width: 360px; margin: 0 auto;
}
.shield img { width: 76px; height: 76px; margin: 0 auto 14px; }
.shield h4 { margin: 0; font-size: 22px; font-weight: 900; }
.shield p { margin: 6px 0 20px; opacity: .8; font-size: 15px; }
.shield .bank { font-size: 46px; font-weight: 900; line-height: 1; }
.shield .bank small { font-size: 16px; opacity: .7; }
.shield .btn { margin-top: 20px; display: block; padding: 13px; border-radius: 14px; background: linear-gradient(var(--gold), var(--accent)); color: #2b1d14; font-weight: 900; }
.shield .btn2 { margin-top: 10px; display: block; padding: 11px; font-weight: 800; opacity: .75; font-size: 15px; }

.widgets { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.widget { background: var(--night); color: #fbeee0; border-radius: 26px; padding: 18px; box-shadow: var(--shadow); border: 1px solid rgba(255, 255, 255, .08); }
.widget.sm { width: 160px; height: 160px; display: flex; flex-direction: column; justify-content: space-between; }
.widget.sm .row { display: flex; justify-content: space-between; align-items: flex-start; }
.widget.sm img { width: 52px; }
.widget .n { font-size: 38px; font-weight: 900; line-height: 1; }
.widget .l { font-size: 13px; font-weight: 800; opacity: .75; }
.widget.lock { width: 340px; display: flex; gap: 14px; align-items: center; background: rgba(43, 29, 20, .9); border-radius: 22px; }
.ring { width: 64px; height: 64px; border-radius: 50%; background: conic-gradient(var(--accent) 0 82%, rgba(255, 255, 255, .15) 0); display: grid; place-items: center; flex: none; }
.ring div { width: 52px; height: 52px; border-radius: 50%; background: #2b1d14; display: grid; place-items: center; }
.ring img { width: 26px; }

/* FAQ */
.faq { max-width: 760px; margin: 40px auto 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative; font-weight: 900; font-size: 19px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 28px; font-weight: 700; color: var(--accent-deep); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 20px; color: var(--muted); }
.faq details > div p { margin: 0 0 10px; }

.cta { text-align: center; padding: 96px 0; }
.cta img { width: 96px; height: 96px; margin: 0 auto 18px; border-radius: 24px; box-shadow: var(--shadow); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 110px; font-size: 15px; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 14px; }
.site-footer a { color: var(--fg); text-decoration: none; font-weight: 700; }
.site-footer a:hover { color: var(--accent-deep); }
.site-footer p { margin: 0; }

/* Sticky bottom bar (home only) */
.sticky-bar {
  position: fixed; left: 50%; bottom: 16px; transform: translate(-50%, 140%); z-index: 30;
  display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
  transition: transform .35s ease; width: min(420px, calc(100% - 32px));
}
.sticky-bar.show { transform: translate(-50%, 0); }
.sticky-bar img { width: 44px; height: 44px; border-radius: 11px; }
.sticky-bar div { flex: 1; line-height: 1.2; }
.sticky-bar strong { display: block; font-weight: 900; }
.sticky-bar small { color: var(--muted); font-weight: 700; font-size: 13px; }

/* Prose pages (privacy, terms, support) */
.prose { max-width: 720px; margin: 0 auto; padding: 48px 20px 40px; }
.prose h1 { font-size: clamp(34px, 6vw, 48px); line-height: 1.05; letter-spacing: -.03em; font-weight: 900; margin: 0 0 8px; }
.prose h2[id] { scroll-margin-top: 80px; }
.prose h2 { font-size: 23px; font-weight: 900; letter-spacing: -.01em; margin: 40px 0 8px; }
.prose h3 { font-size: 18px; font-weight: 900; margin: 24px 0 6px; }
.prose .muted { color: var(--muted); }
.prose ul { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose .callout { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; margin: 22px 0; }
.prose .callout p { margin: 0; }
.prose .toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 8px; padding: 0; list-style: none; }
.prose .toc a { display: inline-block; padding: 7px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--fg); font-weight: 800; font-size: 15px; }
.contact-card { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; justify-content: space-between; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin: 18px 0; }
.contact-card strong { display: block; font-size: 19px; font-weight: 900; }
.prose .faq { margin-top: 10px; }

@media (max-width: 860px) {
  .stage-area { height: auto; }
  .phone { position: relative; left: auto; transform: none; margin: 0 auto; }
  .note { display: none; }
  .stages { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid3 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  section.block { padding: 64px 0; }
}
@media (max-width: 380px) {
  .phone { width: 270px; height: 560px; }
  .widget.lock { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
