:root {
  --bg-top: #fff7ea;
  --bg-bottom: #ffe1cb;
  --surface: rgba(255, 252, 247, 0.82);
  --surface-strong: #fffdfa;
  --text-main: #1f1b2d;
  --text-soft: #5f5a74;
  --accent: #ff6b57;
  --accent-strong: #e04331;
  --accent-cool: #3ec7b4;
  --line: rgba(84, 61, 46, 0.12);
  --shadow: 0 24px 70px rgba(107, 51, 29, 0.15);
  --radius-xl: 30px;
  --radius-lg: 22px;
}

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

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top left, rgba(62, 199, 180, 0.22), transparent 36%),
    radial-gradient(circle at right 15%, rgba(255, 107, 87, 0.18), transparent 30%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(14px);
  opacity: 0.55;
}

body::before {
  width: 12rem;
  height: 12rem;
  top: 8%;
  right: -3rem;
  background: rgba(62, 199, 180, 0.16);
}

body::after {
  width: 10rem;
  height: 10rem;
  left: -2.5rem;
  bottom: 16%;
  background: rgba(255, 107, 87, 0.18);
}

.page-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.hero-card {
  width: min(100%, 32rem);
  padding: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 2rem;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-copy {
  text-align: center;
  padding: 0.75rem 0.5rem 0.35rem;
}

.eyebrow,
.result-card__eyebrow,
.status-kicker {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

h1,
h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  line-height: 1;
}

h1 {
  margin-top: 0.55rem;
  font-size: clamp(2.6rem, 11vw, 4.6rem);
}

.lede {
  margin: 0.8rem auto 0;
  max-width: 18rem;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--text-soft);
}

.translator-panel {
  display: grid;
  gap: 1rem;
  margin-top: 1.15rem;
  justify-items: center;
}

.pet-selector {
  margin: 0;
  padding: 0.35rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  border: 0;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  width: min(100%, 24rem);
}

.pet-option {
  position: relative;
  cursor: pointer;
}

.pet-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pet-option span {
  display: block;
  padding: 0.95rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 18px;
  text-align: center;
  font-weight: 700;
  color: var(--text-soft);
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.pet-option input:checked + span {
  color: var(--text-main);
  border-color: rgba(255, 107, 87, 0.2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 235, 226, 0.92));
  transform: translateY(-1px);
}

.name-field {
  display: grid;
  gap: 0.45rem;
  color: var(--text-soft);
  font-size: 0.94rem;
  width: min(100%, 24rem);
  text-align: center;
}

.name-field span {
  font-weight: 700;
}

.name-field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.95rem 1rem;
  font: inherit;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.76);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.name-field input:focus {
  outline: none;
  border-color: rgba(62, 199, 180, 0.6);
  box-shadow: 0 0 0 4px rgba(62, 199, 180, 0.14);
}

.mic-zone {
  position: relative;
  display: grid;
  place-items: center;
  padding: 1rem 0 0.4rem;
  min-height: 17rem;
  width: 100%;
}

.mic-rings {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.mic-rings span {
  position: absolute;
  width: 11.5rem;
  height: 11.5rem;
  border-radius: 999px;
  border: 1px solid rgba(62, 199, 180, 0.16);
  animation: ringFloat 6s ease-in-out infinite;
}

.mic-rings span:nth-child(2) {
  width: 14rem;
  height: 14rem;
  animation-delay: -1.7s;
}

.mic-rings span:nth-child(3) {
  width: 16.5rem;
  height: 16.5rem;
  animation-delay: -3.4s;
}

.mic-button {
  position: relative;
  z-index: 1;
  width: 11rem;
  height: 11rem;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  gap: 0.65rem;
  padding: 1.3rem;
  background:
    radial-gradient(circle at 30% 30%, #fff8f0 0%, #ffd0c1 30%, #ff775f 64%, #da3d2d 100%);
  color: white;
  box-shadow:
    0 18px 40px rgba(224, 67, 49, 0.34),
    inset 0 2px 0 rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
  animation: buttonPulse 2.8s ease-in-out infinite;
}

.mic-button:hover,
.mic-button:focus-visible {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 24px 50px rgba(224, 67, 49, 0.38),
    inset 0 2px 0 rgba(255, 255, 255, 0.35);
}

.mic-button:focus-visible {
  outline: 4px solid rgba(62, 199, 180, 0.34);
  outline-offset: 4px;
}

.mic-button:active,
.mic-button.is-busy {
  transform: scale(0.98);
}

.mic-button.is-busy {
  animation-duration: 0.9s;
}

.mic-button__icon {
  width: 3.6rem;
  height: 3.6rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.mic-button__icon svg {
  width: 1.8rem;
  height: 1.8rem;
  fill: currentColor;
}

.mic-button__label {
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  line-height: 1.1;
}

.status-panel,
.result-card,
.soft-cta {
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.82);
}

.status-panel {
  padding: 1rem 1rem 1.05rem;
  width: min(100%, 24rem);
  text-align: center;
}

.status-text {
  margin: 0.45rem 0 0;
  min-height: 2.8rem;
  color: var(--text-main);
  line-height: 1.5;
}

.result-card {
  margin-top: 1rem;
  padding: 1.2rem;
  transform: translateY(10px);
  opacity: 0;
  transition: transform 280ms ease, opacity 280ms ease;
}

.result-card.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.result-card h2 {
  margin-top: 0.45rem;
  font-size: 1.7rem;
}

.result-card__quote {
  margin: 0.85rem 0 0;
  font-size: 1.2rem;
  line-height: 1.5;
}

.result-card__share {
  margin: 1rem 0 0;
  color: var(--text-soft);
  font-size: 0.96rem;
}

.result-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1rem;
}

.secondary-button {
  border: 1px solid rgba(95, 90, 116, 0.14);
  border-radius: 16px;
  padding: 0.85rem 0.65rem;
  background: var(--surface-strong);
  color: var(--text-main);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.secondary-button:hover,
.secondary-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 107, 87, 0.24);
  background: #fff7f3;
}

.soft-cta {
  margin-top: 1rem;
  padding: 1rem;
  text-align: center;
}

.soft-cta p {
  margin: 0;
  line-height: 1.45;
  color: var(--text-soft);
}

.soft-cta p + p {
  margin-top: 0.4rem;
}

.soft-cta a {
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: none;
}

.soft-cta a:hover,
.soft-cta a:focus-visible {
  text-decoration: underline;
}

@keyframes buttonPulse {
  0%,
  100% {
    box-shadow:
      0 18px 40px rgba(224, 67, 49, 0.34),
      inset 0 2px 0 rgba(255, 255, 255, 0.35);
  }
  50% {
    box-shadow:
      0 22px 48px rgba(224, 67, 49, 0.46),
      0 0 0 12px rgba(255, 107, 87, 0.08),
      inset 0 2px 0 rgba(255, 255, 255, 0.35);
  }
}

@keyframes ringFloat {
  0%,
  100% {
    transform: scale(0.96);
    opacity: 0.46;
  }
  50% {
    transform: scale(1.04);
    opacity: 0.18;
  }
}

@media (min-width: 700px) {
  .page-shell {
    padding: 2rem;
  }

  .hero-card {
    width: min(100%, 62rem);
    padding: 1.4rem;
  }

  .translator-panel {
    justify-items: center;
  }

  .name-field,
  .pet-selector,
  .status-panel {
    width: min(100%, 28rem);
  }

  .mic-zone {
    min-height: 18rem;
  }

  .result-card,
  .soft-cta {
    margin-inline: auto;
    max-width: 44rem;
  }
}

@media (max-width: 380px) {
  .hero-card {
    padding: 0.9rem;
  }

  .mic-button {
    width: 9.9rem;
    height: 9.9rem;
  }

  .mic-rings span {
    width: 10.2rem;
    height: 10.2rem;
  }

  .mic-rings span:nth-child(2) {
    width: 12.8rem;
    height: 12.8rem;
  }

  .mic-rings span:nth-child(3) {
    width: 14.8rem;
    height: 14.8rem;
  }

  .result-actions {
    grid-template-columns: 1fr;
  }
}

@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;
  }
}
