/* terraFLOPs one-page site. Colours from the pitch deck; one dark theme on purpose (the brand is night blue). */
:root {
  --night: #0F1B2D;
  --night-2: #22324D;
  --mint: #73FDD6;
  --orange: #F2792B;
  --lilac: #8E63F0;
  --lilac-2: #D883FF;
  --slate: #5B6B7F;
  --mist: #E1E8EE;
  --ink: #EEF3F7;
  --ink-soft: #B7C3D0;
  --glass: rgba(15, 27, 45, 0.42);
  --glass-line: rgba(225, 232, 238, 0.16);
  --f-sans: "Sora", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: clamp(16px, 5vw, 64px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--night); color: var(--ink); font-family: var(--f-sans); font-weight: 300; font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
.mono { font-family: var(--f-mono); font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.78rem; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }

/* background: the thermal field (canvas) and a veil that keeps text readable */
#field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; display: block; background: radial-gradient(120% 90% at 80% 10%, #2a2050 0%, var(--night) 55%); }
.veil { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, rgba(15, 27, 45, 0.72) 0%, rgba(15, 27, 45, 0.35) 55%, rgba(15, 27, 45, 0.15) 100%); }

/* glass panels */
.glass { background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(14px) saturate(130%); -webkit-backdrop-filter: blur(14px) saturate(130%); border-radius: 14px; }

/* header */
.top { transition: transform 0.3s ease; position: fixed; top: 0; left: 0; right: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; padding: calc(14px + env(safe-area-inset-top, 0px)) var(--gutter) 14px; }
.top::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(15, 27, 45, 0.55); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--glass-line); opacity: 0; transition: opacity 0.3s; }
.top.scrolled::before { opacity: 1; }
.brand { display: inline-flex; }
.hexes { width: 40px; height: 44px; }
@media (min-width: 861px) { .hexes { width: 64px; height: 72px; } }   /* desktop: in proportion to the large wordmark */
.menu { display: flex; align-items: center; gap: 2px; padding: 6px; border-radius: 12px; }
.menu a { font-family: var(--f-mono); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; color: var(--ink-soft); padding: 10px 16px; border-radius: 8px; transition: background 0.25s, color 0.25s; }
.menu a:hover, .menu a[aria-current="true"] { color: var(--ink); background: rgba(225, 232, 238, 0.08); }
.menu .cta { color: var(--night); background: var(--mint); font-weight: 500; margin-left: 6px; }
.menu .cta:hover { color: var(--night); background: #9dffe4; }
section[id] { scroll-margin-top: 84px; }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 999px; font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; color: var(--ink); cursor: pointer; transition: background 0.25s, color 0.25s, transform 0.25s; }
.pill.glass:hover { background: rgba(115, 253, 214, 0.14); }
.pill.solid { background: var(--mint); color: var(--night); border: 0; font-weight: 500; }
.pill.solid:hover { transform: translateY(-1px); background: #9dffe4; }
.pill.solid:disabled { opacity: 0.6; cursor: default; transform: none; }

main { position: relative; }
section { padding-inline: var(--gutter); }

/* hero */
.hero { min-height: 68svh; display: grid; align-content: end; padding-block: 110px 7vh; position: relative; }
.hero-inner { max-width: 980px; }
.wordmark { font-size: clamp(3.6rem, 13vw, 10.5rem); line-height: 0.92; font-weight: 600; letter-spacing: -0.035em; margin: 0; color: var(--mint); }
.lede { font-size: clamp(1.25rem, 2.6vw, 2rem); font-weight: 300; margin: 18px 0 0; max-width: 24ch; line-height: 1.2; }
.tags { margin: 22px 0 0; color: var(--ink-soft); }
.tags span { color: var(--mint); padding: 0 0.4em; }

/* text sections */
.eyebrow { color: var(--mint); margin: 0 0 18px; font-size: clamp(0.95rem, 1.3vw, 1.15rem); }
h2 { font-size: clamp(2rem, 5.2vw, 4.2rem); font-weight: 600; line-height: 1.04; letter-spacing: -0.025em; margin: 0; text-wrap: balance; }
h3 { font-size: 1.35rem; font-weight: 600; margin: 14px 0 8px; letter-spacing: -0.01em; }
.body { color: var(--ink-soft); max-width: 56ch; margin: 22px 0 0; font-size: 1.08rem; text-wrap: pretty; }
.nowrap { white-space: nowrap; }
.statement { padding-block: 8vh 4vh; max-width: 1180px; }

/* figures */
.figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding-block: 4vh 14vh; max-width: 1180px; }
.figure { padding: 28px 26px 26px; }
.num { margin: 0; font-size: clamp(3rem, 6.5vw, 5.4rem); font-weight: 600; line-height: 1; letter-spacing: -0.04em; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.num .pre { color: var(--mint); font-weight: 400; margin-right: 0.04em; }
.num .unit { color: var(--mint); font-size: 0.55em; margin-left: 0.06em; }
.what { margin: 14px 0 0; color: var(--ink-soft); max-width: 22ch; }
.figures .note { grid-column: 1 / -1; color: var(--slate); margin: 4px 0 0; text-transform: none; letter-spacing: 0.02em; }


/* pillars */
.pillars { padding-block: 8vh 14vh; max-width: 1180px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card { padding: 26px; min-width: 0; }
.card .idx { color: var(--lilac-2); }
.card p { color: var(--ink-soft); margin: 0; }
.card:nth-child(1) h3 { color: var(--mint); }
.card:nth-child(2) h3 { color: #c9b6ff; }
.card:nth-child(3) h3 { color: #ffb489; }

/* where it works */
.where { padding-block: 4vh 12vh; max-width: 1180px; }
.map { margin: 36px 0 0; display: grid; gap: 12px; }
.map img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--glass-line); }
.map figcaption { color: var(--slate); text-transform: none; letter-spacing: 0.02em; }

/* tech teaser */
.tech { padding-block: 6vh 16vh; max-width: 1180px; }
.ast { color: var(--mint); font-size: 0.55em; position: relative; top: -0.6em; margin-left: 0.05em; }
.footnote { margin: 22px 0 0; color: var(--ink-soft); font-size: 1rem; text-transform: none; letter-spacing: 0.04em; }
.tech-inner { padding: clamp(28px, 5vw, 56px); border-color: rgba(115, 253, 214, 0.28); }
.tech-inner { position: relative; overflow: hidden; }
.tech-inner::after { content: ""; position: absolute; right: 0; bottom: 0; width: min(300px, 45%); aspect-ratio: 300 / 260; background: url("../img/hex-corner.svg") right bottom / contain no-repeat; opacity: 0.35; pointer-events: none; }
.tech-inner > * { position: relative; z-index: 1; }

/* contact */
.reach { padding: clamp(24px, 3vw, 36px); display: grid; gap: 22px; justify-items: start; }
.reach .body { margin: 0; }
.contact { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 72px); padding-block: 8vh 12vh; max-width: 1180px; align-items: start; }

/* footer */
.foot { padding: 0 var(--gutter) calc(32px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 14px; color: var(--slate); max-width: 1180px; }
.foot p { margin: 0; }
.privacy summary { cursor: pointer; color: var(--ink-soft); width: max-content; }
.privacy-body { color: var(--ink-soft); font-size: 0.9rem; max-width: 70ch; padding: 10px 0 4px; }
.privacy-body p { margin: 0 0 10px; }

/* reveal on scroll: visible by default, animated only once JS marks the page */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s cubic-bezier(.2,.7,.2,1), transform 0.9s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
.js .cards .reveal:nth-child(2), .js .figures .reveal:nth-child(2) { transition-delay: 0.12s; }
.js .cards .reveal:nth-child(3), .js .figures .reveal:nth-child(3) { transition-delay: 0.24s; }

@media (max-width: 860px) {
  .top.away { transform: translateY(-110%); }
  .menu a:not(.cta) { display: none; }
  .menu { padding: 4px; }
  .figures, .cards { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .veil { background: rgba(15, 27, 45, 0.5); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
