/* Demo form page and embed. Tokens and t- components come from design/. Mobile first. */
html { color-scheme: light; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; }
h1, h2, p, ol, ul, fieldset, legend { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
[hidden] { display: none !important; }

/* "FREE" in the headline: capitals in brand teal, no underline */
.free { color: var(--teal-700); letter-spacing: 0.02em; }

/* ---------- Standalone page ---------- */
html:not(.is-embed) body {
  background: var(--color-bg-page) radial-gradient(var(--cream-dot) 1.2px, transparent 1.3px) 0 0 / 22px 22px;
}
.page {
  max-width: var(--container); margin: 0 auto;
  padding: var(--space-5) max(var(--gutter), env(safe-area-inset-left)) var(--space-8);
  display: grid; gap: var(--space-6);
  grid-template-areas: "header" "card" "footer";
}
.page__header { grid-area: header; display: flex; justify-content: center; }
.page__logo { display: block; width: 6.5rem; border-radius: var(--radius-md); }
.page__logo img { display: block; width: 100%; height: auto; aspect-ratio: 360 / 278; }
.page__main { display: contents; }
.page__title { font-size: var(--text-2xl); color: var(--color-text); text-align: center; }
.page__card { grid-area: card; padding: var(--space-6) var(--space-5); width: 100%; max-width: 30rem; justify-self: center; display: grid; gap: var(--space-3); }
.intro { font-size: var(--text-md); color: var(--color-text-muted); line-height: var(--leading-snug); text-align: center; max-width: 30ch; justify-self: center; margin-bottom: var(--space-3); }

/* Three real student artworks, taped up like a sketchbook wall */
.art { display: flex; justify-content: center; gap: var(--space-2); margin: calc(-1 * var(--space-2)) 0 var(--space-2); }
.art__piece {
  margin: 0; width: 5.5rem; aspect-ratio: 1; padding: 0.3rem; background: var(--white);
  box-shadow: 0 1px 2px rgb(31 42 46 / 0.12), 0 4px 10px rgb(31 42 46 / 0.08); position: relative;
}
.art__piece img { display: block; width: 100%; height: 100%; object-fit: cover; }
.art__piece::before {  /* a strip of yellow tape */
  content: ""; position: absolute; top: -0.45rem; left: 50%; width: 2.4rem; height: 0.9rem;
  transform: translateX(-50%) rotate(-3deg); background: rgb(242 227 148 / 0.85);
}
.art__piece--1 { transform: rotate(-6deg) translateY(0.3rem); }
.art__piece--2 { transform: rotate(2deg); z-index: 1; }
.art__piece--3 { transform: rotate(7deg) translateY(0.4rem); }

.page__footer {
  grid-area: footer; text-align: center; font-size: var(--text-xs); color: var(--color-text-muted);
  display: grid; gap: var(--space-1); padding-top: var(--space-4); border-top: 1px solid var(--color-border);
}

@media (min-width: 40rem) {
  .page { padding-top: var(--space-8); gap: var(--space-8); }
  .page__logo { width: 8rem; }
  .page__card { padding: var(--space-8); }
}

@media (min-width: 40rem) {
  .page__title { font-size: var(--text-3xl); }
  .art__piece { width: 6.5rem; }
}

/* ---------- Form ---------- */
.book { display: grid; gap: var(--space-5); }
.book__summary { margin-bottom: var(--space-1); }
.book__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.phone { display: grid; grid-template-columns: 6.5rem 1fr; gap: var(--space-2); }
.phone__cc { position: relative; }
.phone__cc-display { display: none; }
/* With JS: show a compact code ("IN +91") over a full-width native select, so the open list keeps full names */
.js .phone__cc-display {
  display: flex; align-items: center; pointer-events: none; white-space: nowrap; overflow: hidden;
  font-variant-numeric: tabular-nums;
}
.js .phone__cc-select { position: absolute; inset: 0; opacity: 0; }
.js .phone__cc:hover .phone__cc-display { border-color: var(--ink-700); }
.js .phone__cc:focus-within .phone__cc-display {
  outline: var(--focus-ring-width) solid var(--color-focus); outline-offset: 0; border-color: var(--color-focus);
}
.phone__number { font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }

/* Age group: two large choices instead of a dropdown */
.ages__options { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.ages__option { position: relative; }
.ages__option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ages__option span {
  display: grid; place-items: center; min-height: 3.25rem; border: 1.5px solid var(--color-border-control);
  border-radius: var(--radius-md); font-weight: var(--weight-medium); background: var(--white); transition: border-color .15s, background .15s;
}
.ages__option input:checked + span { border-color: var(--teal-700); background: var(--teal-50); color: var(--teal-700); box-shadow: inset 0 0 0 1px var(--teal-700); }
.ages__option input:focus-visible + span { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.ages__option:hover span { border-color: var(--ink-700); }
fieldset[aria-invalid="true"] .ages__option span { border-color: var(--color-error); }

.book__small { display: flex; gap: var(--space-2); justify-content: center; align-items: flex-start; text-align: left; }
.book__small svg { width: 1rem; height: 1rem; flex: none; margin-top: 0.1rem; }

.book__turnstile { min-height: 65px; }
.book__submit { margin-top: var(--space-1); }
.book__small { font-size: var(--text-xs); text-align: center; margin-top: calc(-1 * var(--space-2)); }

/* ---------- Thank you ---------- */
.thanks { display: grid; gap: var(--space-4); }
.thanks:focus { outline: none; }
.thanks__mark {
  width: 3.5rem; height: 3.5rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--teal-50); color: var(--teal-700);
}
.thanks__mark svg { width: 1.75rem; height: 1.75rem; }
.thanks__title { font-size: var(--text-2xl); }
.thanks__subtitle { font-size: var(--text-md); font-weight: var(--weight-semibold); margin-top: var(--space-2); }
.steps { list-style: none; display: grid; gap: var(--space-3); }
.steps li { display: grid; grid-template-columns: 2rem 1fr; gap: var(--space-3); align-items: start; }
.steps__n {
  width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--color-surface-tint); color: var(--mustard-700);
  font-family: var(--font-display); font-weight: var(--weight-display); font-size: var(--text-base);
}
.steps li > span:last-child { padding-top: 0.2rem; }
.thanks .t-btn { margin-top: calc(-1 * var(--space-2)); }

@media (min-width: 60rem) {
  .page__card:has(.thanks) { max-width: 36rem; justify-self: center; }
}

/* ---------- Embed (inside the WordPress popup) ---------- */
.is-embed, .is-embed body { background: transparent; }
.embed { padding: var(--space-1) var(--space-1) var(--space-3); max-width: var(--measure); margin: 0 auto; }
.embed__title { font-size: var(--text-xl); text-align: center; margin-bottom: var(--space-2); }
.is-embed .book { gap: var(--space-4); }
.is-embed .thanks__title { font-size: var(--text-xl); }

/* Embed: always on white (never inherit a dark popup or browser backdrop); room for the taped art */
html.is-embed, html.is-embed body { background: var(--white); }
.embed .art { margin-top: var(--space-3); }
.embed .art__piece { width: 5rem; }

/* Google rating under the button: TACO's own listing, 4.6 from 279 reviews */
.proof { display: flex; gap: var(--space-2); justify-content: center; align-items: center; font-size: var(--text-sm); color: var(--color-text-muted); margin-top: calc(-1 * var(--space-2)); }
.proof strong { color: var(--color-text); font-weight: var(--weight-semibold); }
.proof__star { color: var(--mustard); }

/* WhatsApp button in WhatsApp's darker green (#1DA851): white bold text passes 3:1 for large text */
.btn-whatsapp { background: #1DA851; color: var(--white); font-size: 1.125rem; font-weight: var(--weight-semibold); gap: var(--space-2); }
.btn-whatsapp:hover { background: #178F44; }
.btn-whatsapp svg { width: 1.5rem; height: 1.5rem; }
.steps li { align-items: center; }
.thanks .btn-whatsapp { margin-top: var(--space-3); }
/* Breathing room between the title (or rating) and the first field */
.page__title, .embed__title { margin-bottom: var(--space-3); }
.page__title, .embed__title { text-wrap: balance; }

/* Embed: size to the content so the popup can shrink to fit (no full-viewport minimum) */
html.is-embed body { min-height: 0; }
