/* ==========================================================================
   TRIAN INVEST — Design tokens
   Default palette: "Charcoal & Brass" — a precision-instrument dark theme.
   Two alternative palettes are provided below; to switch, comment out the
   default block and uncomment one alternative. Nothing else needs to change.
   ========================================================================== */

:root {
  /* --- Charcoal & Brass (default) --- */
  --ink:        #0A0C0F;   /* page background */
  --panel:      #12151A;   /* alternating section background */
  --hairline:   #262B31;   /* borders, dividers */
  --hairline-soft: #1A1E23;
  --paper:      #ECEAE4;   /* primary text, warm off-white */
  --muted:      #8B9096;   /* secondary text */
  --accent:     #B08D57;   /* brass — used sparingly */
  --accent-dim: rgba(176, 141, 87, 0.35);
  --accent-faint: rgba(176, 141, 87, 0.12);

  /* --- Alternative 1: "Deep Navy & Steel" ---
  --ink:        #0A0E14;
  --panel:      #10151D;
  --hairline:   #232B37;
  --hairline-soft: #171C24;
  --paper:      #E9ECF1;
  --muted:      #838C99;
  --accent:     #6C8CBF;
  --accent-dim: rgba(108, 140, 191, 0.35);
  --accent-faint: rgba(108, 140, 191, 0.12);
  */

  /* --- Alternative 2: "Graphite & Verdigris" ---
  --ink:        #0D0F0F;
  --panel:      #131615;
  --hairline:   #262B29;
  --hairline-soft: #191C1B;
  --paper:      #E8ECE9;
  --muted:      #8A9390;
  --accent:     #6FA98C;
  --accent-dim: rgba(111, 169, 140, 0.35);
  --accent-faint: rgba(111, 169, 140, 0.12);
  */

  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --container: 1180px;
  --gutter: clamp(1.5rem, 5vw, 4rem);
}

/* ==========================================================================
   Reset & base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-weight: 400; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--ink);
  padding: 0.75rem 1.25rem;
  z-index: 200;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.skip-link:focus { left: 1rem; top: 1rem; }

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

/* ==========================================================================
   Nav
   ========================================================================== */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem var(--gutter);
  background: linear-gradient(to bottom, rgba(10,12,15,0.85), rgba(10,12,15,0));
  transition: background 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(10, 12, 15, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}

.nav-mark {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-decoration: none;
  color: var(--paper);
}

.nav-links {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2.25rem);
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.nav-links a:hover,
.nav-links a:focus-visible { color: var(--paper); border-color: var(--accent); }

@media (max-width: 640px) {
  .nav-links { gap: 0.9rem; }
  .nav-links a { font-size: 0.62rem; letter-spacing: 0.06em; }
}

/* ==========================================================================
   Scroll gauge — persistent instrument motif, echoes the hero curve
   ========================================================================== */

.gauge {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  height: 40vh;
  width: 10px;
  z-index: 90;
  pointer-events: none;
}
.gauge-track {
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--hairline);
  transform: translateX(-50%);
}
.gauge-tick {
  position: absolute;
  left: 50%;
  top: 0;
  width: 9px;
  height: 1px;
  background: var(--accent);
  transform: translate(-50%, 0);
  box-shadow: 0 0 6px var(--accent-dim);
}
@media (max-width: 900px) {
  .gauge { display: none; }
}

/* ==========================================================================
   Hero — scroll-scrubbed frame sequence
   ========================================================================== */

.hero-wrapper {
  position: relative;
  height: 400vh; /* scroll distance available to scrub the sequence */
}

.hero-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--ink);
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(6,7,9,0.88) 0%, rgba(6,7,9,0.35) 42%, rgba(6,7,9,0.55) 100%);
  pointer-events: none;
}

.hero-content {
  position: absolute;
  left: var(--gutter);
  bottom: clamp(3rem, 10vh, 6rem);
  right: var(--gutter);
  max-width: 44rem;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero-content h1 {
  font-size: clamp(2.75rem, 8vw, 6rem);
  color: var(--paper);
  line-height: 0.98;
}

.claim {
  margin-top: 1.25rem;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  color: var(--muted);
  max-width: 32rem;
  font-weight: 300;
}

.scroll-hint {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(3rem, 10vh, 6rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.scroll-hint i {
  display: block;
  width: 1px;
  height: 34px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}
@media (max-width: 640px) {
  .scroll-hint { display: none; }
  .hero-content { right: var(--gutter); max-width: none; }
}

/* ==========================================================================
   Sections — shared rhythm
   ========================================================================== */

.section {
  padding: clamp(5rem, 12vw, 9rem) 0;
  border-top: 1px solid var(--hairline-soft);
}
.section--alt { background: var(--panel); }

.kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.1rem;
}

.section h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  max-width: 30ch;
  color: var(--paper);
}

.lede {
  margin-top: 1.5rem;
  max-width: 46rem;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--muted);
}

.fine-print {
  margin-top: 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

/* ---- Problem ---- */

.problem-grid {
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.value-shift {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border: 1px solid var(--hairline);
  padding: 2rem 1.75rem;
  background: var(--panel);
}
.v-from {
  font-family: var(--font-mono);
  font-size: 2.4rem;
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--hairline);
}
.v-arrow {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 1.1rem;
}
.v-to {
  font-family: var(--font-mono);
  font-size: 3.4rem;
  color: var(--accent);
  line-height: 1;
}
.v-label {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 22ch;
}

.text-block p { margin-top: 1.1rem; color: var(--muted); }
.text-block p:first-of-type { margin-top: 1.5rem; }
.text-block h2 { margin-top: 0.75rem; }

@media (max-width: 760px) {
  .problem-grid { grid-template-columns: 1fr; }
}

/* ---- Approach ---- */

.flow {
  margin-top: 3.5rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: stretch;
}
.flow-step {
  border-top: 1px solid var(--accent-dim);
  padding-top: 1.25rem;
}
.flow-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.flow-body { color: var(--muted); font-size: 0.98rem; }
.flow-connector {
  align-self: center;
  width: clamp(1rem, 3vw, 2.5rem);
  height: 1px;
  background: var(--hairline);
  margin-top: 0.6rem;
}

@media (max-width: 820px) {
  .flow { grid-template-columns: 1fr; }
  .flow-connector { display: none; }
  .flow-step { padding-top: 1.5rem; border-top: 1px solid var(--hairline); }
}

/* ---- Team / split ---- */

.split {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}
.split-divider { background: var(--hairline); }
.split-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper);
  margin-bottom: 0.85rem;
}
.split-col p:not(.split-tag) { color: var(--muted); }

@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; }
  .split-divider { display: none; height: 1px; }
}

/* ---- Audience ---- */

.audience-grid {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.75rem, 4vw, 2.5rem);
}
.audience-card {
  border-top: 1px solid var(--hairline);
  padding-top: 1.25rem;
}
.audience-card p:not(.split-tag) { color: var(--muted); font-size: 0.98rem; }

@media (max-width: 900px) {
  .audience-grid { grid-template-columns: 1fr; }
}

/* ---- Contact ---- */

.section--contact { border-top: 1px solid var(--hairline-soft); }
.contact-inner { text-align: center; }
.contact-inner h2 { margin: 0 auto; }
.contact-email {
  display: inline-block;
  margin-top: 2.25rem;
  font-family: var(--font-mono);
  font-size: clamp(1.3rem, 3.4vw, 2rem);
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-dim);
  padding-bottom: 0.35rem;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}
.contact-email:hover,
.contact-email:focus-visible { border-color: var(--accent); opacity: 0.85; }
.contact-secondary {
  display: inline-block;
  margin-top: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
}
.section--contact .fine-print { margin-top: 1.5rem; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--hairline-soft);
  padding: 2.25rem 0 3rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}
.footer-muted { color: var(--hairline); }
@media (max-width: 500px) {
  .footer-inner { flex-direction: column; gap: 0.5rem; }
}

/* ==========================================================================
   Scroll-reveal (progressive enhancement, see script.js)
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
