/* Echelon Dynamics — site styles. No client JS; theme follows the OS. */
@font-face { font-family: "Instrument Serif"; src: url(/assets/fonts/instrument-serif-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url(/assets/fonts/instrument-serif-latin-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url(/assets/fonts/schibsted-grotesk-latin-wght-normal.woff2) format("woff2-variations"); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Martian Mono"; src: url(/assets/fonts/martian-mono-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --bg: #0b0f17;
  --bg-2: #0e131d;
  --surface: #111724;
  --fg: #e8ecf4;
  --fg-2: #c3cad8;
  --muted: #8f98ab;
  --accent: #7aa2ff;
  --accent-ink: #0b0f17;
  --line: #1c2433;
  --line-2: #273247;
  --grid: rgba(122, 162, 255, .06);
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, .7);
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f8fb;
    --bg-2: #eef1f7;
    --surface: #ffffff;
    --fg: #0e1420;
    --fg-2: #2b3445;
    --muted: #556075;
    --accent: #2f5bd8;
    --accent-ink: #ffffff;
    --line: #dde2ec;
    --line-2: #c9d1e0;
    --grid: rgba(47, 91, 216, .07);
    --shadow: 0 30px 70px -35px rgba(14, 20, 32, .35);
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.6 var(--sans);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
main { flex: 1; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 14px; border-radius: 6px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ── Mark ─────────────────────────────────────────── */
.mark { display: inline-flex; flex-direction: column; gap: 4px; }
.mark span { display: block; height: 2px; border-radius: 2px; background: var(--accent); }
.mark span:nth-child(1) { width: 12px; opacity: .55; }
.mark span:nth-child(2) { width: 18px; opacity: .8; }
.mark span:nth-child(3) { width: 24px; }

/* ── Header ───────────────────────────────────────── */
.site-header { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; padding: 8px 0; }
.brand-name { font-weight: 600; font-size: 1rem; letter-spacing: -.005em; }
.nav { display: flex; gap: 4px; }
.nav a {
  text-decoration: none; color: var(--fg-2); font-size: .95rem; font-weight: 500;
  padding: 10px 12px; border-radius: 6px; position: relative;
}
.nav a:hover { color: var(--fg); background: var(--bg-2); }
.nav a[aria-current="page"] { color: var(--fg); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; background: var(--accent); border-radius: 2px;
}
@media (max-width: 520px) {
  .header-row { padding-top: 6px; padding-bottom: 6px; gap: 0; }
  .nav { width: 100%; margin: 0 -12px; }
  .nav a { padding: 10px 12px; }
}

/* ── Type ─────────────────────────────────────────── */
.eyebrow {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); display: flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--accent); }
.display {
  font-family: var(--serif); font-weight: 400; letter-spacing: -.015em;
  font-size: clamp(2.9rem, 7.4vw, 6rem); line-height: .98;
  text-wrap: balance;
}
.display em, .h2 em { font-style: italic; color: var(--accent); }
.h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.04; letter-spacing: -.01em; text-wrap: balance; }
.h3 { font-family: var(--sans); font-weight: 600; font-size: 1.15rem; line-height: 1.3; letter-spacing: -.01em; }
.lede { font-size: clamp(1.08rem, 1.6vw, 1.25rem); line-height: 1.55; color: var(--fg-2); max-width: 40ch; }
.muted { color: var(--muted); }
.prose { max-width: 66ch; }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: 1em; }
.prose h2 { font-family: var(--sans); font-size: 1.2rem; font-weight: 600; letter-spacing: -.01em; margin: 2.2em 0 .6em; }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: .4em; }
.prose a, .link { color: var(--fg); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: text-decoration-color .15s; }
.prose a:hover, .link:hover { text-decoration-color: var(--accent); }

/* ── Buttons ──────────────────────────────────────── */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px;
  border-radius: 8px; font-weight: 600; font-size: .98rem; text-decoration: none; border: 1px solid transparent;
  transition: transform .15s ease, background-color .15s, border-color .15s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { border-color: var(--line-2); color: var(--fg); }
.btn-ghost:hover { border-color: var(--accent); }
.btn .arr { font-family: var(--mono); font-size: .85em; }

/* ── Hero ─────────────────────────────────────────── */
.hero { position: relative; padding: clamp(56px, 10vw, 128px) 0 clamp(56px, 8vw, 104px); overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px; background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 70% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 80% at 70% 40%, #000 30%, transparent 75%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-copy > * + * { margin-top: 28px; }
.hero-copy .lede { max-width: 44ch; }
.formation { width: 100%; max-width: 520px; justify-self: end; color: var(--accent); }
.formation .bar { stroke: currentColor; stroke-width: 2; stroke-linecap: round; transform-box: fill-box; transform-origin: left center; }
.formation .node { fill: var(--bg); stroke: currentColor; stroke-width: 1.5; }
.formation .node.lead { fill: currentColor; }
.formation .tick { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 2 6; }
.formation text { font-family: var(--mono); font-size: 10px; fill: var(--muted); letter-spacing: .06em; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .formation { justify-self: start; max-width: 420px; }
}
@media (max-width: 520px) {
  .formation { max-width: 300px; }
}

@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
  .rise.d1 { animation-delay: .08s; } .rise.d2 { animation-delay: .16s; } .rise.d3 { animation-delay: .24s; }
  .formation .bar { animation: draw .9s cubic-bezier(.2, .7, .2, 1) both; }
  .formation .node { animation: fade .5s ease both; }
  .formation g:nth-of-type(1) > * { animation-delay: .20s; } .formation g:nth-of-type(2) > * { animation-delay: .26s; }
  .formation g:nth-of-type(3) > * { animation-delay: .32s; } .formation g:nth-of-type(4) > * { animation-delay: .38s; }
  .formation g:nth-of-type(5) > * { animation-delay: .44s; } .formation g:nth-of-type(6) > * { animation-delay: .50s; }
  .formation g:nth-of-type(7) > * { animation-delay: .56s; } .formation g:nth-of-type(8) > * { animation-delay: .62s; }
  .formation .node { animation-delay: 1s !important; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ── Sections ─────────────────────────────────────── */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 4vw, 64px); align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head > * + * { margin-top: 0; }
.section-head .h2 { margin-top: 18px; }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; } }

/* ── Product card (DealHunter palette lives only in here) ── */
.dh-card {
  --dh-bg: #070d0b; --dh-line: #163a30; --dh-mint: #00ffb9; --dh-purple: #b832fd; --dh-fg: #eafff8; --dh-muted: #a3bcb3;
  position: relative; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 56px); align-items: center;
  background:
    radial-gradient(ellipse 60% 70% at 100% 0%, rgba(0, 255, 185, .10), transparent 70%),
    radial-gradient(ellipse 50% 60% at 0% 100%, rgba(184, 50, 253, .10), transparent 70%),
    var(--dh-bg);
  color: var(--dh-fg); border: 1px solid var(--dh-line); border-radius: 18px;
  padding: clamp(24px, 4vw, 56px); overflow: hidden; box-shadow: var(--shadow);
}
.dh-card .dh-label { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--dh-mint); }
.dh-card .dh-label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--dh-mint); box-shadow: 0 0 0 4px rgba(0, 255, 185, .15); }
.dh-card h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 3.8vw, 2.9rem); line-height: 1.05; margin-top: 18px; letter-spacing: -.01em; }
.dh-card p { color: var(--dh-muted); margin-top: 16px; max-width: 42ch; }
.dh-card .btn-dh { background: var(--dh-mint); color: #04130e; margin-top: 28px; }
.dh-card .btn-dh:hover { transform: translateY(-1px); }
.dh-card :focus-visible { outline-color: var(--dh-mint); }
.dh-card .dh-links { margin-top: 18px; font-size: .92rem; color: var(--dh-muted); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.dh-card .dh-links a { color: var(--dh-fg); text-decoration: underline; text-decoration-color: rgba(0, 255, 185, .35); text-underline-offset: 3px; }
.dh-card .dh-links a:hover { text-decoration-color: var(--dh-mint); }
.shots { position: relative; align-self: center; padding: 0 0 clamp(40px, 6vw, 72px) 0; }
.shots .desk { border-radius: 12px; border: 1px solid var(--dh-line); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .8); width: 100%; }
.shots .phone {
  position: absolute; right: clamp(-8px, -1vw, 0px); bottom: 0; width: 34%; max-width: 230px;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .7));
}
.dh-card p.dh-caption { max-width: none; margin-top: 0; }
.dh-caption { grid-column: 1 / -1; font-size: .8rem; line-height: 1.5; color: var(--dh-muted); border-top: 1px solid var(--dh-line); padding-top: 16px; }
@media (max-width: 860px) {
  .dh-card { grid-template-columns: 1fr; }
  .shots { padding-bottom: 56px; }
  .shots .phone { width: 38%; right: -4px; }
}

/* ── Numbered points ──────────────────────────────── */
.points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.point { padding: 32px 32px 8px 0; }
.point + .point { padding-left: 32px; border-left: 1px solid var(--line); }
.point .num { font-family: var(--mono); font-size: .72rem; color: var(--accent); letter-spacing: .06em; }
.point .h3 { margin-top: 20px; }
.point p { color: var(--muted); margin-top: 10px; font-size: .98rem; }
@media (max-width: 860px) {
  .points { grid-template-columns: 1fr; }
  .point, .point + .point { padding: 28px 0; border-left: 0; }
  .point + .point { border-top: 1px solid var(--line); }
}

/* ── Steps ────────────────────────────────────────── */
.steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 0; }
.steps li { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 24px; padding: 28px 0; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps .k { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; color: var(--accent); padding-top: 6px; }
.steps h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.6rem, 2.6vw, 2rem); line-height: 1.1; }
.steps p { color: var(--muted); margin-top: 8px; max-width: 60ch; }
@media (max-width: 520px) { .steps li { grid-template-columns: 1fr; gap: 8px; } }

/* ── Chips / platforms ────────────────────────────── */
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: .92rem; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--fg-2); background: var(--surface); }
.note { font-size: .82rem; color: var(--muted); margin-top: 14px; }
.platforms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.platform {
  display: block; text-decoration: none; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  transition: border-color .15s, transform .15s;
}
.platform:hover { border-color: var(--accent); transform: translateY(-2px); }
.platform .k { font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.platform .h3 { margin-top: 12px; display: flex; justify-content: space-between; gap: 12px; }
.platform .h3 .arr { font-family: var(--mono); color: var(--accent); }
.platform p { color: var(--muted); font-size: .95rem; margin-top: 6px; }
@media (max-width: 860px) { .platforms { grid-template-columns: 1fr; } }

/* ── Split / facts ────────────────────────────────── */
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 4vw, 64px); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.facts { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
.facts dd { color: var(--fg); }
@media (max-width: 520px) { .facts div { grid-template-columns: 1fr; gap: 4px; } }

.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.principle { padding: 28px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.principle .num { font-family: var(--mono); font-size: .72rem; color: var(--accent); }
.principle .h3 { margin-top: 16px; }
.principle p { color: var(--muted); margin-top: 8px; font-size: .98rem; }
@media (max-width: 860px) { .principles { grid-template-columns: 1fr; } }

/* ── Page head ────────────────────────────────────── */
.page-head { padding: clamp(56px, 9vw, 112px) 0 clamp(40px, 6vw, 72px); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.page-head::after {
  content: ""; position: absolute; right: var(--gutter); bottom: -1px; width: min(38vw, 360px); height: 74px; pointer-events: none;
  background:
    linear-gradient(var(--accent), var(--accent)) right 0 bottom 0 / 100% 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right 0 bottom 24px / 70% 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right 0 bottom 48px / 46% 2px no-repeat;
  opacity: .5;
}
.page-head > .wrap > * + * { margin-top: 24px; }
.page-head .display { font-size: clamp(2.6rem, 6.4vw, 5rem); }

/* ── Contact ──────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.contact-card { padding: clamp(24px, 3vw, 36px); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.contact-card .k { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.contact-card .h3 { margin-top: 14px; }
.contact-card p { color: var(--muted); margin-top: 8px; }
.contact-card .addr { display: inline-block; margin-top: 20px; font-family: var(--serif); font-size: clamp(1.45rem, 2.6vw, 1.9rem); color: var(--fg); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 6px; text-decoration-thickness: 1px; overflow-wrap: anywhere; }
.contact-card .addr:hover { text-decoration-color: var(--accent); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.callout { margin-top: 28px; padding: 18px 20px; border-left: 2px solid var(--accent); background: var(--bg-2); border-radius: 0 8px 8px 0; color: var(--fg-2); font-size: .95rem; }

/* ── Closing band ─────────────────────────────────── */
.closing { padding: clamp(64px, 9vw, 112px) 0; border-top: 1px solid var(--line); background: var(--bg-2); }
.closing .wrap { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 28px; }
.closing .h2 { max-width: 18ch; }
.closing .mail { font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2.2rem); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 6px; text-decoration-thickness: 1px; overflow-wrap: anywhere; }
.closing .mail:hover { text-decoration-color: var(--accent); }

/* ── Press ────────────────────────────────────────── */
.assets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.asset { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.asset .swatch { height: 140px; display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.asset .swatch.dark { background: #0b0f17; } .asset .swatch.light { background: #f7f8fb; }
.asset .swatch img { width: auto; max-width: 70%; max-height: 64px; }
.asset .meta { padding: 16px 18px; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.asset .meta span { font-weight: 600; font-size: .95rem; }
.asset .meta a { font-family: var(--mono); font-size: .72rem; color: var(--accent); text-underline-offset: 3px; }
@media (max-width: 860px) { .assets { grid-template-columns: 1fr; } }
.boiler { padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--fg-2); }

/* ── Footer ───────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 44px; font-size: .88rem; color: var(--muted); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: flex-start; }
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-brand .mark { margin-top: 7px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: -10px -10px 0; }
.footer-nav a { color: var(--fg-2); text-decoration: none; padding: 10px; border-radius: 6px; }
.footer-nav a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }

/* ── 404 ──────────────────────────────────────────── */
.lost { padding: clamp(80px, 14vw, 180px) 0; }
.lost > .wrap > * + * { margin-top: 24px; }
.lost .code { font-family: var(--mono); font-size: .75rem; letter-spacing: .1em; color: var(--accent); }
.split > div > .h2 { margin-top: 18px; }
@media (max-width: 720px) { .page-head::after { display: none; } }
