/* Aatox site, shared styles.
   Rules followed here: one typeface (Manrope), flat backgrounds, one accent, spacing and radius
   from fixed scales, type sizes from the Tailwind scale, one easing curve for motion. */

@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  /* spacing scale */
  --s0: 0;
  --s25: 2px;
  --s50: 4px;
  --s75: 8px;
  --s100: 12px;
  --s200: 16px;
  --s300: 24px;
  --s400: 32px;
  --s500: 40px;
  --s600: 48px;
  --s700: 64px;
  --s800: 80px;
  --s900: 96px;

  /* radius scale (Tailwind) */
  --r-sm: 4px;
  --r-lg: 8px;
  --r-xl: 12px;
  --r-2xl: 16px;
  --r-3xl: 24px;
  --r-full: 9999px;

  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --font: "Manrope", ui-sans-serif, system-ui, sans-serif;

  /* light theme */
  --bg: #ffffff;
  --surface: #f5f5f5;
  --raised: #ebebeb;
  --line: #d4d4d4;
  --ink: #111111;
  --muted: #5c5c5c;
  --accent: #4f46e5;
  --accent-ink: #ffffff;
  --danger: #b42318;
  --glass: rgba(255, 255, 255, 0.72);
  --overlay: rgba(255, 255, 255, 0.8);
  --noise: 0.05;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #181818;
    --raised: #1f1f1f;
    --line: #313131;
    --ink: #f5f5f5;
    --muted: #a3a3a3;
    --accent: #8a86e8;
    --accent-ink: #0b0b14;
    --danger: #ff8a80;
    --glass: rgba(24, 24, 24, 0.72);
    --overlay: rgba(0, 0, 0, 0.8);
    --noise: 0.08;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  text-wrap: pretty;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* a fine grain keeps flat surfaces from looking dead */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  opacity: var(--noise);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

h1, h2, h3 { text-wrap: balance; font-weight: 700; margin: 0; }
a { color: var(--accent); }
img { max-width: 100%; height: auto; }
.wrap { width: min(1200px, 100% - var(--s600)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: var(--s50); border-radius: var(--r-sm); }

/* skip link */
.skip {
  position: fixed; left: var(--s200); top: var(--s200); z-index: 100;
  padding: var(--s75) var(--s200); border-radius: var(--r-lg);
  background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 14px; line-height: 20px; text-decoration: none;
  transform: translateY(-200%); transition: transform 300ms var(--ease);
}
.skip:focus { transform: none; }

/* floating glass island nav */
.island-wrap { position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; justify-content: center; padding-top: var(--s300); pointer-events: none; }
.island {
  pointer-events: auto; display: flex; align-items: center; gap: var(--s200);
  padding: var(--s75) var(--s75) var(--s75) var(--s300);
  border-radius: var(--r-full); width: max-content; max-width: calc(100% - var(--s400));
  background: var(--glass); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent), 0 8px 32px color-mix(in srgb, var(--accent) 14%, transparent);
}
.brand { display: inline-flex; align-items: center; gap: var(--s75); font-size: 18px; line-height: 28px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; margin-right: var(--s200); }
.brand img { width: 28px; height: 28px; display: block; }
.links { display: flex; gap: var(--s50); }
.links a {
  font-size: 14px; line-height: 20px; font-weight: 600; text-decoration: none; color: var(--muted);
  padding: var(--s75) var(--s200); border-radius: var(--r-full); transition: all 300ms var(--ease);
}
.links a:hover { color: var(--ink); background: var(--raised); }
.links a[aria-current="page"] { color: var(--ink); background: var(--raised); }
.burger { display: none; position: relative; width: 40px; height: 40px; border: 0; border-radius: var(--r-full); background: var(--raised); cursor: pointer; }
.burger span { position: absolute; left: 12px; width: 16px; height: 2px; background: var(--ink); border-radius: var(--r-full); transition: transform 500ms var(--ease), top 500ms var(--ease); }
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 23px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { top: 19px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 40; display: grid; align-content: center; justify-items: start; gap: var(--s200);
  padding: var(--s900) var(--s400) var(--s400);
  background: var(--overlay); -webkit-backdrop-filter: blur(64px); backdrop-filter: blur(64px);
  opacity: 0; visibility: hidden; transition: opacity 700ms var(--ease), visibility 0s linear 700ms;
}
.menu.open { opacity: 1; visibility: visible; transition: opacity 700ms var(--ease), visibility 0s; }
.menu a {
  font-size: 36px; line-height: 40px; font-weight: 700; color: var(--ink); text-decoration: none;
  transform: translateY(48px); opacity: 0; transition: transform 700ms var(--ease), opacity 700ms var(--ease);
}
.menu.open a { transform: none; opacity: 1; }
.menu.open a:nth-child(1) { transition-delay: 100ms; }
.menu.open a:nth-child(2) { transition-delay: 150ms; }
.menu.open a:nth-child(3) { transition-delay: 200ms; }
.menu.open a:nth-child(4) { transition-delay: 250ms; }
@media (max-width: 720px) {
  .links { display: none; }
  .burger { display: block; }
  .brand { margin-right: var(--s300); }
}

main { padding-top: var(--s900); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s75);
  min-height: 44px; padding: var(--s75) var(--s100);
  font: 600 16px/24px var(--font); text-decoration: none; cursor: pointer; border: 0;
  border-radius: var(--r-lg); background: var(--accent); color: var(--accent-ink);
  transition: all 300ms var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn:active { transform: scale(0.98); box-shadow: none; }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; box-shadow: none; }
.btn.ghost { background: var(--surface); color: var(--ink); }
.btn.ghost:hover { background: var(--raised); box-shadow: none; }
.btn svg, .ico { width: 20px; height: 20px; fill: currentColor; flex: none; }

/* shared blocks used by the smaller pages */
.hero { padding: var(--s800) 0 var(--s700); max-width: 680px; margin-inline: auto; text-align: center; }
.hero h1 { font-size: 48px; line-height: 1; letter-spacing: -0.03em; margin-bottom: var(--s200); }
.hero p.lead { font-size: 18px; line-height: 28px; color: var(--muted); margin: 0 0 var(--s400); }
.hero img.logo { width: 128px; height: 128px; margin-bottom: var(--s300); }
h2 { font-size: 30px; line-height: 36px; letter-spacing: -0.02em; margin: var(--s800) 0 var(--s200); }
.section-note { color: var(--muted); max-width: 680px; margin: 0 0 var(--s300); }
.grid { display: grid; gap: var(--s200); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: var(--s200) 0 var(--s700); align-items: start; }
.card { background: var(--surface); border-radius: var(--r-3xl); padding: var(--s300); transition: all 500ms var(--ease); }
.card:hover { background: var(--raised); transform: translateY(-4px); }
.card h3 { font-size: 20px; line-height: 28px; margin: var(--s100) 0 var(--s75); }
.card p { margin: 0; color: var(--muted); }
.card .ico { width: 32px; height: 32px; color: var(--accent); }
.product { display: flex; gap: var(--s300); align-items: center; flex-wrap: wrap; }
.product img { width: 96px; height: 96px; border-radius: var(--r-3xl); }
.product .text { flex: 1 1 280px; }
.product h3 { font-size: 24px; line-height: 32px; margin: 0 0 var(--s75); }
.product p { margin: 0; color: var(--muted); }
.tag { display: inline-block; font-size: 12px; line-height: 16px; font-weight: 600; padding: var(--s50) var(--s75); border-radius: var(--r-sm); background: var(--raised); color: var(--ink); margin-bottom: var(--s75); }
.center { text-align: center; }

/* forms */
form.waitlist { display: grid; gap: var(--s100); max-width: 520px; }
form.waitlist .row { display: flex; gap: var(--s75); flex-wrap: wrap; }
form.waitlist input[type="email"] {
  flex: 1 1 240px; min-height: 48px; padding: var(--s75) var(--s200);
  font: 400 16px/24px var(--font); color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--r-lg); transition: all 300ms var(--ease);
}
form.waitlist input[type="email"]:hover { border-color: var(--muted); }
form.waitlist input[aria-invalid="true"] { border-color: var(--danger); }
.consent { font-size: 14px; line-height: 20px; color: var(--muted); margin: 0; }
.consent label { display: flex; gap: var(--s75); align-items: flex-start; cursor: pointer; }
.consent input { margin-top: var(--s25); width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.field-error { min-height: 20px; margin: 0; font-size: 14px; line-height: 20px; color: var(--danger); }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* text pages (privacy, terms, support) */
.doc { padding: var(--s700) 0 var(--s400); max-width: 720px; }
.doc h1 { font-size: 36px; line-height: 40px; letter-spacing: -0.02em; margin-bottom: var(--s75); }
.doc h2 { font-size: 24px; line-height: 32px; margin: var(--s500) 0 var(--s75); }
.doc p, .doc li { color: var(--muted); }
.doc li { margin-bottom: var(--s75); }
.doc .updated { font-size: 14px; line-height: 20px; margin-bottom: var(--s300); }
details { background: var(--surface); border-radius: var(--r-2xl); padding: var(--s200) var(--s300); margin: var(--s100) 0; transition: background 300ms var(--ease); }
details[open] { background: var(--raised); }
details summary { cursor: pointer; font-weight: 600; color: var(--ink); }
details p { margin: var(--s100) 0 0; }

footer.site { margin-top: var(--s900); padding: var(--s400) 0 var(--s600); color: var(--muted); font-size: 14px; line-height: 20px; }
footer.site .wrap { display: flex; justify-content: space-between; gap: var(--s200); flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: var(--s300); }
footer.site a { color: var(--muted); margin-right: var(--s200); text-decoration: none; transition: color 300ms var(--ease); }
footer.site a:hover { color: var(--ink); }

@media (min-width: 1024px) {
  .hero h1 { font-size: 60px; }
  h2 { font-size: 36px; line-height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 1ms !important; }
}
