/* base.css — reset, typography, page containers and buttons (used on every page). */

/* ── Reset ── */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  -webkit-text-size-adjust: 100%;
}

html.no-scroll {
  overflow: hidden;
}

body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

ul,
ol {
  list-style: none;
}

button {
  font: inherit;
}

/* Without this, rules like img { display: block } would override the hidden attribute. */

[hidden] {
  display: none !important;
}

/* ── Typography ── */

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--navy-deep);
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-ink);
}

.accent {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Vertical rhythm: put .flow on a container and every child gets the same gap.
Override the gap per container with --flow-space. */

.flow > * + * {
  margin-top: var(--flow-space, 1rem);
}

/* ── Page containers ── */

.wrap {
  width: min(100% - 2 * var(--gutter), var(--max-width));
  margin-inline: auto;
}

.section {
  padding-block: var(--section-y);
}

.section--tint {
  background: var(--tint);
}

.section--flush-top {
  padding-top: 0;
}

/* ── Buttons: green-deep is the one primary action (call). ── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--tap);
  padding: 0.7rem 1.5rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.btn svg {
  flex: none;
  width: 1rem;
  height: 1rem;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--green-deep);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--green-ink);
  transform: translateY(-2px);
}

.btn-outline {
  border-color: var(--navy);
  color: var(--navy);
  background: transparent;
}

.btn-outline:hover {
  background: var(--navy);
  color: #fff;
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
  background: transparent;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* ── Focus: always visible; lighter ring on dark surfaces ── */

:focus-visible {
  outline: 3px solid var(--green-deep);
  outline-offset: 3px;
}

:is(.hero, .process, .page-hero, .site-footer, .emergency-strip, .mobile-cta, .cta-panel) :focus-visible {
  outline-color: var(--green-soft);
}

.skip-link {
  position: absolute;
  top: 0;
  left: -999px;
  z-index: 200;
  padding: 0.75rem 1.125rem;
  border-radius: 0 0 10px 0;
  background: var(--green-deep);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}

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

/* ── Scroll reveal: only hides content once JS has confirmed it can reveal it (html.js) ── */

.js .reveal {
  opacity: 0;
  transform: translateY(1.4rem);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* ── Toast (used by "Link copied") ── */

.toast-stack {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  width: min(92vw, 380px);
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  width: 100%;
  padding: 0.8rem 1.1rem;
  border-radius: 12px;
  background: var(--navy-deep);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.show {
  opacity: 1;
  transform: none;
}

@media (max-width: 820px) {
  .toast-stack {
    bottom: calc(var(--bar-h) + 1rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
