/* =========================================================
   IGNYX — "the ember path" landing
   Default = plain stacked page (no JS / no WebGL).
   html.gl  = immersive scroll journey over a WebGL scene.
   ========================================================= */
:root {
  --ink: #2B1E18;
  --txt: #5B4A41;
  --muted: #8C7B71;
  --line: rgba(43, 30, 24, .13);
  --accent: #FF5B2E;
  --accent-d: #E2461A;
  --accent-hot: #FF8A3D;
  --ok: #1E9E6A;
  --amber: #C98A12;
  --cream: #FFF9F4;
  --glass: rgba(255, 249, 244, .58);
  --glass-b: rgba(255, 255, 255, .78);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; overflow-x: clip; }
body {
  min-height: 100vh;
  background: #F3E6DB linear-gradient(180deg, #CBC3D8 0%, #E6D3CC 34%, #F6E3D1 62%, #EEDDD2 100%) fixed;
  color: var(--txt);
  font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); }
button { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 999px; font-size: 13px; }
.skip:focus { top: 12px; }

/* ---------- buttons ---------- */
/* ghost: frosted pill */
.ghost {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--glass-b);
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  color: var(--ink); font-size: 13px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: background .2s, transform .2s, box-shadow .2s;
}
.ghost:hover { background: rgba(255, 252, 249, .9); box-shadow: 0 6px 18px rgba(90, 50, 30, .10); }
.ghost--icon { width: 40px; padding: 0; justify-content: center; }
.ghost svg { flex: none; }

/* cta: ember pill with an arrow bubble */
.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 40px; padding: 0 5px 0 17px;
  border: none; border-radius: 999px;
  background: linear-gradient(180deg, #FF7A45 0%, #F24B1D 100%);
  color: #fff; font-size: 13px; font-weight: 600; letter-spacing: .01em;
  cursor: pointer; white-space: nowrap;
  box-shadow: 0 8px 22px rgba(242, 75, 29, .30), inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -1px 0 rgba(120, 30, 0, .18);
  transition: box-shadow .2s, transform .2s, filter .2s;
}
.cta:hover { filter: saturate(1.08) brightness(1.03); box-shadow: 0 10px 28px rgba(242, 75, 29, .38), inset 0 1px 0 rgba(255, 255, 255, .35); }
.cta:active { transform: translateY(1px); }
.arr {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255, 255, 255, .22);
  transition: transform .25s;
}
.arr svg { width: 14px; height: 14px; }
.cta:hover .arr, .go:hover .arr { transform: translateX(2px) rotate(-12deg); }
.cta--sm { min-height: 32px; padding: 0 4px 0 13px; font-size: 12px; gap: 7px; }
.cta--sm .arr { width: 24px; height: 24px; }

/* go: outlined pill link inside cards */
.go {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 14px; padding: 4px 4px 4px 14px;
  border: 1px solid rgba(255, 91, 46, .35); border-radius: 999px;
  color: var(--accent-d); font-size: 13.5px; font-weight: 600;
  transition: background .2s, border-color .2s;
}
.go .arr { width: 26px; height: 26px; background: var(--accent); color: #fff; }
.go:hover { background: rgba(255, 91, 46, .07); border-color: rgba(255, 91, 46, .6); }

/* ---------- header ---------- */
.hdr {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(14px, 3vw, 32px);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand svg { width: 32px; height: 32px; filter: drop-shadow(0 4px 10px rgba(242, 75, 29, .25)); }
.brand span { font-family: var(--serif); font-size: 24px; letter-spacing: .2em; line-height: 1; padding-top: 2px; }
.tabs {
  display: flex; gap: 2px; padding: 4px;
  border-radius: 999px;
  background: var(--glass); border: 1px solid var(--glass-b);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.tabs a { position: relative; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--txt); transition: background .2s, color .2s; }
.tabs a:hover { background: rgba(255, 255, 255, .8); color: var(--ink); }
.tabs a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(43, 30, 24, .08); }
.tabs a.on::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; background: var(--accent); transform: rotate(45deg); }
.right { display: flex; align-items: center; gap: 8px; }
.chain { cursor: default; }
.chain i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(30, 158, 106, .16); }
.snd-on { display: none; }
[data-sound][aria-pressed="true"] .snd-on { display: block; }
[data-sound][aria-pressed="true"] .snd-off { display: none; }
.menu-btn { display: none; }
.gl-only { display: none; }
html.gl .gl-only { display: inline-flex; }

.menu {
  position: fixed; z-index: 30; top: 66px; right: 14px;
  width: min(290px, calc(100vw - 28px));
  display: flex; flex-direction: column;
  padding: 8px; border-radius: 18px;
  background: rgba(255, 250, 246, .97); border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(70, 40, 25, .16);
}
.menu a { display: flex; justify-content: space-between; align-items: center; padding: 11px 12px; border-radius: 12px; color: var(--ink); font-size: 15px; }
.menu a:hover, .menu a.on { background: #F8EDE4; }
.menu small { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--muted); }

/* ---------- hero ---------- */
.hero {
  min-height: 86vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 40px 20px;
}
.hero h1 {
  margin: 0; padding-left: .17em;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(4.6rem, 17vw, 12rem); line-height: .9; letter-spacing: .17em;
  color: var(--ink);
  text-shadow: 0 2px 40px rgba(255, 245, 235, .75);
}
.hero__line { margin: 20px 0 0; font-family: var(--mono); font-size: clamp(11px, 1.4vw, 13px); letter-spacing: .36em; color: var(--ink); padding-left: .36em; }
.hero__sub { display: block; margin-top: 10px; max-width: 440px; font-size: 15px; color: var(--txt); }
.hero__chips { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 26px; }

.ca-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 6px 6px 14px; border-radius: 999px;
  background: rgba(255, 252, 249, .82); border: 1px solid var(--glass-b);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-size: 12.5px; max-width: 100%;
}
.ca-pill b { font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: .08em; color: var(--muted); white-space: nowrap; }
.ca-pill code { font-size: 12.5px; color: var(--accent-d); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ca-pill.is-soon { padding-right: 14px; }
.ca-pill.is-soon code { color: var(--ink); }
.cp {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 999px; padding: 4px 11px; font-family: var(--mono); font-size: 11px; cursor: pointer;
}
.cp:hover { border-color: var(--accent); color: var(--accent-d); }
.cp.is-done { background: var(--ok); border-color: var(--ok); color: #fff; }

.status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 5px 5px 14px; border-radius: 999px;
  background: rgba(255, 252, 249, .82); border: 1px solid var(--glass-b);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-size: 13px;
}
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: pulse 1.8s infinite; }
.status b { font-weight: 600; color: var(--ink); }
.status span { font-family: var(--mono); font-size: 12px; color: var(--txt); }

.hint {
  display: none;
  flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .26em; color: var(--ink);
}
.hint i { display: block; width: 1px; height: 40px; background: linear-gradient(var(--accent), transparent); animation: drop 2.2s ease-in-out infinite; }

/* ---------- cards ---------- */
#cards { max-width: 760px; margin: 0 auto; padding: 0 16px 80px; display: grid; gap: 16px; }
.card {
  position: relative;
  padding: 20px 22px 18px;
  border-radius: 22px;
  background: rgba(255, 250, 246, .84);
  border: 1px solid rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(18px) saturate(1.15); backdrop-filter: blur(18px) saturate(1.15);
  box-shadow: 0 24px 60px rgba(90, 50, 30, .15);
  scroll-margin-top: 90px;
}
.card::before {
  content: ""; position: absolute; left: 22px; right: 22px; top: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), rgba(255, 138, 61, .0));
  border-radius: 2px;
}
.card .k {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em; color: var(--accent-d);
}
.card .k span { display: inline-flex; align-items: center; gap: 9px; }
.card .k span::before { content: ""; width: 6px; height: 6px; background: var(--accent); transform: rotate(45deg); border-radius: 1px; }
.card .k b { font-weight: 500; color: var(--muted); text-align: right; }
.card h2 {
  margin: 10px 0 6px;
  font-family: var(--serif); font-weight: 400;
  font-size: 34px; line-height: 1.04; letter-spacing: .005em; color: var(--ink);
}
.card p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--txt); }
.card p + p { margin-top: 8px; }
.card .note { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.card .fine { margin-top: 14px; font-size: 11.5px; line-height: 1.45; color: var(--muted); }
.card .ca-pill { margin-top: 14px; background: #fff; border-color: var(--line); }

.rows { margin-top: 12px; display: grid; grid-template-columns: 1fr auto; border-top: 1px solid var(--line); }
.rows > * { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.rows > :nth-child(odd) { color: var(--muted); padding-right: 12px; }
.rows > code:nth-child(odd) { color: var(--ink); font-size: 12.5px; }
.rows > :nth-child(even) { text-align: right; color: var(--ink); }
.rows > code:nth-child(even) { font-size: 12.5px; }
.live, .soon { display: inline-flex; align-items: center; justify-content: flex-end; gap: 7px; font-family: var(--mono); font-size: 12px; }
.live::before, .soon::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.live { color: var(--ok) !important; }
.live::before { background: var(--ok); animation: pulse 1.8s infinite; }
.soon { color: var(--amber) !important; }
.soon::before { background: transparent; border: 1.5px solid var(--amber); width: 6px; height: 6px; }

.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.btns .ghost { background: #fff; border-color: var(--line); }
.btns .ghost:hover { border-color: rgba(255, 91, 46, .45); }

/* ---------- rail (journey nav) ---------- */
.rail { display: none; }
.rail button {
  all: unset; cursor: pointer;
  display: flex; align-items: center; gap: 10px; padding: 6px 0;
}
.rail .n { font-family: var(--serif); font-size: 15px; letter-spacing: .08em; color: var(--muted); opacity: 0; transform: translateX(6px); transition: .25s; white-space: nowrap; }
.rail .t { width: 7px; height: 7px; border: 1px solid rgba(43, 30, 24, .35); transform: rotate(45deg); transition: .25s; }
.rail .tick { width: 1px; height: 12px; margin-right: 3.5px; background: rgba(43, 30, 24, .18); }
.rail button.on .t { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255, 91, 46, .16); }
.rail button.on .n, .rail:hover .n { opacity: 1; transform: none; color: var(--ink); }
.rail button:focus-visible .t { outline: 2px solid var(--accent); outline-offset: 3px; }

#gl, #load, #track { display: none; }

/* =========================================================
   Immersive layout
   ========================================================= */
html.gl body { background: #F3E6DB; }
html.gl #gl { display: block; position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
html.gl #track { display: block; position: relative; z-index: 1; height: 1000vh; pointer-events: none; }
html.gl .hdr { position: fixed; left: 0; right: 0; }
html.gl .hero {
  position: fixed; z-index: 5; inset: 0 0 auto 0; height: 100vh; min-height: 0;
  padding: 0 20px; pointer-events: none;
  transition: opacity .2s linear;
}
html.gl .hero__chips { pointer-events: auto; }
html.gl .hint {
  display: flex; position: fixed; z-index: 5; left: 50%; bottom: 26px; transform: translateX(-50%);
  pointer-events: none; transition: opacity .2s linear;
}
html.gl #cards { display: block; padding: 0; margin: 0; max-width: none; }
html.gl .card {
  position: fixed; z-index: 6;
  left: clamp(14px, 3vw, 40px); bottom: clamp(14px, 4vh, 40px);
  width: min(430px, calc(100vw - 28px));
  max-height: calc(100vh - 110px); overflow: auto;
  opacity: 0; transform: translateY(18px) scale(.985); transform-origin: left bottom;
  transition: opacity .4s ease, transform .4s cubic-bezier(.2, .8, .2, 1);
  pointer-events: none;
}
html.gl .card.show { opacity: 1; transform: none; pointer-events: auto; }
html.gl .rail {
  display: flex; flex-direction: column; align-items: flex-end;
  position: fixed; z-index: 10; right: clamp(12px, 2vw, 28px); top: 50%; transform: translateY(-50%);
}

/* loader (immersive only) */
html.gl #load {
  display: flex; position: fixed; inset: 0; z-index: 50;
  flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: linear-gradient(180deg, #D9CEDF 0%, #F1DED4 55%, #F8E7D6 100%);
  transition: opacity .7s ease, visibility .7s;
}
html.gl.ready #load { opacity: 0; visibility: hidden; pointer-events: none; }
.load__mark svg { width: 74px; height: 74px; animation: breathe 1.8s ease-in-out infinite; filter: drop-shadow(0 10px 24px rgba(242, 75, 29, .35)); }
.load__txt { font-family: var(--mono); font-size: 11px; letter-spacing: .3em; color: var(--muted); }
.load__bar { width: 120px; height: 2px; border-radius: 2px; background: rgba(43, 30, 24, .1); overflow: hidden; }
.load__bar i { display: block; height: 100%; width: 40%; background: var(--accent); animation: load 1.2s ease-in-out infinite; }

/* ---------- motion ---------- */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes drop { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
@keyframes breathe { 0%, 100% { transform: scale(1) rotate(0deg); } 50% { transform: scale(1.08) rotate(6deg); } }
@keyframes load { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .tabs a { padding: 8px 11px; }
}
@media (max-width: 1060px) {
  .tabs { display: none; }
  .menu-btn { display: inline-flex; }
}
@media (max-width: 760px) {
  .hide-m { display: none !important; }
  .hdr { padding: 12px 14px; }
  .right { gap: 6px; }
  .brand span { font-size: 20px; }
  .brand svg { width: 28px; height: 28px; }
  .ghost { padding: 0 11px; }
  .ghost--icon { padding: 0; }
  .cta { padding-left: 14px; }
  .cta .arr { width: 28px; height: 28px; }
  .card h2 { font-size: 29px; }
  html.gl .card { left: 12px; right: 12px; width: auto; bottom: 12px; padding: 16px 16px 14px; max-height: calc(100vh - 92px); }
  html.gl .rail { right: 8px; }
  .rail .n { display: none; }
  html.gl .hint { bottom: 18px; }
}
@media (max-width: 520px) {
  .hide-s { display: none !important; }
  .hdr .cta { padding: 0 4px 0 12px; font-size: 12px; }
  .hdr .cta .arr { width: 26px; height: 26px; }
  .hero__sub { font-size: 14px; max-width: 320px; }
  .status span { display: none; }
  .ca-pill { max-width: calc(100vw - 32px); }
  .card { padding: 18px 16px 16px; }
}
