/* ==========================================================================
   about.css — RunSheets marketing / product website page
   Reuses design tokens (--bg, --accent, --text, etc.), .btn-primary, and
   .theme-toggle-btn behavior from style.css. This file only adds the
   marketing-page-specific layout: nav, hero, feature grid, steps, footer.
   ========================================================================== */

/* style.css sets `html, body { height: 100% }` for the app shell, which
   manages its own internal scroll containers (.viewport, .sidebar-nav) and
   never scrolls the document itself. This plain marketing page relies on
   normal document flow/scroll instead, so that fixed height (combined with
   `overflow-x: hidden` implicitly forcing `overflow-y: auto` per the CSS
   overflow-interdependency rule) clips all content past one viewport tall
   and makes the rest unscrollable. Override both back to auto here. */
html.marketing-page,
html.marketing-page body {
  height: auto;
}

.marketing-body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

.marketing-body main {
  display: block;
  max-width: none;
}

/* ---------------------------------- Nav ---------------------------------- */

.marketing-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem clamp(1.25rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.marketing-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--text);
}

.marketing-logo-mark {
  display: flex;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  color: #fff;
  padding: 5px;
}

.marketing-logo-mark svg { width: 100%; height: 100%; }

.marketing-logo-mark-sm { width: 24px; height: 24px; border-radius: 6px; padding: 4px; }

.marketing-logo-word {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -.01em;
}

.marketing-logo-word span { color: var(--accent-2); }

.marketing-nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.marketing-nav-links > a:not(.btn-primary) {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-dim);
  text-decoration: none;
  transition: color .15s var(--ease, ease);
}

.marketing-nav-links > a:not(.btn-primary):hover { color: var(--text); }

.marketing-login-btn { font-size: .85rem; padding: .5rem 1.1rem; }

/* --------------------------------- Hero ---------------------------------- */

.hero {
  display: flex;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) clamp(1.25rem, 4vw, 3rem) clamp(2rem, 5vw, 3.5rem);
}

.hero-copy { flex: 1 1 440px; min-width: 0; }

.eyebrow {
  display: inline-block;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: var(--accent-soft);
  padding: .35rem .75rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1.1rem;
}

.hero-copy h1 {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -.02em;
  margin: 0 0 1.1rem;
  font-weight: 800;
}

.hero-sub {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-dim);
  margin: 0 0 1.9rem;
  max-width: 46ch;
}

.hero-cta { display: flex; gap: .9rem; flex-wrap: wrap; }

.btn-lg { font-size: .95rem; padding: .78rem 1.5rem; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: background .15s var(--ease, ease), border-color .15s var(--ease, ease);
}

.btn-secondary:hover { background: var(--surface-hover); border-color: var(--border-soft); }

.hero-shot {
  flex: 1 1 560px;
  min-width: 0;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  background: var(--surface-solid);
}

.hero-shot img { display: block; width: 100%; height: auto; }

/* ------------------------------ Section base ------------------------------ */

/* Scoped to .marketing-body (about.html's own <body> class) rather than a
   bare `main > section` — index.html's real app shell also happens to be
   built as <main class="main-col"><section id="viewport">, and since
   about.css now loads on index.html too (for the pre-login hero), an
   unscoped selector here was leaking in and re-styling (centering/padding)
   the actual dashboard/dispatch/map content area. Never unscope this. */
.marketing-body main > section {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 3rem);
}

.marketing-body main > section h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 800;
  letter-spacing: -.01em;
  margin: 0 0 1rem;
  text-align: center;
}

.section-what {
  max-width: 820px;
}

.section-what h2 { text-align: left; }

.section-what p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-dim);
  margin: 0 0 1.15rem;
}

.section-what p:last-child { margin-bottom: 0; }

/* -------------------- index.html's pre-login sections --------------------
   index.html's #loginScreen has no <main> wrapper and no .marketing-body
   class (see the CRITICAL gotcha note above), so the `.marketing-body
   main > section` rule never reaches it. .login-section is the same
   max-width/padding/heading treatment as a standalone, unscoped class —
   safe to use directly since it isn't a bare tag selector, only apply it to
   elements that are meant to look like a marketing section. */
.login-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 3rem);
}

.login-section-bordered { border-top: 1px solid var(--border-soft); }

.login-section h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 800;
  letter-spacing: -.01em;
  margin: 0 0 1rem;
  text-align: center;
}

.showcase-sub {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-dim);
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2.25rem;
}

.screenshot-card {
  margin: 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  background: var(--surface-solid);
}

.screenshot-card img { display: block; width: 100%; height: auto; }

.screenshot-card figcaption {
  padding: .9rem 1.1rem 1.1rem;
  font-size: .85rem;
  line-height: 1.5;
  color: var(--text-dim);
}

/* Click-to-enlarge trigger wrapping each thumbnail — see the lightbox JS
   near the bottom of index.html. A <button>, not a click handler on the
   <img>, so it's keyboard-reachable (Enter/Space) and gets a native focus
   ring for free. */
.screenshot-trigger {
  display: block;
  width: 100%;
  position: relative;
  border: 0;
  padding: 0;
  margin: 0;
  background: none;
  cursor: zoom-in;
  overflow: hidden;
}

.screenshot-trigger img { transition: transform .35s var(--ease); }

.screenshot-card:hover .screenshot-trigger img { transform: scale(1.045); }

.screenshot-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* Magnifying-glass hint, dimmed until the card is hovered/focused — signals
   "click to enlarge" without permanently cluttering the screenshot. */
.screenshot-zoom-hint {
  position: absolute;
  top: .7rem;
  right: .7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(10, 13, 21, .55);
  color: #fff;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}

.screenshot-zoom-hint svg { width: 17px; height: 17px; }

.screenshot-card:hover .screenshot-zoom-hint,
.screenshot-trigger:focus-visible .screenshot-zoom-hint {
  opacity: 1;
  transform: translateY(0);
}

.screenshot-card {
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}

.screenshot-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   Screenshot lightbox — full-size viewer opened by any .screenshot-trigger.
   Mirrors style.css's .modal-overlay/.modal-panel (same backdrop treatment,
   same fadeIn/rise @keyframes, same [hidden]-driven show/hide) so it reads
   as the same overlay pattern used everywhere else in the app, not a
   one-off. z-index 110 deliberately clears the app's own modals (100) —
   this page never has both open at once, but keeps it future-proof. */
.screenshot-lightbox {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3vh 4vw;
}

.screenshot-lightbox[hidden] { display: none; }

.screenshot-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 14, .78);
  backdrop-filter: blur(4px);
  animation: fadeIn .18s var(--ease);
}

.screenshot-lightbox-panel {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: min(1100px, 92vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: rise .22s var(--ease);
}

.screenshot-lightbox-panel img {
  display: block;
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  background: var(--surface-2);
}

.screenshot-lightbox-panel figcaption {
  padding: 1rem 1.3rem;
  font-size: .9rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border-soft);
}

.screenshot-lightbox-close {
  position: absolute;
  top: .7rem;
  right: .7rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(10, 13, 21, .55);
  color: #fff;
  cursor: pointer;
  transition: background .15s var(--ease);
}

.screenshot-lightbox-close:hover { background: rgba(10, 13, 21, .8); }
.screenshot-lightbox-close svg { width: 18px; height: 18px; }

@media (max-width: 640px) {
  .screenshot-lightbox { padding: 0; }
  .screenshot-lightbox-panel { max-width: 100vw; max-height: 100vh; border-radius: 0; }
  .screenshot-lightbox-panel img { max-height: 70vh; }
}

/* 4 cards read better as a tidy 2x2 than feature-grid's default auto-fit
   (which leaves an awkward 3-then-1 layout at this section's narrower
   max-width) — same .feature-card styling, just a fixed 2-column track.
   Double-class selector (not source order) is what wins over .feature-grid's
   own grid-template-columns below, since this rule needs to apply wherever
   it's combined with .feature-grid regardless of which is defined first. */
.feature-grid.mini-feature-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 640px) {
  .feature-grid.mini-feature-grid { grid-template-columns: 1fr; }
}

.login-section-cta { text-align: center; margin-top: 1.75rem; }

.data-callout { max-width: 780px; margin: 0 auto; text-align: center; }

.data-callout p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-dim);
  margin: 0;
}

.data-callout a {
  color: var(--accent-2);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent-ring);
  text-underline-offset: 2px;
}

.data-callout a:hover { color: var(--accent); }

/* ------------------------------- Features -------------------------------- */

.section-features { border-top: 1px solid var(--border-soft); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2.25rem;
}

.feature-card {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.feature-icon svg { width: 22px; height: 22px; }

.feature-icon-blue   { background: rgba(75,155,255,.14);  color: var(--blue); }
.feature-icon-purple { background: rgba(192,132,252,.14); color: var(--purple); }
.feature-icon-amber  { background: rgba(245,165,36,.14);  color: var(--amber); }
.feature-icon-red    { background: rgba(243,89,107,.14);  color: var(--red); }
.feature-icon-green  { background: rgba(53,211,145,.14);  color: var(--green); }
.feature-icon-cyan   { background: rgba(34,211,238,.14);  color: var(--cyan); }

.feature-card h3 {
  font-size: 1.02rem;
  font-weight: 700;
  margin: 0 0 .5rem;
}

.feature-card p {
  font-size: .88rem;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0;
}

/* --------------------------------- How -------------------------------- */

.section-how { border-top: 1px solid var(--border-soft); }

.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-top: 2.25rem;
}

.how-step { text-align: center; }

.how-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin: 0 auto .9rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 700;
  font-size: .92rem;
}

.how-step h3 {
  font-size: .98rem;
  font-weight: 700;
  margin: 0 0 .5rem;
}

.how-step p {
  font-size: .87rem;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0;
  max-width: 34ch;
  margin-inline: auto;
}

/* ----------------------------- Built for / CTA ----------------------------- */

.section-built-for {
  border-top: 1px solid var(--border-soft);
  max-width: 780px;
  text-align: center;
}

/* Inline prose links (e.g. the Nagoh Creative mention) — styled to match
   the brand instead of falling back to browser-default link blue. */
.section-what a,
.section-built-for a {
  color: var(--accent-2);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent-ring);
  text-underline-offset: 2px;
}

.section-what a:hover,
.section-built-for a:hover {
  color: var(--accent);
}

.section-built-for p {
  font-size: .98rem;
  line-height: 1.75;
  color: var(--text-dim);
  margin: 0;
}

.section-cta {
  border-top: 1px solid var(--border-soft);
  text-align: center;
  max-width: 640px;
}

.section-cta p {
  font-size: .96rem;
  color: var(--text-dim);
  margin: 0 0 1.6rem;
}

.section-cta .btn-primary { display: inline-flex; }

/* -------------------------------- Footer -------------------------------- */

.marketing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem clamp(1.25rem, 4vw, 3rem) 3rem;
  border-top: 1px solid var(--border-soft);
}

.marketing-footer-brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-dim);
}

.marketing-footer-links { display: flex; gap: 1.4rem; }

.marketing-footer-links a {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-dim);
  text-decoration: none;
  transition: color .15s var(--ease, ease);
}

.marketing-footer-links a:hover { color: var(--text); }

.marketing-footer-brand a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 2px;
}

.marketing-footer-brand a:hover { color: var(--text); }

/* ------------------------------ Responsive ------------------------------- */

@media (max-width: 860px) {
  .hero { flex-direction: column; align-items: stretch; text-align: center; }
  .hero-copy { flex: none; }
  .hero-sub { max-width: none; margin-inline: auto; }
  .hero-cta { justify-content: center; }
  .hero-shot { flex: none; }
}

@media (max-width: 640px) {
  .marketing-nav-links { gap: 1rem; }
  .marketing-nav-links > a:not(.btn-primary):not(.icon-btn) { display: none; }
  .marketing-footer { justify-content: center; text-align: center; }
}
