/* =============================================================
   BASE.CSS
   Reset, box model, and base element styling. No component or
   layout-specific rules here — see layout.css / components.css.
============================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--color-slate-600);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

svg {
  display: block;
}

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--color-charcoal-900);
  line-height: var(--lh-tight);
  font-weight: 700;
}

p {
  margin: 0;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input,
textarea,
select,
button {
  font-family: inherit;
  font-size: inherit;
}

/* ---------- Respect user motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Accessibility utilities ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 0;
  z-index: 999;
  background: var(--color-green-600);
  color: var(--color-white);
  padding: var(--space-3) var(--space-5);
  font-weight: 600;
  border-radius: 0 0 var(--radius-sm) 0;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
}

/* Consistent visible focus state across all interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--color-green-700);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---------- Reusable text utilities ---------- */
.text-accent {
  color: var(--color-green-600);
}

/* Eyebrow label with a small sparkle glyph — echoes the sparkle
   mark beside the apple in the logo; the brand's signature motif
   used sparingly throughout the page. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-green-600);
  margin: 0 0 var(--space-3);
}

.eyebrow::before {
  content: "";
  width: 14px;
  height: 14px;
  background-color: var(--color-green-500);
  clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%);
  flex-shrink: 0;
}

/* ---------- Icon base ---------- */
.icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

.icon--sm { width: 18px; height: 18px; }
.icon--md { width: 24px; height: 24px; }
.icon--lg { width: 36px; height: 36px; }

/* ---------- Scroll-reveal utility ----------
   Applied via JS (ScrollReveal module in main.js) the first time an
   element with this class enters the viewport. `--reveal-delay` is
   set per-element by the script to stagger groups of cards/steps.
   Falls back to fully visible if JS/observer support is unavailable. */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

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

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