/* =====================================================
   That Tomato — design tokens
   ===================================================== */
:root {
  --bg: #0a0a0a;
  --bg-alt: #120d0d;
  --paper: #f5f1ea;
  --tomato: #b91a00;
  --tomato-dark: #8b1400;
  --tomato-light: #d26a59;
  --leaf: #4c9a5b;
  --leaf-dark: #2f6b3c;
  --mustard: #f2c14e;
  --water: #6cc7e0;
  --water-light: #b9ecf7;
  --ink: #f5f1ea;
  --ink-dim: #8a8a85;
  --ink-faint: #4d4a45;
  --line: #2a2622;

  --font-display: 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --max-w: 760px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

::selection {
  background: var(--tomato);
  color: var(--paper);
}

:focus-visible {
  outline: 2px solid var(--mustard);
  outline-offset: 3px;
}

.is-hidden { display: none !important; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--tomato-light);
  margin: 0 0 1.5rem;
}

.wordmark {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(2.5rem, 8.5vw, 4.2rem);
  margin: 0 0 0.5rem;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.tagline {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--ink-dim);
  margin: 0 0 2.5rem;
  font-weight: 400;
}

/* =====================================================
   Pixel tomato mascot
   ===================================================== */
.pixel-tomato {
  position: relative;
  display: inline-block;
  filter: drop-shadow(0 0 40px rgba(229, 56, 79, 0.35));
  animation: tomato-breathe 4.5s ease-in-out infinite;
}

.pixel-tomato img {
  display: block;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.pixel-tomato--small {
  filter: drop-shadow(0 0 24px rgba(229, 56, 79, 0.3));
}

@keyframes tomato-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.pixel-tomato.is-shaking {
  animation: tomato-shake 0.4s ease;
}

@keyframes tomato-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px) rotate(-2deg); }
  40% { transform: translateX(7px) rotate(2deg); }
  60% { transform: translateX(-5px) rotate(-1deg); }
  80% { transform: translateX(4px) rotate(1deg); }
}

/* water droplets sliding down the tomato's skin, looping every few seconds */
.droplet {
  position: absolute;
  transform: scale(var(--droplet-scale, 1));
  transform-origin: top center;
  background: linear-gradient(200deg, var(--water-light) 15%, var(--water) 75%);
  box-shadow: inset -1px -1px 0 rgba(255,255,255,0.65), 0 1px 2px rgba(0,0,0,0.4);
  border-radius: 50% 50% 60% 60% / 60% 60% 100% 100%;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  animation-name: droplet-fall;
  animation-timing-function: ease-in;
  animation-iteration-count: infinite;
  animation-duration: 5.5s;
}

@keyframes droplet-fall {
  0%, 55% {
    opacity: 0;
    transform: scale(var(--droplet-scale, 1)) translateY(0) scaleY(0.55);
  }
  62% {
    opacity: 0.95;
    transform: scale(var(--droplet-scale, 1)) translateY(calc(var(--droplet-fall, 20px) * 0.12)) scaleY(0.75);
  }
  85% {
    opacity: 0.9;
    transform: scale(var(--droplet-scale, 1)) translateY(var(--droplet-fall, 20px)) scaleY(1);
  }
  97%, 100% {
    opacity: 0;
    transform: scale(var(--droplet-scale, 1)) translateY(calc(var(--droplet-fall, 20px) * 1.08)) scaleY(1.05);
  }
}

/* =====================================================
   Grain / atmosphere
   ===================================================== */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.05;
  background-image: radial-gradient(rgba(255,255,255,0.6) 0.5px, transparent 0.5px);
  background-size: 3px 3px;
}

/* =====================================================
   GATE VIEW
   ===================================================== */
#gate-view {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  position: relative;
  background:
    radial-gradient(ellipse 60% 45% at 50% 32%, rgba(229,56,79,0.14), transparent 70%),
    var(--bg);
}

.gate-inner {
  position: relative;
  z-index: 2;
  max-width: 420px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.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;
}

#gate-view .pixel-tomato {
  margin-bottom: 2rem;
}

.wordmark--hero { font-size: clamp(2.1rem, 6.5vw, 3rem); margin-bottom: 2.5rem; }

#gate-view .wordmark {
  font-size: clamp(2.2rem, 7vw, 3.6rem);
  margin-bottom: 2.5rem;
}

.code-form {
  width: 100%;
}

.code-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}

.code-input {
  flex: 1 1 220px;
  background: #151010;
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  letter-spacing: 0.25em;
  text-align: center;
  text-transform: uppercase;
  padding: 0.85em 1em;
  border-radius: 6px;
  transition: border-color 0.2s ease;
}

.code-input::placeholder {
  color: var(--ink-faint);
  letter-spacing: 0.4em;
}

.code-input:focus {
  border-color: var(--tomato);
}

.code-submit {
  flex: 0 0 auto;
  background: var(--tomato);
  color: var(--paper);
  border: none;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  padding: 0.85em 1.4em;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.code-submit:hover { background: var(--tomato-light); }
.code-submit:active { transform: scale(0.97); }

.code-hint {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-faint);
  margin: 0.9rem 0 0;
  min-height: 1.2em;
}

.code-hint.is-error { color: var(--tomato-light); }
.code-hint.is-success { color: var(--leaf); }

.gate-contact {
  display: inline-block;
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-faint);
  text-decoration: none;
  transition: color 0.2s ease;
}

.gate-contact:hover { color: var(--tomato-light); }

/* =====================================================
   PITCH VIEW
   ===================================================== */
#pitch-view {
  background: var(--bg);
}

.pitch-hero {
  min-height: 90svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
  background:
    radial-gradient(ellipse 60% 45% at 50% 30%, rgba(229,56,79,0.12), transparent 70%),
    var(--bg);
}

.pitch-hero .pixel-tomato { margin-bottom: 1.5rem; }

.scroll-cue {
  margin-top: 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-faint);
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 0.6em 1.1em;
  border-radius: 100px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.scroll-cue:hover {
  border-color: var(--tomato);
  color: var(--tomato-light);
}

/* =====================================================
   Scroll progress bar
   ===================================================== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  height: 5px;
}

.scroll-progress__track {
  position: absolute;
  inset: 0;
  background: var(--line);
}

.scroll-progress__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--tomato-dark), var(--tomato));
  transition: width 0.08s linear;
}

/* dossier side nav */
.dossier-nav {
  position: fixed;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dossier-nav a {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  text-decoration: none;
  padding: 0.35em 0.7em;
  border-radius: 3px;
  border-left: 2px solid transparent;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(6px);
  max-width: 0;
  overflow: hidden;
  transition: color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, max-width 0.2s ease, transform 0.2s ease;
}

.dossier-nav a.is-active {
  color: var(--tomato-light);
  border-left-color: var(--tomato);
  opacity: 1;
  max-width: 220px;
  transform: translateX(0);
}

@media (max-width: 900px) {
  .dossier-nav { display: none; }
}

/* file sections */
.file-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 6rem 1.5rem;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.file-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fan mode hides investor-facing content (Roadmap, The Ask) entirely,
   both the section itself and its dossier nav entry. Investor mode
   shows everything, this rule only ever applies under .mode-fan. */
#pitch-view.mode-fan .investor-only {
  display: none !important;
}

.file-section--alt {
  max-width: none;
  padding: 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* Alt sections wrap their content in .file-inner so the tab and the
   title always share the exact same centered column as normal
   sections (fixes the misalignment from centering children individually). */
.file-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 6rem 1.5rem;
}

.file-tab {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--tomato);
  border: 1px solid var(--tomato-dark);
  padding: 0.3em 0.7em;
  border-radius: 3px;
  margin: 0 0 1.25rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 4.2vw, 2.4rem);
  margin: 0 0 1.5rem;
  letter-spacing: -0.02em;
}

.section-body p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #dcd8d0;
  margin: 0 0 1.1rem;
  font-weight: 400;
}

.section-body .lede {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--ink);
}

/* music authenticity callout */
.callout {
  margin-top: 2rem;
  background: #151010;
  border: 1px solid var(--tomato-dark);
  border-left: 3px solid var(--tomato);
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
}

.callout__label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tomato-light);
  margin: 0 0 0.75rem !important;
}

.callout p:last-child {
  font-size: 0.98rem !important;
  line-height: 1.65;
  margin: 0 !important;
}

.transcript {
  margin-top: 2rem;
  background: #151010;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
}

.transcript__label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1rem !important;
}

.transcript p {
  font-size: 0.95rem !important;
  line-height: 1.65;
}

.pillar-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pillar-list li {
  position: relative;
  padding-left: 1.6rem;
  font-size: 1.02rem;
  line-height: 1.6;
  color: #dcd8d0;
}

.pillar-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  background: var(--tomato);
  border-radius: 50%;
}

.tone-note {
  font-size: 0.92rem !important;
  color: var(--ink-faint) !important;
  font-style: italic;
}

/* timeline */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 2px solid var(--line);
}

.timeline li {
  position: relative;
  padding: 0 0 2.25rem 1.75rem;
}

.timeline li:last-child { padding-bottom: 0; }

.timeline li::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 0.4em;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--tomato);
  border: 2px solid var(--bg);
}

.timeline__when {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tomato-light);
  margin-bottom: 0.35rem;
}

.timeline h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0 0 0.4rem;
  letter-spacing: -0.01em;
}

.timeline p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-dim);
  margin: 0;
}

.timeline__cost {
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

/* ask */
.ask-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
  margin: 2rem 0 1.5rem;
}

.ask-card {
  background: #151010;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.5rem;
}

.ask-card--highlight {
  border-color: var(--tomato-dark);
  background: linear-gradient(160deg, #1c1112, #151010);
}

.ask-card__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 0.5rem;
}

.ask-card__amount {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.8rem;
  color: var(--tomato-light);
  margin: 0 0 0.6rem;
  letter-spacing: -0.02em;
}

.ask-card p:last-child {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-dim);
  margin: 0;
}

.ask-note {
  font-size: 0.88rem !important;
  color: var(--ink-faint) !important;
}

/* demo tracks */
.demo-tracks {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.demo-track {
  background: #151010;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
}

.demo-track__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
}

.demo-track audio {
  width: 100%;
  display: block;
}

.demo-track__note {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-faint);
  margin: 0.6rem 0 0;
}

.demo-track__note code {
  background: #0a0a0a;
  padding: 0.1em 0.4em;
  border-radius: 3px;
}

/* contact */
.contact-section {
  max-width: none;
  text-align: center;
  padding: 7rem 1.5rem 5rem;
  background:
    radial-gradient(ellipse 60% 50% at 50% 20%, rgba(229,56,79,0.1), transparent 70%),
    var(--bg);
}

.contact-section .file-tab { margin-top: 1.5rem; }

.contact-email {
  display: inline-block;
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--tomato-light);
  text-decoration: none;
  border-bottom: 1px solid var(--tomato-dark);
  padding-bottom: 0.2em;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.contact-email:hover {
  color: var(--mustard);
  border-color: var(--mustard);
}

.footnote {
  margin-top: 3.5rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-faint);
}

@media (max-width: 480px) {
  .code-row { flex-direction: column; }
  .code-submit { width: 100%; }
}
