/* UnFig launch page: the aurora look, with cream "paper" sections for the story. */
:root {
  --bg: #06110b;
  --text: #eef5ef;
  --muted: #a6b8ab;
  --lime: #f4ae85;
  --glow-a: #2f8f5b;
  --glow-b: #c9b458;
  --glow-c: #3b6cff;
  --glass: rgba(255, 255, 255, 0.07);
  --edge: rgba(255, 255, 255, 0.16);
  --paper: #f4efe4;
  --paper-2: #ebe4d4;
  --ink: #14281d;
  --soft: #4f5d53;
  --clay: #c4643c;
  --rule: #cfc5b0;
  --ai: #2f8f5b;
  --ai-text: #9a4a28;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font: 400 17px/1.6 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
main { overflow-x: clip; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(780px, 100% - 32px); margin-inline: auto; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; }
h1, h2, h3 { font-family: "Bricolage Grotesque", Inter, sans-serif; font-weight: 700; letter-spacing: -0.035em; line-height: 1.02; font-optical-sizing: auto; }
h1 em, h2 em { font-style: normal; font-weight: 300; }
.dark h1 em, .dark h2 em { color: var(--lime); }
.paper h2 em { color: var(--clay); }
.eyebrow { font: 500 13px/1.5 Inter; letter-spacing: 0.04em; color: var(--muted); }
.kicker { font: 500 13px Inter; letter-spacing: 0.2em; text-transform: uppercase; color: var(--clay); }

/* Sky: the aurora behind every dark section. */
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.sky i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55; animation: drift 26s ease-in-out infinite alternate; }
.sky i:nth-child(1) { width: 60vw; height: 40vw; left: -10vw; top: -10vw; background: var(--glow-a); }
.sky i:nth-child(2) { width: 50vw; height: 34vw; right: -12vw; top: 10vh; background: var(--glow-b); opacity: 0.32; animation-duration: 32s; }
.sky i:nth-child(3) { width: 46vw; height: 30vw; left: 30vw; bottom: -18vw; background: var(--glow-c); opacity: 0.2; animation-duration: 38s; }
.sky::after { content: ""; position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.09'/%3E%3C/svg%3E"); mix-blend-mode: overlay; }
@keyframes drift { to { transform: translate(6vw, 4vw) scale(1.12); } }

.glass { background: var(--glass); border: 1px solid var(--edge); backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 30px 60px -30px rgba(0, 0, 0, 0.6); }

/* Nav */
nav { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 30; border-radius: 999px; display: flex; align-items: center; gap: 26px; padding: 8px 8px 8px 22px; width: max-content; max-width: calc(100% - 32px); }
nav .logo { font: 400 26px "Bricolage Grotesque"; }
nav .links { display: flex; gap: 22px; font-size: 14px; color: var(--muted); }
nav .links a:hover { color: var(--text); }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 15px; transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease; }
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible, .replay:focus-visible, nav a:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.btn-light { background: var(--text); color: #08140d; box-shadow: 0 10px 30px -10px rgba(244, 174, 133, 0.5); }
.btn-glass { color: var(--text); }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; }

/* Hero */
.hero { padding: 180px 0 120px; text-align: center; }
.hero .eyebrow { max-width: 44ch; margin: 0 auto 26px; font-size: 15px; }
.hero h1 { font-size: clamp(60px, 10vw, 160px); max-width: 11ch; margin: 0 auto; }
.hero .lede { color: var(--muted); font-size: clamp(18px, 2vw, 21px); max-width: 44ch; margin: 28px auto 36px; }
.hero .ctas { justify-content: center; }
.facts-row { list-style: none; display: flex; gap: 24px; justify-content: center; margin-top: 30px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.facts-row li::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--lime); margin-right: 8px; vertical-align: 2px; }

/* Paper sections */
.paper { background: var(--paper); color: var(--ink); }
.paper p { color: var(--soft); }
section { padding: 130px 0; }
section.tight { padding-top: 0; }
.spread-sec { padding-bottom: 110px; }
.spread-head { text-align: center; max-width: 760px; margin: 0 auto; }
.spread-head h2 { font-size: clamp(42px, 5.6vw, 84px); margin: 18px 0 20px; }
.spread-head p { font: 400 clamp(19px, 2vw, 23px)/1.45 "Bricolage Grotesque"; max-width: 44ch; margin: 0 auto; }
.spread { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 28px; align-items: end; margin-top: 72px; }
.spread figure { background: var(--paper-2); padding: 14px; border-radius: 4px; }
.spread img { border-radius: 22px; box-shadow: 0 30px 60px -30px rgba(20, 40, 29, 0.45); }
.spread figure:nth-child(2) { transform: translateY(-36px); }
figcaption { font-size: 13px; color: var(--soft); margin-top: 12px; }
figcaption b { color: var(--ink); font-weight: 600; }

/* Providers */
.providers { padding: 56px 0; border-bottom: 1px solid var(--edge); }
.providers .wrap { display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.providers ul { display: flex; gap: 44px; list-style: none; flex-wrap: wrap; font: 400 34px/1 "Bricolage Grotesque"; }
.providers small { font: 500 13px Inter; color: var(--muted); margin-left: 6px; }

/* Pipeline */
.sec-head { display: grid; grid-template-columns: 140px 1.3fr 1fr; gap: 28px; align-items: end; margin-bottom: 52px; }
.sec-head h2 { font-size: clamp(42px, 5.4vw, 80px); }
.sec-head.center { display: block; text-align: center; margin-bottom: 40px; }
.sec-head.center h2 { margin: 14px 0 18px; }
.sec-head.center p { max-width: 46ch; margin: 0 auto; font-size: 18px; }
.pipeline { list-style: none; border-top: 1px solid var(--ink); }
.pipeline li { display: grid; grid-template-columns: 70px 1fr 1.7fr 1.1fr; gap: 24px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--rule); transition: background 0.2s ease; }
.pipeline li:hover { background: var(--paper-2); }
.pipeline h3 { font-size: 40px; }
.pipeline p { font-size: 16px; }
.pipeline img { border: 1px solid var(--rule); border-radius: 8px; aspect-ratio: 16 / 9; object-fit: cover; object-position: left top; width: 100%; }

/* Splits */
.split { display: grid; grid-template-columns: 1fr 1.25fr; gap: 64px; align-items: center; }
.split.rev { grid-template-columns: 1.25fr 1fr; }
.split h2, .keypath h2 { font-size: clamp(46px, 5.6vw, 86px); margin-top: 12px; }
.split p, .keypath p { color: var(--muted); margin-top: 22px; font-size: 18px; max-width: 44ch; }
.panel { border-radius: 28px; padding: 12px; }
.panel video { border-radius: 18px; }
.panel .cap { color: var(--muted); padding: 10px 6px 2px; }
.list { margin-top: 30px; display: grid; gap: 10px; }
.list div { border-radius: 16px; padding: 14px 18px; display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.list span { color: var(--muted); text-align: right; }

/* Interview */
.talk { padding-bottom: 110px; }
.prompt { display: flex; align-items: center; gap: 12px; background: #fff; border: 1.5px solid var(--ink); border-radius: 22px; padding: 10px 10px 10px 22px; box-shadow: 0 6px 0 var(--ink); }
.prompt .typed { flex: 1; font-size: 18px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prompt .send { background: var(--ink); color: var(--paper); border-radius: 14px; padding: 12px 18px; font-weight: 600; font-size: 15px; }
.thread { padding-top: 56px; display: flex; flex-direction: column; gap: 18px; }
.msg { display: flex; gap: 14px; align-items: flex-start; max-width: 86%; }
.msg .who { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font: 600 12px Inter; color: #fff; }
.msg.ai .who { background: var(--ai); }
.msg.you { align-self: flex-end; flex-direction: row-reverse; }
.msg.you .who { background: var(--ink); }
.bubble { background: #fff; border: 1px solid var(--rule); border-radius: 20px; padding: 14px 18px; color: var(--ink); min-height: 50px; }
.msg.ai .bubble { border-top-left-radius: 6px; }
.msg.you .bubble { background: var(--ink); color: var(--paper); border: 0; border-top-right-radius: 6px; }
.bubble .q { display: block; color: var(--ai-text); font-size: 12px; margin-bottom: 2px; }
.artifact { background: #fff; border: 1px solid var(--rule); border-radius: 24px; padding: 12px; box-shadow: 0 30px 60px -40px rgba(20, 40, 29, 0.4); }
.artifact .head { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 12px; color: var(--soft); }
.artifact .head b { color: var(--ink); font-weight: 600; }
.artifact img, .artifact video { border-radius: 14px; border: 1px solid var(--rule); }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.screens { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 6px; }
.screens img { border-radius: 20px; border: 0; box-shadow: 0 20px 40px -24px rgba(0, 0, 0, 0.5); }
.replay-row { text-align: center; margin-top: 28px; }
.replay { font: 500 14px Inter; color: var(--ink); background: transparent; border: 1px solid var(--ink); border-radius: 999px; padding: 10px 18px; cursor: pointer; }
.replay:hover { background: var(--ink); color: var(--paper); }

/* Animation states, only when the script runs and motion is welcome. */
.thread.anim [data-step] { opacity: 0; transform: translateY(14px); transition: opacity 0.45s ease, transform 0.45s ease; }
.thread.anim [data-step].in { opacity: 1; transform: none; }
.thread.anim .wipe.in img { animation: wipe 1.3s cubic-bezier(0.65, 0, 0.35, 1) both; }
.thread.anim .duo img:nth-child(2) { animation-delay: 0.5s; }
@keyframes wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.thread.anim .pop .screens img { opacity: 0; transform: translateY(24px) scale(0.92); transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.thread.anim .pop.in .screens img { opacity: 1; transform: none; }
.thread.anim .pop.in .screens img:nth-child(2) { transition-delay: 0.25s; }
.thread.anim .pop.in .screens img:nth-child(3) { transition-delay: 0.5s; }
.dots { display: inline-flex; gap: 5px; padding: 6px 0; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--soft); opacity: 0.4; animation: dot 1s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 40% { opacity: 1; transform: translateY(-3px); } }
.caret::after { content: ""; display: inline-block; width: 2px; height: 1em; background: currentColor; margin-left: 2px; vertical-align: -2px; animation: blink 0.9s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Phone */
.center { text-align: center; }
.head-gap { margin-bottom: 64px; }
.head-gap h2 { font-size: clamp(48px, 7vw, 104px); margin-top: 12px; }
.head-gap p { color: var(--muted); max-width: 46ch; margin: 20px auto 0; font-size: 18px; }
.phone-stage { display: grid; grid-template-columns: 1fr auto 1fr; gap: 48px; align-items: center; }
.device { width: 320px; border-radius: 52px; padding: 12px; background: #050a07; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 60px 120px -30px rgba(47, 143, 91, 0.6); }
.device video { border-radius: 40px; width: 100%; aspect-ratio: 400 / 866; object-fit: cover; }
.side h3 { font-size: 34px; margin-bottom: 8px; }
.side h3 + p { margin-bottom: 24px; }
.side p { color: var(--muted); }
.side.right { text-align: right; }
.share { border-radius: 24px; padding: 26px; }

/* Keys */
.keypath { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: center; }
.diagram { border-radius: 24px; padding: 32px; }
.diagram svg { width: 100%; height: auto; }

/* Own */
.own { border-radius: 28px; padding: 44px; display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: center; }
.own h2 { font-size: clamp(40px, 4.6vw, 66px); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.facts div { border-top: 1px solid var(--edge); padding-top: 16px; }
.facts b { display: block; font-weight: 600; margin-bottom: 4px; }
.facts span { color: var(--muted); font-size: 14px; }

/* Close */
.final { text-align: center; padding: 170px 0 180px; }
.final h2 { font-size: clamp(64px, 13vw, 210px); line-height: 0.9; }
.final p { color: var(--muted); max-width: 40ch; margin: 28px auto 40px; font-size: clamp(18px, 2vw, 22px); }
.final .ctas { justify-content: center; }
footer { padding: 30px 0 40px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--edge); }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

@media (max-width: 960px) {
  nav .links { display: none; }
  .spread { grid-template-columns: 1fr 1fr; }
  .spread figure:nth-child(3) { display: none; }
  .spread figure:nth-child(2) { transform: none; }
  .sec-head { grid-template-columns: 1fr; gap: 12px; }
  .pipeline li { grid-template-columns: 44px 1fr; }
  .pipeline li p, .pipeline li img { grid-column: 2; }
  .split, .split.rev, .keypath, .own, .phone-stage { grid-template-columns: 1fr; }
  .split.rev .panel { order: 2; }
  .device { margin: 0 auto; }
  .side.right { text-align: left; }
}
@media (max-width: 560px) {
  section { padding: 90px 0; }
  .hero { padding: 140px 0 90px; }
  .spread { grid-template-columns: 1fr; }
  .spread figure:nth-child(1) { display: none; }
  .msg { max-width: 100%; }
  .duo { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .own { padding: 28px; }
  .device { width: 270px; }
  .prompt .typed { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sky i, .dots i, .caret::after { animation: none; }
  .btn, .pipeline li { transition: none; }
}
