/* Journology — marketing site. Matches the app's dark-noir theme
   (mobile/src/theme/presets.ts darkNoir): #02030A, cool near-white text,
   translucent glass surfaces, Space Grotesk + Inter. No build step. */

:root {
  --bg:          #02030A;
  --bg-2:        #06070F;
  --glass:       rgba(255, 255, 255, 0.04);
  --glass-2:     rgba(233, 238, 246, 0.06);
  --stroke:      rgba(233, 238, 246, 0.10);
  --stroke-strong: rgba(233, 238, 246, 0.22);
  --text-100:    #EFF6FF;
  --text-200:    #BDC5CD;
  --text-500:    #9CA4AC;
  --text-550:    #8E959C;
  --highlight:   #E9EEF6;

  --font-display: "Space Grotesk", "SF Pro Display", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  --wrap: 1140px;
  --r-card: 28px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-200);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* film grain — quiet, cinematic, ties the flat blacks together */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 999; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: rgba(233, 238, 246, 0.25); color: var(--text-100); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

a { color: var(--text-100); text-decoration: none; }
a:hover { color: #fff; }
a:focus-visible, .btn:focus-visible { outline: 1px solid rgba(233,238,246,0.5); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; color: var(--text-100); margin: 0; letter-spacing: -0.01em; text-wrap: balance; }

.eyebrow {
  font-family: var(--font-body); font-weight: 400; font-size: 0.76rem;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-500);
}

.wordmark { display: block; height: 27px; width: auto; }
.wordmark.sm { height: 22px; }

/* ---- top bar ---- */
.topbar { position: relative; z-index: 4; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; padding: 28px 24px; }
.topbar .nav a { color: var(--text-500); font-size: 0.95rem; }
.topbar .nav a:hover { color: var(--text-100); }

/* ---- hero ---- */
.hero { position: relative; overflow: hidden; background: var(--bg); }
.hero-bg { position: absolute; inset: 0; background: url("assets/hero.jpg") center right / cover no-repeat; }
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, var(--bg) 0%, rgba(2,3,10,0.90) 34%, rgba(2,3,10,0.42) 66%, rgba(2,3,10,0.62) 100%),
    linear-gradient(180deg, rgba(2,3,10,0.75) 0%, transparent 20%, transparent 60%, var(--bg) 100%);
}
.hero-inner { position: relative; z-index: 2; padding: clamp(48px, 8vw, 120px) 0 clamp(48px, 9vw, 128px); }
.hero h1 {
  font-size: clamp(2.5rem, 5.6vw, 4.3rem); line-height: 1.05; margin: 20px 0 0;
  letter-spacing: -0.02em; max-width: 15ch;
}
.hero .lead { margin: 22px 0 0; max-width: 44ch; font-size: clamp(1.06rem, 1.6vw, 1.28rem); color: var(--text-200); line-height: 1.6; }
.hero .cta-row { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

/* glass buttons — mirror the app's primary/tertiary */
.btn {
  display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-body);
  font-weight: 500; font-size: 1rem; padding: 14px 24px; border-radius: 100px;
  cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.btn-primary {
  color: var(--text-100);
  background: linear-gradient(180deg, rgba(233,238,246,0.15), rgba(26,29,38,0.20));
  border: 1px solid rgba(233,238,246,0.14);
  backdrop-filter: blur(6px);
}
.btn-primary:hover { border-color: rgba(233,238,246,0.4); transform: translateY(-1px); }
.btn-ghost { color: var(--text-200); background: transparent; border: 1px solid var(--stroke); }
.btn-ghost:hover { color: var(--text-100); border-color: var(--stroke-strong); }

/* ---- sections ---- */
section.band { padding: clamp(60px, 9vw, 118px) 0; }
/* cool atmospheric glow so the lower page isn't flat black */
#how { background: radial-gradient(58% 44% at 50% 0%, rgba(199, 213, 236, 0.055), transparent 70%); }
#participant { background: radial-gradient(50% 60% at 50% 100%, rgba(199, 213, 236, 0.04), transparent 70%); }

.section-head { max-width: 62ch; }
.section-head h2, .teams-grid h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); line-height: 1.12; margin-top: 12px; max-width: 24ch; }
.section-head p { color: var(--text-500); font-size: 1.1rem; margin: 16px 0 0; max-width: 54ch; }

/* the route — dotted journey trail with three stops and a finale flag */
.route-strip { margin: clamp(30px, 4vw, 46px) 0 0; }
.route-strip svg { width: 100%; height: auto; display: block; overflow: visible; }
.route-strip .route { fill: none; stroke: var(--highlight); stroke-opacity: 0.22; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 0.5 9; }
.route-strip .stop { fill: var(--bg); stroke: rgba(233, 238, 246, 0.55); stroke-width: 1.6; }
.route-strip .stop-core { fill: rgba(233, 238, 246, 0.8); }
.route-strip .flag-pole { stroke: rgba(233, 238, 246, 0.7); stroke-width: 1.8; stroke-linecap: round; }
.route-strip .flag { fill: rgba(233, 238, 246, 0.85); }

/* how it works — glass case-file cards */
.steps { margin-top: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step {
  position: relative; overflow: hidden;
  background: var(--glass); border: 1px solid var(--stroke); border-radius: var(--r-card);
  padding: 30px 28px 32px;
  transition: border-color .25s ease, background .25s ease, transform .25s ease;
}
/* top-edge highlight — the app's highlightTint on glass surfaces */
.step::before, .participant::before {
  content: ""; position: absolute; top: 0; left: 14%; right: 14%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(233, 238, 246, 0.22), transparent);
}
.step:hover { border-color: var(--stroke-strong); background: var(--glass-2); transform: translateY(-3px); }
.step .ghost {
  position: absolute; top: 2px; right: 18px;
  font-family: var(--font-display); font-weight: 500; font-size: 5.4rem; line-height: 1;
  color: rgba(233, 238, 246, 0.05); pointer-events: none; user-select: none;
}
.step .num {
  font-family: var(--font-display); font-weight: 500; font-size: 0.85rem;
  letter-spacing: 0.18em; color: var(--text-500);
}
.step .num::after { content: ""; display: inline-block; width: 34px; height: 1px; background: var(--stroke-strong); margin-left: 12px; vertical-align: middle; }
.step h3 { font-size: 1.3rem; margin: 16px 0 8px; }
.step p { color: var(--text-500); margin: 0; }

/* teams block */
.teams { position: relative; overflow: hidden; border-top: 1px solid var(--stroke); border-bottom: 1px solid var(--stroke); background: var(--bg-2); }
.teams .mark {
  position: absolute; right: -30px; top: 50%; transform: translateY(-50%) rotate(6deg);
  width: 330px; opacity: 0.07; pointer-events: none;
}
.teams-grid { position: relative; z-index: 2; max-width: 62ch; }
.teams-grid > p { color: var(--text-500); font-size: 1.1rem; margin: 16px 0 0; max-width: 54ch; }
.teams .tags { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.tag { font-size: 0.92rem; color: var(--text-200); background: var(--glass); border: 1px solid var(--stroke); border-radius: 100px; padding: 8px 16px; }

/* participant strip */
.participant {
  position: relative; overflow: hidden;
  background: var(--glass-2); border: 1px solid rgba(233, 238, 246, 0.14); border-radius: var(--r-card);
  padding: clamp(30px, 4vw, 48px);
}
.participant .symbol { height: 44px; width: auto; opacity: 0.9; margin-bottom: 18px; }
.participant h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.participant p { color: var(--text-200); margin: 14px 0 0; max-width: 58ch; }
.participant .code {
  display: inline-block; font-family: var(--font-display); font-weight: 500; color: var(--text-100);
  background: rgba(26, 29, 38, 0.5); border: 1px solid var(--stroke-strong); border-radius: 8px;
  padding: 1px 10px 2px; letter-spacing: 0.06em; white-space: nowrap;
}
.participant .mark {
  position: absolute; right: -46px; bottom: -70px; width: 230px; opacity: 0.06;
  transform: rotate(-8deg); pointer-events: none;
}

/* footer */
footer { padding: 56px 0 68px; border-top: 1px solid var(--stroke); }
.foot-grid { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
footer .tagline { color: var(--text-550); margin: 12px 0 0; font-size: 0.95rem; }
footer .foot-right { color: var(--text-550); font-size: 0.9rem; text-align: right; }
footer .foot-right a { color: var(--text-200); }

/* ---- prose / privacy ---- */
.prose { max-width: 720px; margin: 0 auto; padding: clamp(40px, 6vw, 76px) 24px 88px; }
.prose h1 { font-size: clamp(2.1rem, 4vw, 3rem); margin: 16px 0 6px; }
.prose .updated { color: var(--text-550); font-size: 0.9rem; margin: 0 0 30px; }
.prose h2 { font-size: 1.3rem; margin: 36px 0 8px; color: var(--text-100); }
.prose p { color: var(--text-200); margin: 0 0 16px; }
.prose .back { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--stroke); }

/* ---- motion ---- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(16px); animation: rise .8s cubic-bezier(.2,.7,.2,1) forwards; }
  .d1 { animation-delay: .05s; } .d2 { animation-delay: .16s; } .d3 { animation-delay: .28s; }
  .d4 { animation-delay: .4s; } .d5 { animation-delay: .52s; }
  @keyframes rise { to { opacity: 1; transform: none; } }

  /* scroll reveals (added by the tiny observer script; no-JS pages stay visible) */
  .js .sr { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
  .js .sr.in { opacity: 1; transform: none; }
  .js .sr:nth-child(2) { transition-delay: .08s; }
  .js .sr:nth-child(3) { transition-delay: .16s; }
}

/* ---- responsive ---- */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .steps { grid-template-columns: 1fr; gap: 16px; }
  .route-strip { display: none; }
  .hero-scrim { background:
    linear-gradient(90deg, var(--bg) 0%, rgba(2,3,10,0.82) 55%, rgba(2,3,10,0.6) 100%),
    linear-gradient(180deg, rgba(2,3,10,0.7) 0%, transparent 28%, transparent 55%, var(--bg) 100%); }
  .foot-grid { flex-direction: column; align-items: flex-start; }
  footer .foot-right { text-align: left; }
  .teams .mark { display: none; }
  .participant .mark { display: none; }
}
