/* Shared site stylesheet — Trinity AI³ */

:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --fg: #ffffff;
  --fg-body: #d1d5db;
  --fg-dim: #9ca3af;
  --fg-mute: #6b7280;
  --accent: #4a9eff;
  --accent-hover: #7eb8ff;
  --accent-soft: rgba(74, 158, 255, 0.18);
  --accent-fade: rgba(74, 158, 255, 0.08);
  --accent-bg: rgba(74, 158, 255, 0.12);
  --border: rgba(255, 255, 255, 0.08);
  --nav-bg: rgba(10, 10, 10, 0.72);
  --nav-border: rgba(255, 255, 255, 0.06);
}
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--fg);
  background: var(--bg);
  overflow-x: hidden;
  position: relative;
  line-height: 1.7;
}

/* === Neural mesh (faint blue network background) === */
.neural {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  background: url('/neural-mesh.svg') center / cover no-repeat;
  opacity: 0.4;
  mix-blend-mode: screen;
}
@media (prefers-reduced-motion: reduce) { .neural { opacity: 0.3; } }

/* === Aurora === */
.aurora { position: fixed; inset: -20%; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora .blob {
  position: absolute; border-radius: 50%; filter: blur(120px);
  mix-blend-mode: screen; opacity: 0.5; will-change: transform;
}
.aurora .blob-a {
  width: 60vmax; height: 60vmax; top: -20%; left: -15%;
  background: radial-gradient(circle, rgba(60,120,255,0.32) 0%, transparent 60%);
  animation: drift-a 38s ease-in-out infinite alternate;
}
.aurora .blob-b {
  width: 55vmax; height: 55vmax; bottom: -25%; right: -10%;
  background: radial-gradient(circle, rgba(90,80,220,0.26) 0%, transparent 60%);
  animation: drift-b 52s ease-in-out infinite alternate;
}
.aurora .blob-c {
  width: 45vmax; height: 45vmax; top: 35%; left: 50%;
  background: radial-gradient(circle, rgba(74,158,255,0.22) 0%, transparent 65%);
  animation: drift-c 44s ease-in-out infinite alternate;
}
@keyframes drift-a { 0% { transform: translate(0,0) scale(1); } 100% { transform: translate(15vmax,8vmax) scale(1.15); } }
@keyframes drift-b { 0% { transform: translate(0,0) scale(1); } 100% { transform: translate(-12vmax,-10vmax) scale(1.1); } }
@keyframes drift-c { 0% { transform: translate(-50%,0) scale(1); } 100% { transform: translate(-50%,-6vmax) scale(1.18); } }
@media (prefers-reduced-motion: reduce) { .aurora .blob { animation: none; } }

/* === Topbar === */
nav.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0.875rem 1.75rem;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--nav-border);
}
nav.topbar .brand { justify-self: start; }
nav.topbar .links { justify-self: center; }
nav.topbar .brand {
  display: inline-flex; align-items: center; text-decoration: none; color: var(--fg);
  font-weight: 500; font-size: 0.875rem; letter-spacing: 0.16em; text-transform: uppercase;
}
nav.topbar .brand img {
  width: 28px; height: 28px; margin-right: 0.6rem;
  -webkit-user-select: none; user-select: none; object-fit: contain;
}
nav.topbar .brand sup { font-size: 0.7em; vertical-align: super; line-height: 0; margin-left: 0.05em; }
nav.topbar .links { display: flex; gap: 2rem; align-items: center; }
nav.topbar .links a {
  color: var(--fg-dim); text-decoration: none; font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; transition: color 160ms ease;
}
nav.topbar .links a:hover { color: var(--fg); }
nav.topbar .links a.active { color: var(--fg); }
nav.topbar .links .sep { display: none; }
@media (max-width: 980px) {
  nav.topbar .links { gap: 1.25rem; }
  nav.topbar .links a { font-size: 0.6875rem; letter-spacing: 0.14em; }
}
@media (max-width: 760px) {
  nav.topbar .links .marketing { display: none; }
  nav.topbar .links .sep.marketing { display: none; }
}
@media (max-width: 540px) {
  nav.topbar { padding: 0.75rem 1rem; }
  nav.topbar .brand span.wm { display: none; }
  nav.topbar .links { gap: 1rem; }
  nav.topbar .links a { font-size: 0.6875rem; letter-spacing: 0.12em; }
}

/* === Buttons (unified slim outlined) === */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.55rem 1.35rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  color: var(--fg-dim);
  font-size: 0.7rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
  text-decoration: none;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.btn:hover {
  color: var(--fg);
  border-color: rgba(255,255,255,0.42);
  background: rgba(255,255,255,0.04);
}

/* === Hero (used on landing + placeholder pages) === */
.hero {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start;
  padding: clamp(4.5rem, 8vh, 6.5rem) 1.5rem 0.5rem;
  text-align: center;
}
.hero img.logo {
  width: clamp(340px, 58vh, 620px);
  max-width: 88vw;
  height: auto;
  display: block; margin: 0 auto clamp(0.75rem, 1.5vh, 1.25rem);
  -webkit-user-select: none; user-select: none;
  filter: drop-shadow(0 0 100px var(--accent-soft));
}
.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 0 1.25rem;
}
.placeholder-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  margin: 1rem 0 0.5rem;
  color: var(--fg);
}
.placeholder-sub {
  color: var(--fg-mute);
  font-size: 0.8125rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* === Social row === */
nav.social {
  display: flex; gap: 0.875rem;
  justify-content: center; align-items: center;
  flex-wrap: wrap;
  max-width: 540px; margin: 0 auto;
}
nav.social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  color: var(--fg-mute);
  transition: color 160ms ease, background-color 160ms ease, box-shadow 200ms ease;
}
nav.social a:hover {
  color: var(--accent);
  background: rgba(74, 158, 255, 0.08);
  box-shadow: 0 0 22px var(--accent-soft);
}
nav.social svg { width: 18px; height: 18px; fill: currentColor; }

/* === Legal page main === */
main.legal {
  position: relative; z-index: 1;
  max-width: 680px; margin: 0 auto; padding: 6rem 1.5rem 4rem;
  font-size: 0.9375rem;
  line-height: 1.65;
}
.section-label {
  color: var(--fg-mute); font-size: 0.6875rem; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase; margin-bottom: 0.75rem;
}
main.legal h1 {
  font-size: 1.625rem;
  margin: 0 0 0.25rem;
  color: var(--fg-body);
  font-weight: 500;
  letter-spacing: -0.01em;
}
main.legal h2 {
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--fg-dim); margin: 2.25rem 0 0.625rem;
}
main.legal p { margin: 0 0 0.875rem; color: var(--fg-body); }
main.legal ul { padding-left: 1.1rem; margin: 0 0 0.875rem; color: var(--fg-body); }
main.legal li { margin: 0.25rem 0; }
main.legal a {
  color: var(--fg-dim);
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.18);
  text-underline-offset: 3px;
}
main.legal a:hover { color: var(--fg); text-decoration-color: var(--fg); }
main.legal strong { color: var(--fg-body); font-weight: 600; }
main.legal .meta {
  color: var(--fg-mute); font-size: 0.6875rem; letter-spacing: 0.18em;
  text-transform: uppercase; font-weight: 500;
  margin-bottom: 2.25rem;
}

/* === Wait list form === */
.waitlist-form {
  display: flex; gap: 0.625rem; flex-wrap: wrap;
  margin: 2rem 0 1rem;
  max-width: 480px;
}
.waitlist-form input[type=email] {
  flex: 1; min-width: 220px;
  padding: 0.6rem 1.05rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  color: var(--fg);
  font-family: inherit;
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.waitlist-form input[type=email]::placeholder { color: var(--fg-mute); }
.waitlist-form input[type=email]:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(74,158,255,0.06);
}
.waitlist-form .btn { white-space: nowrap; }
.waitlist-status {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  min-height: 1em;
}
.waitlist-status:empty { display: none; }

/* === Products grid (Tesla-veil reveal) === */
main.products {
  position: relative; z-index: 1;
  max-width: 1100px; margin: 0 auto; padding: 6rem 1.5rem 4rem;
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 2rem 0 0;
}
@media (max-width: 760px) {
  .products-grid { grid-template-columns: 1fr; max-width: 360px; margin-left: auto; margin-right: auto; }
}
.product-card {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.75rem 1.5rem 1.25rem;
  transition: border-color 220ms ease, background-color 220ms ease, transform 220ms ease;
  text-decoration: none;
}
.product-card:hover {
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.035);
  transform: translateY(-2px);
}
.product-card .product-art {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.product-card .product-art img {
  max-width: 75%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 32px rgba(74,158,255,0.28));
}
.product-card .product-art svg {
  width: 62%;
  height: auto;
  max-height: 100%;
  filter: drop-shadow(0 0 22px rgba(74,158,255,0.18));
}
.product-card .product-name {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin: 0;
  text-align: center;
}
.product-card .product-name sup { font-size: 0.7em; vertical-align: super; line-height: 0; }
.product-card.veiled .product-name { color: var(--fg-mute); letter-spacing: 0.22em; }

/* Tactical chrome — corner brackets (all four), catalog meta, status indicator */
.product-card .corner {
  position: absolute;
  width: 14px; height: 14px;
  pointer-events: none;
  border-color: rgba(255,255,255,0.24);
  border-style: solid;
  border-width: 0;
  transition: border-color 220ms ease;
}
.product-card .corner.tl { top: 0.5rem; left: 0.5rem; border-top-width: 1px; border-left-width: 1px; }
.product-card .corner.tr { top: 0.5rem; right: 0.5rem; border-top-width: 1px; border-right-width: 1px; }
.product-card .corner.bl { bottom: 0.5rem; left: 0.5rem; border-bottom-width: 1px; border-left-width: 1px; }
.product-card .corner.br { bottom: 0.5rem; right: 0.5rem; border-bottom-width: 1px; border-right-width: 1px; }
.product-card:hover .corner { border-color: rgba(74,158,255,0.55); }
.product-card .meta-row {
  position: absolute;
  top: 0.85rem; left: 1.05rem; right: 1.05rem;
  display: flex; justify-content: space-between; align-items: center;
  font-family: "SF Mono", "JetBrains Mono", "Consolas", "Roboto Mono", monospace;
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  color: var(--fg-mute);
  text-transform: uppercase;
  pointer-events: none;
}
.product-card .status { display: inline-flex; align-items: center; gap: 0.4rem; }
.product-card .status::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--fg-mute);
}
.product-card.active .status { color: var(--accent); }
.product-card.active .status::before {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(74,158,255,0.7);
  animation: pulse-dot 2s ease-in-out infinite;
}
.product-card.veiled .status { color: #c08a3d; }
.product-card.veiled .status::before { background: #d49545; box-shadow: 0 0 6px rgba(212,149,69,0.45); }
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.product-card.veiled svg { animation: bh-breath 7s ease-in-out infinite; }
@keyframes bh-breath {
  0%, 100% { opacity: 0.92; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.03); }
}
@media (prefers-reduced-motion: reduce) {
  .product-card.active .status::before { animation: none; }
  .product-card.veiled svg { animation: none; }
}
main.legal footer {
  margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid var(--border);
  color: var(--fg-mute); font-size: 0.8125rem; text-align: center; letter-spacing: 0.05em;
}
main.legal footer a { color: var(--fg-mute); }
main.legal footer a:hover { color: var(--fg); text-decoration: none; }
.nm { letter-spacing: 0.02em; font-weight: 500; color: var(--fg); }
.nm sup { font-size: 0.7em; vertical-align: super; line-height: 0; }

/* === Site footer (multi-column, muted) === */
footer.site-footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  padding: 1.75rem 1.5rem 1.5rem;
  margin-top: 1.25rem;
  background: rgba(0,0,0,0.4);
}
footer.site-footer .footer-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.75rem 2rem;
}
footer.site-footer .col h4 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin: 0 0 1rem;
}
footer.site-footer .col a {
  display: block;
  color: var(--fg-dim);
  text-decoration: none;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  padding: 0.25rem 0;
  transition: color 160ms ease;
}
footer.site-footer .col a:hover { color: var(--fg); }
footer.site-footer .footer-bottom {
  max-width: 1100px;
  margin: 1.75rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
footer.site-footer .footer-bottom p {
  margin: 0;
  color: var(--fg-mute);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}
footer.site-footer .footer-bottom .brand-mini {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--fg-mute);
  font-size: 0.6875rem; letter-spacing: 0.18em; text-transform: uppercase;
  text-decoration: none;
}
footer.site-footer .footer-bottom .brand-mini img {
  width: 18px; height: 18px; opacity: 0.6;
}
footer.site-footer .footer-bottom .brand-mini sup { font-size: 0.7em; vertical-align: super; line-height: 0; }
