/* ============================================================
   ASTRONAUT - Absolute Return Quant Fund
   Concept: "The view from orbit" - dark, cinematic, invitation-only
   ============================================================ */

:root {
  /* palette - deep space */
  --bg:        #05070a;
  --bg-2:      #080b11;
  --panel:     #0b0e14;
  --ink:       #eef1f6;
  --ink-soft:  #aeb6c4;
  --ink-mute:  #6b7686;
  --line:      rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.05);
  /* cold platinum / ice - used with extreme restraint */
  --accent:    #a9c2d8;
  --accent-dim: rgba(169, 194, 216, 0.16);

  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --f-display: "Fraunces", Georgia, "Times New Roman", serif;
  --f-body:    "Jost", system-ui, -apple-system, sans-serif;
  --f-mono:    "Space Mono", ui-monospace, "SFMono-Regular", monospace;
}

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

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-weight: 300;
  font-size: clamp(16px, 1.05vw, 18px);
  line-height: 1.7;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* radial vignette + faint nebula tint for depth */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(40, 60, 90, 0.18), transparent 55%),
    radial-gradient(90% 60% at 80% 110%, rgba(80, 60, 110, 0.10), transparent 60%),
    var(--bg);
}

#stars {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.55;
  pointer-events: none;
}

/* soft light that trails the pointer */
#cursor-halo {
  position: fixed;
  top: 0;
  left: 0;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 3;
  background: radial-gradient(circle at center,
    rgba(169, 194, 216, 0.13),
    rgba(169, 194, 216, 0.05) 38%,
    transparent 68%);
  mix-blend-mode: screen;
  filter: blur(10px);
  opacity: 0;
  transition: opacity 0.7s var(--ease);
  will-change: transform;
}
#cursor-halo.on { opacity: 1; }

@media (prefers-reduced-motion: reduce), (hover: none), (pointer: coarse) {
  #cursor-halo { display: none !important; }
}

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

/* visually hidden, still read by screen readers + search engines */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

::selection { background: var(--accent-dim); color: #fff; }

/* ---------- shared ---------- */
.eyebrow,
.section-tag {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.italic { font-style: italic; }
.reg { font-size: 0.4em; vertical-align: super; color: var(--ink-mute); font-family: var(--f-body); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.6rem clamp(1.25rem, 4vw, 3.25rem);
  transition: background 0.5s var(--ease), border-color 0.5s var(--ease), padding 0.5s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(5, 7, 10, 0.72);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-bottom-color: var(--line);
  padding-top: 1.05rem;
  padding-bottom: 1.05rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
}
.logo-img {
  height: 18px;
  width: auto;
  display: block;
  opacity: 0.92; /* match the soft-white ink, avoid harsh pure-white */
}

/* brand mark + sparkles under the wordmark */
.brand { position: relative; display: inline-flex; }
.brand-sparkles {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  width: 100%;
  height: 30px;
  pointer-events: none;
  /* fade the whole effect out toward the edges, no hard box over the video */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
}
.brand-line {
  position: absolute;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.brand-line--wide { left: 0; width: 100%; opacity: 0.55; filter: blur(0.6px); }
.brand-line--narrow { left: 25%; width: 50%; opacity: 0.8; }
.brand-particles { position: absolute; inset: 0; }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 3vw, 2.75rem);
  font-family: var(--f-mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.nav-links a { position: relative; color: var(--ink-soft); transition: color 0.3s var(--ease); }
.nav-links a:hover { color: var(--ink); }
/* underline wipes in from the left on hover, out to the right */
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-login {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
}
.nav-login svg { transition: transform 0.3s var(--ease); }
.nav-login:hover svg { transform: translateX(4px); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  /* tall scroll runway → the hero stays pinned and lingers as you scroll */
  height: 220svh;
}
.hero-pin {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 7rem clamp(1.25rem, 4vw, 3.25rem) 6rem;
  overflow: hidden;
}

.hero-media {
  position: absolute; inset: 0; z-index: 0;
  /* ultimate fallback: poster always paints behind the video */
  background: #05070a url("assets/hero-poster.jpg") center / cover no-repeat;
}
.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* motion comes from scroll-scrubbing (main.js), not an idle loop */
  transform: scale(1.06);
  filter: saturate(105%) contrast(104%);
}
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(5,7,10,0.55) 0%, rgba(5,7,10,0.15) 26%, rgba(5,7,10,0.25) 60%, rgba(5,7,10,0.92) 100%),
    radial-gradient(80% 60% at 28% 42%, rgba(5,7,10,0.30), transparent 70%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
}
.hero .eyebrow { display: block; margin-bottom: 1.6rem; }

.hero-title {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(3.4rem, 11.5vw, 11rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.hero-title span { display: block; }
.hero-title .italic { color: var(--accent); font-weight: 400; }

.hero-sub {
  margin-top: 2.1rem;
  max-width: 30ch;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.65;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 2.4rem;
  transform: translateX(-50%);
  z-index: 2;
  width: 24px; height: 40px;
  border: 1px solid var(--line);
  border-radius: 20px;
  display: grid;
  place-items: start center;
  padding-top: 7px;
}
.scroll-cue span {
  width: 3px; height: 8px;
  border-radius: 3px;
  background: var(--accent);
  animation: scrollPulse 2.2s var(--ease) infinite;
}
@keyframes scrollPulse {
  0%   { opacity: 0; transform: translateY(-3px); }
  35%  { opacity: 1; }
  70%  { opacity: 0; transform: translateY(11px); }
  100% { opacity: 0; }
}

/* ============================================================
   SECTIONS - generic rhythm
   ============================================================ */
section { position: relative; z-index: 1; }

.ethos, .quiet, .access {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(6rem, 14vh, 11rem) clamp(1.25rem, 4vw, 3.25rem);
}

.section-tag { display: block; margin-bottom: 2.4rem; }

/* ETHOS */
.lede {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(2rem, 5.4vw, 4.3rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  max-width: 16ch;
}
.lede em { font-style: italic; color: var(--accent); }

.triad {
  list-style: none;
  margin-top: clamp(3rem, 7vh, 5.5rem);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border-block: 1px solid var(--line-soft);
}
.triad li {
  position: relative;
  overflow: hidden;
  background: var(--bg);
  padding: 2.4rem 1.8rem 2.6rem;
  transition: background 0.55s var(--ease);
}
.triad .t {
  display: inline-block;
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(1.25rem, 2.4vw, 1.9rem);
  letter-spacing: -0.01em;
  color: var(--ink);
  transition: transform 0.55s var(--ease), color 0.55s var(--ease);
  will-change: transform;
}
/* handcrafted hover: a faint glow lifts from below, the principle rises,
   and an accent hairline draws across the foot of the cell */
.triad li::after {
  content: "";
  position: absolute;
  left: 1.8rem;
  right: 1.8rem;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0.7;
  transition: transform 0.6s var(--ease);
}
@media (hover: hover) {
  .triad li:hover {
    background: radial-gradient(130% 90% at 50% 130%, rgba(169, 194, 216, 0.09), transparent 62%), var(--bg);
  }
  .triad li:hover .t { transform: translateY(-3px); color: #fff; }
  .triad li:hover::after { transform: scaleX(1); }
}

/* DOCTRINE founders statement */
.doctrine-statement {
  margin-top: clamp(3rem, 7vh, 5rem);
  max-width: 32ch;
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.doctrine-coda {
  margin-top: 1.7rem;
  font-family: var(--f-mono);
  font-size: 0.76rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

/* QUIET divider */
.quiet { text-align: center; }
.quiet-line {
  font-family: var(--f-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.8rem, 4.6vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.quiet-sub {
  margin: 1.6rem auto 0;
  max-width: 46ch;
  color: var(--ink-soft);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.012em;
}

/* ACCESS */
.access { text-align: left; max-width: 760px; }
.access-title {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
}
.access-body {
  margin-top: 1.8rem;
  color: var(--ink-soft);
  max-width: 46ch;
}
.access-actions {
  margin-top: 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 1.05rem 1.7rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.4s var(--ease);
}
.btn svg { transition: transform 0.3s var(--ease); }
.btn-primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 14px 38px -14px rgba(169, 194, 216, 0.55);
  transform: translateY(-1px);
}
.btn-primary:hover svg { transform: translateX(4px); }
.btn-ghost { color: var(--ink-soft); }
.btn-ghost:hover { color: var(--ink); border-color: var(--accent); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--line);
  padding: clamp(3.5rem, 7vh, 5rem) clamp(1.25rem, 4vw, 3.25rem) 3rem;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.4));
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
}

/* brand row */
.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-brand { display: inline-block; line-height: 0; }
.footer .logo-img { height: 26px; opacity: 0.9; }
.footer-nav {
  display: flex;
  gap: 2rem;
  font-family: var(--f-mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.footer-nav a { position: relative; color: var(--ink-soft); transition: color 0.3s var(--ease); }
.footer-nav a:hover { color: var(--accent); }
.footer-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.footer-nav a:hover::after { transform: scaleX(1); transform-origin: left; }

/* hairline */
.footer-rule {
  height: 1px;
  background: var(--line);
  margin: 2.4rem 0;
}

/* labelled fine print */
.footer-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.2rem;
}
@media (min-width: 760px) {
  /* equal columns, flush to both edges → squared, justified blocks */
  .footer-cols { grid-template-columns: 1fr 1fr 1fr; gap: 2.5rem; }
}
.footer-col p {
  color: #98a1b0;
  font-size: 0.8rem;
  line-height: 1.8;
  text-align: justify;
  text-justify: inter-word;
  -webkit-hyphens: auto;
  hyphens: auto;
}
.footer-col strong { color: var(--ink-soft); font-weight: 500; }
.footer-label {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.7;
  margin-bottom: 0.9rem !important;
}

/* bottom bar */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.footer-loc { color: var(--ink-soft); }
.footer-loc .heart {
  color: var(--accent);
  margin: 0 0.18em;
  vertical-align: -1px;
}

/* ============================================================
   LOGIN / MEMBER ACCESS PORTAL (login.html)
   ============================================================ */
.auth-body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
.auth-main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 8rem 1.5rem 4rem;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0));
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: clamp(2rem, 5vw, 3rem);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.auth-eyebrow {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1rem;
}
.auth-title {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-bottom: 0.7rem;
}
.auth-intro {
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.7;
  margin-bottom: 2.2rem;
}
.field { margin-bottom: 1.3rem; }
.field label {
  display: block;
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.6rem;
}
.field input {
  width: 100%;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1rem;
  padding: 0.95rem 1rem;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.field input::placeholder { color: #4b5564; }
.field input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0,0,0,0.5);
}

.auth-error {
  display: none;
  align-items: flex-start;
  gap: 0.6rem;
  border: 1px solid rgba(214, 122, 122, 0.4);
  background: rgba(120, 40, 40, 0.14);
  border-radius: 2px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.4rem;
  color: #e9c4c4;
  font-size: 0.85rem;
  line-height: 1.5;
}
.auth-error.show { display: flex; }
.auth-error svg { flex: 0 0 auto; margin-top: 2px; color: #d67a7a; }

.btn-block {
  width: 100%;
  justify-content: center;
  padding-top: 1.05rem;
  padding-bottom: 1.05rem;
}
.btn[aria-busy="true"] { opacity: 0.7; pointer-events: none; }

.auth-foot {
  margin-top: 1.8rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
  color: #868f9f;
  font-size: 0.82rem;
  line-height: 1.7;
}
.auth-foot a { color: var(--ink-soft); border-bottom: 1px solid var(--line); transition: color 0.25s var(--ease); }
.auth-foot a:hover { color: var(--accent); }

.auth-back {
  position: fixed;
  top: 1.6rem;
  left: clamp(1.25rem, 4vw, 3.25rem);
  z-index: 50;
}

.auth-backlink {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-top: 1.9rem;
  font-family: var(--f-mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color 0.25s var(--ease);
}
.auth-backlink:hover { color: var(--ink); }
.auth-backlink svg { transition: transform 0.3s var(--ease); }
.auth-backlink:hover svg { transform: translateX(-4px); }

/* 404 */
.notfound { text-align: center; max-width: 540px; }
.nf-title {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0.5rem 0 0;
}
.nf-sub {
  margin-top: 1.1rem;
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.6;
}
.notfound .auth-backlink { margin-top: 2.2rem; }

/* ============================================================
   REVEAL animations
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  filter: blur(6px);
  transition:
    opacity 1s var(--ease) var(--d, 0s),
    transform 1s var(--ease) var(--d, 0s),
    filter 1s var(--ease) var(--d, 0s);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 720px) {
  .triad { grid-template-columns: 1fr; }
  .triad li { padding: 1.8rem 1.4rem; }
  .nav { padding: 1.15rem 1.25rem; }
  .logo-img { height: 15px; }
  .footer .logo-img { height: 18px; }
  .nav-links { gap: 1.2rem; font-size: 0.68rem; }
  .hero-sub { max-width: 100%; }
}

@media (max-width: 480px) {
  .nav { padding-left: 1rem; padding-right: 1rem; }
  .nav-links { gap: 1.1rem; }
  .nav-login svg { display: none; }  /* drop the lone arrow; keep the LOG IN label */
  .logo-img { height: 13px; }        /* slightly smaller so both labels fit on one line */
}

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