/* Self-hosted fonts: no requests to Google or any other third party. */
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 400 500;
  font-display: swap;
}
@font-face {
  font-family: "Cardo";
  src: url("fonts/cardo-greek-ext-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+1F00-1FFF;
}
@font-face {
  font-family: "Cardo";
  src: url("fonts/cardo-greek-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0370-03FF;
}

/* Layout: a real homepage, mobile first. A dark stage holds the rendered object (always dark); the rest follows the viewer's theme. One column on phones, split rows from 820px. */
:root {
  --bg: #F3F5F8;
  --bg-2: #E9ECF2;
  --fg: #0B0D12;
  --muted: #586074;
  --rule: #D7DCE5;
  --accent: #2B54F0;
  --stage: #06070A;
  --stage-fg: #EEF1F6;
  --stage-muted: #8A93A6;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 48px);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #07080B; --bg-2: #0D0F14; --fg: #EEF1F6; --muted: #8A93A6; --rule: #1A1E28; --accent: #5B83FF; color-scheme: dark; } }
:root[data-theme="dark"] { --bg: #07080B; --bg-2: #0D0F14; --fg: #EEF1F6; --muted: #8A93A6; --rule: #1A1E28; --accent: #5B83FF; color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--fg); font: 400 17px/1.55 var(--sans); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; font-weight: 500; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: .01em; }

/* stage: always dark */
.stage { position: relative; background: var(--stage); color: var(--stage-fg); min-height: clamp(600px, 92svh, 900px); display: flex; flex-direction: column; overflow: hidden; isolation: isolate; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: -1; }
.stage .fallback { position: absolute; inset: 0; z-index: -2; background: radial-gradient(ellipse 60% 70% at 70% 0%, rgba(61,107,255,.28), transparent 70%); }

nav { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: calc(18px + env(safe-area-inset-top, 0px)) var(--gutter) 18px; }
.wordmark { font-weight: 600; font-size: 19px; letter-spacing: -.02em; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.wordmark i { width: 2px; height: 18px; background: linear-gradient(#9DB4FF, #3D6BFF); box-shadow: 0 0 10px 1px rgba(61,107,255,.8); border-radius: 1px; }
nav .links { display: flex; align-items: center; gap: 26px; font-size: 15px; color: var(--stage-muted); }
nav .links a { text-decoration: none; }
nav .links a:hover { color: var(--stage-fg); }
.lang { display: inline-flex; border: 1px solid rgba(238,241,246,.16); border-radius: 999px; padding: 3px; }
.lang button { border: 0; background: transparent; color: var(--stage-muted); padding: 5px 10px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 500; }
.lang button[aria-pressed="true"] { background: rgba(238,241,246,.12); color: var(--stage-fg); }
@media (max-width: 640px) { nav .links a[href="#principios"] { display: none; } nav .links { gap: 16px; } }
@media (max-width: 819px) { .mono { font-size: 13.5px; } .stage { min-height: clamp(560px, 86svh, 820px); } }

.hero { margin-top: auto; padding: 0 var(--gutter) clamp(32px, 7vh, 72px); display: grid; gap: 22px; max-width: 760px; }
.hero .kicker { color: #9DB4FF; }
.hero h1 { font-size: clamp(44px, 7.4vw, 98px); line-height: .96; letter-spacing: -.04em; font-weight: 500; }
.hero h1 span { color: var(--stage-muted); }
.hero p.sub { font-size: clamp(17px, 1.6vw, 19px); color: #B7BECC; max-width: 46ch; }
.ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px; font-size: 15px; font-weight: 500; text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.btn.primary { background: var(--stage-fg); color: var(--stage); }
.btn.primary:hover { background: #fff; }
.btn.ghost { border-color: rgba(238,241,246,.2); color: var(--stage-fg); background: rgba(238,241,246,.03); }
.btn.ghost:hover { border-color: rgba(238,241,246,.45); }
.scrollcue { position: absolute; right: var(--gutter); bottom: clamp(32px, 7vh, 72px); color: var(--stage-muted); display: none; }
@media (min-width: 820px) { .scrollcue { display: block; } }

/* sections */
main section { padding: clamp(64px, 12vw, 140px) var(--gutter); }
.sec-head { display: grid; gap: 10px; margin-bottom: clamp(32px, 5vw, 56px); max-width: 720px; }
.sec-head .mono { color: var(--muted); }
.sec-head h2 { font-size: clamp(30px, 4.4vw, 52px); line-height: 1.02; letter-spacing: -.035em; }

.products { display: grid; gap: 16px; }
.product { position: relative; display: grid; gap: 22px; padding: 16px; border: 1px solid var(--rule); border-radius: 16px; background: var(--bg-2); overflow: hidden; isolation: isolate; }
.product::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--accent) 30%, #9DB4FF 50%, var(--accent) 70%, transparent); transform: scaleX(0); opacity: 0; }
.product .viz { position: relative; border-radius: 11px; background: var(--stage); border: 1px solid rgba(238,241,246,.07); overflow: hidden; aspect-ratio: 16 / 9; }
.product .viz svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.product .info { display: grid; gap: 14px; align-content: center; padding: 4px 6px 8px; min-width: 0; }
.product .cat { color: var(--accent); }
.product h3 { font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -.03em; line-height: 1.08; }
.status { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: ping 2.4s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(61,107,255,.6); } 80%, 100% { box-shadow: 0 0 0 8px rgba(61,107,255,0); } }
.product p { color: var(--muted); max-width: 52ch; }
.product .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; padding-top: 4px; }
.product .io { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); }
.product .io b { color: var(--fg); font-weight: 500; }
@media (min-width: 820px) {
  .product { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 40px; padding: 20px; }
  .product .viz { order: 2; }
  .product .info { padding: 16px 0 16px 16px; }
}

.principles { display: grid; gap: 36px; }
.principle { display: grid; gap: 10px; border-top: 1px solid var(--rule); padding-top: 18px; }
.principle h3 { font-size: clamp(22px, 2.2vw, 28px); letter-spacing: -.02em; line-height: 1.15; }
.principle p { color: var(--muted); }
@media (min-width: 820px) { .principles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; } }

.closing { background: var(--bg-2); }
.closing .inner { display: grid; gap: 22px; max-width: 900px; }
.closing h2 { font-size: clamp(32px, 5vw, 60px); line-height: 1.02; letter-spacing: -.04em; }
.mail { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.mail span { font-size: clamp(20px, 2.4vw, 26px); letter-spacing: -.01em; user-select: all; }
.copy { border: 1px solid var(--rule); background: transparent; color: var(--fg); border-radius: 999px; padding: 8px 14px; font-size: 14px; cursor: pointer; }
.copy:hover { border-color: var(--muted); }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 24px var(--gutter) calc(28px + env(safe-area-inset-bottom, 0px)); color: var(--muted); border-top: 1px solid var(--rule); }

/* ── motion ── */
/* load sequence: only when JS runs and motion is allowed; everything settles within about a second */
.anim .hero > * { opacity: 0; transform: translateY(16px); filter: blur(6px); }
.anim.ready .hero > * { opacity: 1; transform: none; filter: none; transition: opacity .9s ease, transform 1.1s cubic-bezier(.2,.7,.2,1), filter .9s ease; transition-delay: calc(var(--i, 0) * 110ms + 250ms); }
.anim nav { opacity: 0; }
.anim.ready nav { opacity: 1; transition: opacity 1s ease .9s; }

/* scroll reveals */
.anim .reveal { opacity: 0; transform: translateY(26px); }
.anim .reveal.in { opacity: 1; transform: none; transition: opacity .8s ease, transform 1s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 90ms); }

/* products: the light bar draws in on reveal and brightens on hover; a soft spotlight follows the pointer */
.product.in::before { transform: scaleX(1); opacity: .6; transition: transform 1.2s cubic-bezier(.2,.7,.2,1) .2s, opacity .6s ease .2s; }
.product:hover::before { opacity: 1; }
.product::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .35s ease;
  background: radial-gradient(460px circle at var(--mx, 50%) var(--my, 50%), rgba(61,107,255,.10), transparent 62%); }
@media (hover: hover) { .product:hover::after { opacity: 1; } }

/* principles: a short line of light grows along the top rule */
.principle { position: relative; }
.principle::before { content: ""; position: absolute; left: 0; top: -1px; height: 1px; width: 0; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.principle.in::before { width: 38%; transition: width 1.2s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 120ms + 300ms); }

/* closing: the hero's light comes back, drifting slowly */
.closing { position: relative; overflow: hidden; isolation: isolate; }
.closing::before { content: ""; position: absolute; inset: -30% -20% auto auto; width: 80%; height: 160%; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 45% 55% at 70% 0%, rgba(61,107,255,.2), transparent 70%); animation: drift 16s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-12%, 6%, 0); } }
.closing .note { color: var(--muted); font-size: 18px; }

@media (prefers-reduced-motion: reduce) {
  .status i, .closing::before { animation: none; }
  .product::before, .product::after, .principle::before { transition: none; }
}
.grc { font-family: "Cardo", Georgia, serif; font-style: italic; }

