/* ============================================
   FlowPilot — Base Styles
   Reset, typography defaults, and utilities.
   ============================================ */

/* ─── Modern reset ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-1);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ─── Focus styles (accessibility) ─── */
:focus-visible {
  outline: 2px solid var(--brand-400);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ─── Skip link (keyboard accessibility) ─── */
.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 1000;
  padding: 12px 20px;
  background: var(--brand-500);
  color: #fff;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: top var(--duration-base) var(--ease-out);
}

.skip-link:focus {
  top: 16px;
}

/* ─── Typography ─── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-0);
  letter-spacing: -0.01em;
}

p {
  color: var(--text-1);
}

/* ─── Utility: eyebrow label ─── */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-300);
}

@media (min-width: 1024px) {
  .eyebrow {
    font-size: 13px;
  }
}

/* ─── Utility: section container ─── */
.section-container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

/* ─── Utility: section padding ─── */
.section-padding {
  padding-top: 64px;
  padding-bottom: 64px;
}

@media (min-width: 640px) {
  .section-padding {
    padding-top: 80px;
    padding-bottom: 80px;
  }
}

@media (min-width: 1024px) {
  .section-padding {
    padding-top: 120px;
    padding-bottom: 120px;
  }
}

/* ─── Utility: section header ─── */
.section-header {
  text-align: center;
  margin-bottom: 48px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.section-header .eyebrow {
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(32px, 4.5vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
}

.section-subhead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-1);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 1024px) {
  .section-header {
    margin-bottom: 72px;
  }
}

/* ─── Utility: visually hidden (screen reader only) ─── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Scroll reveal ─── */
/* Elements with .reveal class start hidden + offset, then transition
   to visible state when .revealed class is added by reveal.js
   (via IntersectionObserver). Respects prefers-reduced-motion. */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 700ms var(--ease-out),
    transform 700ms var(--ease-out);
  will-change: opacity, transform;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
