/* ===================================================================
   Ypotheto — marketing landing page
   Standalone: no relationship to the app in frontend/ or backend/.
   Design language mirrors the app's "warm technical paper" system
   (frontend/src/app/globals.css): #faf9f6 paper, dot grid, Manrope
   headings, JetBrains Mono labels, cobalt/copper accents, white
   cards with hard offset shadows.
   =================================================================== */

:root {
  --background: #faf9f6;
  --panel: #f4f3ef;
  --foreground: #1a1a1a;
  --card: #ffffff;
  --border-subtle: #dcdad4;
  --border-mid: #c5c2ba;
  --shadow-warm: #eae7e1;
  --shadow-warm-dk: #dcdad4;
  --cobalt: #0047ab;
  --rust: #c25a3f;
  --teal: #0f766e;
  --text-muted: #5e5e5e;
  --text-faint: #9b988f;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-head: "Manrope", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--background);
  background-image: radial-gradient(var(--border-subtle) 1px, transparent 1px);
  background-size: 24px 24px;
  background-attachment: fixed;
  color: var(--foreground);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(0, 71, 171, 0.15); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------------- shared ---------------- */

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.kicker::after {
  content: "";
  flex: 0 0 64px;
  height: 1px;
  background: var(--border-mid);
}

.kicker-fig {
  color: var(--cobalt);
  border: 1px solid var(--cobalt);
  background: rgba(0, 71, 171, 0.06);
  padding: 2px 8px;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  max-width: 720px;
  margin-bottom: 20px;
}

.section-sub {
  font-size: 16.5px;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 32px;
}

.accent { color: var(--cobalt); }

.accent-serif {
  color: var(--cobalt);
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
}

/* scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* buttons — app style: black, mono, hard shadow, press-down active */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: #ffffff;
  background: var(--foreground);
  border: 1px solid var(--foreground);
  border-radius: 6px;
  padding: 14px 24px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.1s ease;
  box-shadow: 3px 3px 0px 0px var(--shadow-warm-dk);
}

.btn:hover { background: #333333; }

.btn:active {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0px 0px var(--shadow-warm-dk);
}

.btn:disabled { opacity: 0.6; cursor: wait; }

.btn-small { padding: 9px 16px; font-size: 11px; box-shadow: 2px 2px 0px 0px var(--shadow-warm-dk); }

/* ---------------- nav ---------------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--foreground);
}

.nav-logobox {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px; width: 36px;
  background: var(--card);
  border: 1px solid var(--border-mid);
  border-radius: 6px;
  box-shadow: 1.5px 1.5px 0px 0px var(--shadow-warm);
}

.nav-logo { height: 26px; width: 26px; object-fit: contain; }

.nav-wordmark {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-doc {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--text-faint);
  border-left: 1px solid var(--border-subtle);
  padding-left: 10px;
  margin-left: 2px;
}

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

/* ---------------- hero ---------------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 130px 24px 80px;
}

#net-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* blueprint registration marks in the hero corners */
.hero-marks .mark {
  position: absolute;
  width: 22px; height: 22px;
  border-color: var(--border-mid);
  border-style: solid;
  border-width: 0;
}
.mark-tl { top: 84px;  left: 20px;  border-top-width: 1px; border-left-width: 1px; }
.mark-tr { top: 84px;  right: 20px; border-top-width: 1px; border-right-width: 1px; }
.mark-bl { bottom: 20px; left: 20px;  border-bottom-width: 1px; border-left-width: 1px; }
.mark-br { bottom: 20px; right: 20px; border-bottom-width: 1px; border-right-width: 1px; }

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 860px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--foreground);
  background: var(--card);
  border: 1px solid var(--border-mid);
  border-radius: 6px;
  padding: 7px 14px;
  margin-bottom: 34px;
  box-shadow: 1.5px 1.5px 0px 0px var(--shadow-warm);
}

.badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cobalt);
  animation: pulse-dot 1.8s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 71, 171, 0.35); }
  50% { box-shadow: 0 0 0 7px rgba(0, 71, 171, 0); }
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(40px, 7.5vw, 80px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.04;
  margin-bottom: 26px;
}

.hero-sub {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 42px;
}

.hero-sub em {
  color: var(--cobalt);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.hero-caption {
  margin-top: 72px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-faint);
}

.hero-caption::before {
  content: "";
  display: block;
  width: 64px;
  height: 1px;
  background: var(--border-mid);
  margin: 0 auto 12px;
}

/* ---------------- notify form ---------------- */

.notify-form {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}

/* app input style: white, black border, square, hard black shadow */
.notify-form input[type="email"] {
  flex: 1 1 260px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--foreground);
  background: var(--card);
  border: 1px solid var(--foreground);
  border-radius: 0;
  padding: 14px 16px;
  outline: none;
  box-shadow: 1.5px 1.5px 0px 0px var(--foreground);
  transition: box-shadow 0.15s ease;
}

.notify-form input[type="email"]::placeholder { color: var(--text-faint); }

.notify-form input[type="email"]:focus {
  box-shadow: 3px 3px 0px 0px var(--cobalt);
}

.form-msg {
  flex-basis: 100%;
  min-height: 22px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  text-align: center;
}

.form-msg.ok { color: var(--teal); }
.form-msg.err { color: var(--rust); }

/* ---------------- etymology ---------------- */

.etym {
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--card);
  padding: 72px 24px;
}

.etym-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.etym-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--text-faint);
  margin-bottom: 20px;
}

.etym-word {
  font-family: var(--font-head);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.etym-greek { color: var(--cobalt); }

.etym-tr {
  font-family: var(--font-mono);
  font-size: 0.45em;
  font-weight: 400;
  color: var(--text-faint);
  vertical-align: middle;
  letter-spacing: 0;
}

.etym-def { font-size: 16.5px; color: var(--text-muted); }
.etym-def em { font-family: Georgia, "Times New Roman", serif; }
.etym-def strong { color: var(--foreground); }

/* ---------------- problem ---------------- */

.problem { padding: 110px 0; }

.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 44px;
}

.problem-card {
  background: var(--card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 30px 26px;
  box-shadow: 2.5px 2.5px 0px 0px var(--shadow-warm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
              transform 0.6s cubic-bezier(0.22,1,0.36,1), opacity 0.6s cubic-bezier(0.22,1,0.36,1);
}

.problem-card.is-visible { transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease; }

.problem-card:hover {
  border-color: var(--border-mid);
  box-shadow: 4px 4px 0px 0px var(--shadow-warm-dk);
  transform: translate(-1.5px, -1.5px);
}

.problem-card .problem-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--rust);
  margin-bottom: 16px;
}

.problem-card .problem-num::after {
  content: "";
  display: block;
  width: 28px;
  height: 1px;
  background: var(--border-mid);
  margin-top: 8px;
}

.problem-card h3 {
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.problem-card p { font-size: 14px; color: var(--text-muted); }

.problem-card:nth-child(2) { transition-delay: 0.1s; }
.problem-card:nth-child(3) { transition-delay: 0.2s; }
.problem-card.is-visible:nth-child(n) { transition-delay: 0s; }

/* ---------------- pipeline ---------------- */

.pipeline {
  padding: 110px 0;
  background: var(--panel);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}

.pipe-track {
  position: relative;
  height: 0;
  max-width: 1100px;
  margin: 56px auto 0;
  border-top: 1px dashed var(--border-mid);
  display: none;
}

.pipe-pulse {
  position: absolute;
  top: -4px;
  width: 72px; height: 7px;
  border-radius: 4px;
  background: linear-gradient(90deg, transparent, var(--cobalt), transparent);
  opacity: 0.65;
  animation: pipe-run 5s linear infinite;
}

@keyframes pipe-run {
  from { left: -72px; }
  to   { left: 100%; }
}

@media (min-width: 900px) {
  .pipe-track { display: block; }
  .pipe-grid { margin-top: 30px; }
}

.pipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-top: 52px;
}

.pipe-card {
  background: var(--card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 28px 24px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 2.5px 2.5px 0px 0px var(--shadow-warm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
              transform 0.6s cubic-bezier(0.22,1,0.36,1), opacity 0.6s cubic-bezier(0.22,1,0.36,1);
}

.pipe-card.is-visible { transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease; transition-delay: 0s; }

.pipe-card:hover {
  border-color: var(--border-mid);
  box-shadow: 4.5px 4.5px 0px 0px var(--shadow-warm-dk);
  transform: translate(-1.5px, -1.5px);
}

.pipe-card[data-stage="2"] { transition-delay: 0.1s; }
.pipe-card[data-stage="3"] { transition-delay: 0.2s; }
.pipe-card[data-stage="4"] { transition-delay: 0.3s; }

.pipe-icon {
  width: 52px; height: 52px;
  border-radius: 6px;
  background: rgba(0, 71, 171, 0.06);
  border: 1px solid var(--cobalt);
  color: var(--cobalt);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.pipe-icon svg { width: 30px; height: 30px; }

.pipe-step {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--text-faint);
  text-transform: uppercase;
}

.pipe-card h3 {
  font-family: var(--font-head);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 6px 0 10px;
}

.pipe-card p { font-size: 13.5px; color: var(--text-muted); }
.pipe-card p em { color: var(--cobalt); font-family: Georgia, "Times New Roman", serif; }

/* app-style module footer */
.pipe-module {
  margin-top: 22px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.module-status { color: var(--cobalt); font-weight: 700; }
.module-status.rust { color: var(--rust); }

/* ---------------- arena ---------------- */

.arena { padding: 110px 0; }

.arena-stage {
  position: relative;
  background: var(--card);
  border: 1px solid var(--foreground);
  border-radius: 6px;
  padding: 24px 24px 32px;
  overflow: hidden;
  min-height: 280px;
  box-shadow: 3px 3px 0px 0px var(--shadow-warm-dk);
}

.arena-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.arena-round { color: var(--cobalt); font-weight: 700; }

.arena-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-faint);
  font-weight: 700;
}

.arena-live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--rust);
  animation: pulse-dot 1.4s ease-in-out infinite;
}

.arena-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 170px;
  align-content: flex-start;
}

.chip {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 9px 14px;
  border-radius: 6px;
  border: 1px solid var(--border-mid);
  background: var(--panel);
  color: var(--foreground);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  box-shadow: 1.5px 1.5px 0px 0px var(--shadow-warm);
  opacity: 0;
  transform: scale(0.85) translateY(8px);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 0.4s ease, background 0.4s ease, box-shadow 0.4s ease, filter 0.4s ease;
}

.chip.in { opacity: 1; transform: none; }

.chip .chip-mark {
  font-size: 11px;
  width: 15px;
  text-align: center;
  color: var(--text-faint);
}

.chip.verified {
  border-color: var(--teal);
  background: rgba(15, 118, 110, 0.06);
}
.chip.verified .chip-mark { color: var(--teal); }

.chip.culled {
  border-color: var(--rust);
  opacity: 0.3;
  filter: grayscale(0.6);
  transform: scale(0.92);
  box-shadow: none;
}
.chip.culled .chip-mark { color: var(--rust); }

.chip.champion {
  border-color: var(--cobalt);
  background: rgba(0, 71, 171, 0.06);
  color: var(--cobalt);
  box-shadow: 2.5px 2.5px 0px 0px rgba(0, 71, 171, 0.25);
}
.chip.champion .chip-mark { color: var(--cobalt); }

.arena-scanline {
  position: absolute;
  top: 66px; bottom: 18px;
  width: 2px;
  background: var(--cobalt);
  opacity: 0;
  left: -10px;
}

.arena-scanline.scanning {
  opacity: 0.55;
  animation: scan 1.6s linear forwards;
}

@keyframes scan {
  from { left: 0; }
  to   { left: 100%; }
}

/* ---------------- trust ---------------- */

.trust {
  padding: 110px 0;
  background: var(--card);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.trust-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  align-items: center;
}

@media (min-width: 880px) {
  .trust-inner { grid-template-columns: 1.15fr 1fr; }
}

.trust-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.trust-list li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 15px;
  color: var(--text-muted);
}

.trust-list li:nth-child(2) { transition-delay: 0.1s; }
.trust-list li:nth-child(3) { transition-delay: 0.2s; }

.trust-check { color: var(--teal); font-weight: 700; }

.trust-visual { display: flex; justify-content: center; }

.hypo-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--foreground);
  border-radius: 6px;
  padding: 26px;
  box-shadow: 5px 5px 0px 0px var(--shadow-warm-dk);
  animation: card-float 6s ease-in-out infinite;
}

@keyframes card-float {
  0%, 100% { transform: translateY(0) rotate(-0.4deg); }
  50% { transform: translateY(-10px) rotate(0.4deg); }
}

.hypo-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--cobalt);
  border: 1px solid var(--cobalt);
  background: rgba(0, 71, 171, 0.06);
  display: inline-block;
  padding: 3px 8px;
  margin-bottom: 14px;
}

.hypo-title {
  font-family: var(--font-head);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.hypo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.hypo-sources { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }

.hypo-source { display: flex; align-items: center; gap: 10px; }

.src-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cobalt);
  flex-shrink: 0;
}

.src-line {
  height: 6px;
  border-radius: 3px;
  background: var(--shadow-warm);
  border: 1px solid var(--border-subtle);
  flex: 1;
}

.src-line.short { flex: 0.65; }

.hypo-verified {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--teal);
  border-top: 1px dashed var(--border-subtle);
  padding-top: 14px;
}

/* ---------------- cta ---------------- */

.cta {
  position: relative;
  padding: 130px 0;
  text-align: center;
}

.cta-logobox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 92px; width: 92px;
  background: var(--card);
  border: 1px solid var(--border-mid);
  border-radius: 6px;
  box-shadow: 2.5px 2.5px 0px 0px var(--shadow-warm);
  margin-bottom: 28px;
}

.cta-logo { height: 64px; width: 64px; object-fit: contain; }

.cta-title {
  font-family: var(--font-head);
  font-size: clamp(32px, 5.5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 18px;
}

.cta .section-sub { margin-left: auto; margin-right: auto; }

/* ---------------- footer ---------------- */

.footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--card);
  padding: 28px 0;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-faint);
}

.footer a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.footer a:hover { color: var(--cobalt); }

/* ---------------- reduced motion ---------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .chip { opacity: 1; transform: none; }
}
