/* Condensa Labs · the three public sites (house, Condensa, Paint the Facts).
 *
 * One palette for the whole house: the black of the Paint the Facts canvas and its yellow, with the
 * warm pearl of its inks for text. Typography: Atkinson Hyperlegible Next for everything that is
 * read, Atkinson Hyperlegible Mono for labels and data (shared/identity/typography.md).
 * The page is dark by design; it does not follow the system theme.
 */

@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("fonts/atkinson-next.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("fonts/atkinson-next-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Mono"; src: url("fonts/atkinson-mono.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }

:root {
  /* palette */
  --black: #02080e;          /* the page, the app's canvas */
  --night: #030d17;          /* raised surfaces */
  --deep: #081723;           /* cards, fields */
  --pearl: #eee1cb;          /* text */
  --body: rgb(238 225 203 / .78);
  --mist: #94a6b3;           /* secondary text */
  --line: rgb(148 166 179 / .18);
  --line-strong: rgb(148 166 179 / .36);
  --yellow: #fcca1f;         /* the one accent */
  --yellow-soft: rgb(252 202 31 / .14);
  --on-yellow: #02080e;

  /* type */
  --sans: "Atkinson Hyperlegible Next", Verdana, system-ui, sans-serif;
  --mono: "Atkinson Hyperlegible Mono", ui-monospace, Menlo, monospace;

  /* space */
  --gutter: clamp(20px, 5vw, 84px);
  --max: 1320px;
  --section: clamp(112px, 17vh, 210px);
  --ease: cubic-bezier(.16, 1, .3, 1);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 80px; background: var(--black); }
body {
  margin: 0;
  /* transparent: the page colour is on <html>, so the fixed fluid (z-index -1) shows through */
  background: transparent;
  color: var(--pearl);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--yellow); color: var(--on-yellow); }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 4px; border-radius: 2px; }
[hidden] { display: none !important; }

/* ---------- type roles ---------- */
.display { font-weight: 600; font-size: clamp(48px, 8.2vw, 128px); line-height: .98; letter-spacing: -.04em; text-wrap: balance; }
.h2 { font-weight: 650; font-size: clamp(34px, 4.6vw, 64px); line-height: 1.04; letter-spacing: -.032em; text-wrap: balance; }
.h3 { font-weight: 700; font-size: clamp(21px, 1.9vw, 27px); line-height: 1.2; letter-spacing: -.02em; }
.h4 { font-weight: 700; font-size: 18px; line-height: 1.3; letter-spacing: -.01em; }
.lead { font-size: clamp(18px, 1.55vw, 21px); line-height: 1.5; color: var(--body); max-width: 50ch; }
.body { color: var(--body); max-width: 62ch; }
.small { font-size: 14px; line-height: 1.5; color: var(--mist); }
.label { font-family: var(--mono); font-weight: 500; font-size: 12px; line-height: 1.4; letter-spacing: .06em; text-transform: uppercase; color: var(--mist); }
.label.yellow, .yellow { color: var(--yellow); }
.data { font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; }
.muted { color: var(--mist); }
.stack > * + * { margin-top: 20px; }
.stack-sm > * + * { margin-top: 10px; }
.stack-lg > * + * { margin-top: 32px; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.section { padding-block: var(--section); position: relative; }
.section-tight { padding-block: calc(var(--section) * .6); position: relative; }
.grid-12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 28px); }
.intro { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 28px); row-gap: 24px; align-items: end; }
.intro > .intro-head { grid-column: 1 / span 7; display: grid; gap: 18px; }
.intro > .intro-text { grid-column: 8 / -1; display: grid; gap: 16px; }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* The fixed WebGL stage sits behind the page; the page is transparent over it. */
.stage { position: fixed; left: 0; top: 0; width: 100%; height: 100vh; height: 100lvh; z-index: 0; pointer-events: none; }
main, .footer { position: relative; z-index: 1; overflow-x: clip; }

/* ---------- header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background .4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.header.is-scrolled { background: rgb(2 8 14 / .74); -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2); border-color: var(--line); }
.header-in { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 17px; letter-spacing: -.02em; text-decoration: none; white-space: nowrap; }
.wordmark .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 18px rgb(252 202 31 / .7); }
.wordmark img { width: 30px; height: 30px; border-radius: 7px; }
.wordmark small { font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--mist); margin-left: 4px; }
.nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 34px); margin-left: auto; }
.nav a { font-size: 15px; text-decoration: none; color: var(--body); position: relative; padding-block: 8px; white-space: nowrap; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: var(--yellow); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav a:hover { color: var(--pearl); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--pearl); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 50px; padding: 14px 24px; border-radius: 999px;
  font-weight: 700; font-size: 16px; line-height: 1; letter-spacing: -.005em; text-decoration: none;
  background: var(--yellow); color: var(--on-yellow); border: 1px solid var(--yellow);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 40px -8px rgb(252 202 31 / .55); }
.btn-ghost { background: transparent; color: var(--pearl); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--pearl); box-shadow: none; }
.btn-sm { min-height: 40px; padding: 10px 18px; font-size: 14px; }
.btn .arrow { font-family: var(--mono); font-weight: 500; }
.ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.link { color: var(--pearl); font-weight: 600; text-decoration: none; display: inline-flex; gap: 10px; align-items: center; }
.link .arrow { color: var(--yellow); font-family: var(--mono); transition: transform .3s var(--ease); }
.link:hover .arrow { transform: translateX(4px); }
.link:hover { text-decoration: underline; text-decoration-color: var(--yellow); }

/* ---------- scrubbed scenes: a tall section with a sticky frame ---------- */
.scene { position: relative; }
.scene-frame { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
/* The fluid lies under everything, fixed, and shows while its zone (a scene) is on screen. */
.fluid { position: fixed; left: 0; top: 0; width: 100%; height: 100vh; height: 100lvh; z-index: -1; display: block; transition: opacity 1s var(--ease); }
.fluid.is-away { opacity: 0; }
.fluid-glow { position: absolute; inset: 0; background:
  radial-gradient(42% 36% at 72% 46%, rgb(252 202 31 / .12), transparent 70%),
  radial-gradient(30% 30% at 20% 80%, rgb(252 202 31 / .06), transparent 70%); }
.fluid-live .fluid-glow { display: none; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Steps that light up one at a time inside a scene. */
.steps-caption { display: grid; }
.steps-caption > * { grid-area: 1 / 1; transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .steps-caption > *:not(.is-active) { opacity: 0; transform: translateY(8px); }

/* ---------- living things (the WebGL stage draws over these) ---------- */
.art { position: relative; aspect-ratio: 1; }
.art img {
  width: 100%;
  -webkit-mask-image: radial-gradient(closest-side, #000 78%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 78%, transparent 100%);
  transition: opacity .8s;
}
.webgl .art.is-live img { opacity: 0; }

.morph { position: relative; aspect-ratio: 1; }
.morph-fallback { position: absolute; inset: 0; display: grid; }
.morph-fallback > * { grid-area: 1 / 1; width: 100%; height: 100%; transition: opacity .6s; }
/* The glyph's picture comes from the element's own style (mask-image); it is shown once, centred, at
   the size the particles draw it (88% of the box). Longhands on purpose: a `mask` shorthand with an
   unset variable is dropped whole, and the picture then repeats as a grid. */
.morph-fallback .glyph {
  background: var(--yellow);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: 88%; mask-size: 88%;
}
.morph-fallback img { object-fit: contain; -webkit-mask-image: radial-gradient(closest-side, #000 78%, transparent 100%); mask-image: radial-gradient(closest-side, #000 78%, transparent 100%); }
.js .morph-fallback > *:not(.is-active) { opacity: 0; }
.webgl .morph.is-live .morph-fallback { opacity: 0; transition: opacity .8s; }

.drop { display: block; width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle at 42% 38%, color-mix(in srgb, var(--d, #888) 100%, white 25%), var(--d, #888) 46%, transparent 70%); transition: scale .6s var(--ease); }
.webgl .drop { background: none; }

/* ---------- phone and device frames ---------- */
.phone { position: relative; width: min(100%, 320px); aspect-ratio: 720 / 1564; border-radius: 46px; padding: 9px; background: linear-gradient(145deg, #2a3138, #0b0f13 40%, #1b2127); box-shadow: 0 40px 90px -30px rgb(0 0 0 / .9), 0 0 0 1px rgb(255 255 255 / .06) inset; }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 38px; }
.device { border-radius: 14px; overflow: hidden; box-shadow: 0 40px 90px -30px rgb(0 0 0 / .9), 0 0 0 1px rgb(255 255 255 / .07); }
.device img { width: 100%; }
.watch { width: min(100%, 210px); aspect-ratio: 416 / 496; border-radius: 52px; padding: 14px; background: linear-gradient(145deg, #2a3138, #0b0f13 45%, #1b2127); box-shadow: 0 30px 70px -24px rgb(0 0 0 / .9); }
.watch img { width: 100%; height: 100%; object-fit: cover; border-radius: 38px; }

/* ---------- lists of things ---------- */
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3.4vw, 56px); }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 3.4vw, 56px); }
.item { display: grid; gap: 10px; align-content: start; padding-top: 22px; border-top: 1px solid var(--line); }
.item.accent { border-top-color: var(--yellow); }
.facts-row { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.facts-row .data { font-size: 14px; color: var(--mist); }
.facts-row .data b { font-family: var(--sans); font-weight: 700; font-size: 26px; color: var(--yellow); letter-spacing: -.02em; margin-right: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-family: var(--mono); font-size: 12.5px; letter-spacing: .02em; color: var(--body); border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 12px; }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 22px 0; font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--yellow); font-size: 22px; transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 24px; color: var(--body); max-width: 64ch; }

/* ---------- closing band and footer ---------- */
.closing { text-align: left; }
.footer { border-top: 1px solid var(--line); padding-block: 64px 40px; background: var(--black); }
.footer-sig { font-weight: 700; font-size: clamp(26px, 3.2vw, 44px); letter-spacing: -.03em; line-height: 1.08; }
.footer-sig span { color: var(--yellow); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 56px; }
.footer-grid h4 { font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--mist); margin-bottom: 14px; }
.footer-grid li + li { margin-top: 8px; }
.footer-grid a { text-decoration: none; color: var(--body); }
.footer-grid a:hover { color: var(--pearl); text-decoration: underline; text-decoration-color: var(--yellow); }
.footer-cross { color: var(--body); max-width: 34ch; }
.footer-legal { margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; font-size: 13px; color: var(--mist); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .intro > .intro-head, .intro > .intro-text { grid-column: 1 / -1; }
  .cols-3, .cols-2 { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .nav .nav-hide { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .header-in { min-height: 60px; gap: 16px; }
  .nav { gap: 14px; }
  .nav a { font-size: 14px; }
  .nav .nav-hide-sm { display: none; }
  .wordmark { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
