:root {
  color-scheme: light;
  --ink: #17231d;
  --muted: #647069;
  --surface: #ffffff;
  --background: #fffaf2;
  --accent: #ef6a37;
  --accent-dark: #cf4c1f;
  --accent-soft: #fff0e7;
  --green: #227a55;
  --green-soft: #e9f7ef;
  --border: #e9e3d9;
  --shadow: 0 18px 60px rgba(40, 49, 44, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--background);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 8%, rgba(239, 106, 55, 0.1), transparent 24rem),
    radial-gradient(circle at 90% 90%, rgba(34, 122, 85, 0.08), transparent 28rem),
    var(--background);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: min(100%, 700px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  color: white;
  background: var(--accent);
  transform: rotate(-3deg);
}

.brand-mark svg {
  width: 21px;
  fill: currentColor;
}

.screen {
  display: none;
  animation: enter 320ms ease both;
}

.screen.is-active {
  display: block;
}

#start-screen {
  padding-top: clamp(24px, 8vh, 86px);
}

.eyebrow,
.result-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 620px;
  margin: 24px 0 18px;
  font-size: clamp(2.5rem, 8vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

h1 span {
  color: var(--accent);
}

.lead {
  max-width: 570px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.5vw, 1.22rem);
  line-height: 1.65;
}

.benefits {
  display: grid;
  gap: 12px;
  margin-bottom: 32px;
  color: #3f4c45;
  font-weight: 650;
}

.benefits div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check {
  display: inline-grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--green);
  background: var(--green-soft);
  font-size: 0.84rem;
  font-weight: 900;
}

.primary-button {
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 16px;
  padding: 16px 22px;
  color: white;
  background: var(--accent);
  box-shadow: 0 12px 28px rgba(239, 106, 55, 0.24);
  cursor: pointer;
  font-weight: 850;
  transition:
    transform 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.primary-button:hover {
  background: var(--accent-dark);
  box-shadow: 0 15px 32px rgba(239, 106, 55, 0.3);
  transform: translateY(-2px);
}

.primary-button:active {
  transform: translateY(0);
}

.progress-area {
  position: sticky;
  z-index: 4;
  top: 0;
  padding: 8px 0 20px;
  background: color-mix(in srgb, var(--background) 92%, transparent);
  backdrop-filter: blur(10px);
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.back-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #eee8de;
}

.progress-track span {
  display: block;
  width: 12.5%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #ff9a58);
  transition: width 280ms ease;
}

.question-container {
  padding-top: clamp(16px, 5vh, 50px);
}

.question-number {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.question-title {
  margin-bottom: 12px;
  font-size: clamp(1.65rem, 5vw, 2.55rem);
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.question-helper {
  margin-bottom: 24px;
  color: var(--muted);
  line-height: 1.55;
}

.answers {
  display: grid;
  gap: 10px;
}

.answer-button {
  width: 100%;
  min-height: 58px;
  border: 1.5px solid var(--border);
  border-radius: 15px;
  padding: 15px 17px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  font-weight: 680;
  line-height: 1.35;
  text-align: left;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.answer-button:hover,
.answer-button.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateX(3px);
}

.text-input {
  width: 100%;
  min-height: 62px;
  border: 1.5px solid var(--border);
  border-radius: 15px;
  outline: none;
  padding: 16px 18px;
  color: var(--ink);
  background: var(--surface);
  font-size: 1.05rem;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.text-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.text-input.has-error {
  border-color: #c83f30;
  box-shadow: 0 0 0 4px #fee9e5;
}

.input-error {
  min-height: 20px;
  margin: 8px 2px 0;
  color: #a83227;
  font-size: 0.82rem;
  font-weight: 700;
}

.input-action {
  margin-top: 4px;
}

.multiple-actions {
  position: sticky;
  bottom: 0;
  padding: 16px 0 4px;
  background: linear-gradient(transparent, var(--background) 24%);
}

.loading-screen {
  padding-top: clamp(65px, 15vh, 130px);
  text-align: center;
}

.dog-avatar {
  display: grid;
  width: 88px;
  height: 88px;
  margin: 0 auto 24px;
  place-items: center;
  border-radius: 28px;
  background: var(--accent-soft);
  box-shadow: var(--shadow);
  font-size: 2.8rem;
  animation: breathe 1.4s ease-in-out infinite;
}

.loading-screen h2 {
  margin-bottom: 30px;
  font-size: clamp(1.65rem, 5vw, 2.3rem);
  letter-spacing: -0.04em;
}

.analysis-list {
  display: inline-grid;
  gap: 12px;
  text-align: left;
}

.analysis-item {
  opacity: 0;
  color: var(--muted);
  transform: translateY(7px);
  animation: reveal 350ms ease forwards;
}

.analysis-item:nth-child(2) {
  animation-delay: 600ms;
}

.analysis-item:nth-child(3) {
  animation-delay: 1200ms;
}

.analysis-item span {
  margin-right: 8px;
  color: var(--green);
  font-weight: 900;
}

.result-screen {
  padding-bottom: 40px;
}

.result-screen h2 {
  margin: 20px 0 18px;
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.result-screen h2 span {
  color: var(--accent);
}

.result-copy {
  margin: 0 0 18px;
  border: 1px solid #cce8d8;
  border-radius: 18px;
  padding: 18px;
  color: #315544;
  background: linear-gradient(135deg, #e8f8ef, #f6fff9);
  font-size: 0.96rem;
  line-height: 1.55;
}

.result-copy p {
  margin-bottom: 10px;
}

.result-copy p:last-child {
  margin-bottom: 0;
}

.result-copy strong {
  color: var(--ink);
}

.guidance-box {
  margin: 14px 0 0;
  border-left: 4px solid #e18936;
  border-radius: 4px 12px 12px 4px;
  padding: 13px 14px;
  color: #5b4035;
  background: #fff6e8;
  font-size: 1rem;
  line-height: 1.62;
}

.safety-box {
  margin: 22px 0;
  border-radius: 14px;
  padding: 16px 18px;
  color: #62483e;
  background: #fff2e8;
  font-size: 0.9rem;
}

.offer-card {
  position: relative;
  overflow: hidden;
  margin-top: 18px;
  border: 0;
  border-radius: 24px;
  padding: clamp(22px, 5vw, 34px);
  color: white;
  background:
    radial-gradient(circle at 95% 0%, rgba(255, 255, 255, 0.18), transparent 16rem),
    linear-gradient(145deg, #194f3b, #247a56);
  box-shadow: 0 22px 55px rgba(25, 79, 59, 0.24);
}

.result-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 0 0 20px;
  padding: 16px 18px;
  background: var(--accent);
  line-height: 1.2;
  text-align: center;
}

.offer-kicker {
  display: inline-flex;
  border-radius: 999px;
  padding: 7px 10px;
  color: #164d37;
  background: #dff5e8;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.offer-card h3 {
  margin: 10px 0 12px;
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  letter-spacing: -0.045em;
}

.offer-card > p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

.offer-card .offer-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 22px 0 14px;
  padding: 16px 18px;
  color: #4b2818;
  background: #ffb35e;
  box-shadow: 0 12px 28px rgba(15, 46, 34, 0.28);
  line-height: 1.2;
  text-align: center;
}

.offer-card .offer-cta:hover {
  background: #ffc276;
}

.cta-copy {
  display: block;
  min-width: 0;
}

.cta-copy strong {
  white-space: nowrap;
}

.cta-arrow {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  align-self: center;
  border-radius: 50%;
  background: rgba(75, 40, 24, 0.1);
  font-size: 1.35rem;
}

.offer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 22px;
}

.offer-tags span {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 7px 10px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  font-weight: 760;
}

.offer-card ul {
  display: grid;
  gap: 10px;
  margin: 22px 0 26px;
  padding: 0;
  list-style: none;
}

.offer-card li {
  position: relative;
  padding-left: 28px;
  line-height: 1.45;
}

.offer-card li::before {
  position: absolute;
  top: 0;
  left: 0;
  color: #93edbb;
  content: "✓";
  font-weight: 900;
}

.offer-card .primary-button {
  font-size: 0.92rem;
}

.offer-disclaimer {
  margin: 14px 0 0 !important;
  color: rgba(255, 255, 255, 0.58) !important;
  font-size: 0.72rem;
  text-align: center;
}

.final-cta {
  margin-top: 22px;
  background: var(--accent);
}

.text-button {
  display: block;
  margin: 22px auto 0;
  border: 0;
  padding: 10px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes breathe {
  50% {
    transform: scale(1.06) rotate(2deg);
  }
}

@media (max-width: 520px) {
  .app-shell {
    padding: 18px;
  }

  .brand {
    margin-bottom: 20px;
  }

  #start-screen {
    padding-top: 24px;
  }

  h1 {
    font-size: clamp(2.45rem, 13vw, 3.7rem);
  }

  .offer-card {
    border-radius: 20px;
  }

  .offer-card .offer-cta {
    font-size: 0.86rem;
  }

  .progress-meta {
    justify-content: flex-end;
  }

  .back-button {
    position: static;
    width: 50px;
    height: 50px;
    margin-top: 18px;
    border: 2px solid var(--accent);
    border-radius: 16px;
    color: white;
    background: var(--accent);
    box-shadow: 0 12px 28px rgba(239, 106, 55, 0.32);
    font-size: 1.35rem;
  }
}

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