/*
 * EveryCare marketing site.
 *
 * The palette and type scale come from docs/18-visual-theme-and-illustrations.md
 * (Deep Teal #0F766E, mint accents, neutral surfaces, restrained status colour).
 * Fraunces carries the warmth of the display voice; Inter matches the app UI.
 */

:root {
  /* Brand */
  --teal-900: #134e4a;
  --teal-800: #115e59;
  --teal-700: #0f766e;
  --teal-500: #14b8a6;
  --teal-300: #5eead4;
  --teal-100: #ccfbf1;

  /* Neutrals */
  --bg: #f8fafa;
  --surface: #ffffff;
  --surface-muted: #eef2f2;
  --ink: #172b2a;
  --ink-soft: #64748b;
  --border: #e2e8e8;

  /* Status, used sparingly */
  --success: #15803d;
  --success-bg: #dcfce7;
  --warning: #b45309;
  --warning-bg: #fef3c7;

  --shell: min(1120px, 100% - 2.5rem);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-card: 0 1px 2px rgba(19, 78, 74, 0.05), 0 18px 40px -28px rgba(19, 78, 74, 0.4);

  --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--teal-700);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-variation-settings:
    'SOFT' 20,
    'WONK' 1,
    'opsz' 40;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

:focus-visible {
  outline: 3px solid var(--teal-500);
  outline-offset: 3px;
  border-radius: 4px;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  background: var(--surface);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top 150ms ease;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(248, 250, 250, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}

.site-header .shell {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 76px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.wordmark svg {
  width: 34px;
  height: 34px;
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--teal-700);
}

.site-nav .button {
  color: var(--surface);
}

/* --------------------------------------------------------------- buttons */

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0 1.5rem;
  border-radius: 999px;
  background: var(--teal-700);
  color: var(--surface);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    background 150ms ease,
    transform 150ms ease;
}

.button:hover {
  background: var(--teal-900);
  transform: translateY(-1px);
}

.button--quiet {
  background: transparent;
  color: var(--teal-700);
  border-color: var(--border);
}

.button--quiet:hover {
  background: var(--teal-100);
  color: var(--teal-900);
}

/* Store badges are drawn in-brand rather than hotlinked. */
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 58px;
  padding: 0 1.25rem 0 1rem;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  border: 1px solid var(--ink);
  transition:
    transform 150ms ease,
    background 150ms ease;
}

.store-badge:hover {
  transform: translateY(-2px);
  background: #0d1f1e;
}

.store-badge svg {
  width: 26px;
  height: 26px;
  flex: none;
}

.store-badge span {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.3;
}

.store-badge strong {
  display: block;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-transform: none;
  color: #fff;
}

.stores--on-dark .store-badge {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--surface);
}

.stores--on-dark .store-badge:hover {
  background: var(--teal-100);
}

.stores--on-dark .store-badge span {
  color: var(--ink-soft);
}

.stores--on-dark .store-badge strong {
  color: var(--ink);
}

/* ------------------------------------------------------------------ hero */

.hero {
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem);
}

.hero .shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-800);
  background: var(--teal-100);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
}

.hero h1 {
  font-size: clamp(2.6rem, 5.4vw, 4rem);
  margin: 1.5rem 0 1.25rem;
}

.hero h1 em {
  font-style: italic;
  color: var(--teal-700);
}

.hero p.lede {
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 34ch;
}

.hero .stores {
  margin-top: 2rem;
}

.hero .fineprint {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.hero-art {
  position: relative;
}

.hero-art svg {
  width: 100%;
  height: auto;
}

/* ------------------------------------------------------- section scaffold */

.section {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
}

.section-head {
  max-width: 46ch;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-head h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  margin-bottom: 0.9rem;
}

.section-head p {
  color: var(--ink-soft);
  font-size: 1.075rem;
}

.label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-700);
  margin-bottom: 0.9rem;
}

/* The dashed arc from the hero returns as the divider between sections. */
.arc-divider {
  display: block;
  width: 100%;
  height: 34px;
  color: var(--teal-300);
  opacity: 0.85;
}

/* -------------------------------------------------------------- features */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-card);
}

.card .spot {
  width: 88px;
  height: 88px;
  margin-bottom: 1.25rem;
}

.card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.65rem;
}

.card p {
  color: var(--ink-soft);
  font-size: 1rem;
}

/* ------------------------------------------------------------------ modes */

.modes {
  background: var(--surface);
  border-block: 1px solid var(--border);
}

.mode-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.75rem 2.5rem;
}

.mode-list li {
  padding-top: 1.25rem;
  border-top: 2px solid var(--teal-100);
}

.mode-list h3 {
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}

.mode-list p {
  color: var(--ink-soft);
  font-size: 0.99rem;
}

/* ------------------------------------------------------------ commitments */

.pledge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem 2.5rem;
}

.pledge {
  display: flex;
  gap: 0.9rem;
}

.pledge svg {
  width: 28px;
  height: 28px;
  flex: none;
  margin-top: 0.2rem;
  color: var(--teal-700);
}

.pledge h3 {
  font-family: var(--body);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0;
  margin-bottom: 0.25rem;
}

.pledge p {
  color: var(--ink-soft);
  font-size: 0.97rem;
}

/* --------------------------------------------------------------- closing */

.closing {
  background: var(--teal-900);
  color: #eaf6f4;
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 2.5rem;
  align-items: center;
}

.closing h2 {
  color: #fff;
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  margin-bottom: 1rem;
}

.closing p {
  color: rgba(234, 246, 244, 0.78);
  max-width: 40ch;
}

.closing .stores {
  margin-top: 2rem;
}

.closing-art svg {
  width: 100%;
  height: auto;
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  padding: 3.5rem 0 4rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  align-items: flex-start;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.footer-note {
  max-width: 32ch;
}

.footer-links {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--ink-soft);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--teal-700);
  text-decoration: underline;
}

.footer-bottom {
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  font-size: 0.9rem;
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 860px) {
  .hero .shell,
  .closing {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-art {
    order: -1;
    max-width: 460px;
  }

  .hero p.lede {
    max-width: 46ch;
  }

  .site-nav a:not(.button) {
    display: none;
  }

  .closing-art {
    display: none;
  }
}

/* ----------------------------------------------------------------- motion */

.rise {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 700ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.rise:nth-child(2) {
  animation-delay: 80ms;
}
.rise:nth-child(3) {
  animation-delay: 160ms;
}
.rise:nth-child(4) {
  animation-delay: 240ms;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

/* The care circle turns slowly; the people stay upright. */
.orbit {
  transform-origin: 260px 250px;
  animation: orbit 48s linear infinite;
}

@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}

.orbit-node {
  animation: counter-orbit 48s linear infinite;
}

@keyframes counter-orbit {
  to {
    transform: rotate(-360deg);
  }
}

.float {
  animation: float 6s ease-in-out infinite;
}

.float--slow {
  animation-duration: 8s;
  animation-delay: -2s;
}

@keyframes float {
  50% {
    transform: translateY(-8px);
  }
}

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

  .rise,
  .orbit,
  .orbit-node,
  .float {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
