/* ==========================================================================
   Purr Next Door — shared stylesheet
   Tokens, type scale and component styles carried across from the design
   canvas so checkout looks like the rest of the site rather than a bolted-on
   payment form. Mobile-first; the two-column checkout appears at 900px.
   ========================================================================== */

:root {
  --paper: #FDF5E6;
  --paper-2: #F7E8CF;
  --espresso: #1F140E;
  --espresso-2: #33221A;
  --coral: #E4572E;
  --coral-deep: #C33F1C;
  --marigold: #F2A03D;
  --lemon: #F7D372;
  --rose: #EDA98D;
  --sage: #6E8B5B;
  --sage-soft: #DEE6D2;
  --wood: #C9A878;
  --ink: #2A1C14;
  --ink-soft: #6B5748;
  --cat-blue: #2F6BA8;
  --danger: #B3261E;

  --display: 'Baloo 2', system-ui, sans-serif;
  --body: 'Nunito', system-ui, sans-serif;
  --hand: 'Caveat', cursive;

  --gutter: 20px;
  --radius: 16px;
  --shadow-hard: 5px 5px 0 var(--espresso);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--espresso);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--display); font-weight: 800; margin: 0; line-height: 1.08; }
p { margin: 0; }
a { color: var(--coral-deep); text-decoration: none; }
a:hover { color: var(--coral); }
img { max-width: 100%; display: block; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--marigold);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.shell {
  max-width: 1120px;
  margin: 0 auto;
  background: var(--paper);
  min-height: 100vh;
}

/* ---------- header ------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px var(--gutter);
  background: rgba(253, 245, 230, 0.96);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1.5px solid rgba(31, 20, 14, 0.14);
}
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--espresso); }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand b { font-family: var(--display); font-weight: 800; font-size: 16px; letter-spacing: -0.2px; }
.nav__secure {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--display); font-weight: 800; font-size: 11px;
  letter-spacing: 1.6px; text-transform: uppercase; color: var(--sage);
}
.nav__secure svg { width: 15px; height: 15px; fill: currentColor; flex: none; }
.nav-cta {
  display: inline-flex; align-items: center; border-radius: 999px;
  padding: 9px 16px; min-height: 42px;
  background: var(--coral-deep); color: #fff;
  font-family: var(--display); font-weight: 800; font-size: 13px; white-space: nowrap;
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), background-color .18s ease;
}
.nav-cta:hover { color: #fff; background: var(--coral); transform: translateY(-2px) rotate(-1.5deg); }

/* ---------- test-mode banner --------------------------------------------- */
.testbar {
  background: var(--lemon); color: var(--espresso);
  padding: 9px var(--gutter);
  font-size: 12.5px; font-weight: 700; line-height: 1.45;
  border-bottom: 2px solid var(--espresso);
  display: flex; gap: 9px; align-items: flex-start;
}
.testbar svg { width: 16px; height: 16px; flex: none; margin-top: 2px; fill: var(--espresso); }
.testbar[hidden] { display: none; }

/* ---------- progress tracker --------------------------------------------- */
.steps { padding: 18px var(--gutter) 0; }
.steps ol {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; gap: 6px;
}
.steps li {
  flex: 1; min-width: 0;
  font-family: var(--display); font-weight: 700;
  font-size: 11.5px; letter-spacing: .3px;
  color: var(--ink-soft);
  padding-top: 9px;
  border-top: 4px solid rgba(31, 20, 14, 0.14);
  text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.steps li[data-state="done"] { color: var(--sage); border-top-color: var(--sage); }
.steps li[data-state="current"] { color: var(--coral-deep); border-top-color: var(--coral-deep); font-weight: 800; }

/* ---------- checkout layout ---------------------------------------------- */
.checkout { padding: 22px var(--gutter) 60px; }
.headline {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(25px, 6.4vw, 34px); line-height: 1.1;
  color: var(--espresso); margin-bottom: 22px; max-width: 22ch;
}
.cols { display: flex; flex-direction: column; gap: 26px; }

@media (min-width: 900px) {
  :root { --gutter: 40px; }
  .cols { flex-direction: row; align-items: flex-start; gap: 44px; }
  .cols__main { flex: 1 1 auto; min-width: 0; }
  .cols__aside { flex: 0 0 340px; position: sticky; top: 84px; }
  .headline { font-size: 38px; max-width: 26ch; }
  .steps li { font-size: 13px; }
}

/* ---------- form --------------------------------------------------------- */
.card {
  background: #fff; border: 2px solid var(--espresso); border-radius: var(--radius);
  padding: 20px 18px; box-shadow: var(--shadow-hard); margin-bottom: 20px;
}
.card__h {
  font-family: var(--display); font-weight: 800; font-size: 19px;
  color: var(--espresso); margin-bottom: 4px;
}
.card__sub { font-size: 14px; color: var(--ink-soft); margin-bottom: 16px; }

.field { margin-bottom: 15px; }
.field:last-child { margin-bottom: 0; }
.field > label, .field__label {
  display: block; font-family: var(--display); font-weight: 800;
  font-size: 10.5px; letter-spacing: 1.3px; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 6px;
}
.req { color: var(--coral-deep); }
.opt { font-weight: 700; letter-spacing: 0; text-transform: none; font-size: 11.5px; opacity: .8; }

input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%; background: #fff; color: var(--ink);
  border: 2px solid var(--espresso); border-radius: 12px;
  padding: 12px 13px; min-height: 50px; font-size: 16px; /* 16px stops iOS zoom */
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
select { appearance: none; background-image: none; padding-right: 38px; }
.select-wrap { position: relative; }
.select-wrap::after {
  content: ''; position: absolute; right: 15px; top: 50%; width: 9px; height: 9px;
  border-right: 2.5px solid var(--espresso); border-bottom: 2.5px solid var(--espresso);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.hint { font-size: 12.5px; color: var(--ink-soft); margin-top: 5px; }

.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: var(--danger); }
.err {
  display: none; margin-top: 6px; font-size: 13px; font-weight: 700;
  color: var(--danger); line-height: 1.4;
}
.field.is-invalid .err { display: block; }

.phone { display: grid; grid-template-columns: 116px 1fr; gap: 9px; }
.phone .select-wrap::after { right: 11px; }
.phone select { padding-left: 10px; padding-right: 26px; font-size: 15px; }

.grid2 { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 560px) {
  .grid2 { grid-template-columns: 1fr 1fr; gap: 0 14px; }
}

.check {
  display: flex; gap: 11px; align-items: flex-start;
  background: var(--sage-soft); border: 1.5px dashed var(--sage);
  border-radius: 12px; padding: 13px 14px; margin: 4px 0 0;
  cursor: pointer;
}
.check input { width: 22px; height: 22px; flex: none; margin: 1px 0 0; accent-color: var(--sage); cursor: pointer; }
.check span { font-size: 14.5px; font-weight: 700; color: var(--ink); line-height: 1.4; }

/* ---------- buttons ------------------------------------------------------ */
.actions {
  display: flex; flex-direction: column-reverse; gap: 12px; margin-top: 24px;
}
@media (min-width: 560px) {
  .actions { flex-direction: row; align-items: center; justify-content: space-between; }
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 2px solid var(--espresso); border-radius: 999px;
  font-family: var(--display); font-weight: 800; font-size: 16px;
  padding: 13px 26px; min-height: 52px; width: 100%;
  box-shadow: 4px 4px 0 var(--espresso);
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s ease, background-color .18s ease;
}
@media (min-width: 560px) { .btn { width: auto; } }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--espresso); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--espresso); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: 4px 4px 0 var(--espresso); }
.btn--primary { background: var(--coral-deep); color: #fff; }
.btn--primary:hover { background: var(--coral); color: #fff; }
.btn--lemon { background: var(--lemon); color: var(--espresso); }
.btn--ghost { background: transparent; color: var(--espresso); box-shadow: none; border-color: transparent; text-decoration: underline; }
.btn--ghost:hover { box-shadow: none; color: var(--coral-deep); }
.btn .spin { width: 17px; height: 17px; border: 2.5px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- order summary ------------------------------------------------ */
.summary {
  background: var(--espresso); color: var(--paper);
  border-radius: var(--radius); padding: 20px 18px;
}
.summary__h {
  font-family: var(--display); font-weight: 800; font-size: 10.5px;
  letter-spacing: 1.9px; text-transform: uppercase; color: var(--marigold);
  margin-bottom: 14px;
}
.summary__plan { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.summary__name { font-family: var(--display); font-weight: 800; font-size: 25px; color: var(--paper); }
.summary__price { font-family: var(--display); font-weight: 800; font-size: 25px; color: var(--lemon); }
.summary__per { font-size: 13px; color: rgba(253,245,230,.7); margin-top: 3px; }
.summary__blurb { font-family: var(--hand); font-size: 19px; line-height: 1.25; color: var(--lemon); margin-top: 11px; }
.summary__stamp {
  display: inline-block; margin-top: 12px; background: var(--lemon); color: var(--espresso);
  font-family: var(--hand); font-weight: 700; font-size: 15px; padding: 2px 11px;
  border: 2px dashed var(--coral-deep); border-radius: 8px; transform: rotate(-3deg);
}
.summary hr { border: none; border-top: 1px solid rgba(253,245,230,.16); margin: 17px 0; }
.summary__sub { font-family: var(--display); font-weight: 800; font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase; color: rgba(253,245,230,.62); margin-bottom: 9px; }
.summary ul { list-style: none; margin: 0; padding: 0; }
.summary li { position: relative; padding-left: 22px; font-size: 14px; line-height: 1.5; color: rgba(253,245,230,.88); margin-bottom: 7px; }
.summary li::before { content: ''; position: absolute; left: 3px; top: 9px; width: 7px; height: 7px; border-radius: 2px; background: var(--marigold); transform: rotate(45deg); }
.summary__gift {
  display: flex; gap: 9px; align-items: flex-start; margin-top: 15px;
  background: rgba(110,139,91,.24); border: 1.5px dashed var(--sage);
  border-radius: 12px; padding: 11px 12px;
}
.summary__gift svg { width: 17px; height: 17px; flex: none; margin-top: 2px; fill: var(--lemon); }
.summary__gift b { display: block; font-family: var(--display); font-size: 10px; font-weight: 800; letter-spacing: 1.3px; text-transform: uppercase; color: var(--lemon); margin-bottom: 2px; }
.summary__gift span { font-size: 12.5px; line-height: 1.4; color: rgba(253,245,230,.86); }
.totals { margin-top: 4px; }
.totals div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: rgba(253,245,230,.8); margin-bottom: 7px; }
.totals .grand { font-family: var(--display); font-weight: 800; font-size: 19px; color: var(--paper); padding-top: 11px; border-top: 1px solid rgba(253,245,230,.16); margin-top: 11px; }
.totals .grand span:last-child { color: var(--lemon); }
.totals .free { color: var(--sage-soft); font-weight: 700; }

/* ---------- review ------------------------------------------------------- */
.review__row {
  display: flex; justify-content: space-between; gap: 14px; align-items: flex-start;
  padding: 14px 0; border-bottom: 1px solid rgba(31,20,14,.12);
}
.review__row:last-child { border-bottom: none; padding-bottom: 0; }
.review__k { font-family: var(--display); font-weight: 800; font-size: 10.5px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--ink-soft); flex: 0 0 116px; padding-top: 2px; }
.review__v { font-size: 15px; line-height: 1.55; color: var(--ink); flex: 1; }
.review__v .muted { color: var(--ink-soft); }
.review__edit { font-size: 13px; font-weight: 800; text-decoration: underline; flex: none; }

.catnote {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--paper-2); border: 2px dashed var(--coral-deep);
  border-radius: 14px; padding: 14px 15px; margin-top: 22px;
}
.catnote svg { width: 26px; height: 26px; flex: none; }
.catnote b { display: block; font-family: var(--display); font-weight: 800; font-size: 14.5px; color: var(--coral-deep); margin-bottom: 3px; }
.catnote p { font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); }
.catnote strong { color: var(--ink); font-weight: 800; }

/* ---------- messages ----------------------------------------------------- */
.notice {
  border-radius: 12px; padding: 13px 15px; font-size: 14.5px; line-height: 1.5;
  margin-bottom: 18px; font-weight: 600;
}
.notice--error { background: #FBEAE8; border: 2px solid var(--danger); color: #7A1A14; }
.notice--info { background: var(--sage-soft); border: 1.5px dashed var(--sage); color: var(--ink); }
.notice[hidden] { display: none; }

.saving {
  font-size: 12px; font-weight: 700; color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: 6px; min-height: 18px;
}
.saving[hidden] { display: none; }

/* ---------- plans page --------------------------------------------------- */
.plans-page { padding: 30px var(--gutter) 60px; }
.plans { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 24px; }
@media (min-width: 720px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .plans { grid-template-columns: repeat(4, 1fr); } }
.plan {
  position: relative; background: #fff; border: 2px solid var(--espresso);
  border-radius: 18px; padding: 20px 18px 18px; box-shadow: 6px 6px 0 var(--marigold);
  display: flex; flex-direction: column;
}
.plan--hero { box-shadow: 6px 6px 0 var(--coral); }
.plan__top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.plan__term { font-family: var(--display); font-weight: 800; font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; }
.plan__price { font-family: var(--display); font-weight: 800; font-size: 26px; }
.plan__blurb { font-family: var(--hand); font-size: 20px; line-height: 1.25; margin-top: 10px; }
.plan__meta { display: flex; gap: 10px; margin-top: 10px; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.plan__save { color: var(--sage); font-weight: 800; }
.plan__gift {
  display: flex; gap: 9px; align-items: flex-start; margin-top: 13px; padding: 10px 11px;
  border-radius: 12px; background: rgba(110,139,91,.16); border: 1.5px dashed var(--sage);
}
.plan__gift.is-off { background: rgba(31,20,14,.055); border-color: rgba(31,20,14,.22); }
.plan__gift svg { width: 18px; height: 18px; flex: none; margin-top: 1px; fill: #4E6640; }
.plan__gift.is-off svg { fill: rgba(31,20,14,.38); }
.plan__gift b { display: block; font-family: var(--display); font-weight: 800; font-size: 10px; letter-spacing: 1.3px; text-transform: uppercase; color: #4E6640; margin-bottom: 3px; }
.plan__gift.is-off b { color: rgba(31,20,14,.5); }
.plan__gift em { font-style: normal; display: block; font-size: 12.5px; line-height: 1.42; color: var(--ink-soft); }
.plan__gift.is-off em { color: rgba(31,20,14,.45); text-decoration: line-through; }
.plan .stamp {
  position: absolute; top: -13px; right: 16px; background: var(--lemon); color: var(--espresso);
  font-family: var(--hand); font-weight: 700; font-size: 16px; padding: 3px 12px;
  border: 2px dashed var(--coral-deep); border-radius: 8px; transform: rotate(-6deg);
}
.plan .btn { margin-top: auto; width: 100%; padding-top: 12px; padding-bottom: 12px; }
.plan__buywrap { margin-top: 16px; }

/* ---------- footer ------------------------------------------------------- */
.foot { background: var(--espresso); color: rgba(253,245,230,.6); padding: 26px var(--gutter) 34px; font-size: 12.5px; line-height: 1.7; }
.foot a { color: rgba(253,245,230,.82); text-decoration: underline; }
.foot a:hover { color: var(--marigold); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .btn:hover { transform: none; }
}
