/* Shared site stylesheet — Trinity AI³
   Visual flattening 2026-04-28: single 15px / weight 400-or-600 / no transform / no
   letter-spacing / uniform #6b7280 across every text element on every page. Mirrors
   the macrohardeneddiscipline.com gold-standard palette. */

:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --fg: #6b7280;
  --border: rgba(107, 114, 128, 0.16);
  --nav-bg: rgba(10, 10, 10, 0.72);
  --nav-border: rgba(107, 114, 128, 0.14);
}

html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--fg);
  background: var(--bg);
  overflow-x: hidden;
  position: relative;
  line-height: 1.7;
  font-size: 15px;
  font-weight: 400;
}

/* Global flattening: every text element uniform palette unless explicitly bumped to weight 600 for emphasis */
body, body * {
  color: #6b7280;
  text-transform: none;
  letter-spacing: 0;
}
body :is(h1, h2, h3, h4, h5, h6, p, a, span, li, label, strong, em, button, input, textarea, select, sup) {
  font-size: 15px;
  font-weight: 400;
  font-family: inherit;
  line-height: 1.65;
}
body strong, body b { font-weight: 600; }
body h1, body h2, body h3, body h4 { font-weight: 600; margin: 1.25rem 0 0.5rem; }

/* Superscript stays superscript visually, but body text reads it as part of the run */
sup {
  font-size: 0.7em !important;
  vertical-align: super;
  line-height: 0;
  margin-left: 0.05em;
}

/* === Background atmospherics === */
.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 { 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; display: inline-flex; align-items: center; text-decoration: none; }
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 span,
nav.topbar .brand a { font-weight: 600; }
nav.topbar .links { justify-self: center; display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
nav.topbar .links a {
  text-decoration: none;
  transition: color 160ms ease;
}
nav.topbar .links a:hover { color: #9ca3af; }
@media (max-width: 760px) { nav.topbar .links .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; }
}

/* === Buttons (slim outlined, single 15px / weight 600 emphasis) === */
.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;
  text-decoration: none;
  font-weight: 600 !important;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
  cursor: pointer;
  -webkit-user-select: none; user-select: none;
}
.btn:hover {
  color: #9ca3af;
  border-color: rgba(255,255,255,0.42);
  background: rgba(255,255,255,0.04);
}

/* === Hero === */
.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 rgba(107, 114, 128, 0.18));
}
.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 0 1.25rem;
}
.placeholder-title { margin: 1rem 0 0.5rem; font-weight: 600; }
.placeholder-sub { margin: 0; }

/* === Launch copy === */
.launch-copy {
  position: relative; z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 0.25rem 1.5rem 1.5rem;
  text-align: center;
}
.launch-copy p { margin: 0.5rem 0; }
.launch-copy .lc-payoff,
.launch-copy .lc-cta { font-weight: 600; }

/* === 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 .social-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  color: var(--fg);
  opacity: 0.5;
  cursor: default;
  -webkit-user-select: none; user-select: none;
}
nav.social svg { width: 18px; height: 18px; fill: currentColor; }

/* === Legal-style page main === */
main.legal {
  position: relative; z-index: 1;
  max-width: 680px; margin: 0 auto; padding: 6rem 1.5rem 4rem;
  line-height: 1.7;
}
main.legal.signin-redirect { text-align: center; }
#clerk-signin, #clerk-waitlist {
  margin: 2rem auto;
  min-height: 360px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
}
main.legal h1 { margin: 0 0 0.5rem; }
main.legal h2 { margin: 1.75rem 0 0.5rem; }
main.legal h3 { margin: 1.25rem 0 0.5rem; }
main.legal p { margin: 0 0 0.875rem; }
main.legal ul { padding-left: 1.1rem; margin: 0 0 0.875rem; }
main.legal li { margin: 0.25rem 0; }
main.legal a {
  text-decoration: underline;
  text-decoration-color: rgba(107, 114, 128, 0.4);
  text-underline-offset: 3px;
}
main.legal a:hover { color: #9ca3af; text-decoration-color: #9ca3af; }
main.legal .meta { margin-bottom: 2.25rem; }

/* === Wait list / contact form === */
.waitlist-form, .contact-form {
  display: flex; gap: 0.625rem; flex-wrap: wrap;
  margin: 2rem 0 1rem;
  max-width: 480px;
}
.contact-form {
  flex-direction: column;
  max-width: 540px;
}
.waitlist-form input[type=email],
.contact-form input,
.contact-form textarea,
.contact-form select {
  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;
  font-family: inherit;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.contact-form textarea { border-radius: 16px; min-height: 140px; resize: vertical; }
.waitlist-form input[type=email]::placeholder,
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #6b7280; opacity: 0.6; }
.waitlist-form input[type=email]:focus,
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-color: #9ca3af;
  background: rgba(255,255,255,0.06);
}
.waitlist-form .btn { white-space: nowrap; }
.waitlist-status, .contact-status {
  margin: 0.75rem 0 0;
  min-height: 1em;
}
.waitlist-status:empty, .contact-status:empty { display: none; }

/* === Products grid === */
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;
}
.product-card .product-art svg {
  width: 62%;
  height: auto;
  max-height: 100%;
}
.product-card .product-name {
  margin: 0;
  text-align: center;
  font-weight: 600;
}

/* Tactical chrome — corner brackets + status indicator (color flattened to gray) */
.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(107, 114, 128, 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;
  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: #6b7280;
}
.product-card.active .status::before {
  background: #6b7280;
  box-shadow: 0 0 8px rgba(107, 114, 128, 0.7);
  animation: pulse-dot 2s ease-in-out infinite;
}
.product-card.veiled .status::before {
  background: #6b7280;
  box-shadow: 0 0 6px rgba(107, 114, 128, 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; }
}

/* === Site footer (multi-column) === */
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 {
  margin: 0 0 0.75rem;
  font-weight: 600;
}
footer.site-footer .col a {
  display: block;
  text-decoration: none;
  padding: 0.2rem 0;
  transition: color 160ms ease;
}
footer.site-footer .col a:hover { color: #9ca3af; }
footer.site-footer .col span.disabled {
  display: block;
  opacity: 0.55;
  padding: 0.2rem 0;
  cursor: default;
  -webkit-user-select: none; user-select: none;
}
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; }
footer.site-footer .footer-bottom .brand-mini {
  display: inline-flex; align-items: center; gap: 0.5rem;
  text-decoration: none;
}
footer.site-footer .footer-bottom .brand-mini img {
  width: 18px; height: 18px; opacity: 0.6;
}
