/* STONKD. Fargene er de samme som foer (StonkFun-blaa paa nesten svart), fontene er
   stonkfun.xyz sine. Bildene er rendret i Blender, saa siden rundt dem holdes stille. */
:root {
  --bg: #050c10;
  --bg-2: #081419;
  --panel: #0b1820;
  --panel-2: #10222c;
  --line: #16303b;
  --line-soft: #10252e;
  --text: #f1f8fb;
  --muted: #a6c6d3;
  --dim: #6f8793;
  --accent: #52b9e2;
  --accent-2: #8fd4f1;
  --accent-3: #ccedf9;
  --accent-soft: rgba(82, 185, 226, .12);
  --ok: #39d6a3;
  --bad: #fb7185;
  --r: 12px;
  --r-lg: 20px;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: Sora, ui-sans-serif, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans);
  font-size: 15px; -webkit-font-smoothing: antialiased; }
/* Bakgrunnen ligger paa html; body er gjennomsiktig saa 3D-lerretet bak innholdet synes. */
body { background: transparent; overflow-x: hidden; scrollbar-color: var(--line) var(--bg); scrollbar-width: thin; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; letter-spacing: -0.035em; }
p { margin: 0; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------------------------------------------------------------- knapper */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px;
  padding: 0 22px; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: #04121a;
  font-weight: 700; font-size: 15px; white-space: nowrap;
  box-shadow: 0 8px 28px rgba(82, 185, 226, .25), inset 0 1px 0 rgba(255, 255, 255, .45);
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease; }
.btn:hover { filter: brightness(1.06); box-shadow: 0 10px 36px rgba(82, 185, 226, .38), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: rgba(255, 255, 255, .03); color: var(--text); border-color: var(--line);
  box-shadow: none; }
.btn.ghost:hover { border-color: var(--accent); background: var(--accent-soft); }
.btn.sm { height: 36px; padding: 0 16px; font-size: 13.5px; }
.btn.wide { width: 100%; height: 52px; font-size: 16px; }

/* ---------------------------------------------------------------- nav */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background .25s ease, border-color .25s ease;
  border-bottom: 1px solid transparent; }
.nav.solid { background: rgba(5, 12, 16, .92); border-color: var(--line-soft); }
.nav-in { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .06em; font-size: 16px; }
.brand img { width: 20px; height: auto; }
.links { display: flex; gap: 24px; font-size: 14px; color: var(--muted); }
.links a:hover { color: var(--text); }
.nav-r { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.ca { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(11, 24, 32, .7); color: var(--muted);
  font-family: var(--mono); font-size: 12px; font-weight: 600; cursor: pointer; }
.ca .k { color: var(--dim); letter-spacing: .12em; }
.ca:hover, .ca.on { border-color: var(--accent); color: var(--text); }

/* ---------------------------------------------------------------- hero */
/* 3D-scenen ligger fast over hele skjermen, bak innholdet (coins.js). */
#stage { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; display: block; }

/* Toppen: stort ordmerke, 3D-myntene under, saa overskrift, ingress og knapper.
   Alt maales i skjermhoeyde (svh), saa hele toppen faar plass naar man kommer inn. */
.hero { position: relative; }
.hero-in { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding-top: 72px; padding-bottom: 3svh; }
.wordmark { margin: 0; font-weight: 800; font-size: min(21vw, 22svh); line-height: .86; letter-spacing: -0.055em;
  background: linear-gradient(180deg, var(--accent-3) 8%, var(--accent-2) 45%, var(--accent) 80%, #2f86ab);
  -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .05em; }
.hero-coins { flex: none; width: 100%; height: 31svh; margin: -1.5svh 0 1svh; }
html.nogl .hero-coins { background: url(/img/hero.webp) center / cover no-repeat; border-radius: 20px; }
.hero h1 { margin: 0 auto; max-width: 28em; font-size: clamp(21px, min(2.5vw, 4svh), 38px); line-height: 1.12; font-weight: 800; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent-3), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead b { color: var(--text); font-weight: 700; }
.hero .lead { margin: 1.6svh auto 0; max-width: 46em; color: var(--muted); font-size: clamp(14px, 2svh, 17px); line-height: 1.6; }
.cta { display: flex; gap: 12px; margin-top: 3svh; flex-wrap: wrap; justify-content: center; }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; font-family: var(--mono);
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-2); }
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 4px rgba(57, 214, 163, .15); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(57, 214, 163, 0); } }


/* Plassholder mens API-et svarer (det kan ta en stund). */
.sk { color: transparent !important; border-radius: 6px; width: fit-content;
  background: linear-gradient(90deg, var(--panel) 0%, var(--panel-2) 50%, var(--panel) 100%) 0 0 / 200% 100%;
  animation: sk 1.4s linear infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------------------------------------------------------------- seksjoner */
.sect { padding: 120px 0; }
.sect.tight { padding: 0 0 40px; }
.head { max-width: 640px; margin-bottom: 44px; }
.head h2 { font-size: clamp(30px, 3.6vw, 48px); line-height: 1.05; font-weight: 800; }
.head p:not(.eyebrow) { margin-top: 14px; color: var(--muted); line-height: 1.65; }
.row-head { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.row-head > div { max-width: 640px; }

.search { height: 40px; min-width: 0; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--text); outline: none; font-size: 14px; }
.search::placeholder { color: var(--dim); }
.search:focus { border-color: var(--accent); }
.row-head .search { width: 300px; }

/* ---------------------------------------------------------------- launch */
.launch { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.ticket, .receipt { border: 1px solid var(--line); border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%); }
.ticket { padding: 8px 28px; }
.field { padding: 22px 0; }
.field + .field { border-top: 1px solid var(--line-soft); }
.lblrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.lblrow .search { height: 34px; width: 210px; font-size: 13px; }
.lbl { margin: 0 0 12px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--dim); }
.lblrow .lbl { margin: 0; }
.cnt { color: var(--accent-2); letter-spacing: .04em; text-transform: none; margin-left: 6px; }

.cats, .chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.cats::-webkit-scrollbar, .chips::-webkit-scrollbar, .row::-webkit-scrollbar { display: none; }
.cats { margin-bottom: 12px; }
.cats button, .chips button { flex: none; height: 30px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-soft); background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.cats button:hover, .chips button:hover { color: var(--text); border-color: var(--line); }
.cats button.on, .chips button.on { color: var(--accent-3); border-color: rgba(82, 185, 226, .55); background: var(--accent-soft); }
.chips .n { color: var(--dim); font-family: var(--mono); font-size: 11px; margin-left: 4px; }

.row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0;
  mask-image: linear-gradient(90deg, #000 85%, transparent); }
.row button { flex: none; display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 16px 0 7px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); cursor: pointer;
  font-family: var(--mono); font-weight: 600; font-size: 13px; transition: border-color .15s ease, background .15s ease; }
.row button img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--panel-2); }
.row button:hover { border-color: #26505f; }
.row button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-3); }
.row button.dim { opacity: .38; cursor: not-allowed; }
.none { color: var(--dim); font-size: 13px; padding: 12px 0; }

.kinds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.kinds button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px;
  border-radius: var(--r); border: 1px solid var(--line); background: var(--bg-2); cursor: pointer;
  font-weight: 600; font-size: 14px; }
.kinds button img { width: 16px; height: 16px; }
.kinds button:hover { border-color: #26505f; }
.kinds button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-3); }
.target { width: 100%; height: 50px; margin-top: 10px; padding: 0 16px; border-radius: var(--r); outline: none;
  border: 1px solid var(--line); background: var(--bg); font-size: 15px; }
.target:focus { border-color: var(--accent); }
.target[hidden] { display: none; }
.found { display: flex; align-items: center; gap: 10px; min-height: 22px; margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.found b { color: var(--text); }
.found.bad { color: var(--bad); }
.found .rav { width: 22px; height: 22px; }

/* Kvitteringen: det du har valgt, samlet og lest som en setning. */
.receipt { position: sticky; top: 88px; padding: 28px; overflow: hidden; }
.receipt::before { content: ""; position: absolute; inset: -40% -20% auto auto; width: 70%; aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(82, 185, 226, .16), transparent); pointer-events: none; }
/* 3D-scenen i kvitteringen. Uten WebGL vises de rendrede mynt-skivene i stedet. */
.rstage { position: relative; height: 170px; margin: -8px -8px 18px; }
.rstage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .5s ease; }
.rstage.gl canvas { opacity: 1; }
.rfallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; }
.rstage.gl .rfallback { display: none; }
.rfallback .disc { width: 120px; height: 120px; }

/* Mynt-skive: en tom staalmynt rendret i Blender, med logoen lagt i feltet. */
.disc { position: relative; flex: none; display: grid; place-items: center; border-radius: 50%;
  background: url(/img/coin-blank.webp) center / contain no-repeat;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .55)); }
.disc > img, .disc > span { width: 69%; height: 69%; border-radius: 50%; object-fit: cover; display: grid; place-items: center;
  background: var(--panel); font-family: var(--mono); font-weight: 700; font-size: 13px; color: var(--accent-3); }
.disc::after { content: ""; position: absolute; inset: 15.5%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 34% 26%, rgba(255, 255, 255, .38), rgba(255, 255, 255, 0) 46%),
    radial-gradient(circle at 70% 85%, rgba(143, 212, 241, .18), rgba(143, 212, 241, 0) 40%);
  box-shadow: inset 0 3px 7px rgba(0, 0, 0, .55), inset 0 -1px 2px rgba(255, 255, 255, .3); }

.sentence { font-size: 22px; line-height: 1.35; font-weight: 700; letter-spacing: -0.02em; }
.sentence em { font-style: normal; color: var(--accent-2); }
.split { margin: 24px 0; padding: 4px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.split div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; font-size: 14px; color: var(--muted); }
.split dd { margin: 0; font-family: var(--mono); color: var(--text); text-align: right; }
.fine { margin-top: 12px; font-size: 12.5px; color: var(--dim); text-align: center; }

/* ---------------------------------------------------------------- how */
/* Ett steg per rad. Mynten staar fast ved siden av mens stegene scroller forbi. */
/* Ett steg per rad i venstre halvdel; mynten staar fast til hoeyre (coins.js). */
.how-grid { display: block; }
.hsteps { list-style: none; margin: 0; padding: 0 0 14vh; width: 48%; }
.hsteps li { min-height: 78vh; display: flex; flex-direction: column; justify-content: center;
  padding: 40px 0; border-top: 1px solid var(--line-soft); opacity: .3; transition: opacity .4s ease; }
.hsteps li:first-child { border-top: 0; }
.hsteps li.on { opacity: 1; }
.hsteps .n { font-family: var(--mono); font-size: 13px; letter-spacing: .14em; color: var(--accent-2); margin-bottom: 18px; }
.hsteps h3 { font-size: clamp(26px, 2.8vw, 38px); line-height: 1.1; max-width: 13em; }
.hsteps p { margin-top: 16px; max-width: 32em; color: var(--muted); font-size: 16px; line-height: 1.7; }

/* ---------------------------------------------------------------- tall */
.nums { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--bg-2); }
.nums > div { padding: 28px; }
.nums > div + div { border-left: 1px solid var(--line-soft); }
.nums .k { font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.nums .v { margin-top: 10px; font-size: 36px; font-weight: 800; letter-spacing: -0.03em; }
.nums .s { margin-top: 6px; font-size: 13px; color: var(--muted); }

/* ---------------------------------------------------------------- par */
#gcats { margin-bottom: 22px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.pcard { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 12px 18px; cursor: pointer;
  border: 1px solid var(--line-soft); border-radius: var(--r-lg); background: var(--bg-2); text-align: center;
  transition: border-color .15s ease, transform .15s ease; }
.pcard:hover { border-color: var(--accent); transform: translateY(-2px); }
.pcard .disc { width: 84px; height: 84px; margin-bottom: 10px; }
.pcard b { font-family: var(--mono); font-size: 14px; }
.pcard small { color: var(--muted); font-size: 12.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard em { margin-top: 6px; font-style: normal; font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); }
.more { text-align: center; margin-top: 22px; }

/* ---------------------------------------------------------------- coins */
.bar { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.card { display: block; padding: 18px; border: 1px solid var(--line-soft); border-radius: var(--r-lg); background: var(--bg-2);
  transition: border-color .15s ease; }
.card:hover { border-color: var(--accent); }
.card-top { display: flex; align-items: center; gap: 12px; }
.cimg, .avatar { width: 42px; height: 42px; flex: none; border-radius: 50%; object-fit: cover; background: var(--panel-2); }
.avatar { display: grid; place-items: center; font-family: var(--mono); font-size: 12px; color: var(--accent-2); }
.card-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sub { margin-top: 2px; font-size: 12.5px; color: var(--dim); font-family: var(--mono); }
.tag { margin-left: auto; flex: none; padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 600;
  color: var(--ok); background: rgba(57, 214, 163, .1); }
.wire { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 12px 14px; border-radius: var(--r);
  background: var(--bg); }
.wire .fee { font-family: var(--mono); font-size: 13px; color: var(--accent-2); white-space: nowrap; }
.wire .line { flex: 1; height: 1px; background: repeating-linear-gradient(90deg, var(--line) 0 5px, transparent 5px 10px); }
.who { display: flex; align-items: center; gap: 9px; min-width: 0; }
.who b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.who small { color: var(--dim); font-size: 11.5px; }
.rav { flex: none; border-radius: 50%; object-fit: cover; background: var(--panel-2); }
.rav.blank { display: inline-grid; place-items: center; font-family: var(--mono); font-size: 10px; color: var(--accent-2); }
.empty { grid-column: 1 / -1; padding: 48px; text-align: center; color: var(--dim); border: 1px dashed var(--line);
  border-radius: var(--r-lg); }

/* ---------------------------------------------------------------- bunn */
.foot { border-top: 1px solid var(--line-soft); padding: 40px 0 56px; margin-top: 40px; }
.foot-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 22px; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.foot nav a:hover { color: var(--text); }
.disclaim { margin-top: 24px; max-width: 760px; font-size: 12.5px; line-height: 1.6; color: var(--dim); }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 60; transform: translate(-50%, 12px); opacity: 0;
  padding: 10px 16px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line);
  font-size: 13px; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- smal skjerm */
@media (max-width: 980px) {
  .links { display: none; }
  .launch { grid-template-columns: minmax(0, 1fr); }
  .receipt { position: static; }
  .nums { grid-template-columns: 1fr 1fr; }
  .nums > div:nth-child(3) { border-left: 0; }
  .nums > div:nth-child(n + 3) { border-top: 1px solid var(--line-soft); }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .ca { display: none; }
  .hero-in { padding-top: 64px; }
  .hero-coins { height: 27svh; }
  .cta .btn { height: 44px; padding: 0 18px; }
  .sect { padding: 80px 0; }
  .row-head { flex-direction: column; align-items: stretch; }
  .row-head .search { width: 100%; }
  .ticket { padding: 4px 18px; }
  .receipt { padding: 22px; }
  .lblrow { flex-direction: column; align-items: stretch; }
  .lblrow .search { width: 100%; }
  .kinds { grid-template-columns: 1fr 1fr; }
  /* Mobil: mynten staar i oevre del av skjermen, teksten kommer under den. */
  .hsteps { width: 100%; }
  .hsteps li { min-height: 100vh; justify-content: flex-end; padding: 0 0 12vh; border-top: 0; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nums .v { font-size: 28px; }
  .nums > div { padding: 20px; }
}
/* Lave skjermer: ingressen viker, saa overskrift og knapper fortsatt synes. */
@media (max-height: 640px) { .hero .lead { display: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .eyebrow i, .sk { animation: none; }
}
