/*
 * ShipMore — dark data-platform aesthetic
 * Component styles only. All color + font tokens live in theme.css.
 * If you want to change colors, edit theme.css — not this file.
 */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "ss02", "cv11";
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.mono { font-family: var(--font-mono); letter-spacing: 0; }
.kbd { font-family: var(--font-mono); font-size: 11px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg-1); color: var(--fg-2); }

.wrap { max-width: 1360px; margin: 0 auto; padding: 0 32px; }
.hair { border: 0; height: 1px; background: var(--line-soft); margin: 0; }
.hair-v { width: 1px; background: var(--line-soft); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--fg-3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  border: 1px solid var(--line);
  background: var(--bg-1);
  color: var(--fg);
  border-radius: 0;
  cursor: pointer;
  transition: all 160ms ease;
}
.btn:hover { background: var(--bg-2); border-color: var(--fg-3); }
.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
  font-weight: 600;
}
.btn-primary:hover { background: var(--accent-dim); border-color: var(--accent-dim); box-shadow: 0 0 40px var(--accent-glow); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  background: var(--bg-1);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-2);
  letter-spacing: 0.02em;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }

/* Terminal */
.terminal {
  background: var(--bg-1);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--fg-2);
}
.terminal-head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.term-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.term-dot.live { background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.terminal-body { padding: 18px 20px; }
.prompt { color: var(--accent); }
.muted { color: var(--fg-4); }
.c-cyan { color: var(--cyan); }
.c-amber { color: var(--amber); }
.c-magenta { color: var(--magenta); }
.c-accent { color: var(--accent); }
.c-red { color: var(--red); }

.cursor {
  display: inline-block;
  width: 8px; height: 1em;
  background: var(--fg);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s steps(2) infinite;
}
/* 2026-05-12: cursor background var(--accent) → var(--fg) to match the hero terminal accent demotion */
@keyframes blink { 50% { opacity: 0; } }

/* Grid pattern bg */
.grid-bg {
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 56px 56px;
}

/* section frames */
.section { position: relative; }
/* Vertical rhythm — one knob (--vspace), applied symmetrically so every section's TOP gap
   (divider/label → content) exactly equals its BOTTOM gap (content → next divider).
   2026-06-01: centralized here — was per-section inline `padding-top: var(--vspace)`, which
   the Problem (8px) and CTA sections didn't follow, so spacing drifted between sections.
     - top gap    → `.section-label { margin-bottom: var(--vspace) }`
     - bottom gap → `.section > .wrap { padding-bottom: var(--vspace) }`
   The single divider per section is `.section-label`'s border-top — wrap-width, NOT full-bleed,
   sitting above the section title. The old full-viewport `.section { border-top }` and
   `.cta { border-top }` were removed so there is exactly ONE line per section. */
.section > .wrap { padding-bottom: var(--vspace); }
/* Shapes & Playbook place their grid as a sibling AFTER the intro div, so restore that gap. */
.shapes-grid, .playbook-grid, .feat-grid { margin-top: var(--vspace); }
.section-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0 0;
  margin-bottom: var(--vspace);     /* top gap: divider/label → content (matches .wrap padding-bottom) */
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-top: 1px solid var(--line-soft);   /* the one divider — above the title, wrap-width (not full-bleed) */
}

h1, h2, h3 { letter-spacing: -0.035em; margin: 0; font-weight: 500; }
.display { font-size: clamp(44px, 7vw, 104px); line-height: 0.95; letter-spacing: -0.04em; font-weight: 500; }
.display em { font-style: normal; color: var(--accent); }
.display .strike { position: relative; color: var(--fg-3); }
.display .strike::after {
  content: ""; position: absolute; left: -2%; right: -2%; top: 50%;
  height: 3px; background: var(--fg-3);
  transform: translateY(-50%);
}

.h2 { font-size: clamp(32px, 4vw, 56px); line-height: 1.02; letter-spacing: -0.035em; }
.h3 { font-size: 22px; line-height: 1.15; }
.lede { font-size: 19px; line-height: 1.55; color: var(--fg-2); max-width: 58ch; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 700ms ease, transform 700ms ease; }
.reveal.in { opacity: 1; transform: none; }

/* 2026-06-06 (LCP): above-the-fold hero content animates in on LOAD via CSS, not the
   JS IntersectionObserver above. JS-gated reveal kept the LCP <h1> at opacity:0 until
   app.js executed, delaying mobile LCP ~2s. A CSS animation paints it as soon as the
   stylesheet applies (LCP fires at animation start) and keeps the fade — and the hero
   stays visible even if JS never loads. */
.hero .reveal { animation: heroReveal 700ms ease both; }
@keyframes heroReveal { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .hero .reveal { animation: none; opacity: 1; transform: none; }
}

/* util */
.row { display: flex; }

/* Hero terminal glow is position:absolute; inset:-40px — it bleeds 40px past its
   box on every side. Clip the horizontal bleed so the decoration never adds page
   scroll (it sits off-screen on phones anyway). overflow-x: clip leaves vertical
   flow untouched. (2026-06-01) */
.hero { overflow-x: clip; }

/* Let long unbreakable strings (URLs, slugs, code) wrap instead of pushing the page
   wide on very narrow phones. (2026-06-01) */
body { overflow-wrap: break-word; }

/* ============================================================
   MOBILE LAYER (2026-06-01) — fixes horizontal scroll on phones.
   styles.css previously had ZERO media queries, so the nav and the
   inline two-column grids never collapsed: the nav row (logo + section
   links + theme toggle + $159 CTA) forced the page to ~900px wide on a
   375px screen, so it scrolled sideways. This adds the missing mobile
   breakpoints. No hamburger menu — on a single-scroll lander the in-page
   section links are dropped on mobile; the logo + theme + CTA remain.
   !important is used only to beat the page's inline grid/padding styles. */
/* Nav: the logo + 8 section links + theme + $159 CTA need ~930px to sit on one row;
   below that the full row can't fit, so drop the in-page anchor links (logo + theme
   + CTA remain). No hamburger — these are just jump links on a single-scroll page. */
@media (max-width: 960px) {
  .nav-links { display: none; }
}
@media (max-width: 768px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  .nav > .wrap { padding-left: 16px !important; padding-right: 16px !important; }

  /* Collapse the inline two-column sections to a single column */
  .hero-grid, .loop-cols, .faq-cols { grid-template-columns: 1fr !important; gap: 40px !important; }

  /* Footer: 4 columns → 2 */
  .footer-cols { grid-template-columns: 1fr 1fr !important; gap: 28px 24px !important; }
}
@media (max-width: 440px) {
  .footer-cols { grid-template-columns: 1fr !important; }
}

/* ============================================================
   MOBILE MENU (2026-06-01) — hamburger + dropdown drawer.
   Shown ≤960px (where the inline .nav-links are hidden). The CTA stays in the
   bar down to 600px, then moves into the drawer. Burger morphs to an X. ============================================================ */
.nav { position: relative; z-index: 50; }   /* anchor the dropdown; sit above the dim backdrop */

.nav-burger {
  display: none;                              /* shown ≤960 below */
  width: 40px; height: 34px; padding: 0;
  align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line); border-radius: 2px;
  cursor: pointer; position: relative;
}
.nav-burger:hover { border-color: var(--fg-3); }
.nav-burger span {
  position: absolute; width: 16px; height: 1.5px; background: var(--fg);
  transition: transform 220ms ease, opacity 160ms ease;
}
.nav-burger span:nth-child(1) { transform: translateY(-4.5px); }
.nav-burger span:nth-child(3) { transform: translateY(4.5px); }
body.menu-open .nav-burger span:nth-child(1) { transform: rotate(45deg); }
body.menu-open .nav-burger span:nth-child(2) { opacity: 0; }
body.menu-open .nav-burger span:nth-child(3) { transform: rotate(-45deg); }

.nav-mobile {
  position: absolute; top: 100%; left: 0; right: 0;
  display: flex; flex-direction: column;
  background: var(--bg-1);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line);
  padding: 8px 20px 20px;
  z-index: 60;
  transform: translateY(-8px); opacity: 0; visibility: hidden;
  transition: opacity 200ms ease, transform 200ms ease, visibility 0s linear 200ms;
}
body.menu-open .nav-mobile { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
.nav-mobile a:not(.btn) {
  font-family: var(--font-mono); font-size: 14px; letter-spacing: -0.01em;
  color: var(--fg-2); text-decoration: none;
  padding: 13px 2px; border-bottom: 1px solid var(--line-soft);
}
.nav-mobile a:not(.btn):hover { color: var(--fg); }
.nav-mobile .nav-mobile-cta { margin-top: 16px; text-align: center; }

/* dim the page behind an open menu (header stays above via .nav z-index) */
body.menu-open::after { content: ""; position: fixed; inset: 0; z-index: 45; background: oklch(0 0 0 / 0.55); }
body.menu-open { overflow: hidden; }

@media (max-width: 960px) { .nav-burger { display: inline-flex; } }
@media (min-width: 961px) { .nav-mobile { display: none; } }   /* never on desktop */
@media (max-width: 600px) { .nav-cta { display: none; } }      /* CTA moves into the drawer on phones */
.col { display: flex; flex-direction: column; }
.grow { flex: 1; }
.center { align-items: center; justify-content: center; }

/* fine scrollbars in terminals */
.terminal-body::-webkit-scrollbar { height: 8px; width: 8px; }
.terminal-body::-webkit-scrollbar-thumb { background: var(--line); }
.terminal-body::-webkit-scrollbar-track { background: transparent; }

/* selection */
::selection { background: var(--accent); color: var(--accent-fg); }
