/* CreativeFlame landing page v2. Tokens mirror the app (dark, amber). System fonts only: no third-party requests, faster, more private. */
:root {
  --bg: #121110; --surface: #1b1917; --surface-2: #232019; --line: #2f2a25; --line-strong: #3d362f;
  --text: #ece6de; --muted: #a39a90; --faint: #7a7168;
  --amber: #e8a13a; --amber-bright: #f5b94f; --amber-rgb: 232, 161, 58;
  --cream: #f6eee0;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --gutter: clamp(18px, 5vw, 56px);
}
* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
img, video, svg { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--cream); margin: 0; line-height: 1.12; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(2.8rem, 6.6vw, 4.8rem); line-height: 1.08; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.9rem); line-height: 1.18; margin-bottom: 18px; }
h3 { font-size: 1.5rem; margin-bottom: 8px; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 16px; font-size: 13px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--amber-bright); }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px var(--gutter); position: sticky; top: 0; z-index: 10; background: rgba(18,17,16,.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand img { height: 28px; width: auto; }
.top-nav { display: flex; align-items: center; gap: 28px; font-size: 15px; color: var(--muted); }
.top-nav a:not(.btn):hover { color: var(--text); }
@media (max-width: 760px) { .top-nav a:not(.btn) { display: none; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent; background: var(--amber-bright); color: #1a1208; font: 500 16px/1 var(--font); text-decoration: none; cursor: pointer; transition: transform .12s ease, background .12s ease; }
.btn:hover { background: #ffc965; }
.btn:active { transform: translateY(1px); }
.btn-small { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: rgba(255,255,255,.05); }
.btn[disabled] { opacity: .6; cursor: progress; }

main { overflow-x: clip; }
main > section { padding: clamp(44px, 7vw, 88px) var(--gutter); max-width: calc(1180px + 2 * var(--gutter)); margin: 0 auto; }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: clamp(20px, 5vw, 64px); align-items: center; padding-top: clamp(36px, 7vw, 88px); padding-bottom: clamp(24px, 4vw, 48px); }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.55; color: var(--muted); max-width: 40em; margin: 26px 0 30px; }
.lede .brand-word { color: var(--amber-bright); font-weight: 700; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.fine { font-size: 14px; line-height: 1.5; color: var(--faint); max-width: 34em; }
.hero-fire { position: relative; aspect-ratio: 1; display: grid; place-items: center; }
.hero-fire::before { content: ""; position: absolute; inset: -22%; border-radius: 50%; background: radial-gradient(circle, rgba(130, 64, 12, .55) 0%, rgba(80, 40, 8, .28) 38%, rgba(18,17,16,0) 68%); animation: breathe 7s ease-in-out infinite; }
.fire-video, .fire-fallback { position: relative; width: 100%; max-width: 440px; }
.fire-fallback { position: absolute; width: 46%; }
.fire-video { z-index: 1; background: transparent; mix-blend-mode: screen; }
@keyframes breathe { 0%, 100% { opacity: .8; transform: scale(.97); } 50% { opacity: 1; transform: scale(1.03); } }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } .hero-fire { order: -1; max-width: 240px; margin: 0 auto -10px; } }

/* trust strip */
.trust { list-style: none; max-width: calc(1180px + 2 * var(--gutter)); margin: 0 auto; padding: 22px var(--gutter); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.trust li { display: flex; align-items: center; gap: 10px; }
.trust li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--amber-bright); flex: none; }

/* carousel */
.shot-wide { position: relative; max-width: none !important; padding-top: clamp(40px, 6vw, 72px) !important; padding-bottom: clamp(48px, 7vw, 88px) !important; }
.carousel { max-width: 1240px; margin: 0 auto; outline-offset: 8px; }
.carousel-frame { position: relative; aspect-ratio: 1060 / 666; border-radius: 12px; overflow: hidden; background: #000; border: 1px solid #454545; box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 90px rgba(var(--amber-rgb), .08); touch-action: pan-y; }
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .45s ease; pointer-events: none; }
.slide.is-active { opacity: 1; pointer-events: auto; }
.slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.carousel-bar { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; }
.car-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(18,17,16,.6); color: var(--text); font: 22px/1 var(--font); cursor: pointer; display: grid; place-items: center; padding: 0 0 3px; }
.car-btn[hidden] { display: none; }
.car-btn:hover { background: rgba(255,255,255,.08); }
.car-pause { font-size: 0; padding: 0; }
.car-pause::before { content: ""; width: 10px; height: 12px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.car-pause.is-paused::before { width: 0; height: 0; border: 0; border-left: 11px solid currentColor; border-top: 7px solid transparent; border-bottom: 7px solid transparent; margin-left: 3px; }
.car-dots { display: flex; gap: 8px; align-items: center; }
.car-dot { width: 8px; height: 8px; padding: 0; border-radius: 4px; border: 0; background: var(--line-strong); cursor: pointer; transition: width .25s ease, background .25s ease; position: relative; }
.car-dot::after { content: ""; position: absolute; inset: -12px -4px; } /* bigger touch target */
.car-dot[aria-current="true"] { width: 22px; background: var(--amber-bright); }
.shot-caption { text-align: center; color: var(--muted); font-size: 16px; line-height: 1.5; min-height: 3em; max-width: 46em; margin: 14px auto 0; transition: opacity .25s ease; }
.shot-caption.swap { opacity: 0; }

/* chiaroscuro glows: soft amber pools behind the screenshots so the dark app windows never melt into the dark page.
   Pseudo-elements at z-index -1 with no stacking context on the section, so they paint behind all content. */
.shot-wide::before, .shot-wide::after, .feature::before, .feature::after, .more::before, .sovereign::before, .form-block::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 120, 0, .3), rgba(255, 120, 0, 0));
}
.shot-wide::before { left: 50%; top: -30px; width: min(1556px, 150vw); height: 860px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(255, 120, 0, 1), rgba(255, 120, 0, 0)); }
.shot-wide::after { left: 50%; top: 560px; width: min(1556px, 150vw); height: 860px; transform: translateX(-50%); opacity: .8; }
@media (max-width: 860px) { .shot-wide::before { top: -170px; height: 640px; opacity: .55; } .shot-wide::after { top: 380px; opacity: .35; } }
.feature, .more, .sovereign, .form-block { position: relative; }
.feature::before { left: 68%; top: 50%; width: min(1284px, 130vw); aspect-ratio: 1284 / 796; transform: translate(-50%, -50%); }
.feature::after { left: 80%; top: 70%; width: min(640px, 80vw); aspect-ratio: 1; transform: translate(-50%, -50%); opacity: .6; }
.more::before { left: 50%; top: 62%; width: min(1654px, 150vw); height: 668px; transform: translate(-50%, -50%); }
.sovereign::before { left: 72%; top: 50%; width: min(1132px, 130vw); height: 668px; transform: translate(-50%, -50%); }
.form-block::before { left: 30%; top: 68%; width: min(1023px, 120vw); height: 350px; transform: translate(-50%, -50%); opacity: .5; }

/* how ideas grow */
.path h2 { max-width: 20em; }
.path-row { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: s; }
.step { position: relative; padding: 24px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); animation: lit 12s infinite; }
.step:nth-child(2) { animation-delay: 3s; } .step:nth-child(3) { animation-delay: 6s; } .step:nth-child(4) { animation-delay: 9s; }
.step-n { display: block; font-size: 13px; font-weight: 500; letter-spacing: .12em; color: var(--amber-bright); margin-bottom: 12px; }
.step h3 { font-size: 1.9rem; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.step-icon { flex: none; color: var(--muted); animation: lit-icon 12s infinite; }
.step:nth-child(2) .step-icon { animation-delay: 3s; } .step:nth-child(3) .step-icon { animation-delay: 6s; } .step:nth-child(4) .step-icon { animation-delay: 9s; }
.step p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.step:not(:last-child)::after { content: "\203A"; position: absolute; right: -15px; top: 50%; transform: translateY(-50%); z-index: 1; width: 14px; text-align: center; font: 30px/1 var(--font); color: var(--amber-bright); }
@keyframes lit-icon { 0%, 24% { color: var(--amber-bright); } 28%, 100% { color: var(--muted); } }
@keyframes lit { 0%, 24% { border-color: var(--amber-bright); background: #22190f; box-shadow: 0 0 36px rgba(var(--amber-rgb), .16); } 28%, 100% { border-color: var(--line); background: var(--surface); box-shadow: none; } }
@media (max-width: 900px) { .path-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .step:not(:last-child)::after { display: none; } }
@media (max-width: 520px) { .path-row { grid-template-columns: 1fr; } }

/* feature rows */
.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.feature h2 { max-width: 12em; }
.feature p:not(.eyebrow):not(.pull) { color: var(--muted); font-size: 1.1rem; line-height: 1.6; max-width: 27em; }
.pull { font-family: var(--serif); font-size: 1.3rem; line-height: 1.3; color: var(--cream); border-left: 3px solid var(--amber-bright); padding-left: 14px; margin: 22px 0 0; }
.pull-small { font-family: var(--serif); font-size: 1rem; color: var(--amber-bright); margin: 0; }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; } }

/* loop slots: a poster until a video is dropped into /img/loops/ */
.loop { position: relative; margin: 0; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0,0,0,.45); }
.loop video { width: 100%; height: 100%; object-fit: cover; object-position: center bottom; background: #000; }
.loop video { position: absolute; inset: 0; }
/* frame sequences: still frames from the app, crossfaded in order. A recorded video, if one exists, plays on top. */
.seq { background: transparent; border: 0; box-shadow: none; overflow: visible; }
.seq .frames { position: absolute; inset: 0; overflow: hidden; border-radius: 12px; }
.seq .frames img { position: absolute; max-width: none; height: auto; opacity: 0; animation-duration: var(--seq-d); animation-iteration-count: infinite; animation-timing-function: ease; }
.seq video { background: transparent; opacity: 0; border-radius: 12px; }
.seq[data-ready] video { opacity: 1; }
.seq-collect { --seq-d: 14s; }
.seq-collect .frames img { left: 0; top: 0; width: 100%; animation-name: seq4; }
.seq-collect .frames img:nth-child(2) { animation-delay: 3.5s; }
.seq-collect .frames img:nth-child(3) { animation-delay: 7s; }
.seq-collect .frames img:nth-child(4) { animation-delay: 10.5s; }
.seq-think { --seq-d: 12s; }
.seq-think .frames img { left: 0; top: 0; width: 100%; animation-name: seq3; }
.seq-think .frames img:nth-child(2) { animation-delay: 4s; }
.seq-think .frames img:nth-child(3) { animation-delay: 8s; }
.seq-arrange { --seq-d: 12s; }
.seq-arrange .frames img { left: 0; top: .26%; width: 100%; animation-name: seq3; }
.seq-arrange .frames img:nth-child(2) { animation-delay: 4s; }
.seq-arrange .frames img:nth-child(3) { animation-delay: 8s; }
/* single-image slots for the three small cards */
.seq-still .frames img { animation: none; opacity: 1; }
.seq-fire .frames img, .seq-say .frames img, .seq-find .frames img { left: 0; top: 0; width: 100%; border-radius: 0; }
.seq:hover .frames img { animation-play-state: paused; }
.seq.is-offscreen .frames img { animation-play-state: paused; }
@keyframes seq4 { 0% { opacity: 0; } 5%, 25% { opacity: 1; } 31%, 100% { opacity: 0; } }
@keyframes seq3 { 0% { opacity: 0; } 6%, 33% { opacity: 1; } 40%, 100% { opacity: 0; } }

/* more */
.more h2 { max-width: 20em; margin-bottom: 36px; }
.more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.more-grid article .loop { margin-bottom: 20px; }
.more-grid h3 { font-size: 1.6rem; }
.more-grid p { color: var(--muted); font-size: 16px; line-height: 1.55; }
@media (max-width: 860px) { .more-grid { grid-template-columns: 1fr; } }

/* digital sovereignty */
.sovereign { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: center; border-top: 1px solid var(--line); }
.sov-copy h2 { max-width: 11em; }
.sov-copy p:not(.eyebrow) { color: var(--muted); font-size: 1.1rem; line-height: 1.6; max-width: 28em; }
.sov-diagram { margin: 0; padding: 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.sov-diagram figcaption { margin-top: 10px; text-align: center; font-size: 13px; color: var(--faint); }
.sov-diagram svg { width: 100%; height: auto; overflow: visible; }
.sov-diagram text { font-family: var(--font); fill: var(--faint); font-size: 12px; }
.sov-diagram .t1 { fill: var(--text); font-size: 14px; font-weight: 500; }
.sov-diagram .t1.big { font-size: 15px; fill: var(--cream); }
.sov-diagram .cl { fill: var(--muted); }
.sov-diagram rect { fill: var(--bg); stroke: var(--line-strong); stroke-width: 1.5; }
.sov-diagram .sv-server rect { stroke: var(--amber-bright); stroke-width: 2; }
.sov-diagram .sv-ring { fill: none; stroke: var(--amber-bright); stroke-width: 2; stroke-dasharray: 352; stroke-dashoffset: 0; transform: rotate(-90deg); transform-origin: 299px 126px; }
.sov-diagram .sv-link { fill: none; stroke: var(--amber-bright); stroke-width: 2; stroke-dasharray: 64; stroke-dashoffset: 0; }
.sov-diagram .sv-cline { fill: none; stroke: var(--faint); stroke-width: 2; stroke-dasharray: 6 6; }
.sov-diagram .sv-cbox { stroke: var(--faint); stroke-dasharray: 6 6; }
.sov-diagram .sv-pulse { fill: var(--amber-bright); opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .sv-scene { animation: sv-scene 12s infinite; }
  .sv-ring { animation: sv-ring 12s infinite; }
  .sv-server image, .sv-server text { animation: sv-in 12s infinite; }
  .sv-dev { animation: sv-dev 12s infinite; }
  .sv-link { animation: sv-link 12s infinite; }
  .sv-claude { animation: sv-claude 12s infinite; }
  .sv-cline, .sv-cbox { animation: sv-lit 12s infinite; }
  .sv-pulse { animation: sv-pulse 12s infinite; }
}
@keyframes sv-scene { 0% { opacity: 0; } 3%, 92% { opacity: 1; } 98%, 100% { opacity: 0; } }
@keyframes sv-in { 0%, 3% { opacity: 0; } 12%, 100% { opacity: 1; } }
@keyframes sv-ring { 0%, 3% { stroke-dashoffset: 352; } 20%, 100% { stroke-dashoffset: 0; } }
@keyframes sv-dev { 0%, 24% { opacity: 0; } 32%, 100% { opacity: 1; } }
@keyframes sv-link { 0%, 26% { stroke-dashoffset: 64; } 38%, 100% { stroke-dashoffset: 0; } }
@keyframes sv-claude { 0%, 40% { opacity: 0; } 48%, 100% { opacity: 1; } }
@keyframes sv-lit { 0%, 56% { stroke: var(--faint); } 62%, 76% { stroke: var(--amber-bright); } 82%, 100% { stroke: var(--faint); } }
@keyframes sv-pulse { 0%, 58% { opacity: 0; transform: translateX(0); } 60% { opacity: 1; transform: translateX(0); } 70% { opacity: 1; transform: translateX(112px); } 72%, 100% { opacity: 0; transform: translateX(112px); } }
@media (max-width: 860px) { .sovereign { grid-template-columns: 1fr; } }

/* forms */
.form-block > * { max-width: 720px; }
.form-block h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.disclosure { margin-top: 22px; }
.disclosure summary { list-style: none; cursor: pointer; font-size: 15px; line-height: 1.5; border-radius: 8px; }
.disclosure summary::-webkit-details-marker { display: none; }
.summary-cta { color: var(--amber-bright); font-weight: 500; white-space: nowrap; }
.disclosure summary:hover .summary-cta { text-decoration: underline; }
.arrow { display: inline-block; transition: transform .2s ease; }
.disclosure[open] .arrow { transform: rotate(90deg); }
.disclosure-body { padding-top: 18px; }
.disclosure-body > p:first-child { margin-bottom: 0; }
.form { margin-top: 22px; }
.form label { display: block; font-weight: 500; margin-bottom: 8px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
input[type="email"], input[type="text"], textarea { width: 100%; min-height: 48px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; }
textarea { resize: vertical; }
.row input[type="email"] { flex: 1 1 260px; width: auto; }
input::placeholder, textarea::placeholder { color: var(--faint); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.status { min-height: 1.6em; margin: 12px 0 0; font-size: 15px; color: var(--muted); }
.status.ok { color: #9fd3a0; }
.status.err { color: #f0a199; }
.survey fieldset { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
.survey legend { font-weight: 500; padding: 0; margin-bottom: 8px; }
.survey .field { margin-bottom: 24px; }
.opt { display: flex !important; align-items: center; gap: 10px; font-weight: 400 !important; margin: 0 0 6px !important; padding: 8px 0; cursor: pointer; }
.opt input { width: 20px; height: 20px; accent-color: var(--amber); flex: none; }
.scale { display: flex; gap: 8px; }
.scale label { margin: 0; flex: 1; max-width: 64px; }
.scale input { position: absolute; opacity: 0; }
.scale span { display: grid; place-items: center; height: 48px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 500; cursor: pointer; }
.scale input:checked + span { background: var(--amber-bright); color: #1a1208; border-color: var(--amber-bright); }
.scale input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 3px; }
.scale-ends { display: flex; justify-content: space-between; max-width: 340px; font-size: 13px; color: var(--faint); margin: 6px 0 0; }
.link-email { color: var(--muted); }

.share-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.share h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.foot { position: relative; padding: 0 var(--gutter) 40px; margin: 64px 0 0; color: var(--faint); font-size: 14px; }
.foot-glow { position: absolute; left: 0; right: 0; top: -433px; bottom: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.foot-glow::before { content: ""; position: absolute; left: 50%; top: calc(.78 * min(461px, 82vw) - 124px); width: min(1467px, 150vw); height: 1115px; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,120,0,.4) 22%, rgba(255,120,0,0) 100%); animation: glowBreath 8s ease-in-out infinite alternate; }
@keyframes glowBreath { from { opacity: .75; } to { opacity: 1; } }
.foot-fire { position: relative; width: min(461px, 82vw); aspect-ratio: 1; margin: 54px auto 0; display: grid; place-items: center; }
.foot-embers { position: absolute; left: 50%; top: -260px; width: min(1400px, 100vw); height: calc(100% + 260px); transform: translateX(-50%); pointer-events: none; }
.foot-fire .fire-video { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; z-index: 1; mix-blend-mode: screen; }
.foot-fire .fire-fallback { width: 46%; }
.foot-text { position: relative; max-width: 1180px; margin: 0 auto; }
.foot-text p { margin: 0 0 6px; }
.foot a { color: var(--muted); }

.prose { max-width: 720px; margin: 0 auto; padding: 48px var(--gutter) 24px; }
.prose h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 18px; }
.prose h2 { font-size: 1.4rem; margin-top: 30px; }
.prose p, .prose li { color: #d0c7bb; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-fire::before, .step, .step-icon, 
  .step:last-child { border-color: var(--amber-bright); }
  .step:last-child .step-icon { color: var(--amber-bright); }
  .seq .frames img { animation: none; opacity: 0; }
  .seq .frames img.rm { opacity: 1; transform: none; }
  .seq-still .frames img { opacity: 1; }
  .fire-video { display: none; } .fire-fallback { position: relative; }
  .slide { transition: none; }
}
