/* ==========================================================================
   143 Meridian — site styles
   Design language ported from the Truestar app design system:
   near-black canvas, glass surfaces, gold reserved for worth/product moments,
   white interactive chrome, SF Pro system stack.
   ========================================================================== */

:root {
  /* Backgrounds (Truestar tsBg / tsBgSecondary / tsBgTertiary) */
  --bg: #0a0a0a;
  --bg-2: #111111;
  --bg-3: #1a1a1a;

  /* Text (tsTextPrimary / tsTextSecondary / tsTextMuted) */
  --text: #ffffff;
  --text-2: #888888;
  --muted: #666666;

  /* Borders (tsBorder / tsBorderStrong) */
  --border: #222222;
  --border-strong: #333333;

  /* Gold — reserved for the star, the product, and moments of worth */
  --gold: #F5A623;
  --gold-light: #FFD07A;
  --gold-deep: #B8731A;

  /* Glass surface */
  --glass: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
          Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100dvh;
}

::selection { background: rgba(245, 166, 35, 0.3); }

h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }

a { color: var(--text); text-underline-offset: 3px; }

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 50;
  padding: 10px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* --------------------------------------------------------------------------
   Nav — glass bar, white for the current page, muted otherwise
   -------------------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  /* Bar spans full width; contents cap at ~1000px so the wordmark and
     links don't drift apart on wide screens */
  padding: 18px max(24px, calc((100% - 1000px) / 2));
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.wordmark {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.nav ul {
  display: flex;
  gap: clamp(10px, 2.5vw, 28px);
  list-style: none;
}

.nav ul a {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
  text-decoration: none;
  padding: 12px 2px;
  transition: color 150ms var(--ease-out);
}

.nav ul a[aria-current="page"] { color: var(--text); }

@media (hover: hover) and (pointer: fine) {
  .nav ul a:hover { color: var(--text); }
}

@media (max-width: 560px) {
  .nav { flex-wrap: wrap; padding-bottom: 8px; }
  .nav ul { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
}

/* --------------------------------------------------------------------------
   Page scaffold
   -------------------------------------------------------------------------- */

main { display: block; }

section {
  position: relative;
  padding: clamp(64px, 10vh, 112px) 24px;
}

.inner { max-width: 880px; margin: 0 auto; }
.inner-narrow { max-width: 720px; margin: 0 auto; }

/* Caps kicker — Truestar section-header grammar (11pt semibold, tracked, muted) */
.kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}

section h1 {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin-bottom: 20px;
}

section h2 {
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

section h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

section p {
  font-size: clamp(16px, 1.9vw, 17px);
  line-height: 1.7;
  color: var(--text-2);
  max-width: 65ch;
}

section p + p { margin-top: 16px; }
section p strong { color: var(--text); font-weight: 600; }

.divider {
  max-width: 880px;
  margin: 0 auto;
  border: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-strong), transparent);
}

/* --------------------------------------------------------------------------
   Glass cards — Truestar standard card: 20pt padding, 20pt radius
   -------------------------------------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 44px;
  list-style: none;
}

.glass-card {
  padding: 22px 20px 24px;
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  transition: border-color 200ms var(--ease-out), transform 200ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  a.glass-card:hover,
  .card-grid .glass-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
  }
}

.glass-card .glyph {
  display: block;
  color: var(--gold);
  font-size: 18px;
  margin-bottom: 12px;
}

.glass-card h3 { color: var(--text); }

.glass-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-2);
}

/* --------------------------------------------------------------------------
   Buttons — white interactive chrome; gold reserved for the product CTA
   -------------------------------------------------------------------------- */

/* iiSU CTA grammar: gradient stroke border (accent → accent 0.35) over a
   tinted fill, monospaced ALL CAPS, min-height 52px, radius 14. Never solid pills. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 14px;
  transition: filter 150ms var(--ease-out), transform 120ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }

.btn-ghost {
  color: var(--text);
  background:
    linear-gradient(rgb(24, 24, 24), rgb(24, 24, 24)) padding-box,
    linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.12)) border-box;
}

.btn-gold {
  color: var(--gold-light);
  background:
    linear-gradient(rgb(45, 33, 14), rgb(45, 33, 14)) padding-box,
    linear-gradient(180deg, var(--gold), rgba(245, 166, 35, 0.35)) border-box;
}

@media (hover: hover) and (pointer: fine) {
  .btn-ghost:hover, .btn-gold:hover { filter: brightness(1.25); }
}

/* --------------------------------------------------------------------------
   Hero (home) — starfield + the star
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: min(92dvh, 900px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 48px 24px 72px;
}

.starfield {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.starfield span {
  position: absolute;
  border-radius: 50%;
  background: #fff7e8;
  opacity: 0.14;
  animation: twinkle var(--d, 4s) ease-in-out var(--delay, 0s) infinite;
}

.starfield span.bright {
  background: #fffdf7;
  box-shadow: 0 0 6px 1px rgba(255, 224, 160, 0.7);
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent 80%, var(--bg) 100%);
}

.hero-star {
  position: relative;
  z-index: 1;
  width: clamp(180px, 28vw, 250px);
  height: clamp(180px, 28vw, 250px);
  margin-bottom: 8px;
}

.hero-star svg { overflow: visible; }

/* Layered bloom shells sway via SVG animateTransform (see index.html) —
   SMIL rotates about the user-space origin, which is the star's centre.
   The reduced-motion pause is handled in JS with svg.pauseAnimations(). */

.hero-copy { position: relative; z-index: 1; }

.hero-copy h1 {
  font-size: clamp(24px, 3.6vw, 36px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  line-height: 1.12;
  margin-bottom: 0;
}

.hero-copy .tagline {
  margin-top: 14px;
  font-size: clamp(16px, 2.2vw, 19px);
  color: var(--text-2);
  letter-spacing: 0.01em;
}

.hero-cta {
  margin-top: 36px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Product page bits
   -------------------------------------------------------------------------- */

.product-mark {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.product-mark h1, .product-mark h2 { margin-bottom: 0; }

/* Status chip — quiet neutral metadata, never competes with the wordmark */
.badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  padding: 5px 10px;
}

/* Signup */

.signup { margin-top: 48px; max-width: 460px; }

.signup-label {
  color: var(--text-2);
  font-size: 15px;
  margin-bottom: 14px;
}

.signup-row { display: flex; gap: 8px; }

.signup input[type="email"] {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: var(--bg-3);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  transition: border-color 150ms var(--ease-out);
}

.signup input[type="email"]::placeholder { color: var(--muted); }
.signup input[type="email"]:focus-visible {
  outline: none;
  border-color: var(--gold);
}

.signup button {
  height: 52px;
  padding: 0 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-light);
  background:
    linear-gradient(rgb(45, 33, 14), rgb(45, 33, 14)) padding-box,
    linear-gradient(180deg, var(--gold), rgba(245, 166, 35, 0.35)) border-box;
  border: 1px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 120ms var(--ease-out), filter 150ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .signup button:hover { filter: brightness(1.25); }
}
.signup button:active { transform: scale(0.97); }
.signup button:disabled { opacity: 0.6; cursor: default; }

.form-msg {
  min-height: 22px;
  margin-top: 12px;
  font-size: 15px;
  color: var(--text-2);
}
.form-msg.ok { color: var(--gold); }

.hp { display: none; }

/* --------------------------------------------------------------------------
   Support / FAQ
   -------------------------------------------------------------------------- */

.faq { margin-top: 36px; display: grid; gap: 12px; }

.faq details {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 0 20px;
  transition: border-color 200ms var(--ease-out);
}

.faq details[open] { border-color: var(--border-strong); }

.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  flex: none;
  color: var(--muted);
  font-size: 20px;
  font-weight: 400;
  transition: transform 200ms var(--ease-out);
}

.faq details[open] summary::after { transform: rotate(45deg); }

.faq details p {
  padding-bottom: 18px;
  font-size: 15px;
  line-height: 1.65;
}
.faq details p + p { margin-top: 10px; }

/* --------------------------------------------------------------------------
   Contact / info rows
   -------------------------------------------------------------------------- */

.contact-line {
  font-size: clamp(18px, 2.6vw, 22px);
  color: var(--text);
  margin-top: 8px;
}
.contact-line a { color: var(--gold-light); }

/* Compact contact strip (home page) — the full contact page keeps its scale */
.contact-mini { padding: clamp(40px, 6vh, 64px) 24px; }
.contact-mini h2 { font-size: 20px; margin-bottom: 8px; }
.contact-mini p { font-size: 15px; }
.contact-mini .contact-line { font-size: 17px; margin-top: 4px; }

.info-list {
  margin-top: 36px;
  list-style: none;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--border);
}

.info-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  justify-content: space-between;
  padding: 16px 4px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}

.info-list .k {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  align-self: center;
}

.info-list .v { color: var(--text); }
.info-list .v a { color: var(--text); }

/* --------------------------------------------------------------------------
   Prose pages (privacy)
   -------------------------------------------------------------------------- */

.prose { padding-bottom: 96px; }

.prose h1 { margin-bottom: 8px; }

.prose .updated { color: var(--muted); font-size: 15px; }

.prose .rule {
  width: 48px;
  height: 1px;
  background: var(--gold);
  margin: 28px 0;
  border: 0;
  opacity: 0.7;
}

.prose h2 {
  font-size: 21px;
  margin: 44px 0 12px;
}

.prose ul { margin: 14px 0 0 22px; }
.prose li {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-2);
}
.prose li + li { margin-top: 8px; }
.prose li strong, .prose p strong { color: var(--text); }
.prose a { color: var(--gold-light); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px 48px;
}

.footer-inner {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.footer-inner a { color: var(--text-2); text-decoration: none; }
@media (hover: hover) and (pointer: fine) {
  .footer-inner a:hover { color: var(--text); text-decoration: underline; }
}

.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; }

/* --------------------------------------------------------------------------
   Animation
   -------------------------------------------------------------------------- */

.rise { animation: rise 900ms var(--ease-out) both; }
.rise-2 { animation: rise 900ms var(--ease-out) 150ms both; }
.rise-3 { animation: rise 900ms var(--ease-out) 300ms both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.12; transform: scale(0.8); }
  50%      { opacity: 0.9;  transform: scale(1.15); }
}

/* Truestar breathing: 3s cycle, 0.55 → 0.85 opacity */
@keyframes breathe {
  from { opacity: 0.55; }
  to   { opacity: 0.85; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .rise-2, .rise-3, .starfield span {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
  }
  .starfield span { opacity: 0.5; }
  .glass-card, .btn, .faq details { transition-duration: 0.01ms; }
}
