/* Dogful design system v2. Mobile-first at 375px, deliberate desktop treatment.
   Laws: no gradient-glass, no sparkle, no purple, no eyebrow titles, type >= 16px, tap targets >= 56px. */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700;9..144,900&family=Nunito+Sans:opsz,wght@6..12,400;6..12,600;6..12,700;6..12,800&display=swap');

:root {
  --bg: #F7F2E9;
  --card: #FFFFFF;
  --ink: #26251F;
  --muted: #6E6A5E;
  --green: #2F6B4F;
  --green-dark: #24543E;
  --green-deep: #1C3F30;
  --green-soft: #E4EEE6;
  --amber: #D98E2B;
  --amber-soft: #F9EFDC;
  --warn-ink: #7A5A1E;
  --line: #E5DCCB;
  --line-strong: #D8CDB8;
  --radius: 18px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(38,37,31,.05), 0 8px 24px -12px rgba(38,37,31,.14);
  --shadow-lift: 0 2px 4px rgba(38,37,31,.06), 0 16px 36px -14px rgba(38,37,31,.22);
  --shadow-btn: 0 2px 0 var(--green-deep), 0 10px 22px -10px rgba(47,107,79,.55);
  --ease: cubic-bezier(.22,.9,.35,1);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 17px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
}
::selection { background: var(--green-soft); color: var(--green-deep); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Ambient background art: oversized paw arcs, flat color, desktop only */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: 0;
  background:
    radial-gradient(circle 8px at 8% 12%, var(--line) 98%, transparent) ,
    radial-gradient(circle 8px at 12% 9%, var(--line) 98%, transparent),
    radial-gradient(circle 8px at 16% 13%, var(--line) 98%, transparent),
    radial-gradient(circle 14px at 12% 18%, var(--line) 98%, transparent),
    radial-gradient(circle 8px at 88% 88%, var(--line) 98%, transparent),
    radial-gradient(circle 8px at 92% 84%, var(--line) 98%, transparent),
    radial-gradient(circle 8px at 84% 85%, var(--line) 98%, transparent),
    radial-gradient(circle 14px at 88% 92%, var(--line) 98%, transparent);
}
@media (min-width: 760px) { body::before { opacity: .8; } }

/* Layout shells */
.shell { max-width: 480px; margin: 0 auto; padding: 0 18px 72px; position: relative; }
@media (min-width: 760px) { .shell { max-width: 560px; padding-top: 8px; } }

/* Brand header */
.brand {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 18px 0 10px; user-select: none;
}
.brand svg { width: 26px; height: 26px; }
.brand span { font-family: var(--font-display); font-weight: 900; font-size: 22px; letter-spacing: -0.01em; color: var(--green); }

/* Quiz top bar: back button pinned to the true top-left, brand stays centered.
   The button never reserves layout space, so the progress bar below always
   aligns with the content edges at every width. */
.quiz-top { position: relative; }
.back-fab {
  position: absolute; top: 6px; left: 0; z-index: 30;
  width: 56px; height: 56px; border-radius: 50%;
  border: 2px solid var(--line); background: var(--card); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
  opacity: 1; transform: none; pointer-events: auto;
  transition: opacity .18s var(--ease), transform .18s var(--ease), border-color .15s var(--ease);
}
.back-fab:hover { border-color: var(--green); transform: translateX(-2px); }
.back-fab.hidden { opacity: 0; transform: translateX(-6px); pointer-events: none; }
.back-fab svg { width: 22px; height: 22px; }

/* Typography */
h1, .display {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.015em;
  font-size: 27px; line-height: 1.18; margin-bottom: 10px;
}
@media (min-width: 760px) { h1, .display { font-size: 34px; } }
h2 { font-family: var(--font-display); font-weight: 700; font-size: 21px; line-height: 1.25; margin-bottom: 8px; letter-spacing: -0.01em; }
p { font-size: 17px; margin-bottom: 10px; }
.muted { color: var(--muted); font-size: 15.5px; }
.lead { font-size: 18.5px; }

/* Cards */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 20px; margin-bottom: 16px; box-shadow: var(--shadow);
}
@media (min-width: 760px) { .card { padding: 28px 26px; } }

/* Buttons */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  min-height: 60px; border: none; border-radius: 999px;
  font-family: var(--font-body); font-size: 18px; font-weight: 800; cursor: pointer;
  text-decoration: none; margin-top: 14px;
  transition: transform .12s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.btn-primary { background: var(--green); color: #fff; box-shadow: var(--shadow-btn); }
.btn-primary:hover { background: var(--green-dark); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(1px); box-shadow: 0 0 0 var(--green-deep), 0 4px 10px -6px rgba(47,107,79,.5); }
.btn-ghost { background: transparent; color: var(--muted); font-weight: 700; font-size: 16px; min-height: 56px; }
.btn-ghost:hover { color: var(--ink); }
.btn[disabled] { opacity: .35; pointer-events: none; box-shadow: none; }

/* Answer options (single choice) */
.opt {
  display: flex; align-items: center; gap: 14px; width: 100%;
  min-height: 62px; padding: 14px 18px; margin-bottom: 12px;
  background: var(--card); border: 2px solid var(--line); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 17.5px; font-weight: 600; color: var(--ink);
  cursor: pointer; text-align: left; box-shadow: var(--shadow);
  transition: transform .12s var(--ease), border-color .15s var(--ease), background .15s var(--ease);
}
.opt:hover { border-color: var(--green); transform: translateY(-1px); }
.opt:active { transform: scale(.985); }
.opt.on { border-color: var(--green); background: var(--green-soft); }
.opt .tick {
  margin-left: auto; width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--line); display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; font-weight: 800; transition: all .15s var(--ease);
}
.opt.on .tick { background: var(--green); border-color: var(--green); animation: pop .25s var(--ease); }
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }

/* Tile grid (Q5a categories) */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  min-height: 92px; padding: 14px 12px; background: var(--card);
  border: 2px solid var(--line); border-radius: var(--radius-sm);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-size: 15.5px; font-weight: 700; color: var(--ink); text-align: center;
  cursor: pointer; box-shadow: var(--shadow);
  transition: transform .12s var(--ease), border-color .15s var(--ease), background .15s var(--ease);
}
.tile:hover { border-color: var(--green); transform: translateY(-2px); }
.tile:active { transform: scale(.97); }
.tile.on { border-color: var(--green); background: var(--green-soft); }
.tile svg { width: 30px; height: 30px; stroke: var(--green); }
.tile.on svg { animation: pop .25s var(--ease); }

/* Text inputs */
.field { position: relative; margin-bottom: 6px; }
input[type=text], input[type=email] {
  width: 100%; min-height: 64px; padding: 0 18px;
  font-family: var(--font-body); font-size: 19px; font-weight: 600; color: var(--ink);
  background: var(--card); border: 2px solid var(--line); border-radius: var(--radius-sm);
  outline: none; box-shadow: var(--shadow); transition: border-color .15s var(--ease);
}
input[type=text]:focus, input[type=email]:focus { border-color: var(--green); }
input::placeholder { color: #B9BFC7; font-weight: 500; }

/* Typeahead dropdown */
.ta-list {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lift); max-height: 260px; overflow-y: auto;
}
.ta-list button {
  display: block; width: 100%; text-align: left; padding: 15px 18px; min-height: 52px;
  background: none; border: none; border-bottom: 1px solid var(--line);
  font-family: var(--font-body); font-size: 17px; font-weight: 600; color: var(--ink); cursor: pointer;
}
.ta-list button:hover { background: var(--green-soft); }
.ta-list button:last-child { border-bottom: none; }

/* Progress header */
.progress-wrap { padding: 4px 0 18px; }
.progress-label { display: flex; justify-content: space-between; font-size: 14px; font-weight: 800; color: var(--muted); margin-bottom: 7px; }
.progress-label b { color: var(--green); font-family: var(--font-display); font-size: 15px; letter-spacing: .01em; }
.progress-bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.progress-bar div { height: 100%; background: var(--green); border-radius: 4px; transition: width .45s var(--ease); }

/* Screen transitions */
.screen { animation: rise .32s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.screen.leaving { animation: sink .18s var(--ease) forwards; }
@keyframes sink { to { opacity: 0; transform: translateY(-10px); } }

/* Interstitial styling */
.inter { text-align: center; padding-top: 12px; }
.inter .art { margin: 4px auto 18px; width: 132px; height: 132px; }
.inter h1 { font-size: 25px; }
@media (min-width: 760px) { .inter h1 { font-size: 30px; } }

/* Stat number */
.stat { font-family: var(--font-display); font-weight: 900; font-size: 44px; color: var(--green); line-height: 1; margin: 8px 0 2px; }

/* Loader */
.loader-ring { width: 92px; height: 92px; margin: 12px auto 20px; position: relative; }
.loader-ring svg { transform: rotate(-90deg); }
.loader-ring circle.track { stroke: var(--line); }
.loader-ring circle.fill { stroke: var(--green); stroke-linecap: round; transition: stroke-dashoffset .3s linear; }
.loader-steps { text-align: left; max-width: 330px; margin: 0 auto; }
.loader-step { display: flex; gap: 12px; align-items: center; padding: 9px 0; font-size: 16.5px; color: var(--muted); transition: color .3s; }
.loader-step .dot {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 800;
  transition: all .3s var(--ease);
}
.loader-step.done { color: var(--ink); }
.loader-step.done .dot { background: var(--green); border-color: var(--green); animation: pop .3s var(--ease); }

/* Trust and guarantee */
.guarantee {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--green-soft); border-radius: var(--radius-sm); padding: 15px 16px; font-size: 16px;
}
.guarantee svg { width: 26px; height: 26px; flex-shrink: 0; margin-top: 1px; }
.guarantee p { margin: 0; font-size: 16px; }
.guarantee b { color: var(--green); }

.care-note { background: var(--amber-soft); color: var(--warn-ink); border-radius: var(--radius-sm); padding: 15px 16px; font-size: 16px; margin-bottom: 16px; }

/* Price block */
.price-line { font-family: var(--font-display); font-size: 46px; font-weight: 900; line-height: 1; margin: 6px 0 2px; }
.price-line .once { display: block; font-family: var(--font-body); font-size: 16.5px; font-weight: 800; color: var(--green); margin-top: 8px; }

ul.included { list-style: none; margin: 14px 0 6px; }
ul.included li { padding: 8px 0 8px 32px; position: relative; font-size: 16.5px; font-weight: 600; }
ul.included li::before {
  content: ""; position: absolute; left: 2px; top: 12px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--green);
}
ul.included li::after {
  content: ""; position: absolute; left: 7px; top: 16.5px; width: 7px; height: 4.5px;
  border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg);
}

/* Dog chip */
.dog-chip { display: flex; align-items: center; gap: 14px; }
.dog-photo {
  width: 68px; height: 68px; border-radius: 50%; background: var(--green); color: #fff; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 30px; font-weight: 900; flex-shrink: 0;
}
.dog-photo img { width: 100%; height: 100%; object-fit: cover; }

/* Week roadmap */
.week-strip { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 4px; position: relative; }
.week-strip .wk {
  display: flex; align-items: center; gap: 12px; background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 16px; font-weight: 600;
}
.week-strip .wk b {
  font-family: var(--font-display); color: var(--green); font-size: 15px; min-width: 76px; font-weight: 700;
}

/* Phone mockup (product proof) */
.phone {
  width: 240px; margin: 6px auto 12px; background: var(--ink); border-radius: 30px; padding: 10px;
  box-shadow: var(--shadow-lift);
}
.phone .ph-screen { background: var(--bg); border-radius: 22px; overflow: hidden; padding: 16px 13px 18px; }
.phone .ph-row { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.phone .ph-dot {
  width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; font-family: var(--font-display);
}
.phone .ph-name { font-weight: 800; font-size: 14px; }
.phone .ph-sub { font-size: 11px; color: var(--muted); }
.phone .ph-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.phone .ph-tag { color: var(--green); font-weight: 800; font-size: 10.5px; margin-bottom: 3px; }
.phone .ph-title { font-family: var(--font-display); font-weight: 700; font-size: 14.5px; line-height: 1.25; margin-bottom: 8px; }
.phone .ph-btn { background: var(--green); color: #fff; border-radius: 9px; text-align: center; font-size: 12px; font-weight: 800; padding: 9px 0; }
.phone .ph-steps { font-size: 11px; color: var(--muted); margin-bottom: 8px; line-height: 1.5; }

/* Checkout rows */
.total-row { display: flex; justify-content: space-between; font-size: 17px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.total-row.grand { font-weight: 800; font-size: 20px; border-bottom: none; padding-top: 12px; }
.total-row.grand span:last-child { font-family: var(--font-display); font-size: 24px; }

label.bump {
  display: flex; gap: 14px; align-items: flex-start; border: 2px solid var(--line); background: var(--card);
  border-radius: var(--radius-sm); padding: 16px; cursor: pointer; font-size: 16px; box-shadow: var(--shadow);
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
label.bump.on { border-color: var(--green); background: var(--green-soft); }
label.bump input { width: 28px; height: 28px; margin-top: 2px; accent-color: var(--green); flex-shrink: 0; }

/* Delivery choices */
.choice {
  border: 2px solid var(--line); background: var(--card); border-radius: var(--radius);
  padding: 20px 18px; margin-bottom: 14px; cursor: pointer; box-shadow: var(--shadow);
  transition: border-color .15s var(--ease), background .15s var(--ease), transform .12s var(--ease);
}
.choice:hover { transform: translateY(-1px); }
.choice.on { border-color: var(--green); background: var(--green-soft); }
.choice h3 { font-family: var(--font-display); font-size: 18.5px; font-weight: 700; }
.chan { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.chan button {
  flex: 1; min-height: 58px; min-width: 100px; border-radius: var(--radius-sm); border: 2px solid var(--line);
  background: var(--card); font-family: var(--font-body); font-size: 16px; font-weight: 700; cursor: pointer;
  transition: all .15s var(--ease);
}
.chan button.on { border-color: var(--green); background: var(--green); color: #fff; }
select.hour {
  width: 100%; min-height: 58px; font-size: 17px; font-weight: 600; border-radius: var(--radius-sm);
  border: 2px solid var(--line); padding: 0 14px; font-family: var(--font-body); background: var(--card); margin-top: 12px;
}

/* Footer trust */
.badge-block { text-align: center; padding: 20px 14px 6px; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.badge-block b { color: var(--ink); }

/* Utility */
.center { text-align: center; }
.mt0 { margin-top: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
