/* Aether Labs — shared shell styles */
:root {
  --bg: #05060a;
  --bg-2: #080a11;
  --surface: rgba(16, 19, 28, 0.72);
  --surface-solid: #0e121b;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --ink: #f2f4f8;
  --muted: #99a1b4;
  --dim: #6b7386;
  --mint: #7bf7cf;
  --violet: #a58bff;
  --rose: #ff9ab8;
  --radius: 14px;
  --wrap: 1200px;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: "Instrument Serif", "Times New Roman", Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked { overflow: hidden; }

::selection { background: rgba(123, 247, 207, 0.28); color: #fff; }

a { color: inherit; text-decoration: none; }
img, svg, canvas { display: block; max-width: 100%; }

h1, h2, h3, h4, p { margin: 0; }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

/* ---------- header ---------- */
.site-head {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(20px, 4vw, 48px);
  border-bottom: 1px solid transparent;
  transition: background 0.5s var(--ease), border-color 0.5s var(--ease), backdrop-filter 0.5s;
}

.site-head.is-stuck {
  background: rgba(5, 6, 10, 0.7);
  border-bottom-color: var(--line);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-mark {
  width: 26px;
  height: 26px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.brand-mark span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--mint), var(--violet));
  box-shadow: 0 0 14px rgba(123, 247, 207, 0.65);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 34px);
}

.nav a {
  position: relative;
  font-size: 14px;
  color: var(--muted);
  padding-block: 6px;
  transition: color 0.25s;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--mint);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.nav a:hover, .nav a:focus-visible, .nav a[aria-current="page"] { color: var(--ink); }
.nav a:hover::after, .nav a:focus-visible::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

.head-actions { display: flex; align-items: center; gap: 12px; }

.menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  cursor: pointer;
}

.menu-btn span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  position: relative;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

.menu-btn span::before,
.menu-btn span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s var(--ease), top 0.3s;
}

.menu-btn span::before { top: -5px; }
.menu-btn span::after { top: 5px; }
.menu-btn[aria-expanded="true"] span { background: transparent; }
.menu-btn[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 70px 0 auto 0;
  z-index: 55;
  display: none;
  flex-direction: column;
  max-height: calc(100dvh - 70px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 10px clamp(20px, 4vw, 48px) 28px;
  background: rgba(5, 6, 10, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px);
}

.mobile-menu a {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 18px;
  color: var(--ink);
}

.mobile-menu .btn { margin-top: 18px; align-self: flex-start; }
.mobile-menu.is-open { display: flex; box-shadow: 0 28px 60px rgba(0, 0, 0, 0.55); }

/* dim the page behind the open menu so the panel reads as a menu, and tapping
   the page dismisses it */
.menu-scrim {
  position: fixed;
  inset: 0;
  z-index: 54;
  background: rgba(5, 6, 10, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.menu-scrim.is-on { opacity: 1; pointer-events: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.3s, border-color 0.3s, color 0.3s;
}

.btn svg { width: 15px; height: 15px; flex: none; }
.btn:hover { border-color: rgba(255, 255, 255, 0.4); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #06070b;
  font-weight: 600;
}

.btn-primary:hover { background: var(--mint); border-color: var(--mint); color: #04100c; }

.btn-ghost { color: var(--muted); }
.btn-ghost:hover { color: var(--ink); }

.btn-sm { min-height: 38px; padding: 0 16px; font-size: 13px; }

/* ---------- type helpers ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.display {
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1.06;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.display em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--mint);
}

.lede {
  font-size: clamp(1rem, 1.25vw, 1.125rem);
  color: var(--muted);
  line-height: 1.7;
  max-width: 56ch;
}

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0ms);
}

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

/* ---------- footer ---------- */
.site-foot {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: clamp(48px, 6vw, 80px) 0 32px;
  background: var(--bg-2);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 36px;
}

.foot-brand p {
  margin-top: 16px;
  max-width: 30ch;
  color: var(--muted);
  font-size: 14px;
}

.foot-col h3 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 500;
  margin-bottom: 16px;
}

.foot-col a, .foot-col p {
  display: block;
  font-size: 14px;
  color: var(--muted);
  padding-block: 5px;
  transition: color 0.25s;
}

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

.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  justify-content: space-between;
  align-items: center;
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--dim);
}

.foot-bottom a { color: var(--muted); }
.foot-bottom a:hover { color: var(--ink); }

/* ---------- modal ---------- */
.notify {
  width: min(520px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: linear-gradient(170deg, #121620, #0a0c12 70%);
  color: var(--ink);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.65);
  overflow: hidden;
}

.notify::backdrop {
  background: rgba(3, 4, 8, 0.72);
  backdrop-filter: blur(6px);
}

.notify[open] { animation: modal-in 0.5s var(--ease) both; }
.notify[open]::backdrop { animation: fade-in 0.4s ease both; }
.notify.is-closing { animation: modal-out 0.28s var(--ease) both; }

@keyframes modal-in {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

@keyframes modal-out {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(10px) scale(0.98); }
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.notify-inner { padding: clamp(24px, 4vw, 36px); }

.notify-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.notify h2 {
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 500;
}

.notify h2 em { font-family: var(--serif); font-style: italic; color: var(--mint); }

.notify p.notify-sub { margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.6; }

.icon-btn {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, transform 0.3s var(--ease);
}

.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); transform: rotate(90deg); }

.field { margin-top: 22px; }

.field label {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 8px;
}

.field input, .field select, .field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  transition: border-color 0.25s, background 0.25s;
}

.field input::placeholder { color: var(--dim); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--mint);
  background: rgba(123, 247, 207, 0.05);
}

.field.has-error input { border-color: #ff7a7a; }

.field-error {
  display: none;
  margin-top: 7px;
  font-size: 12.5px;
  color: #ff9c9c;
}

.field.has-error .field-error { display: block; }

.notify-actions { margin-top: 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.notify-actions .btn { flex: 1 1 180px; }

.form-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--dim);
  line-height: 1.6;
}

.form-success { display: none; text-align: center; padding: 14px 0 4px; }
.form-success.is-on { display: block; animation: modal-in 0.5s var(--ease) both; }
.form-body.is-off { display: none; }

.success-mark {
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(123, 247, 207, 0.4);
  background: rgba(123, 247, 207, 0.1);
  color: var(--mint);
}

.success-mark svg { width: 22px; height: 22px; }

.form-success h3 { font-size: 22px; font-weight: 500; letter-spacing: -0.01em; }
.form-success p { margin-top: 8px; color: var(--muted); font-size: 14px; }
.success-code {
  margin-top: 18px;
  display: inline-block;
  padding: 8px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--mint);
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 90;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  padding: 11px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(12, 15, 22, 0.95);
  color: var(--ink);
  font-size: 13px;
  transition: opacity 0.3s, transform 0.4s var(--ease);
}

.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .nav { display: none; }
  .head-actions .btn { display: none; }
  .menu-btn { display: inline-flex; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .foot-grid { grid-template-columns: 1fr; }
  .brand { font-size: 12px; letter-spacing: 0.14em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
