@font-face { font-family: "Cormorant SN"; src: url("../assets/fonts/cormorant-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Cormorant SN"; src: url("../assets/fonts/cormorant-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --bg0: #04121a; --bg1: #0a2a35; --ink: #e8f6f6; --ink-dim: #a9cfd1; --line: rgba(190, 232, 224, 0.28);
  --stone: rgba(200, 240, 240, 0.07); --stone-hi: rgba(200, 240, 240, 0.14); --type: #bfe8e0; --steam: #66c0f4;
  --serif: "Cormorant SN", "Cormorant Garamond", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { background: var(--bg0); }
body {
  font-family: var(--sans); color: var(--ink); line-height: 1.5; font-size: 17px;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 80% at 50% 0%, #0f3a46 0%, var(--bg1) 35%, var(--bg0) 100%);
}
#motes { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.mist {
  position: fixed; inset: -10%; z-index: 0; pointer-events: none; opacity: .55;
  background: radial-gradient(40% 30% at 20% 70%, rgba(150, 210, 215, .12), transparent 70%),
              radial-gradient(45% 35% at 80% 30%, rgba(150, 210, 215, .10), transparent 70%),
              radial-gradient(60% 40% at 50% 100%, rgba(150, 210, 215, .14), transparent 70%);
  animation: drift 40s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: translate3d(-2%, 0, 0); } to { transform: translate3d(2%, -2%, 0); } }

.top, main, .foot { position: relative; z-index: 1; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; max-width: 640px; margin: 0 auto; }
.logo { font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink); text-decoration: none; }
.icon-btn { background: none; border: 1px solid var(--line); color: var(--ink-dim); border-radius: 999px; width: 42px; height: 42px; display: grid; place-items: center; cursor: pointer; }
.icon-btn[aria-pressed="false"] .wave { opacity: .25; }
.icon-btn[aria-pressed="true"] { color: var(--ink); border-color: var(--type); }

main { max-width: 600px; margin: 0 auto; padding: 8px 20px 24px; min-height: calc(100vh - 170px); }
.screen { opacity: 0; transform: translateY(10px); transition: opacity .45s ease, transform .45s ease; padding-top: 4vh; }
.screen.in { opacity: 1; transform: none; }
.screen[hidden] { display: none; }

h1, h2 { font-family: var(--serif); font-weight: 600; line-height: 1.12; margin: .2em 0 .35em; outline: none; }
h1 { font-size: clamp(40px, 11vw, 64px); text-shadow: 0 0 28px rgba(190, 232, 224, .35); }
h2 { font-size: clamp(27px, 7vw, 36px); }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: 12.5px; color: var(--ink-dim); margin: 0; }
.lead { font-size: 19px; color: #d3ecec; max-width: 32em; }
.meta { color: var(--ink-dim); font-size: 14px; }
.fine { color: rgba(169, 207, 209, .7); font-size: 12.5px; letter-spacing: .03em; }
.invite { border: 1px solid var(--line); background: var(--stone); border-radius: 14px; padding: 12px 14px; font-size: 15px; }

.btn {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 52px; padding: 12px 22px;
  border-radius: 16px; border: 1px solid var(--line); background: var(--stone); color: var(--ink);
  font: 600 16px var(--sans); text-decoration: none; cursor: pointer; transition: background .2s, border-color .2s, box-shadow .2s, transform .1s;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
@media (hover: hover) { .btn:hover { background: var(--stone-hi); border-color: rgba(190, 232, 224, .5); } }
.btn:active { transform: scale(.98); }
.btn.primary { background: linear-gradient(180deg, rgba(210, 245, 240, .28), rgba(160, 220, 215, .14)); border-color: rgba(210, 245, 240, .6); box-shadow: 0 0 30px rgba(190, 232, 224, .22); min-width: 200px; font-size: 18px; }
.btn.steam { background: linear-gradient(180deg, #1b4e6b, #123448); border-color: var(--steam); color: #fff; box-shadow: 0 0 24px rgba(102, 192, 244, .25); width: 100%; }
.btn.ghost { background: transparent; }
.link-btn { background: none; border: 0; color: var(--ink-dim); font: 500 15px var(--sans); padding: 12px 4px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 10px; }

/* question */
.progress { height: 2px; background: rgba(190, 232, 224, .12); border-radius: 2px; overflow: hidden; margin-bottom: 18px; }
#progress-bar { display: block; height: 100%; width: 0; background: linear-gradient(90deg, transparent, var(--type)); transition: width .6s ease; }
.options { display: grid; gap: 12px; margin: 22px 0 8px; }
.option {
  text-align: left; min-height: 60px; padding: 16px 18px; border-radius: 18px; cursor: pointer;
  border: 1px solid var(--line); color: var(--ink); font: 500 17px/1.4 var(--sans);
  background: linear-gradient(180deg, rgba(210, 245, 240, .09), rgba(160, 220, 215, .04));
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: background .25s, border-color .25s, box-shadow .25s, opacity .25s;
}
@media (hover: hover) { .option:hover { border-color: rgba(210, 245, 240, .55); background: rgba(210, 245, 240, .12); } }
.option.chosen { border-color: #fff; box-shadow: 0 0 26px rgba(210, 245, 240, .35); background: rgba(210, 245, 240, .18); }
.option:disabled:not(.chosen) { opacity: .45; }
.swap #q-text, .swap .option { animation: rise .5s ease both; animation-delay: var(--d, 0ms); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }

/* reveal */
.reveal { display: grid; place-items: center; min-height: 60vh; }
.reveal-line { font-family: var(--serif); font-size: 30px; color: #d8f0f0; animation: breathe 2.2s ease both; text-align: center; }
@keyframes breathe { 0% { opacity: 0; letter-spacing: .02em; filter: blur(6px); } 40% { opacity: 1; filter: none; } 100% { opacity: 0; letter-spacing: .12em; filter: blur(4px); } }

/* result */
.result { text-align: center; }
.sigil { width: min(78vw, 320px); height: auto; display: block; margin: 0 auto -6px; }
.sigil.small { width: min(36vw, 150px); }
.result h1 { animation: name-in 1.4s .5s ease both; }
@keyframes name-in { from { opacity: 0; letter-spacing: .25em; filter: blur(8px); } to { opacity: 1; letter-spacing: normal; filter: none; } }
.tagline { font-family: var(--serif); font-size: 25px; color: var(--type); margin: 0 0 6px; }
.wing { color: var(--ink-dim); margin: 0 0 12px; }
.close-call { font-size: 15px; color: #d7eded; }
.core { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 10px; text-align: left; }
.core li { padding: 14px 16px; border-radius: 14px; background: var(--stone); border: 1px solid var(--line); }
.shadow { font-style: italic; color: var(--ink-dim); }
.shadow::before { content: "In the shadow: "; font-style: normal; color: rgba(169, 207, 209, .8); }
.type-share { font-size: 15px; }
.cta-box { margin: 26px 0; padding: 20px; border-radius: 20px; border: 1px solid rgba(102, 192, 244, .35); background: rgba(18, 52, 72, .35); }
.growth { font-family: var(--serif); font-size: 21px; margin: 0 0 16px; }
.compare-cta { margin: 18px 0; }
.section-title { font-family: var(--serif); font-size: 24px; font-weight: 600; margin: 30px 0 12px; }
.share { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.share .btn { font-size: 15px; padding: 10px 12px; }
.toast { min-height: 1.5em; font-size: 14px; color: var(--ink); opacity: 0; transition: opacity .3s; }
.toast.on { opacity: 1; }
.mix { text-align: left; margin: 24px 0; border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; background: var(--stone); }
.mix summary { cursor: pointer; color: var(--ink-dim); font-size: 15px; }
.mix ul { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.mix li { display: grid; grid-template-columns: 8.5em 1fr 3em; gap: 8px; align-items: center; font-size: 14px; }
.bar { height: 6px; background: rgba(190, 232, 224, .1); border-radius: 6px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--type); border-radius: 6px; }
.mix-val { text-align: right; color: var(--ink-dim); }

/* pair */
.pair-sigils { display: flex; align-items: center; justify-content: center; gap: 6px; }
.pair-sigils figure { margin: 0; }
.pair-sigils figcaption { font-size: 13px; color: var(--ink-dim); }
.plus { font-family: var(--serif); font-size: 36px; color: var(--ink-dim); }
.pair-lines { text-align: left; display: grid; gap: 8px; margin: 10px 0 24px; }
.pair-lines p { margin: 0; padding: 14px 16px; border-radius: 14px; background: var(--stone); border: 1px solid var(--line); }

.foot { text-align: center; padding: 20px; color: var(--ink-dim); font-size: 13.5px; max-width: 600px; margin: 0 auto; }
.foot p { margin: 4px 0; }
.socials a { color: var(--ink); margin: 0 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (min-width: 700px) { body { font-size: 18px; } .screen { padding-top: 7vh; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .screen { opacity: 1; transform: none; }
}
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }
