/* AIQuota — landing + legal pages. Instrument panel: dark glass, one aurora accent, precise ticks. */
:root {
  --ink: #eef0ff;
  --ink-soft: #b9bedc;
  --ink-faint: #7d84ad;
  --night: #0b0e1a;
  --night-2: #101532;
  --line: rgba(185, 190, 220, 0.14);
  --cyan: #39e0ff;
  --violet: #8b5cf6;
  --magenta: #ff4fd8;
  --aurora: linear-gradient(100deg, var(--cyan), var(--violet) 52%, var(--magenta));
  --serif: 'Instrument Serif', ui-serif, Georgia, serif;
  --sans: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 40px);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--night);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100svh;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in oklab, var(--violet) 70%, transparent);
}

a:hover {
  text-decoration-color: var(--cyan);
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

.mono {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- Landing ---------- */

.stage {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  isolation: isolate;
}

.stage::before {
  content: '';
  position: absolute;
  inset: -8%;
  z-index: -2;
  background: url('/assets/aurora.webp') center / cover no-repeat;
  animation: settle 2.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.stage::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 55% at 50% 48%, transparent 0 38%, rgba(11, 14, 26, 0.55) 70%),
    linear-gradient(180deg, rgba(11, 14, 26, 0.35), rgba(11, 14, 26, 0.85));
}

.topbar,
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  width: 28px;
  height: 28px;
}

.lang {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  text-decoration: none;
}

.hero {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 28px;
  padding: 24px var(--gutter) 40px;
  text-align: center;
}

.dial {
  position: relative;
  width: min(300px, 62vw);
  aspect-ratio: 1;
  animation: rise 1.2s 0.15s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.dial img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.dial .needle {
  transform-origin: 49.76% 49.25%;
  animation: sweep 1.6s 0.45s cubic-bezier(0.34, 1.32, 0.5, 1) both;
}

.dial .ticks {
  position: absolute;
  inset: -16%;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from -0.5deg,
    rgba(185, 190, 220, 0.22) 0 1deg,
    transparent 1deg 6deg
  );
  mask: radial-gradient(circle, transparent 0 66%, #000 66.5% 68%, transparent 68.5%);
  animation: fade 2s 0.6s both;
}

h1 {
  margin: 0;
  max-width: 14ch;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 7.5vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  animation: rise 1s 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

h1 em {
  font-style: italic;
  background: var(--aurora);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  margin: 0;
  max-width: 46ch;
  color: var(--ink-soft);
  font-size: 1.06rem;
  animation: rise 1s 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.soon {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(16, 21, 50, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: rise 1s 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.soon .pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(57, 224, 255, 0.6);
  animation: pulse 2.4s infinite;
}

.footer {
  flex-wrap: wrap;
  color: var(--ink-faint);
  font-size: 0.86rem;
}

.footer nav {
  display: flex;
  gap: 20px;
}

.footer a {
  text-decoration: none;
}

.footer a:hover {
  color: var(--ink);
}

/* ---------- Legal ---------- */

.doc {
  background:
    radial-gradient(80% 40% at 50% -10%, rgba(139, 92, 246, 0.18), transparent 70%),
    var(--night);
}

.doc-head {
  max-width: 1080px;
  margin: 0 auto;
  padding: 72px var(--gutter) 40px;
  border-bottom: 1px solid var(--line);
}

.doc-head h1 {
  max-width: none;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  animation: none;
}

.doc-head p {
  margin: 14px 0 0;
  color: var(--ink-soft);
}

.doc-body {
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px var(--gutter) 96px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 56px;
}

.toc {
  position: sticky;
  top: 32px;
  align-self: start;
  display: grid;
  gap: 8px;
  font-size: 0.88rem;
}

.toc a {
  color: var(--ink-faint);
  text-decoration: none;
}

.toc a:hover {
  color: var(--ink);
}

.prose {
  max-width: 68ch;
  counter-reset: section;
}

.prose section {
  padding-bottom: 8px;
  scroll-margin-top: 24px;
}

.prose h2 {
  margin: 40px 0 12px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.9rem;
  line-height: 1.15;
}

.prose h2::before {
  counter-increment: section;
  content: counter(section, decimal-leading-zero);
  display: block;
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--violet);
}

.prose section:first-child h2 {
  margin-top: 0;
}

.prose p,
.prose li {
  color: var(--ink-soft);
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

.prose ul {
  padding-left: 1.1em;
}

.prose li {
  margin: 6px 0;
}

.prose li::marker {
  color: var(--violet);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.92rem;
}

.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--line);
}

.prose th {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-faint);
}

.note {
  margin-top: 40px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(16, 21, 50, 0.6);
  font-size: 0.92rem;
}

/* ---------- Motion ---------- */

@keyframes settle {
  from {
    transform: scale(1.08);
    opacity: 0;
  }
}

@keyframes rise {
  from {
    transform: translateY(14px);
    opacity: 0;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

@keyframes sweep {
  from {
    transform: rotate(-175deg);
    opacity: 0;
  }
  8% {
    opacity: 1;
  }
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 10px rgba(57, 224, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(57, 224, 255, 0);
  }
}

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

@media (max-width: 760px) {
  .doc-body {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .toc {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
  }

  .prose table,
  .prose thead,
  .prose tbody,
  .prose tr,
  .prose th,
  .prose td {
    display: block;
  }

  .prose thead {
    display: none;
  }

  .prose td {
    padding: 2px 0;
    border: 0;
  }

  .prose tr {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
  }
}
