:root {
  --bg: oklch(0.1 0 0);
  --bg-deep: oklch(0.08 0.01 280);
  --surface: oklch(0.16 0.014 280 / 0.62);
  --ink: oklch(0.96 0.008 188);
  --muted: oklch(0.76 0.018 230);
  --faint: oklch(0.64 0.02 250);
  --primary: oklch(0.78 0.1 188);
  --primary-deep: oklch(0.52 0.09 188);
  --accent: oklch(0.58 0.13 280);
  --line: oklch(1 0 0 / 0.1);
  --line-strong: oklch(1 0 0 / 0.14);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 16px;
  --wrap: 1120px;
  --z-nav: 40;
  --z-overlay: 50;
  --z-skip: 60;
}

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

html {
  scroll-behavior: smooth;
}

body {
  color-scheme: dark;
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(900px 480px at 80% -10%, oklch(0.45 0.08 188 / 0.16), transparent 60%),
    radial-gradient(700px 420px at 0% 20%, oklch(0.4 0.1 280 / 0.12), transparent 55%),
    var(--bg-deep);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main,
.site-footer {
  position: relative;
  z-index: 2;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

h1,
h2,
h3 {
  font-family: Sora, ui-sans-serif, system-ui, sans-serif;
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.12;
  text-wrap: balance;
  margin: 0;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.wrap {
  width: min(calc(100% - 2.5rem), var(--wrap));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0.75rem;
  z-index: var(--z-skip);
  transform: translateY(-160%);
  padding: 0.55rem 0.9rem;
  border-radius: 9999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.875rem;
}

.skip-link:focus {
  transform: none;
}

/* —— Nav —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  padding: 0.85rem 0 0;
}

.nav-shell {
  width: min(calc(100% - 1.5rem), calc(var(--wrap) + 1.5rem));
  margin-inline: auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.45rem 0.5rem 0.45rem 1rem;
  border: 1px solid var(--line);
  border-radius: 9999px;
  background: oklch(0.12 0.01 280 / 0.72);
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: Sora, sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  min-height: 40px;
}

.wordmark .mark {
  color: var(--ink);
  flex: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
}

.nav-links a {
  padding: 0.55rem 0.85rem;
  border-radius: 9999px;
  color: var(--muted);
  font-size: 0.92rem;
  transition:
    color 320ms var(--ease),
    background-color 320ms var(--ease);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--ink);
  background: oklch(1 0 0 / 0.05);
}

.nav-cta {
  margin-left: 0.35rem;
}

.menu-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border-radius: 9999px;
}

.menu-toggle-bar {
  position: absolute;
  left: 13px;
  right: 13px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 99px;
  transition: transform 400ms var(--ease), top 400ms var(--ease), opacity 240ms var(--ease);
}

.menu-toggle-bar:first-child {
  top: 18px;
}

.menu-toggle-bar:last-child {
  top: 25px;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar:first-child {
  top: 21.5px;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar:last-child {
  top: 21.5px;
  transform: rotate(-45deg);
}

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  display: grid;
  place-items: end stretch;
  padding: 5.5rem 0.85rem 1.25rem;
  background: oklch(0.08 0.01 280 / 0.78);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav nav {
  display: grid;
  gap: 0.35rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: oklch(0.14 0.014 280 / 0.88);
}

.mobile-nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0.4rem 0.35rem;
  font-family: Sora, sans-serif;
  font-size: 1.35rem;
  font-weight: 300;
  letter-spacing: -0.03em;
}

.mobile-nav .btn {
  justify-content: center;
  margin-top: 0.6rem;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0;
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.55rem 0.55rem 0.55rem 1.15rem;
  border-radius: 9999px;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition:
    transform 180ms var(--ease),
    background-color 320ms var(--ease),
    color 320ms var(--ease),
    border-color 320ms var(--ease);
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: var(--ink);
  color: oklch(0.14 0.01 280);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: oklch(0.99 0.01 188);
}

.btn-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  background: oklch(0.14 0.01 280 / 0.1);
  transition: transform 320ms var(--ease);
}

.btn-primary:hover .btn-icon,
.btn-primary:focus-visible .btn-icon {
  transform: translate(1px, -1px);
}

.btn-ghost {
  padding-inline: 1.15rem;
  border: 1px solid var(--line-strong);
  background: oklch(1 0 0 / 0.03);
  color: var(--ink);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: oklch(0.78 0.1 188 / 0.45);
  background: oklch(0.78 0.1 188 / 0.08);
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.btn:focus-visible,
.nav-links a:focus-visible {
  outline-offset: 2px;
}

/* —— Hero —— */
.hero {
  position: relative;
  isolation: isolate;
  min-height: min(100dvh, 820px);
  padding: 4.5rem 0 5.5rem;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: auto auto 10% 42%;
  width: 42rem;
  height: 42rem;
  border-radius: 50%;
  background:
    radial-gradient(circle, oklch(0.72 0.1 188 / 0.22), transparent 62%),
    radial-gradient(circle at 70% 40%, oklch(0.5 0.12 280 / 0.2), transparent 58%);
  filter: blur(8px);
  pointer-events: none;
  z-index: -1;
  animation: glow-drift 16s var(--ease) infinite alternate;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 2.5rem;
}

.kicker {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 5.4rem);
  max-width: 11ch;
}

.lede {
  max-width: 42ch;
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.85rem;
}

.hero-visual {
  display: grid;
  place-items: center;
}

.voice-mark {
  width: min(100%, 420px);
  height: auto;
}

.ring {
  stroke: oklch(0.78 0.1 188 / 0.28);
  stroke-width: 1;
}

.ring-a {
  stroke: oklch(0.78 0.1 188 / 0.16);
}

.ring-b {
  stroke: oklch(0.7 0.11 200 / 0.32);
}

.ring-c {
  stroke: oklch(0.78 0.1 188 / 0.48);
}

.ring-d {
  stroke: oklch(0.82 0.09 188 / 0.7);
}

.ring-core {
  fill: var(--primary);
}

.ring {
  transform-origin: 210px 210px;
  animation: ring-breathe 8s var(--ease) infinite;
}

.ring-b {
  animation-delay: 0.6s;
}

.ring-c {
  animation-delay: 1.2s;
}

.ring-d {
  animation-delay: 1.8s;
}

/* —— Apps —— */
.apps {
  padding: 5.5rem 0 4.5rem;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin-bottom: 1.75rem;
}

.apps-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  grid-template-rows: auto auto;
  gap: 0.9rem;
}

.card {
  position: relative;
  padding: 1.5rem 1.5rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.07);
  transition: border-color 360ms var(--ease);
}

.card:hover,
.card:focus-within {
  border-color: oklch(0.78 0.1 188 / 0.38);
}

.card-flagship {
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1.85rem 1.75rem 1.5rem;
  background:
    linear-gradient(180deg, oklch(0.78 0.1 188 / 0.08), transparent 38%),
    var(--surface);
}

.tag {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.7rem;
}

.card h3 {
  font-size: 1.7rem;
  margin-bottom: 0.7rem;
}

.card p:not(.tag):not(.meta) {
  color: var(--muted);
  max-width: 46ch;
}

.meta {
  margin-top: 1.15rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--faint);
}

.card-flagship .meta {
  margin-top: auto;
  padding-top: 1.5rem;
}

.flagship-viz {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  height: 72px;
  margin-top: 2rem;
}

.flagship-viz span {
  flex: 1;
  border-radius: 99px 99px 4px 4px;
  background: linear-gradient(180deg, var(--primary), oklch(0.5 0.1 280 / 0.55));
  transform-origin: center bottom;
  animation: bar-pulse 2.8s var(--ease) infinite;
}

.flagship-viz span:nth-child(1) { height: 28%; animation-delay: 0.05s; }
.flagship-viz span:nth-child(2) { height: 52%; animation-delay: 0.18s; }
.flagship-viz span:nth-child(3) { height: 40%; animation-delay: 0.3s; }
.flagship-viz span:nth-child(4) { height: 78%; animation-delay: 0.12s; }
.flagship-viz span:nth-child(5) { height: 46%; animation-delay: 0.42s; }
.flagship-viz span:nth-child(6) { height: 90%; animation-delay: 0.22s; }
.flagship-viz span:nth-child(7) { height: 62%; animation-delay: 0.35s; }
.flagship-viz span:nth-child(8) { height: 34%; animation-delay: 0.08s; }
.flagship-viz span:nth-child(9) { height: 70%; animation-delay: 0.28s; }
.flagship-viz span:nth-child(10) { height: 48%; animation-delay: 0.16s; }
.flagship-viz span:nth-child(11) { height: 58%; animation-delay: 0.4s; }
.flagship-viz span:nth-child(12) { height: 26%; animation-delay: 0.24s; }

/* —— AetherSphere —— */
.sphere {
  padding: 6.5rem 0 5.5rem;
}

.sphere-inner {
  max-width: 38rem;
  margin-left: 0;
  margin-right: auto;
}

.sphere h2 {
  font-size: clamp(2.4rem, 5.4vw, 4.4rem);
  max-width: 10ch;
}

.sphere-body {
  margin-top: 1.4rem;
  max-width: 48ch;
  color: var(--muted);
  font-size: 1.08rem;
}

.sphere-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.7rem;
  list-style: none;
  margin: 2.2rem 0 0;
  padding: 0;
}

.sphere-flow li {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  color: var(--ink);
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 9999px;
}

/* —— Under the hood —— */
.hood {
  padding: 1.5rem 0 5rem;
}

.quiet-title {
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--faint);
  margin-bottom: 1.1rem;
}

.hood-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.hood-list li {
  padding: 1.15rem 1.25rem 0 0;
}

.hood-list h3 {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
}

.hood-list p {
  color: var(--faint);
  font-size: 0.95rem;
}

/* —— About —— */
.about {
  padding: 2rem 0 6rem;
}

.about-inner {
  max-width: 36rem;
  margin-left: 0;
}

.about h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.8rem);
  margin-bottom: 1rem;
}

.about p {
  color: var(--muted);
  max-width: 54ch;
}

/* —— Footer —— */
.site-footer {
  padding: 1.4rem 0 2rem;
  border-top: 1px solid var(--line);
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
}

.footer-meta {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--faint);
}

/* —— Motion helpers —— */
.will-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 700ms var(--ease),
    transform 700ms var(--ease);
}

.will-reveal.is-in {
  opacity: 1;
  transform: none;
}

.card.will-reveal {
  transition:
    opacity 700ms var(--ease),
    transform 700ms var(--ease),
    border-color 360ms var(--ease);
}

.apps-grid .card.will-reveal:nth-child(2) {
  transition-delay: 80ms;
}

.apps-grid .card.will-reveal:nth-child(3) {
  transition-delay: 140ms;
}

/* —— Animations —— */
@keyframes glow-drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.85;
  }
  to {
    transform: translate3d(-4%, 6%, 0) scale(1.06);
    opacity: 1;
  }
}

@keyframes ring-breathe {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.015);
    opacity: 1;
  }
}

@keyframes bar-pulse {
  0%,
  100% {
    transform: scaleY(0.72);
    opacity: 0.7;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .nav-shell,
  .mobile-nav,
  .card,
  .mobile-nav nav {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: oklch(0.13 0.012 280);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-glow,
  .ring,
  .flagship-viz span,
  .will-reveal {
    animation: none;
    transition: none;
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1023px) {
  .nav-links,
  .nav-cta {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero {
    min-height: unset;
    padding: 4.25rem 0 3.5rem;
  }

  .hero-visual {
    justify-content: start;
  }

  .voice-mark {
    width: min(72vw, 280px);
    margin-left: -0.5rem;
  }

  .apps-grid,
  .hood-list {
    grid-template-columns: 1fr;
  }

  .card-flagship {
    grid-row: auto;
  }

  .sphere {
    padding-top: 4.5rem;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 1rem;
  }

  .wrap {
    width: min(calc(100% - 1.5rem), var(--wrap));
  }

  .hero h1 {
    max-width: none;
  }

  .lede {
    max-width: none;
  }

  .btn {
    width: 100%;
  }

  .hero-actions {
    width: 100%;
  }

  .nav-shell {
    padding-left: 0.85rem;
  }

  .hood-list li {
    padding-right: 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 1rem;
    margin-bottom: 0.15rem;
  }
}

@media (min-width: 1024px) {
  .sphere-inner {
    width: min(calc(100% - 2.5rem), var(--wrap));
    margin-inline: auto;
    padding-left: 0;
  }
}

/* —— Language switcher —— */
.lang-switch {
  display: inline-flex;
  align-items: center;
  flex: none;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  background: oklch(1 0 0 / 0.03);
}

.lang-switch button {
  min-width: 36px;
  min-height: 32px;
  padding: 0 0.55rem;
  border-radius: 9999px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--faint);
  transition:
    color 320ms var(--ease),
    background-color 320ms var(--ease);
}

.lang-switch button:hover,
.lang-switch button:focus-visible {
  color: var(--ink);
}

.lang-switch button[aria-pressed="true"] {
  color: oklch(0.14 0.01 280);
  background: var(--primary);
}

.lang-switch button[aria-pressed="true"]:hover,
.lang-switch button[aria-pressed="true"]:focus-visible {
  color: oklch(0.14 0.01 280);
}

.lang-switch-mobile {
  margin-top: 0.85rem;
  width: max-content;
}

@media (max-width: 1023px) {
  .lang-switch-desktop {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lang-switch button {
    transition: none;
  }
}
