/* Dawgz web onboarding — light mode only, tokens mirror the iOS views. */

@font-face {
  font-family: "Outfit";
  src: url("assets/fonts/Outfit-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --title: #4a3532;
  --secondary: rgba(60, 60, 67, 0.6);
  --progress-track: #e0f4ff;
  --progress-fill: #009dff;
  --cta-green: rgb(102, 204, 102);
  --cta-disabled: #8e8e93;
  --field-bg: #f2f2f7;
  --chip-bg: #e5e5ea;
  --select-green: #34c759;
  --blue-bg: #5fbfe5;
  --badge-navy: #10378c;
  --creating-title: rgb(153, 102, 51);
  --stat-orange: rgb(230, 102, 51);
  --error-red: #d92d20;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  font-family: "Outfit", -apple-system, "Helvetica Neue", Arial, sans-serif;
  background: #fff;
  color: #000;
  min-height: 100svh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.bg-blue {
  background: var(--blue-bg);
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

input {
  font-family: inherit;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--progress-fill);
  outline-offset: 2px;
}

.app {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  max-width: 560px;
  margin: 0 auto;
  padding-top: env(safe-area-inset-top);
}

/* Header: back chevron + progress bar */
.top-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px 8px;
  min-height: 56px;
}

.back-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #000;
  margin-left: -12px;
}

.bg-blue .back-btn,
.bg-photo .back-btn {
  color: #fff;
}

.back-btn[hidden] {
  display: none;
}

.progress {
  height: 12px;
  max-width: 150px;
  flex: 1;
  background: var(--progress-track);
  border-radius: 6px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: var(--progress-fill);
  border-radius: 6px;
  transition: width 0.2s ease-in-out;
}

.progress[hidden] {
  display: none;
}

/* Content region */
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 24px 16px;
}

.screen-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--title);
  line-height: 1.25;
}

.screen-subtitle {
  font-size: 15px;
  color: var(--secondary);
  margin-top: 8px;
  line-height: 1.4;
}

/* Footer CTA */
.footer {
  padding: 8px 32px calc(24px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 56px;
  border-radius: 28px;
  background: var(--cta-green);
  color: #fff;
  font-size: 20px;
  font-weight: 600;
}

.cta:disabled {
  background: var(--cta-disabled);
  cursor: default;
}

.cta.cta-inverted {
  background: #fff;
  color: var(--cta-green);
}

.cta.cta-black-text {
  background: #fff;
  color: #000;
}

.none-btn {
  min-height: 44px;
  font-size: 17px;
  font-weight: 600;
  color: var(--title);
}

.legal {
  text-align: center;
  font-size: 11px;
  color: var(--secondary);
  padding: 0 24px 8px;
}

.bg-blue .legal,
.bg-photo .legal {
  color: rgba(255, 255, 255, 0.8);
}

/* Text inputs */
.text-field {
  width: 100%;
  min-height: 56px;
  background: var(--field-bg);
  border: 1px solid transparent;
  border-radius: 28px;
  padding: 0 20px;
  font-size: 20px;
}

.text-field:not(:placeholder-shown) {
  border-color: var(--progress-fill);
}

.search-field-wrap {
  position: relative;
  margin-top: 20px;
}

.search-field {
  width: 100%;
  min-height: 48px;
  background: var(--field-bg);
  border: none;
  border-radius: 12px;
  padding: 0 16px 0 40px;
  font-size: 17px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--secondary);
  pointer-events: none;
}

.other-field {
  width: 100%;
  min-height: 48px;
  background: var(--field-bg);
  border: none;
  border-radius: 12px;
  padding: 0 16px;
  font-size: 17px;
  margin-top: 8px;
}

/* Single/multi choice rows */
.option-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.option-row {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 16px 20px;
  min-height: 56px;
  border-radius: 35px;
  background: rgba(128, 128, 128, 0.1);
  border: 2px solid transparent;
  font-size: 17px;
  font-weight: 500;
  color: #000;
}

.option-row[aria-checked="true"] {
  background: #fff;
  border-color: var(--select-green);
}

.radio-dot {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(128, 128, 128, 0.4);
  background: #fff;
  position: relative;
}

.option-row[aria-checked="true"] .radio-dot {
  border-color: var(--select-green);
  background: var(--select-green);
}

.option-row[aria-checked="true"] .radio-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

/* Gender cards */
.gender-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}

.gender-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 200px;
  border-radius: 16px;
  background: var(--field-bg);
  border: 2px solid transparent;
  font-size: 22px;
  font-weight: 500;
  color: #000;
}

.gender-card img {
  height: 100px;
  width: auto;
}

.gender-card.girl[aria-checked="true"] {
  background: rgba(255, 45, 85, 0.1);
  border-color: #ff2d55;
}

.gender-card.boy[aria-checked="true"] {
  background: rgba(0, 122, 255, 0.1);
  border-color: #007aff;
}

/* Age stepper */
.age-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin-top: 32px;
}

.age-wrap img {
  width: 180px;
  height: 180px;
  object-fit: contain;
}

.age-stepper {
  display: flex;
  align-items: center;
  gap: 20px;
}

.age-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--field-bg);
  font-size: 28px;
  font-weight: 600;
  color: var(--title);
}

.age-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.age-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--title);
  min-width: 130px;
  text-align: center;
}

/* Breed pills */
.pill-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.pill {
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 25px;
  background: var(--field-bg);
  border: 2px solid transparent;
  font-size: 17px;
  font-weight: 500;
  color: #000;
}

.pill[aria-checked="true"] {
  background: #fff;
  border-color: var(--select-green);
}

.no-results {
  margin-top: 24px;
  font-size: 15px;
  color: var(--secondary);
  text-align: center;
}

/* Known-commands chips */
.chip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 16px;
  margin-top: 24px;
}

.chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 10px;
  min-height: 44px;
  border-radius: 20px;
  background: var(--chip-bg);
  font-size: 15px;
  font-weight: 500;
  color: #000;
  text-align: left;
}

.chip-circle {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(128, 128, 128, 0.3);
}

.chip[aria-checked="true"] .chip-circle {
  background: var(--select-green);
  border-color: var(--select-green);
}

/* Illustration screens (shelter, medication) */
.illustration {
  align-self: center;
  height: 220px;
  width: auto;
  object-fit: contain;
  margin-top: 16px;
}

/* Welcome */
.bg-photo {
  background: #5fbfe5 url("assets/img/onboarding-welcome-bg.webp") center/cover
    no-repeat;
}

.welcome-copy {
  margin-top: auto;
  text-align: center;
  color: #fff;
  padding-bottom: 16px;
}

.welcome-copy h1 {
  font-size: 28px;
  font-weight: 700;
}

.welcome-copy p {
  font-size: 20px;
  margin-top: 12px;
  line-height: 1.35;
}

/* Community */
.collage {
  position: relative;
  width: 100%;
  aspect-ratio: 10 / 9;
  max-height: 46svh;
  overflow: hidden;
}

.collage img {
  position: absolute;
  border-radius: 50%;
  opacity: 0.45;
  object-fit: cover;
  transform: translate(-50%, -50%);
}

.badge-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.laurel {
  font-size: 56px;
  color: #fff;
  line-height: 1;
}

.badge-capsules {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.badge-capsule {
  background: var(--badge-navy);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  padding: 6px 18px;
  border-radius: 999px;
  white-space: nowrap;
}

.info-title {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin-top: 40px;
}

.info-body {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  margin-top: 12px;
  padding: 0 8px;
}

/* Encouragement. body.bg-diya, not .bg-diya: the element must outrank the
   body.bg-blue rule that ships alongside it. */
body.bg-diya {
  background: #5fbfe5 url("assets/img/diya-bg.webp") top center/cover no-repeat;
}

.stat-rows {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 28px;
}

.stat-row {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #fff;
}

.stat-circle {
  flex: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--stat-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.stat-text {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
}

/* Social validation. body-scoped for the same reason as body.bg-diya. */
body.bg-social {
  background: #5fbfe5 url("assets/img/social-valid-bg.webp") center/cover
    no-repeat;
}

.social-copy {
  color: #fff;
}

.social-copy h1 {
  font-size: 34px;
  font-weight: 700;
  margin-top: 8px;
}

.social-copy .spacer-chart {
  height: 280px;
  max-height: 40svh;
}

.social-copy p {
  font-size: 17px;
  margin-top: 12px;
}

/* Creating program */
.creating-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--creating-title);
  text-align: center;
  margin-top: 28px;
}

.bars {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 32px;
}

.bar-labels {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.bar-label {
  font-size: 15px;
  font-weight: 500;
}

.bar-pct {
  font-size: 12px;
  font-weight: 500;
}

.bar-track {
  margin-top: 6px;
  height: 8px;
  border-radius: 4px;
  background: rgba(128, 128, 128, 0.3);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0;
  border-radius: 4px;
  background: var(--select-green);
}

.recognized {
  margin-top: 32px;
}

.recognized-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--cta-disabled);
}

.recognized img {
  width: 280px;
  max-width: 100%;
  margin-top: 8px;
}

.testimonial {
  margin-top: 24px;
  background: rgba(128, 128, 128, 0.08);
  border: 1px solid rgba(128, 128, 128, 0.15);
  border-radius: 16px;
  padding: 16px;
}

.testimonial-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.testimonial-title {
  font-size: 17px;
  font-weight: 700;
}

.stars {
  color: #ffcc00;
  font-size: 15px;
  white-space: nowrap;
}

.testimonial-review {
  font-size: 12px;
  color: var(--cta-disabled);
  line-height: 1.6;
  margin-top: 8px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.testimonial-author img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.testimonial-author span {
  font-size: 15px;
  font-weight: 600;
}

/* Account + handoff */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.form-field {
  width: 100%;
  min-height: 52px;
  background: var(--field-bg);
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 0 16px;
  font-size: 17px;
}

.form-field:focus {
  border-color: var(--progress-fill);
}

.field-hint {
  font-size: 13px;
  color: var(--secondary);
  line-height: 1.4;
}

.form-error {
  font-size: 15px;
  color: var(--error-red);
  line-height: 1.4;
}

.form-notice {
  font-size: 15px;
  color: var(--title);
  line-height: 1.4;
}

.link-btn {
  min-height: 44px;
  font-size: 15px;
  font-weight: 600;
  color: var(--progress-fill);
  text-align: center;
}

.handoff-email {
  font-size: 20px;
  font-weight: 600;
  color: var(--title);
  margin-top: 16px;
  word-break: break-all;
}

.open-safari {
  margin-top: 16px;
  padding: 16px;
  border-radius: 14px;
  background: var(--field-bg);
  font-size: 15px;
  line-height: 1.5;
}

.open-safari code {
  word-break: break-all;
  font-size: 13px;
}

/* Consent banner */
.consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-top: 1px solid rgba(128, 128, 128, 0.25);
  padding: 16px 24px calc(16px + env(safe-area-inset-bottom));
  font-size: 14px;
  z-index: 10;
}

.consent-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.consent-actions button {
  min-height: 44px;
  padding: 0 20px;
  border-radius: 22px;
  font-size: 15px;
  font-weight: 600;
}

.consent-accept {
  background: var(--cta-green);
  color: #fff;
}

.consent-decline {
  background: var(--field-bg);
  color: #000;
}

.noscript-msg {
  padding: 24px;
  font-size: 16px;
}

/* Config error */
.config-error {
  margin: 40px 24px;
  padding: 20px;
  border-radius: 14px;
  background: #fff3f2;
  border: 1px solid var(--error-red);
  font-size: 15px;
  line-height: 1.5;
}

@media (max-width: 400px) {
  .chip-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gender-card {
    height: 180px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
