/* Webloom base: reset, type, liquid glass, buttons, atmosphere, section scaffolding, reveals. */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-offset);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}

img, svg { display: block; max-width: 100%; }
img { height: auto; } /* width/height attributes reserve space but must not fix the rendered height */
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--blue) 30%, transparent); }

h1, h2, h3, .display {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.04;
  margin: 0;
  text-wrap: balance;
}

h2 { font-size: var(--text-h2); letter-spacing: -0.045em; line-height: 0.98; }
h3 { font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem); letter-spacing: -0.025em; }
em { font-style: normal; color: var(--accent-text); }
p { margin: 0; }

.mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lead { font-size: var(--text-lead); color: var(--muted); max-width: 54ch; }

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

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--on-blue);
  text-decoration: none;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 16px; }

/* ---------------------------------------------------------------- atmosphere (fixed light behind all glass) */

.atmos { position: fixed; inset: -12vh -12vw; z-index: -1; overflow: hidden; pointer-events: none; }

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(var(--blob-blur, 100px));
  opacity: var(--blob-opacity);
  animation: drift 28s var(--ease) infinite alternate;
  transition: background-color 0.8s var(--ease), opacity 0.8s var(--ease);
}

.atmos .b1 { width: 52vw; height: 52vw; left: 0; top: 0; background: var(--a1); }
.atmos .b2 { width: 44vw; height: 44vw; right: 0; top: 30vh; background: var(--a2); animation-duration: 34s; }
.atmos .b3 { width: 40vw; height: 40vw; left: 22vw; bottom: 0; background: var(--a3); animation-duration: 40s; }

.atmos::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: var(--grain);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes drift { to { transform: translate3d(6vw, 5vh, 0) scale(1.08); } }

/* ---------------------------------------------------------------- liquid glass */

.glass {
  position: relative;
  background: linear-gradient(160deg, var(--glass-1), var(--glass-2));
  -webkit-backdrop-filter: blur(var(--blur)) saturate(var(--sat));
  backdrop-filter: blur(var(--blur)) saturate(var(--sat));
  border-radius: var(--r-lg);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 1px 2px var(--shadow-1), 0 28px 60px -30px var(--shadow-2);
}

/* luminous rim: light catches the top-left and bottom-right edges */
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--rim-a), var(--rim-b) 38%, var(--rim-b) 62%, var(--rim-c));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.pill { border-radius: 999px; }

/* ---------------------------------------------------------------- buttons, chips */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  font: 600 0.95rem/1 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease), color var(--dur);
}

.btn--primary {
  background: var(--blue);
  color: var(--on-blue);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.35), 0 12px 30px -12px rgb(47 107 255 / 0.75);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.35), 0 18px 36px -12px rgb(47 107 255 / 0.9); }
.btn--glass { color: var(--ink); }
.btn--glass:hover { transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn:active { transform: translateY(0) scale(0.97); }
.btn--sm { height: 42px; padding: 0 18px; font-size: 0.875rem; }
.btn--lg { height: 58px; padding: 0 30px; font-size: 1rem; }
.btn svg { width: 16px; height: 16px; flex: none; }

/* tiny linked rings inside primary CTAs: they link on hover */
.btn-rings { width: 26px !important; height: 14px !important; overflow: visible; }
.btn-rings circle { fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform 0.45s var(--ease); }
.btn-rings circle:last-child { transform: translateX(4px); }
.btn:hover .btn-rings circle:last-child, .btn:focus-visible .btn-rings circle:last-child { transform: translateX(-3px); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: 0.8rem; font-weight: 500; color: var(--ink); }

/* ---------------------------------------------------------------- sections */

.section { position: relative; padding: var(--space-section) var(--gutter) 0; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; }

.sec-head { display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 64px); max-width: 860px; }

/* ---------------------------------------------------------------- reveal (only when JS is running) */

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.js .is-visible .reveal, .js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blob { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .btn-rings circle { transition: none; }
}
