/* index.html only: hero, steps, bento grid, AI split, CTA, search. */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: var(--space-xl);
  align-items: center;
  padding-top: var(--space-xl);
  padding-bottom: var(--space-2xl);
}

/* Static paw-print texture behind the hero copy/corgi -- brand green at low
   opacity, three prints per tile at different angles so it doesn't read as
   an obvious repeating grid. Decorative only: aria-hidden via ::before,
   never animated (this project already backed off decorative motion once,
   see js/parallax.js). Swap fill hex in the dark-mode override below since
   data-URI SVGs can't read CSS custom properties. */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  z-index: 0;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='%23234d3a'%3E%3Cg transform='translate(24,30) rotate(-12) scale(0.9)'%3E%3Cellipse cx='0' cy='10' rx='7' ry='5.5'/%3E%3Cellipse cx='-6' cy='-2' rx='2.6' ry='3.4'/%3E%3Cellipse cx='-2' cy='-6' rx='2.4' ry='3.2'/%3E%3Cellipse cx='2.5' cy='-6' rx='2.4' ry='3.2'/%3E%3Cellipse cx='6.5' cy='-2' rx='2.6' ry='3.4'/%3E%3C/g%3E%3Cg transform='translate(100,58) rotate(20) scale(1.1)'%3E%3Cellipse cx='0' cy='10' rx='7' ry='5.5'/%3E%3Cellipse cx='-6' cy='-2' rx='2.6' ry='3.4'/%3E%3Cellipse cx='-2' cy='-6' rx='2.4' ry='3.2'/%3E%3Cellipse cx='2.5' cy='-6' rx='2.4' ry='3.2'/%3E%3Cellipse cx='6.5' cy='-2' rx='2.6' ry='3.4'/%3E%3C/g%3E%3Cg transform='translate(48,112) rotate(-32) scale(0.8)'%3E%3Cellipse cx='0' cy='10' rx='7' ry='5.5'/%3E%3Cellipse cx='-6' cy='-2' rx='2.6' ry='3.4'/%3E%3Cellipse cx='-2' cy='-6' rx='2.4' ry='3.2'/%3E%3Cellipse cx='2.5' cy='-6' rx='2.4' ry='3.2'/%3E%3Cellipse cx='6.5' cy='-2' rx='2.6' ry='3.4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  pointer-events: none;
}

@media (prefers-color-scheme: dark) {
  .hero::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='%235aa77e'%3E%3Cg transform='translate(24,30) rotate(-12) scale(0.9)'%3E%3Cellipse cx='0' cy='10' rx='7' ry='5.5'/%3E%3Cellipse cx='-6' cy='-2' rx='2.6' ry='3.4'/%3E%3Cellipse cx='-2' cy='-6' rx='2.4' ry='3.2'/%3E%3Cellipse cx='2.5' cy='-6' rx='2.4' ry='3.2'/%3E%3Cellipse cx='6.5' cy='-2' rx='2.6' ry='3.4'/%3E%3C/g%3E%3Cg transform='translate(100,58) rotate(20) scale(1.1)'%3E%3Cellipse cx='0' cy='10' rx='7' ry='5.5'/%3E%3Cellipse cx='-6' cy='-2' rx='2.6' ry='3.4'/%3E%3Cellipse cx='-2' cy='-6' rx='2.4' ry='3.2'/%3E%3Cellipse cx='2.5' cy='-6' rx='2.4' ry='3.2'/%3E%3Cellipse cx='6.5' cy='-2' rx='2.6' ry='3.4'/%3E%3C/g%3E%3Cg transform='translate(48,112) rotate(-32) scale(0.8)'%3E%3Cellipse cx='0' cy='10' rx='7' ry='5.5'/%3E%3Cellipse cx='-6' cy='-2' rx='2.6' ry='3.4'/%3E%3Cellipse cx='-2' cy='-6' rx='2.4' ry='3.2'/%3E%3Cellipse cx='2.5' cy='-6' rx='2.4' ry='3.2'/%3E%3Cellipse cx='6.5' cy='-2' rx='2.6' ry='3.4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  }
}

.hero__copy {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2.3rem, 1.7rem + 2.4vw, 3.6rem);
  max-width: 16ch;
}

.hero__lead {
  margin-top: var(--space-sm);
  max-width: 46ch;
  color: var(--color-muted);
  font-size: var(--step-1);
}

.hero__ctas {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  flex-wrap: wrap;
}

.hero__visual {
  position: relative;
  z-index: 1;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

/* Real corgi, real transparency (source PNG has an actual alpha channel --
   no mask trick needed). js/parallax.js runs the jump-loop on this. */
.hero-corgi {
  width: min(529px, 90%);
  height: auto;
  filter: drop-shadow(0 24px 20px rgba(28, 33, 29, 0.2));
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  padding-block: var(--space-xl);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.step__index {
  font-family: var(--font-mono);
  color: var(--color-primary);
  font-size: var(--step-1);
}

.step h3 {
  margin-top: 0.5rem;
  font-size: var(--step-1);
}

.step p {
  margin-top: 0.35rem;
}

.section {
  padding-block: var(--space-2xl);
}

.section--alt {
  background: var(--color-surface-alt);
}

.section h2 {
  max-width: 30ch;
  margin-top: 0.5rem;
}

.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: var(--space-lg);
}

.bento__item {
  background: var(--color-surface);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bento__item--featured {
  background: color-mix(in srgb, var(--color-primary) 6%, var(--color-surface));
}

.bento__icon {
  color: var(--color-primary);
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

.bento__item:hover .bento__icon {
  transform: scale(1.15) rotate(-4deg);
}

.bento__item h3 {
  font-size: var(--step-0);
  font-family: var(--font-sans);
  font-weight: 700;
}

.ia-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.ia-card__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.ia-card__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary-bright);
  animation: pulse-dot 2s ease-in-out infinite;
}

.ia-card__stock {
  margin-top: var(--space-sm);
  display: inline-block;
  background: color-mix(in srgb, var(--color-primary) 14%, transparent);
  color: var(--color-primary);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: var(--step--1);
  font-weight: 600;
}

.clinics-cta {
  text-align: center;
}

.clinics-cta h2 {
  max-width: none;
  margin-inline: auto;
}

.search-intro {
  text-align: center;
}

.search-intro h2 {
  margin-inline: auto;
}

.search-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
  margin-top: var(--space-lg);
}

.search-visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 5;
}

.search-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-box {
  max-width: 480px;
  margin-inline: auto;
}

@media (max-width: 860px) {
  .search-split {
    grid-template-columns: 1fr;
  }
  .search-visual {
    aspect-ratio: 16 / 9;
    max-width: 480px;
    margin-inline: auto;
  }
}

.search-results {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.search-results li {
  animation: bubble-in 260ms cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.search-results li:nth-child(2) {
  animation-delay: 40ms;
}
.search-results li:nth-child(3) {
  animation-delay: 80ms;
}
.search-results li:nth-child(4) {
  animation-delay: 120ms;
}

.search-results a {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--color-ink);
  transition: border-color 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

.search-results a:hover {
  border-color: var(--color-primary);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero__visual {
    display: none;
  }
  .steps,
  .ia-split {
    grid-template-columns: 1fr;
  }
  .bento {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .bento {
    grid-template-columns: 1fr;
  }
}
