*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--c-ink);
  background: var(--c-paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: 10px; background: #fff; color: var(--c-night); }
.skip:focus { top: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.w { display: inline-block; white-space: nowrap; }
.ch { display: inline-block; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 46px; padding: 0 24px; border-radius: var(--radius-pill);
  font-size: 15px; font-weight: var(--fw-medium); white-space: nowrap; cursor: pointer;
  border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.97); }
.btn--light { background: #fff; color: var(--c-night); box-shadow: var(--shadow-pill); }
.btn--light:hover { background: #fff1e6; }
.btn--dark { background: var(--c-accent); color: #fff; }
.btn--dark:hover { background: var(--c-accent-2); }
.btn--outline { border-color: var(--c-faint); color: var(--c-ink); background: transparent; }
.btn--outline:hover { border-color: var(--c-accent); color: var(--c-accent-deep); }
.btn--ghost { border-color: rgba(255, 255, 255, 0.22); color: #fff; background: rgba(255, 255, 255, 0.02); }
.btn--ghost:hover { background: var(--c-accent); border-color: var(--c-accent); }
.btn:disabled { opacity: 0.5; cursor: progress; }
.link { color: #fff; font-size: 15px; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.link:hover { text-decoration-thickness: 2px; }

/* Header */
.header {
  position: fixed; inset: 24px 24px auto; z-index: 50;
  display: flex; align-items: center; gap: 14px;
  pointer-events: none;
}
.header > * { pointer-events: auto; }
.pill { display: inline-flex; align-items: center; height: 46px; border-radius: var(--radius-pill); }
.pill--glass {
  background: var(--pill-bg); color: #fff;
  /* No backdrop-filter: over animated WebGL it is recomputed every frame and halves the frame rate. */
  transition: background-color var(--dur) var(--ease-out);
}
.header[data-tone='dark'] { --pill-bg: rgba(16, 16, 16, 0.78); }
.header[data-tone='dark'] .pill--glass { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.header[data-tone='light'] { --pill-bg: rgba(28, 28, 28, 0.85); }
.header__logo { gap: 9px; padding: 0 22px; font-size: 17px; font-weight: var(--fw-semibold); letter-spacing: -0.01em; }
.logo-mark { display: inline-flex; width: 22px; color: #c7c7c7; }
.wordmark { font-weight: 800; letter-spacing: 0.02em; }
.wordmark b { color: var(--c-accent); font-weight: 800; }
.header__nav { gap: clamp(16px, 1.7vw, 28px); padding: 0 22px; font-size: 15px; }
.header__nav a { opacity: 0.92; transition: opacity var(--dur-fast); }
.header__nav a:hover, .header__nav a[aria-current] { opacity: 1; text-decoration: underline; text-decoration-color: var(--c-accent); text-underline-offset: 6px; text-decoration-thickness: 2px; }
[data-header-cta] { margin-left: auto; }
.header__cabinet { margin-left: auto; padding: 0 20px; font-size: 15px; white-space: nowrap; }
.header__cabinet::before { content: ''; width: 7px; height: 7px; margin-right: 9px; border-radius: 50%; background: var(--c-accent); }
.header__cabinet + [data-header-cta] { margin-left: 0; }
.header[data-tone='light'] [data-header-cta] { box-shadow: 0 6px 24px rgba(10, 16, 40, 0.07); }
.header__burger { display: none; width: 46px; justify-content: center; flex-direction: column; gap: 5px; border: 0; cursor: pointer; }
.header__burger span { width: 16px; height: 1.5px; background: currentColor; margin: 0 auto; transition: transform var(--dur-fast) var(--ease-out); }
.header.is-open .header__burger span:first-child { transform: translateY(3.25px) rotate(45deg); }
.header.is-open .header__burger span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
.mobile-menu {
  position: absolute; top: 58px; left: 0; right: 0;
  display: grid; gap: 4px; padding: 14px; border-radius: var(--radius-m);
  background: rgba(11, 11, 11, 0.88); color: #fff;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a:not(.btn) { padding: 12px 10px; font-size: 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.mobile-menu a[aria-current] { color: var(--c-accent); }
.mobile-menu .btn { margin-top: 10px; }

/* Loader */
.loader {
  position: fixed; inset: 0; z-index: 100; background: var(--c-paper);
  display: grid; place-items: center;
}
.loader__logo { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: var(--fw-medium); }
.loader__logo .logo-mark { width: 30px; color: #8a8a8a; }
.loader__bar { position: absolute; left: 0; right: 0; bottom: 0; height: clamp(40px, 9vh, 74px); }
.loader__fill { position: absolute; inset: 0; transform: scaleX(0); transform-origin: left; transition: transform 0.9s cubic-bezier(0.25, 0.1, 0.25, 1); will-change: transform; background: linear-gradient(90deg, #ffe6d1, #ff9a4a 45%, var(--c-accent)); }
.loader__pct {
  position: absolute; bottom: 100%; left: 0; padding-right: 8px;
  font-size: clamp(3rem, 2rem + 4vw, 6rem); font-weight: var(--fw-light); line-height: 1.1; letter-spacing: -0.03em;
}

@media (max-width: 1240px) {
  .header__nav { display: none; }
  .header__burger { display: inline-flex; }
}
@media (max-width: 960px) {
  .header { inset: 14px 14px auto; gap: 8px; }
  .header__nav { display: none; }
  .header__burger { display: inline-flex; }
  .header__logo { padding: 0 16px; font-size: 15px; height: 40px; }
  .header .btn, .header__burger { height: 40px; }
  .header .btn { padding: 0 16px; font-size: 14px; }
  .header__burger { width: 40px; }
  .header__cabinet { display: none; }
  [data-header-cta] { margin-left: auto; }
}
@media (max-width: 420px) {
  .header__logo, .header .btn { padding: 0 12px; }
}
@media (max-width: 380px) {
  [data-header-cta] { display: none; }
  .header__burger { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
