/* Page chrome and the pieces every section shares: nav, buttons, pills, fields, section heads, footer. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  /* the app's ground (main.component.html: bg-gradient-to-bl from-accent-soft via-canvas to-accent-soft), under a dot grid */
  background:
    radial-gradient(circle, var(--grid) 1px, transparent 1.5px) 0 0 / 22px 22px,
    linear-gradient(to bottom left, var(--violet-soft), var(--canvas), var(--violet-soft)) fixed;
  background-color: var(--canvas);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--selection); }
:focus-visible { outline: 2px solid var(--violet-ink); outline-offset: 3px; border-radius: 2px; }
a { color: inherit; text-underline-offset: 3px; text-decoration-color: var(--border-strong); }
a:hover { text-decoration-color: var(--ink); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; text-wrap: balance; }
p { margin: 0; }
code { font: 500 0.875em/1 var(--mono); color: var(--violet-ink); }
main { overflow-x: clip; } /* the hero glow bleeds past the edge on narrow screens */
.wrap { max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.num { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}

/* nav */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--canvas) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--hairline); }
.nav .wrap { display: flex; align-items: center; gap: 32px; height: 64px; }
.nav img { height: 30px; width: auto; display: block; }
.nav-links { display: flex; gap: 28px; margin-left: auto; font-size: 14px; }
.nav-links a { position: relative; color: var(--ink-muted); text-decoration: none; transition: color .2s; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--ink); }
.nav-links a::after { content: ""; position: absolute; inset: auto 0 -22px; height: 2px; background: var(--violet); transform: scaleX(0); transition: transform .3s var(--ease); }
.nav-links a[aria-current]::after { transform: scaleX(1); }
.lang { font-size: 14px; color: var(--ink-muted); text-decoration: none; transition: color .2s; }
.lang:hover { color: var(--ink); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 15px/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  border-radius: var(--r); padding: 13px 20px; border: 1px solid transparent;
  transition: background-color .2s, transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--violet); color: var(--ink-on-fill); }
.btn-primary:hover { background: var(--violet-ink); }
.btn-quiet { background: transparent; border-color: var(--border-strong); color: var(--ink); padding: 9px 14px; font-size: 14px; }
.btn-quiet:hover { background: var(--raised); }

/* pills: a small set of mutually exclusive choices — a button with aria-pressed, or a label around a radio */
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  font: 500 14px/1 var(--sans); color: var(--ink-muted); cursor: pointer;
  background: none; border: 1px solid var(--hairline); border-radius: 999px; padding: 8px 14px;
  transition: color .2s, background-color .2s, border-color .2s;
}
.pill:hover { color: var(--ink); border-color: var(--border-strong); }
.pill[aria-pressed="true"], .pill:has(:checked) { color: var(--ink); background: var(--violet-soft); border-color: var(--violet); }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill:has(:focus-visible) { outline: 2px solid var(--violet-ink); outline-offset: 3px; }

/* fields */
.field { display: grid; gap: 6px; font-size: 13px; color: var(--ink-muted); }
.field input, .field select, .input {
  width: 100%; min-width: 0; font: 400 15px/1.2 var(--sans); color: var(--ink);
  background: var(--sunken); border: 1px solid var(--border-strong); border-radius: var(--r); padding: 12px 14px;
}
.field input:disabled { color: var(--ink-subtle); border-color: var(--hairline); border-style: dashed; }
input::placeholder { color: var(--ink-subtle); }
input[type="range"] { width: 100%; accent-color: var(--violet); }

/* the demo call to action, used in the hero and the close */
.start { margin-top: 36px; }
.start-meta { margin-top: 12px; font-size: 14px; color: var(--ink-subtle); }

/* sections */
.section { padding-block: clamp(72px, 10vw, 128px); }
/* dividers run the width of the content, not the window */
.section, .close, footer { background: linear-gradient(var(--hairline), var(--hairline)) top center / calc(min(1200px, 100%) - 2 * var(--gutter)) 1px no-repeat; }
.section-head { max-width: 40em; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { font-size: clamp(32px, 4vw, 48px); line-height: 1.1; letter-spacing: -0.015em; }
.section-head p { margin-top: 16px; font-size: 17px; color: var(--ink-muted); }

.close { position: relative; padding-block: clamp(80px, 11vw, 144px); text-align: center; overflow: hidden; }
.close::before { content: ""; position: absolute; inset: 20% 25% auto; height: 60%; background: radial-gradient(closest-side, color-mix(in srgb, var(--violet) 22%, transparent), transparent); filter: blur(40px); pointer-events: none; }
.close h2 { position: relative; font-size: clamp(36px, 5vw, 64px); line-height: 1.05; letter-spacing: -0.02em; max-width: 14em; margin-inline: auto; }
.close .start { position: relative; }

footer { padding-block: 28px; font-size: 14px; color: var(--ink-subtle); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; }
footer .wrap > :first-child { margin-right: auto; }

@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav .btn-quiet { margin-left: auto; }
}
