/* ==========================================================================
   Base, utilities and shared components (buttons, toast)
   ========================================================================== */

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

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

html.is-modal-open {
  overflow: hidden;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

[hidden] {
  display: none !important;
}

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

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

/* Focus — visible, high-contrast ring on every interactive element */
:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--c-ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

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

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  --btn-h: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--btn-h);
  padding: 0 26px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out),
    border-color 0.25s var(--ease-out), box-shadow 0.35s var(--ease-out),
    transform 0.35s var(--ease-out);
}

.btn .icon {
  transition: transform 0.35s var(--ease-out);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn--primary {
  background: var(--c-red);
  color: #fff;
  box-shadow: var(--shadow-red);
}

.btn--primary:hover {
  background: var(--c-red-600);
  transform: translateY(-2px);
  box-shadow: 0 18px 34px -14px rgba(216, 38, 26, 0.65);
}

.btn--primary:hover .icon {
  transform: rotate(-8deg) scale(1.08);
}

.btn--secondary {
  background: #fff;
  color: var(--c-ink-2);
  border-color: var(--c-ink-2);
}

.btn--secondary:hover {
  background: var(--c-ink-2);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--secondary:hover .icon {
  transform: rotate(12deg);
}

.btn--sm {
  --btn-h: 42px;
  padding: 0 18px;
  font-size: 0.92rem;
  gap: 8px;
}

/* --------------------------------------------------------------------------
   Toast (used to flag unconfigured contact numbers during review)
   -------------------------------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: var(--radius);
  background: var(--c-ink);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* --------------------------------------------------------------------------
   Reduced motion — collapse every animation/transition to its end state
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}
