/* linksoni.in · the Soni story. Brand sheet v2 + Vault's UI tokens (paper/ink, Schibsted + Plex, radii 6–20).
   The 3D comet lives in #scene (story.js). Every word on the page is real HTML, readable without WebGL. */
:root {
  --space: #0a0d14; --space-2: #10141e; --glass: rgba(16, 20, 30, .62); --glass-line: rgba(255, 255, 255, .09);
  --text-d: #eef0f4; --muted-d: #9aa2b1;
  --paper: #f7f8fa; --surface: #ffffff; --surface-sunk: #eff1f5; --line: #e2e5eb; --ink: #12151c; --muted: #59606e;
  --jd: #2c4a86; --jd-l: #8fb0ec; --vault: #1d6b78; --vault-l: #6fc3cf; --vault-soft: #e3f0f2; --jd-soft: #e8eef9;
  --accent: var(--jd-l); --accent-solid: var(--jd);
  --display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
body[data-theme="jd"] { --accent: var(--jd-l); --accent-solid: var(--jd); }
body[data-theme="vault"] { --accent: var(--vault-l); --accent-solid: var(--vault); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--space); color: var(--text-d); font: 400 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.02em; line-height: 1.06; text-wrap: balance; }
p { margin: 0; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--paper); color: var(--ink); padding: 8px 12px; border-radius: var(--r-sm); }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--r-sm); }

/* Mark colours */
.mk, .wm { fill: var(--text-d); }
.mk-head { fill: var(--accent); transition: fill .6s; }

/* ── Fixed layers ── */
#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; display: block; }
.vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(5, 7, 11, .75) 100%); }
main, .foot { position: relative; z-index: 2; }
.hover-tip { position: fixed; z-index: 30; pointer-events: none; opacity: 0; transform: translate(14px, -50%); transition: opacity .2s; display: grid; gap: 2px; padding: 8px 12px 8px 14px; background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--r-md); backdrop-filter: blur(10px); }
.hover-tip.on { opacity: 1; }
.hover-tip .hl { position: absolute; right: 100%; top: 50%; width: 38px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent)); }
.hover-tip b { font: 600 .9rem var(--display); }
.hover-tip small { font: 500 .7rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted-d); }

/* ── Nav ── */
.nav { position: fixed; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; padding: 0 clamp(16px, 3vw, 32px); background: linear-gradient(180deg, rgba(10, 13, 20, .85), rgba(10, 13, 20, 0)); }
.lockup svg { height: 26px; width: auto; display: block; }
.switch { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--glass-line); border-radius: 999px; background: var(--glass); backdrop-filter: blur(12px); }
.switch button { height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--muted-d); font: 500 .86rem var(--body); cursor: pointer; transition: background .3s, color .3s; white-space: nowrap; }
.switch button:hover { color: var(--text-d); }
.switch button[aria-selected="true"] { background: var(--accent-solid); color: #fff; }
.switch button[data-theme-btn="soni"][aria-selected="true"] { background: var(--text-d); color: var(--space); }
.nav-cta { height: 36px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 999px; border: 1px solid var(--glass-line); text-decoration: none; font-size: .9rem; background: var(--glass); }
.nav-cta:hover { border-color: var(--accent); }
@media (max-width: 760px) {
  .nav { height: auto; padding-block: 10px; flex-wrap: wrap; justify-content: center; gap: 8px; }
  .lockup svg { height: 22px; }
  .nav-cta { display: none; }
  .switch button { padding: 0 11px; font-size: .8rem; height: 30px; }
}

/* ── Story rail ── */
.rail { position: fixed; right: clamp(10px, 2vw, 26px); top: 50%; transform: translateY(-50%); z-index: 15; display: grid; gap: 14px; }
.rail a { display: flex; align-items: center; justify-content: flex-end; gap: 10px; text-decoration: none; }
.rail i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--muted-d); transition: all .3s; order: 2; }
.rail span { font: 500 .68rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted-d); opacity: 0; transform: translateX(6px); transition: all .3s; }
.rail a:hover span, .rail a.on span { opacity: 1; transform: none; }
.rail a.on i { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
.rail a.on span { color: var(--text-d); }
@media (max-width: 760px) { .rail { display: none; } }

/* ── Shared ── */
.eyebrow { font: 500 .76rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); display: inline-flex; align-items: center; gap: 10px; transition: color .6s; }
.eyebrow .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 2.4s infinite; }
.lead { color: var(--muted-d); font-size: clamp(1.05rem, 1.5vw, 1.18rem); max-width: 34em; }
.soft { color: var(--muted-d); }
.ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { height: 46px; display: inline-flex; align-items: center; gap: 10px; padding: 0 20px; border-radius: var(--r-md); border: 1px solid transparent; font: 600 .96rem var(--body); text-decoration: none; cursor: pointer; transition: transform .25s var(--ease), filter .2s, border-color .2s; }
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn span { transition: transform .25s var(--ease); }
.btn:hover span { transform: translateX(3px); }
.btn-jd { background: var(--jd); color: #fff; }
.btn-vault { background: var(--vault); color: #fff; }
.btn-light { background: var(--text-d); color: var(--space); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }

.scene { min-height: 115vh; display: flex; align-items: center; padding: 120px clamp(18px, 6vw, 96px); }
.card { position: relative; max-width: 470px; padding: clamp(24px, 3vw, 34px); background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--r-xl); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); display: grid; gap: 14px; box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .8); }
.card h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 700; }
.card p { color: var(--muted-d); }
.card::before { content: ""; position: absolute; left: 0; top: 24px; bottom: 24px; width: 2px; border-radius: 2px; background: var(--accent); transition: background .6s; }
.part.right { justify-content: flex-end; }
@media (min-width: 761px) { .part.right, .product.right { padding-right: clamp(120px, 10vw, 150px); } }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 0; }
.stats div { border-top: 1px solid var(--glass-line); padding-top: 10px; }
.stats dt { font: 700 1.5rem var(--display); letter-spacing: -0.02em; color: var(--text-d); }
.stats dd { margin: 2px 0 0; font-size: .8rem; color: var(--muted-d); line-height: 1.35; }

/* Intro */
.intro { min-height: 100vh; position: relative; align-items: center; }
.intro-copy { max-width: 640px; display: grid; gap: 26px; }
.intro h1 { font-size: clamp(3rem, 8vw, 6.4rem); font-weight: 800; letter-spacing: -0.04em; line-height: .95; }
.intro h1 .line { display: block; }
.intro h1 em { font-style: normal; color: var(--accent); transition: color .6s; }
.fallback-mark { display: none; position: absolute; right: 8vw; top: 50%; width: min(34vw, 360px); transform: translateY(-50%); }
.scroll-cue { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); display: grid; justify-items: center; gap: 10px; text-decoration: none; font: 500 .7rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted-d); }
.scroll-cue i { width: 1px; height: 46px; background: linear-gradient(var(--accent), transparent); animation: drip 2s var(--ease) infinite; transform-origin: top; }

/* Loop */
.loop { justify-content: flex-start; }
.loop-in { max-width: 520px; display: grid; gap: 16px; }
.loop h2 { font-size: clamp(1.9rem, 3.8vw, 2.8rem); }
.steps { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; padding: 14px 16px; border-radius: var(--r-lg); border: 1px solid var(--glass-line); background: var(--glass); backdrop-filter: blur(12px); opacity: .45; transform: translateX(-6px); transition: opacity .5s, transform .5s var(--ease), border-color .5s; }
.steps li::before { content: "0" counter(s); grid-row: span 2; font: 500 .8rem var(--mono); color: var(--accent); padding-top: 3px; }
.steps li b { font: 600 1.08rem var(--display); }
.steps li span { color: var(--muted-d); font-size: .93rem; }
.steps li.on { opacity: 1; transform: none; border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.steps li.human b::after { content: "your team"; margin-left: 10px; font: 500 .66rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #fff; background: var(--accent-solid); padding: 2px 7px; border-radius: var(--r-sm); vertical-align: 2px; }

/* Products: Vault-style light cards floating in space */
.product { min-height: 125vh; display: flex; align-items: center; padding: 120px clamp(18px, 6vw, 96px); }
.product.right { justify-content: flex-end; }
.card.wide { max-width: 620px; background: var(--paper); color: var(--ink); border-color: var(--line); backdrop-filter: none; }
.card.wide p { color: var(--muted); }
.card.wide::before { background: var(--accent-solid); }
.plock { display: flex; align-items: center; gap: 10px; font-family: var(--display); flex-wrap: wrap; }
.plock svg { width: 34px; height: 34px; }
.plock .w { font-weight: 700; font-size: 1.55rem; letter-spacing: -0.02em; color: var(--ink); }
.plock i { width: 1.5px; height: 22px; background: var(--ink); opacity: .22; }
.plock .d { font-weight: 500; font-size: 1.3rem; }
.plock.jd svg { fill: var(--jd); } .plock.jd .d { color: var(--jd); }
.plock.vault svg { fill: var(--vault); } .plock.vault .d { color: var(--vault); }
.who { font: 500 .74rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.card.wide h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.trio div { background: var(--surface-sunk); border-radius: var(--r-md); padding: 10px 12px; display: grid; gap: 2px; }
.trio span { font: 500 .66rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.trio b { font-size: .88rem; line-height: 1.3; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; display: grid; gap: 4px; }
.plan .tag { justify-self: start; font: 500 .64rem var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--jd-soft); color: var(--jd); }
#soni-vault .plan .tag { background: var(--vault-soft); color: var(--vault); }
.plan b { font: 600 .98rem var(--display); }
.plan strong { font: 700 1.5rem var(--display); letter-spacing: -0.02em; }
.plan strong small { font: 400 .8rem var(--body); color: var(--muted); letter-spacing: 0; }
.plan > small { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.fine { font-size: .84rem; }
@media (max-width: 560px) { .trio, .plans { grid-template-columns: 1fr; } }

/* Contact */
.contact { justify-content: center; text-align: center; }
.contact-in { max-width: 920px; display: grid; gap: 18px; justify-items: center; }
.contact h2 { font-size: clamp(1.9rem, 4vw, 3rem); max-width: 18em; }
.mails { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; width: 100%; margin-top: 18px; }
.mail { position: relative; display: grid; gap: 4px; padding: 26px 18px 20px; border-radius: var(--r-xl); background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(12px); text-decoration: none; transition: transform .35s var(--ease), border-color .35s; }
.mail:hover { transform: translateY(-4px); border-color: var(--accent); }
.mail small { font: 500 .7rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted-d); }
.mail b { font: 600 1.05rem var(--display); overflow-wrap: anywhere; }
.moon { justify-self: center; width: 14px; height: 14px; border-radius: 50%; margin-bottom: 10px; background: var(--accent); box-shadow: 0 0 18px var(--accent); }
.moon.m2 { background: var(--vault-l); box-shadow: 0 0 18px var(--vault-l); }
.moon.m3 { background: var(--text-d); box-shadow: 0 0 18px var(--text-d); }
.contact-meta { color: var(--muted-d); font-size: .92rem; margin-top: 8px; }
.contact-meta a { text-decoration: none; border-bottom: 1px solid var(--glass-line); }
@media (max-width: 760px) { .mails { grid-template-columns: 1fr; } }

/* Finale */
.finale { min-height: 130vh; justify-content: center; text-align: center; }
.finale-in { position: relative; display: grid; gap: 20px; justify-items: center; }
.finale h2 { font-size: clamp(2.2rem, 5.6vw, 4.4rem); font-weight: 800; letter-spacing: -0.035em; }
.chips { position: absolute; inset: -140px -10vw; pointer-events: none; }
.chips span { position: absolute; font: 500 .74rem var(--mono); letter-spacing: .06em; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--glass-line); background: var(--glass); color: var(--muted-d); white-space: nowrap; }
.chips span:nth-child(1) { left: 2%; top: 4%; } .chips span:nth-child(2) { left: 12%; top: 98%; }
.chips span:nth-child(3) { left: 84%; top: 2%; } .chips span:nth-child(4) { left: 88%; top: 94%; }
.chips span:nth-child(5) { left: 46%; top: -8%; } .chips span:nth-child(6) { left: -3%; top: 46%; }
.chips span:nth-child(7) { left: 64%; top: 108%; } .chips span:nth-child(8) { left: 93%; top: 48%; }
@media (max-width: 760px) { .chips { display: none; } }

/* Footer */
.foot { background: linear-gradient(180deg, transparent, var(--space) 30%); padding: 80px clamp(18px, 6vw, 96px) 28px; color: var(--muted-d); font-size: .9rem; }
.foot-in { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; max-width: 1160px; margin: 0 auto; border-top: 1px solid var(--glass-line); padding-top: 36px; }
.foot-lock { height: 24px; width: auto; margin-bottom: 12px; }
.foot-brand p { margin-bottom: 8px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--text-d); }
.foot-col { display: grid; gap: 8px; align-content: start; }
.foot-col .h { font: 500 .7rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-d); }
.foot-note { max-width: 1160px; margin: 26px auto 0; font-size: .78rem; }
@media (max-width: 760px) { .foot-in { grid-template-columns: 1fr; } }

/* Mobile: the comet sits behind the cards */
@media (max-width: 760px) {
  .scene, .product { padding: 110px 16px 80px; min-height: 110vh; align-items: flex-end; }
  .part.right, .product.right { justify-content: flex-start; }
  .intro { align-items: flex-end; padding-bottom: 120px; }
  .card { max-width: none; }
}

/* No WebGL: a still mark and calm layout */
body.no-webgl .fallback-mark { display: block; }
body.no-webgl #scene { display: none; }
@media (max-width: 760px) { body.no-webgl .fallback-mark { position: static; transform: none; width: 160px; margin-bottom: 24px; } body.no-webgl .intro { flex-direction: column; align-items: flex-start; justify-content: flex-end; } }

/* Reveal (set up by story.js) */
.js .reveal { opacity: 0; transform: translateY(30px); }

@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }
@keyframes drip { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
