/* HeroApps website — globals on top of design system tokens.
   Tokens come from heroapps-tokens.css. We only add interaction
   helpers, scroll reveals, and a few section primitives here. */

* { box-sizing: border-box; }
html, body { margin: 0; }
/* Bulletproof horizontal-overflow guard. `clip` (vs `hidden`) does NOT create a
   scroll container, so it cannot leak page-level horizontal scroll and does not
   break the sticky topnav. Applied to BOTH html and body — `overflow-x:hidden`
   on body alone is a leaky net (a wide flex/transform descendant can still drive
   the viewport's horizontal scrollbar). */
html { overflow-x: clip; }
body {
  background: var(--bg-1);
  color: var(--fg-1);
  font-family: var(--font-body);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* Sections */
.section { padding: var(--sp-10) var(--gutter); }
.section--snug { padding: var(--sp-9) var(--gutter); }
.section--dark { background: var(--ha-onyx); color: var(--fg-on-dark); }
.section--mist { background: var(--ha-mist); }

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4,
.section--dark p { color: var(--fg-on-dark); }
.section--dark .eyebrow,
.section--dark .caption,
.section--dark .lede { color: var(--fg-on-dark-2); }

.container { max-width: var(--container); margin: 0 auto; }
.container-wide { max-width: var(--container-wide); margin: 0 auto; }

/* Reveal-on-scroll: opt in with data-reveal=""
   Strategy: VISIBLE BY DEFAULT (so content never gets stuck hidden if the
   page is inspected, screenshotted, or animations are throttled). When the
   element first intersects the viewport, an .is-in class is added which
   re-plays a one-shot fade/slide via CSS animation. */
[data-reveal] { opacity: 1; transform: none; }
[data-reveal].is-in {
  animation: reveal-in 720ms var(--ease-apple);
  animation-delay: var(--reveal-delay, 0ms);
  animation-fill-mode: none;
}
@keyframes reveal-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  [data-reveal].is-in { animation: none; }
}

/* Capsule button base — picked up by Capsule component */
.cap {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; border-radius: var(--r-pill);
  padding: 12px 22px;
  font-family: var(--font-body); font-weight: 500; font-size: 15px;
  cursor: pointer;
  transition: background var(--dur-base) var(--ease-apple),
              color var(--dur-base) var(--ease-apple),
              transform var(--dur-fast) var(--ease-apple),
              opacity var(--dur-base) var(--ease-apple),
              border-color var(--dur-base) var(--ease-apple);
}
.cap:active { transform: scale(0.97); }

.cap--primary { background: var(--ha-ink-2); color: #fff; }
.cap--primary:hover { background: #2c2c2e; }

.cap--accent { background: var(--ha-accent); color: #fff; }
.cap--accent:hover { background: var(--ha-accent-h); }

.cap--outline { background: transparent; color: var(--ha-ink-2); border: 1px solid var(--ha-ink-2); padding: 11px 21px; }
.cap--outline:hover { background: var(--ha-ink-2); color: #fff; }

.cap--onDark { background: #fff; color: var(--ha-ink-2); }
.cap--onDark:hover { background: #e8e8ed; }

.cap--onDarkOutline { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.5); padding: 11px 21px; }
.cap--onDarkOutline:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

.cap--ghost { background: transparent; color: var(--ha-accent); padding: 11px 14px; }
.cap--ghost:hover { color: var(--ha-accent-h); }

/* Caret link */
.caret-link {
  font-size: 14px; color: var(--ha-accent); cursor: pointer;
  font-family: var(--font-body); font-weight: 500;
  display: inline-flex; align-items: center; gap: 4px;
}
.caret-link:hover { text-decoration: underline; }

/* Tile / card surfaces */
.surface {
  background: #fff; border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
}
.surface--lift { box-shadow: var(--sh-card); border-color: transparent; }
.surface--dark {
  background: #1d1d1f; border: 1px solid #2a2a2c; color: var(--fg-on-dark);
}

/* Hairline */
.hairline { border: 0; border-top: 1px solid var(--border-1); margin: 0; }

/* Cursor */
.clickable { cursor: pointer; }

/* Glass — used sparingly on dark sections only */
.glass {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-radius: var(--r-lg);
}
.glass--light {
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.5);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-radius: var(--r-lg);
}

/* Module pill chip — for floating around globe */
.float-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-pill);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  color: var(--fg-on-dark);
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.float-chip__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ha-accent);
  box-shadow: 0 0 8px var(--ha-accent);
}

/* Centered headline group */
.heading-group { text-align: center; max-width: 760px; margin: 0 auto; }
.heading-group h2 { margin-top: 14px; }
.heading-group .lede { margin-top: 22px; }

/* Vertical rhythm helpers */
.stack-4 > * + * { margin-top: 4px; }
.stack-8 > * + * { margin-top: 8px; }
.stack-12 > * + * { margin-top: 12px; }
.stack-16 > * + * { margin-top: 16px; }
.stack-24 > * + * { margin-top: 24px; }

/* Page anchor offset for sticky nav */
section[id] { scroll-margin-top: 64px; }

/* Hide tweaks panel content reset */
button { outline: none; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--ha-accent); outline-offset: 2px; }

/* Apple-style "footnote" eyebrow */
.eyebrow-tech {
  font-family: var(--font-tech);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-2);
}

/* (Page-fade animation intentionally omitted — Reveal handles entry per-element.) */
