/* NordPing: base, components and the small pages. The home page sections live in home.css. */
@font-face { font-family: "Chakra Petch"; src: url(fonts/chakra-petch-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Chakra Petch"; src: url(fonts/chakra-petch-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Chakra Petch"; src: url(fonts/chakra-petch-latin-700-italic.woff2) format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Manrope"; src: url(fonts/manrope-latin-wght-normal.woff2) format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }

:root {
  --bg: #03060f; --bg-2: #060c1b; --panel: #0a1428; --panel-2: #0e1b35;
  --line: rgba(125, 200, 255, .16); --line-strong: rgba(125, 232, 255, .45);
  --text: #eaf2ff; --muted: #93a6c6;
  --cyan: #22d3ee; --ice: #7de8ff; --blue: #2b7fff;
  --danger: #ff5c7a; --ok: #3df0a2;
  --display: "Chakra Petch", "Arial Narrow", Impact, sans-serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --cut: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1rem/1.65 var(--body); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img, svg, canvas { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--ice); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--cyan); color: #00131a; }
[hidden] { display: none !important; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.05; margin: 0 0 .5em; text-wrap: balance; }
h1, h2 { font-style: italic; text-transform: uppercase; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 6.4vw, 4.9rem); }
h2 { font-size: clamp(1.8rem, 4.2vw, 3.1rem); }
h3 { font-size: 1.25rem; letter-spacing: .01em; }
h1 em, h2 em { font-style: inherit; background: linear-gradient(100deg, var(--ice), var(--cyan) 45%, var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 18px rgba(34, 211, 238, .45)); padding-right: .12em; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.02rem, 1.5vw, 1.2rem); color: #c5d3ea; max-width: 60ch; }
.muted { color: var(--muted); }
.fine { font-size: .8rem; color: var(--muted); margin: 0; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }
.sr, .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { left: -9999px; }

.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.narrow { max-width: 760px; }
.narrow-s { max-width: 460px; }

.eyebrow { display: inline-flex; align-items: center; gap: .6em; font: 600 .78rem/1 var(--display); letter-spacing: .22em; text-transform: uppercase; color: var(--ice); margin: 0 0 1.1rem; }
.eyebrow::before { content: "//"; color: var(--blue); letter-spacing: 0; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #48566f; flex: none; display: inline-block; }
.dot-on { background: var(--ok); box-shadow: 0 0 0 0 rgba(61, 240, 162, .7); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(61, 240, 162, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 240, 162, 0); } }

.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--cyan); color: #00131a; padding: 10px 16px; font-weight: 700; }
.skip:focus { top: 12px; }

/* Top loading bar (shown while a page or form is on its way) */
.loadbar { position: fixed; inset: 0 auto auto 0; height: 3px; width: 0; z-index: 300; background: linear-gradient(90deg, var(--blue), var(--ice)); box-shadow: 0 0 14px var(--cyan); opacity: 0; }
.loadbar.on { opacity: 1; width: 82%; transition: width 6s cubic-bezier(.1, .7, .1, 1); }

/* Buttons */
.btn { --skew: -12deg; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .6em; min-height: 48px; padding: 0 1.7em; border: 0; cursor: pointer; text-decoration: none; font: 700 1rem/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: #00131a; background: linear-gradient(100deg, var(--ice), var(--cyan) 50%, #1aa7ff); transform: skewX(var(--skew)); box-shadow: 0 0 0 1px rgba(255, 255, 255, .25) inset, 0 8px 30px -6px rgba(34, 211, 238, .65); transition: transform .15s, box-shadow .2s, filter .2s; overflow: hidden; white-space: nowrap; }
.btn > span { transform: skewX(calc(var(--skew) * -1)); display: inline-block; }
.btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .75) 50%, transparent 70%); transform: translateX(-120%); }
.btn:hover { color: #00131a; transform: skewX(var(--skew)) translateY(-2px); box-shadow: 0 0 0 1px rgba(255, 255, 255, .4) inset, 0 12px 40px -4px rgba(34, 211, 238, .9); }
.btn:hover::after { transform: translateX(120%); transition: transform .55s; }
.btn:active { transform: skewX(var(--skew)) scale(.96); }
.btn-lg { min-height: 56px; font-size: 1.08rem; padding: 0 2em; }
.btn-sm { min-height: 40px; font-size: .84rem; padding: 0 1.2em; }
.btn-block { display: flex; width: 100%; }
.btn-ghost { background: rgba(125, 232, 255, .06); color: var(--ice); box-shadow: 0 0 0 1px var(--line-strong) inset; }
.btn-ghost:hover { color: #fff; background: rgba(125, 232, 255, .14); box-shadow: 0 0 0 1px var(--ice) inset, 0 0 26px -6px var(--cyan); }
.btn-danger { background: linear-gradient(100deg, #ff8fa3, var(--danger)); box-shadow: 0 8px 30px -8px var(--danger); }
.btn-static { pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 1.6rem; }
.btn-row.center { justify-content: center; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linklike:hover { color: #fff; }
.textlink { font-weight: 700; text-decoration: none; }

/* Loading state for buttons */
.spinner { display: none; width: 18px; height: 18px; border: 3px solid rgba(0, 19, 26, .25); border-top-color: #00131a; border-radius: 50%; animation: spin .7s linear infinite; }
.btn.is-loading { pointer-events: none; filter: saturate(.7) brightness(.9); }
.btn.is-loading .spinner { display: inline-block; }
.btn.is-loading::after { transform: translateX(120%); transition: transform 1.1s; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; height: var(--header-h); background: rgba(3, 6, 15, .72); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid var(--line); }
.header-row { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.brand-text { font: italic 700 1.5rem/1 var(--display); letter-spacing: .01em; text-transform: none; }
.brand-text b { color: var(--cyan); text-shadow: 0 0 16px rgba(34, 211, 238, .7); }
.brand .mark { filter: drop-shadow(0 0 8px rgba(34, 211, 238, .5)); }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav > a:not(.btn) { color: #c5d3ea; text-decoration: none; font: 600 .86rem/1 var(--display); letter-spacing: .12em; text-transform: uppercase; padding: 8px 0; position: relative; }
.site-nav > a:not(.btn):hover { color: #fff; }
.site-nav > a:not(.btn):not(.lang-switch)::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px; background: var(--cyan); transition: right .2s; }
.site-nav > a:not(.btn):hover::after { right: 0; }
.nav-sep { width: 1px; height: 22px; background: var(--line); }
.lang-switch span { color: var(--muted); }
.lang-switch span.on { color: var(--cyan); }
.lang-switch i { font-style: normal; color: #48566f; margin: 0 4px; }
.nav-toggle { display: none; width: 46px; height: 46px; background: none; border: 1px solid var(--line); cursor: pointer; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.nav-toggle span { width: 20px; height: 2px; background: var(--ice); transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Cards */
.card { position: relative; background: linear-gradient(160deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); padding: clamp(20px, 4vw, 32px); margin: 1.5rem 0; text-align: left; }
.card h2 { font-size: 1.25rem; font-style: normal; letter-spacing: .06em; }
.card-glow { border-color: var(--line-strong); box-shadow: 0 0 60px -18px rgba(34, 211, 238, .55), 0 0 0 1px rgba(34, 211, 238, .08) inset; }
.card-glow::before, .card-glow::after { content: ""; position: absolute; width: 22px; height: 22px; border: 2px solid var(--cyan); }
.card-glow::before { top: -2px; left: -2px; border-right: 0; border-bottom: 0; }
.card-glow::after { bottom: -2px; right: -2px; border-left: 0; border-top: 0; }
.card.danger { border-color: rgba(255, 92, 122, .3); }
.card.danger summary { cursor: pointer; color: var(--danger); font-weight: 700; }
.card.danger[open] summary { margin-bottom: 1rem; }

/* Forms */
.field { margin-bottom: 1.1rem; min-width: 0; }
.field label { display: block; font: 600 .78rem/1.2 var(--display); letter-spacing: .14em; text-transform: uppercase; color: #c5d3ea; margin-bottom: .5rem; }
.field input, .field select { width: 100%; min-height: 52px; padding: 0 16px; background: rgba(3, 6, 15, .75); color: #fff; border: 1px solid var(--line-strong); border-radius: 0; font: 500 1rem var(--body); transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none; }
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--ice) 50%), linear-gradient(135deg, var(--ice) 50%, transparent 50%); background-position: calc(100% - 22px) 55%, calc(100% - 16px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 44px; }
.field input::placeholder { color: #5f7191; }
.field input:focus, .field select:focus { outline: 0; border-color: var(--ice); box-shadow: 0 0 0 3px rgba(34, 211, 238, .25), 0 0 26px -6px var(--cyan); }
.hint { font-size: .82rem; color: var(--muted); margin: .4rem 0 0; }
.error { font-size: .86rem; font-weight: 600; color: var(--danger); margin: .45rem 0 0; display: flex; gap: .45em; align-items: flex-start; }
.error::before { content: "!"; flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--danger); color: #1a0008; font: 700 .75rem/18px var(--display); text-align: center; }
.field.has-error input, .field.has-error select { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(255, 92, 122, .2); animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.alert { border: 1px solid var(--danger); border-left-width: 4px; background: rgba(255, 92, 122, .1); color: #ffd3db; padding: 12px 16px; margin-bottom: 1.2rem; font-weight: 600; }
.alert-ok { border-color: var(--ok); background: rgba(61, 240, 162, .09); color: #cbffe9; }

.wl-row { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 14px; align-items: start; }
.wl-row .field { margin: 0; }
.wl-row .btn { margin-top: calc(.78rem * 1.2 + .5rem); }
.wl-compact .wl-row { grid-template-columns: 1fr auto; }
.wl-compact .wl-row .btn { margin-top: 0; }
.wl-compact .field input { min-height: 56px; }
.wl-note { font-size: .8rem; color: var(--muted); margin: .9rem 0 0; }

.ticks { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; gap: .6rem; }
.ticks li { padding-left: 1.9em; position: relative; color: #c5d3ea; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .35em; width: 1.05em; height: .6em; border-left: 3px solid var(--cyan); border-bottom: 3px solid var(--cyan); transform: rotate(-45deg) scale(.8); filter: drop-shadow(0 0 6px var(--cyan)); }

/* Small pages: waitlist, auth, thanks, errors */
.narrow-hero { position: relative; padding: clamp(48px, 9vw, 110px) 0 clamp(56px, 9vw, 110px); min-height: calc(100vh - var(--header-h) - 260px); background: radial-gradient(900px 480px at 50% -10%, rgba(43, 127, 255, .28), transparent 70%), radial-gradient(600px 300px at 85% 20%, rgba(34, 211, 238, .14), transparent 70%); overflow: hidden; }
.narrow-hero::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, transparent 0 140px, rgba(125, 232, 255, .035) 140px 141px); pointer-events: none; }
.narrow-hero .wrap { position: relative; }
.narrow-hero h1 { font-size: clamp(2rem, 5.2vw, 3.6rem); }
.auth-links { text-align: center; color: var(--muted); font-size: .95rem; }
.status-line { display: flex; align-items: center; gap: .7em; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1.4rem; margin: 0 0 1.2rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

.steps-list { list-style: none; counter-reset: s; padding: 0; margin: 2rem 0; display: grid; gap: 12px; text-align: left; }
.steps-list li { counter-increment: s; display: grid; grid-template-columns: 52px 1fr; column-gap: 16px; background: var(--panel); border: 1px solid var(--line); padding: 16px 18px; }
.steps-list li::before { content: counter(s); grid-row: span 2; font: italic 700 2rem/1 var(--display); color: var(--cyan); text-shadow: 0 0 18px var(--cyan); align-self: center; text-align: center; }
.steps-list span { color: var(--muted); }

.burst { display: grid; place-items: center; margin-bottom: 1rem; }
.burst svg { overflow: visible; }
.burst-star { fill: var(--cyan); filter: drop-shadow(0 0 22px var(--cyan)); transform-origin: 60px 60px; animation: kapow .6s cubic-bezier(.2, 1.6, .4, 1) both, wobble 5s 1s ease-in-out infinite; }
.burst-check { stroke: #00131a; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .4s .45s forwards; }
@keyframes kapow { from { transform: scale(0) rotate(-90deg); opacity: 0; } }
@keyframes wobble { 50% { transform: rotate(8deg) scale(1.04); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

.glitch { position: relative; display: inline-block; font: italic 700 clamp(6rem, 24vw, 13rem)/.9 var(--display); color: #fff; margin: 0 0 .1em; text-shadow: 0 0 40px rgba(34, 211, 238, .6); }
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; inset: 0; }
.glitch::before { color: var(--cyan); animation: glitch 2.4s infinite steps(1); clip-path: inset(0 0 55% 0); }
.glitch::after { color: var(--blue); animation: glitch 2.4s .3s infinite reverse steps(1); clip-path: inset(55% 0 0 0); }
@keyframes glitch { 0%, 100% { transform: none; } 8% { transform: translate(-8px, 2px); } 12% { transform: translate(7px, -3px); } 16% { transform: none; } 62% { transform: translate(5px, 1px) skewX(-8deg); } 66% { transform: none; } }
.term { margin: 0; padding: 18px 20px; background: #02040b; border: 1px solid var(--line); color: #b9c8e2; font: .82rem/1.75 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; }
.term .dim { color: #5f7191; }
.term .bad { color: var(--danger); }
.err-page .term { margin: 1.5rem auto 0; max-width: 460px; }

/* Legal pages */
.legal { padding: clamp(48px, 8vw, 96px) 0; }
.legal h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
.legal h2 { font-size: 1.3rem; font-style: normal; letter-spacing: .04em; margin-top: 2.4em; color: var(--ice); }
.legal p, .legal li { color: #c5d3ea; }
.legal-table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.4rem; font-size: .92rem; display: block; overflow-x: auto; }
.legal-table th, .legal-table td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; min-width: 150px; }
.legal-table th { background: var(--panel); font: 600 .76rem var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--ice); }
code { font: .88em ui-monospace, Menlo, Consolas, monospace; color: var(--ice); background: rgba(125, 232, 255, .08); padding: .1em .4em; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: #02040b; padding: 56px 0 28px; font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; }
.site-footer h2 { font: 600 .76rem/1 var(--display); font-style: normal; letter-spacing: .2em; color: var(--ice); margin-bottom: 1rem; }
.site-footer nav { display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; }
.site-footer nav a, .site-footer nav button { color: #c5d3ea; text-decoration: none; overflow-wrap: anywhere; }
.site-footer nav a:hover { color: #fff; text-decoration: underline; }
.site-footer .brand { margin-bottom: 1rem; }
.footer-base { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: .8rem; }

/* Cookie banner + sticky mobile CTA */
.cookie { position: fixed; right: 16px; bottom: 16px; z-index: 150; width: min(430px, calc(100% - 32px)); background: rgba(10, 20, 40, .96); border: 1px solid var(--line-strong); box-shadow: 0 20px 60px -10px #000, 0 0 40px -14px var(--cyan); padding: 18px 20px; backdrop-filter: blur(10px); animation: rise .4s both; }
.cookie strong { font: 700 1rem var(--display); letter-spacing: .06em; text-transform: uppercase; }
.cookie p { font-size: .88rem; color: #c5d3ea; margin: .4rem 0 1rem; }
.cookie-actions { display: flex; gap: 14px; justify-content: flex-end; flex-wrap: wrap; padding-right: 6px; }
@keyframes rise { from { transform: translateY(30px); opacity: 0; } }
.sticky-cta { display: none; }

/* Scroll reveal (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s, transform .6s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .site-nav { position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 24px; background: rgba(3, 6, 15, .98); border-bottom: 1px solid var(--line-strong); max-height: calc(100dvh - var(--header-h)); overflow-y: auto; transform: translateY(-12px); opacity: 0; visibility: hidden; transition: transform .2s, opacity .2s, visibility .2s; }
  .site-nav.open { transform: none; opacity: 1; visibility: visible; }
  .site-nav > a:not(.btn) { padding: 16px 0; font-size: 1rem; border-bottom: 1px solid var(--line); }
  .site-nav > a:not(.btn)::after { display: none; }
  .site-nav .btn { margin-top: 18px; }
  .nav-sep { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div { grid-column: 1 / -1; }
  .wl-row { grid-template-columns: 1fr; }
  .wl-row .btn { margin-top: 0; width: 100%; }
}
@media (max-width: 820px) {
  .sticky-cta:not([hidden]) { display: flex; position: fixed; inset: auto 0 0 0; z-index: 140; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px calc(10px + env(safe-area-inset-bottom)); background: rgba(3, 6, 15, .95); border-top: 1px solid var(--line-strong); box-shadow: 0 -10px 40px -10px rgba(34, 211, 238, .5); backdrop-filter: blur(10px); animation: rise .3s both; }
  .sticky-cta span { font: 600 .86rem/1.2 var(--display); letter-spacing: .04em; }
  .sticky-cta .btn { flex: none; margin-right: 6px; }
  body.has-sticky .site-footer { padding-bottom: 96px; }
  body.has-sticky .cookie { bottom: 78px; }
}
@media (max-width: 520px) {
  .wrap { width: calc(100% - 32px); }
  .wl-compact .wl-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .btn-row .btn { width: 100%; }
  .cookie-actions .btn { flex: 1; }
  .cookie { left: 8px; right: 8px; bottom: 8px; width: auto; padding: 12px 14px; }
  .cookie strong { display: none; }
  .cookie p { font-size: .8rem; line-height: 1.45; margin: 0 0 .7rem; }
  .cookie .btn { min-height: 36px; font-size: .76rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
