/* HOPTRAIL base.css: cyanotype tokens, type, site chrome (navbar, drawer, footer, CA strip, countdown, toast, dialog, buttons).
   Shared by every page including the 3D landing. Page layouts live in app.css.
   Fonts: Schibsted Grotesk (display + UI), Newsreader italic (footnotes, captions), IBM Plex Mono (addresses/hashes only). */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400&family=Newsreader:ital,opsz,wght@1,6..72,400&family=Schibsted+Grotesk:wght@400;500;700;800&display=swap');

:root {
  --ink-0: #0b1f3a;      /* deep prussian, page bg */
  --ink-1: #12305a;      /* sheet */
  --ink-2: #1c4a86;      /* raised */
  --chalk: #eef3f8;      /* text, lines */
  --chalk-dim: #a9bdd6;
  --rule: rgba(238, 243, 248, .18);
  --rule-strong: rgba(238, 243, 248, .34);
  --red: #e0483a;        /* ONE accent: money leaving, notice tone, CTA hover */
  --red-ink: #ff6a5c;    /* the same red, lifted for small text on dark blue */

  --f-ui: 'Schibsted Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --f-note: 'Newsreader', Georgia, 'Times New Roman', serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --gutter: 16px;
  --wrap: 1180px;
  --text: 640px;
  --margin: 300px;
  --nav-h: 60px;
  --radius: 2px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
@media (min-width: 720px) { :root { --gutter: 28px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  font: 400 16px/1.6 var(--f-ui); color: var(--chalk);
  background-color: var(--ink-0);
  background-image:
    radial-gradient(1200px 700px at 12% -10%, rgba(28, 74, 134, .55), transparent 60%),
    radial-gradient(900px 600px at 110% 30%, rgba(18, 48, 90, .7), transparent 65%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .93 0 0 0 0 .95 0 0 0 0 .97 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat, repeat;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: inherit; text-decoration-color: var(--rule-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--red); }
:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
::selection { background: var(--red); color: var(--chalk); }
h1, h2, h3, h4 { font-family: var(--f-ui); font-weight: 800; line-height: 1.08; letter-spacing: -.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); }
h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: 0; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }
button, input, select, textarea { font: inherit; color: inherit; }
code, kbd, .mono, .num-mono { font-family: var(--f-mono); font-weight: 400; font-size: .92em; letter-spacing: 0; }
.num { font-variant-numeric: tabular-nums; }
.note, .caption, figcaption { font-family: var(--f-note); font-style: italic; font-weight: 400; }
.dim { color: var(--chalk-dim); }
.red { color: var(--red-ink); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ht-wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.ht-label { font: 700 .72rem/1.2 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--chalk-dim); }
.ht-skiplink { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--chalk); color: var(--ink-0); padding: 8px 12px; font-weight: 700; }
.ht-skiplink:focus { top: 8px; }

/* ── buttons ─────────────────────────────────────────── */
.ht-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 40px; padding: 0 16px; border: 1.5px solid var(--chalk); border-radius: var(--radius);
  background: transparent; color: var(--chalk); font: 700 .92rem/1 var(--f-ui); letter-spacing: .01em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.ht-btn svg { width: 16px; height: 16px; flex: none; }
.ht-btn:hover { border-color: var(--red); color: var(--chalk); background: rgba(224, 72, 58, .12); }
.ht-btn-solid { background: var(--chalk); color: var(--ink-0); }
.ht-btn-solid:hover { background: var(--red); border-color: var(--red); color: var(--chalk); }
.ht-btn-sm { min-height: 34px; padding: 0 12px; font-size: .84rem; }
.ht-btn-ghost { border-color: var(--rule-strong); }
.ht-btn[disabled], .ht-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.ht-icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--rule-strong);
  border-radius: var(--radius); background: transparent; color: var(--chalk); cursor: pointer; text-decoration: none;
}
.ht-icon-btn svg { width: 16px; height: 16px; }
.ht-icon-btn:hover { border-color: var(--red); }

/* ── logo ────────────────────────────────────────────── */
.ht-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--chalk); flex: none; }
.ht-logo svg { width: 30px; height: 30px; flex: none; }
.ht-logo-t { font: 800 1.06rem/1 var(--f-ui); letter-spacing: .08em; }

/* ── navbar ──────────────────────────────────────────── */
.ht-nav { position: sticky; top: 0; z-index: 50; background: rgba(11, 31, 58, .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.ht-nav.is-overlay { position: fixed; left: 0; right: 0; background: linear-gradient(rgba(11, 31, 58, .82), rgba(11, 31, 58, 0)); border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.ht-nav-in { display: flex; align-items: center; gap: 18px; height: var(--nav-h); }
.ht-links { display: none; gap: 2px; }
.ht-links a { padding: 8px 10px; font-weight: 700; font-size: .92rem; text-decoration: none; color: var(--chalk-dim); border-bottom: 2px solid transparent; }
.ht-links a:hover { color: var(--chalk); }
.ht-links a[aria-current="page"] { color: var(--chalk); border-bottom-color: var(--red); }
.ht-nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.ht-burger { display: inline-grid; }
.ht-ca-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border: 1px solid var(--rule-strong);
  border-radius: var(--radius); background: transparent; color: var(--chalk); cursor: pointer; font-size: .82rem; max-width: 100%;
}
.ht-ca-chip:hover { border-color: var(--red); }
.ht-ca-chip svg { width: 14px; height: 14px; flex: none; }
.ht-ca-k { font-weight: 800; letter-spacing: .04em; }
.ht-ca-chip .mono { font-size: .8rem; }
.ht-ca-chip .pending { font-family: var(--f-note); font-style: italic; font-size: .9rem; color: var(--chalk-dim); }
.ht-nav .ht-countdown { font-size: .8rem; }
.ht-hide-sm, .ht-hide-md, .ht-hide-lg { display: none !important; }
@media (min-width: 640px) { .ht-hide-sm { display: inline-flex !important; } }
@media (min-width: 1060px) {
  .ht-links { display: flex; }
  .ht-burger { display: none; }
  .ht-hide-md { display: inline-flex !important; }
}
@media (min-width: 1320px) { .ht-hide-lg { display: inline-flex !important; } }

.ht-drawer { position: sticky; top: var(--nav-h); z-index: 49; background: var(--ink-1); border-bottom: 1px solid var(--rule); padding: 8px var(--gutter) 18px; }
.ht-drawer.is-overlay { position: fixed; left: 0; right: 0; }
.ht-drawer[hidden] { display: none; }
.ht-dl { display: block; padding: 12px 0; border-bottom: 1px solid var(--rule); font-weight: 800; font-size: 1.15rem; text-decoration: none; }
.ht-dl[aria-current="page"] { color: var(--chalk); box-shadow: inset 3px 0 0 var(--red); padding-left: 10px; }
.ht-drawer-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.ht-drawer-cd { margin-top: 12px; font-size: .86rem; }

/* ── CA strip ────────────────────────────────────────── */
.ht-ca { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; max-width: 100%; }
.ht-ca-tag { font: 700 .72rem/1 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--chalk-dim); }
.ht-ca-addr { font-family: var(--f-mono); font-size: .86rem; word-break: break-all; padding: 8px 10px; border: 1px dashed var(--rule-strong); min-width: 0; }
.ht-ca-addr.pending { font-family: var(--f-note); font-style: italic; font-size: 1rem; color: var(--chalk-dim); }

/* ── countdown ───────────────────────────────────────── */
.ht-countdown { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.ht-countdown .cd { display: inline-flex; gap: 6px; align-items: baseline; }
.ht-countdown .c { display: inline-flex; align-items: baseline; gap: 1px; }
.ht-countdown b { font-weight: 800; font-variant-numeric: tabular-nums; }
.ht-countdown small { color: var(--chalk-dim); font-size: .78em; margin-right: 2px; }
.ht-countdown .when { font-family: var(--f-note); font-style: italic; color: var(--chalk-dim); font-size: .95em; }
.ht-countdown .live { font-weight: 800; color: var(--chalk); }
.ht-countdown .live::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 7px; background: var(--red); border-radius: 50%; vertical-align: 1px; }
.ht-countdown.chip .when { display: none; }

/* ── footer ──────────────────────────────────────────── */
.ht-foot { margin-top: 96px; border-top: 1px solid var(--rule); padding: 40px 0 56px; background: rgba(11, 31, 58, .6); }
.ht-foot-top { display: grid; gap: 28px; }
.ht-foot-blurb { color: var(--chalk-dim); max-width: 36ch; margin: 12px 0 0; }
.ht-foot-row { display: flex; flex-direction: column; gap: 16px; padding: 22px 0; margin: 24px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.ht-foot-launch { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.ht-foot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.ht-foot-h { font: 700 .72rem/1.2 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--chalk-dim); margin: 0 0 10px; }
.ht-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ht-foot ul a { text-decoration: none; font-weight: 500; }
.ht-foot ul a:hover { text-decoration: underline; text-decoration-color: var(--red); }
.ht-foot-search { display: flex; gap: 8px; max-width: 520px; }
.ht-foot-legal { margin: 28px 0 0; font-family: var(--f-note); font-style: italic; color: var(--chalk-dim); font-size: .98rem; max-width: 80ch; }
.ht-foot-legal b { font-family: var(--f-ui); font-style: normal; color: var(--chalk); font-weight: 700; }
@media (min-width: 820px) {
  .ht-foot-top { grid-template-columns: 1fr 1fr; align-items: end; }
  .ht-foot-row { flex-direction: row; justify-content: space-between; align-items: center; }
  .ht-foot-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ── inputs ──────────────────────────────────────────── */
.ht-input, .ht-select, .ht-textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1.5px solid var(--rule-strong); border-radius: var(--radius);
  background: rgba(11, 31, 58, .7); color: var(--chalk); font: 500 .95rem/1.3 var(--f-ui); min-width: 0;
}
.ht-input.mono, .ht-input[data-mono] { font-family: var(--f-mono); font-weight: 400; font-size: .88rem; }
.ht-input::placeholder, .ht-textarea::placeholder { color: rgba(169, 189, 214, .7); }
.ht-input:focus, .ht-select:focus, .ht-textarea:focus { outline: none; border-color: var(--chalk); }
.ht-textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.ht-select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--chalk) 50%), linear-gradient(135deg, var(--chalk) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.ht-select option { background: var(--ink-1); }

/* ── toast ───────────────────────────────────────────── */
.ht-toast {
  position: fixed; left: 50%; bottom: 20px; z-index: 200; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: min(92vw, 460px); padding: 12px 16px; background: var(--chalk); color: var(--ink-0); font-weight: 700; font-size: .92rem;
  border-left: 4px solid var(--ink-2); transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.ht-toast.show { opacity: 1; transform: translate(-50%, 0); }
.ht-toast.err { border-left-color: var(--red); }
.ht-toast.ok { border-left-color: var(--ink-2); }

/* ── dialog ──────────────────────────────────────────── */
.ht-dialog { border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: 0; background: var(--ink-1); color: var(--chalk); width: min(92vw, 420px); }
.ht-dialog::backdrop { background: rgba(5, 14, 28, .7); }
.ht-dialog header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--rule); }
.ht-dialog header h2 { margin: 0; font-size: 1.1rem; }
.ht-dialog .body { padding: 16px; }
.ht-dialog .actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 16px; }
.ht-wallets { display: grid; gap: 8px; }
.ht-wallets button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--rule-strong); background: transparent; cursor: pointer; font-weight: 700; text-align: left; }
.ht-wallets button:hover { border-color: var(--red); }
.ht-wallets img { width: 24px; height: 24px; }
.ht-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--chalk); }
.ht-dot.off { background: var(--red); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
