/*
 * Theme detail pages (/themes/<id>; public/_partials/tpl-theme.html, mk-themelive.js).
 * docs/UX-STANDARDS.md: the real invite first, one primary action, promises beside it, thumb zone.
 * Brand chrome stays brand: the invite in the phone carries the theme's color.
 * Motion: transform/opacity only, --ease-out and --d-3; reduced motion shows the final frame.
 */
.tl-hero { --ease-out: cubic-bezier(.22, 1, .36, 1); --d-2: 200ms; --d-3: 320ms; position: relative; background: radial-gradient(110% 70% at 80% 0%, var(--lilac), var(--frosting) 70%); }
/* Phones: name, the invite, the action, then the flavor line. Desktop: words left, the invite right. */
.tl-grid { display: grid; gap: 14px 56px; padding-top: 14px; padding-bottom: 40px; grid-template-areas: "copy" "stage" "form" "lede"; align-items: start; }
@media (min-width: 900px) {
  .tl-grid { gap: 22px 56px; grid-template-columns: minmax(0, 1fr) 360px; grid-template-areas: "copy stage" "lede stage" "form stage"; grid-template-rows: auto auto 1fr; padding-top: 56px; padding-bottom: 80px; }
}
.tl-copy { grid-area: copy; min-width: 0; }
.tl-lede { grid-area: lede; }
.tl-stage { grid-area: stage; position: relative; display: grid; justify-items: center; padding-bottom: 20px; }
.tl-form { grid-area: form; min-width: 0; max-width: 520px; width: 100%; justify-self: center; }
@media (min-width: 900px) { .tl-form { justify-self: start; } }
.tl-copy .td-crumb { margin-bottom: 10px; }
.tl-h1 { font-size: clamp(2rem, 4.6vw + .5rem, 4.4rem); margin: 0; overflow-wrap: anywhere; }
.tl-hero .tl-lede { margin: 0; max-width: 34ch; }
@media (max-width: 899px) {
  .tl-copy { text-align: center; }
  .tl-copy .td-crumb { justify-content: center; margin-bottom: 6px; }
  .tl-hero .tl-lede { margin: 6px auto 0; font-size: 1rem; text-align: center; }
}

/* The phone: the real invite. Smaller on phones so the action stays on the first screen. */
.tl-phone { max-width: min(56vw, 220px); }
@media (min-width: 900px) { .tl-phone { max-width: 340px; } }
.tl-phone .picker__screen { background: var(--night); }
.tl-poster { position: absolute; inset: 0; background: var(--bg, var(--night)); display: grid; align-content: start; }
.tl-poster .hero-art { width: 100%; height: auto; display: block; }
/* "Watch the opening" sits on the phone's lower edge: a quiet secondary that costs no height. */
.tl-watch { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 16px 6px 8px; border: 0; background: #fff; box-shadow: var(--sh-2); color: var(--ink); font: inherit; font-size: .92rem; font-weight: 700; cursor: pointer; border-radius: 999px; white-space: nowrap; transition: transform 200ms cubic-bezier(.22, 1, .36, 1); }
.tl-watch:hover { transform: translateX(-50%) translateY(-2px); }
.tl-watch[hidden] { display: none; }
.tl-watch:focus-visible { outline: 3px solid var(--grape); outline-offset: 2px; }
.tl-watch__ic { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--ink); color: #fff; }
.tl-watch__ic svg { width: 14px; height: 14px; margin-left: 2px; }

/* The form: name + age, the one button, the price line. */
.tl-fields { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 10px; margin-bottom: 12px; }
.tl-field { display: grid; gap: 6px; min-width: 0; }
.tl-field > span { font-size: .85rem; font-weight: 700; color: var(--ink-2); }
.tl-field input, .tl-field select { width: 100%; min-height: 52px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid #d9d1ea; background: #fff; color: var(--ink); font: inherit; font-size: 1.05rem; font-weight: 650; -webkit-appearance: none; appearance: none; }
.tl-field select { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1433' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 12px center / 16px no-repeat; padding-right: 34px; }
.tl-field input::placeholder { color: #9a93b0; font-weight: 550; }
.tl-field input:focus, .tl-field select:focus { outline: none; border-color: var(--grape); box-shadow: 0 0 0 3px rgba(123, 92, 255, .22); }
.tl-cta { white-space: normal; text-align: center; line-height: 1.2; }
.tl-price-line { margin: 10px 0 0; font-size: .88rem; color: var(--ink-2); text-align: center; }
@media (min-width: 900px) { .tl-price-line { text-align: left; } }
.tl-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Why parents pick it */
.tl-reason h3 { margin-top: 12px; }
.tl-reason p { color: var(--ink-2); margin: 0; }
.tl-reason__ic { width: 44px; height: 44px; border-radius: 14px; display: inline-grid; place-items: center; background: var(--lilac); color: var(--grape-ink); }
.tl-reason__ic .ic { width: 22px; height: 22px; }
.tl-crew { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; padding: 8px 10px; border-radius: 16px; background: var(--bg); width: fit-content; }
.tl-crew svg { width: 44px; height: 44px; display: block; }

/* What $29 includes + the promises */
.tl-inc { list-style: none; padding: 0; margin: 0 auto; display: grid; gap: 12px; max-width: 560px; color: var(--ink-2); }
.tl-inc li { display: flex; gap: 10px; }
.tl-inc li .ic { color: var(--balloon); margin-top: 3px; flex: none; }
.tl-inc b { color: var(--ink); }
.tl-trust { list-style: none; padding: 0; margin: 26px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tl-trust li { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; background: #fff; box-shadow: var(--sh-1); font-weight: 700; font-size: .88rem; color: var(--ink); }
.tl-trust li .ic { width: 16px; height: 16px; color: #0f9e7f; }
.tl-more { text-align: center; margin: 24px 0 0; }
/* Three neighbours: a swipeable row on phones instead of three screens of cards. */
@media (max-width: 599px) {
  .tl-similar .gal__grid { grid-auto-flow: column; grid-auto-columns: 82%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -20px; padding: 6px 20px 18px; scrollbar-width: none; }
  .tl-similar .gal__grid::-webkit-scrollbar { display: none; }
  .tl-similar .tcard { scroll-snap-align: center; }
}
@media (max-width: 400px) { .tl-similar .gal__grid { margin: 0 -16px; padding-inline: 16px; } }
.tl-final .mk-lede { max-width: 40ch; }

/* One filled primary per screen (rule 2): on a theme page the header's "Try it free" (same action,
   same theme, mk-themelive.js) steps back to an outline so the hero's button leads. */
body:has(.tl-hero) .mk-head__act .b-btn { --bf: var(--balloon); background: transparent; box-shadow: inset 0 0 0 1.5px var(--balloon); }
body:has(.tl-hero) .mk-head__act .b-btn::before, body:has(.tl-hero) .mk-head__act .b-btn::after { display: none; }

/* Phones: the same button in the thumb zone once the hero's has scrolled away. */
.tl-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 248, 240, .94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 -8px 24px -12px rgba(26, 20, 51, .25);
  transform: translateY(110%); opacity: 0; transition: transform 320ms cubic-bezier(.22, 1, .36, 1), opacity 200ms cubic-bezier(.22, 1, .36, 1); pointer-events: none; }
.tl-bar.is-on { transform: none; opacity: 1; pointer-events: auto; }
@media (min-width: 900px) { .tl-bar { display: none; } }
@media (prefers-reduced-motion: reduce) { .tl-bar { transition: none; } }
@media print { .tl-bar, .tl-form, .tl-watch { display: none !important; } }
