/* Hallmark · shape: Workbench · genre: playful · theme: brand · redesign: full · draw: 29158c · copy: verbatim
 * paper: oklch(97.6% 0.008 85) · accent: oklch(52% 0.194 261.5) · display: Saira Condensed · body: Inter · hero: Stage · nav: kept · footer: kept · signature: the app's own screens running live on the page (AI Talk lesson, analysis, groups, live session) instead of screenshots
 * axes: light/display-condensed/chromatic-blue · posture: Full-palette (brand blue, brand orange) · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V4 · weakest: E, every word is the owner's localized copy in 11 languages, so density is carried by the live screens visitors can use */
/* Hallmark · note · Saira Condensed is the brand's own display face (Default.cshtml font link), kept though the Sport theme also uses it */
/* Hallmark · answered F15 · text-beside-screen splits (hero, analysis, partners, groups, live, close) take --space-3xl like the hero; grids and rows keep --gap-columns */
/* Hallmark · dropped the four emoji over the pain cards · 11 names emoji as icons */
/* Hallmark · dropped "No credit card required" (Hero:FreeNote, CTA:FreeNote) · the owner removed it from the store listings */
/* Hallmark · waive 22 · --color-app-bg is the app's own dark screen colour (#121212) · a phone's screen must match the app it shows */
@import url("./tokens.css");
@import url("./base.css");

/* ---------- shared ---------- */
.dth section { padding-block: var(--section-gap); }
.dth .dth-head { display: grid; gap: var(--space-md); margin-bottom: var(--space-2xl); }
.dth .dth-head .lead { color: var(--color-muted); }
.dth .dth-head-split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; column-gap: var(--gap-columns); }

/* A phone: dark bezel around the screen. The screen is a slot the app showcase fills with the app's own
   screen (laid out at 393 x 852 pt and fitted with CSS zoom, which keeps text sharp); its screenshot
   shows until then, and without script. */
.dth .dth-phone {
  position: relative; display: block; flex: none;
  width: 300px; aspect-ratio: 409 / 868;
  border-radius: 13.5% / 6.4%;
  background: var(--color-phone-bezel);
  box-shadow: var(--shadow-card), inset 0 0 0 1px var(--color-phone-edge), 0 0 0 1px var(--color-phone-ring);
}
.dth .dth-phone-screen {
  position: absolute; inset: 0.92% 1.96%;
  border-radius: 11.8% / 5.5%;
  overflow: hidden; isolation: isolate;
  background: var(--color-app-bg);
}
.dth .dth-fallback { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: top; }
.dth [data-dt-mounted] > .dth-fallback { visibility: hidden; }
/* With script on, a phone shows the app's own background until its live screen fades in, so a refresh
   never flashes the screenshot (another clock, another language) first. Without script, or when the
   showcase never starts (home.js adds .is-fallback), the screenshot is the screen. */
.dth-js .dth .dth-phone-screen > .dth-fallback { visibility: hidden; }
.dth-js .dth .dth-phone-screen.is-fallback:not([data-dt-mounted]) > .dth-fallback { visibility: visible; }
.dth .dth-phone-screen[data-dt-app="groups"], .dth .dth-phone-screen[data-dt-app="live"] { background: #F3F5F6; } /* the app's light background */
.dth .dt-app-root { position: absolute; top: 0; left: 0; animation: dth-screen-in 320ms var(--ease-out) both; }
@keyframes dth-screen-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .dth .dt-app-root { animation: none; } }
/* Touch screens: a phone's scroll views move only once that phone is tapped (islands.tsx), so swipes
   over a phone scroll the page. */
.dth-touch .dth .dth-phone-screen:not(.is-engaged) .dth-scroller { overflow-y: hidden !important; }
/* React Native Web's scroll views show the desktop scrollbar; the phone shows none. */
.dth .dt-app-root * { scrollbar-width: none; }
.dth .dt-app-root *::-webkit-scrollbar { display: none; }

.dth .dth-facts { list-style: none; display: grid; margin-top: var(--space-lg); border-top: var(--rule-hair) solid var(--color-rule); }
.dth .dth-facts li { padding-block: var(--space-sm); border-bottom: var(--rule-hair) solid var(--color-rule); font-weight: 500; }

/* Behind every phone: a soft disc in the section's colour with a fading halo around it (from the
   earlier homepage). The disc is the stage's own pseudo-elements, so the phone, its tilt and its
   live screen stay untouched; the section clips the halo at the page edge. */
.dth .dth-hero-stage, .dth .dth-split-device { position: relative; isolation: isolate; }
.dth .dth-hero-stage::before, .dth .dth-split-device::before,
.dth .dth-hero-stage::after, .dth .dth-split-device::after {
  content: ''; position: absolute; z-index: -1; left: 50%; top: 50%;
  aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  translate: -50% -50%;
}
.dth .dth-hero-stage::before, .dth .dth-split-device::before {
  width: min(100%, 560px);
  background: linear-gradient(145deg, rgb(var(--stage-rgb) / 0.05) 0%, rgb(var(--stage-rgb) / 0.14) 50%, rgb(var(--stage-rgb) / 0.07) 100%);
}
.dth .dth-hero-stage::after, .dth .dth-split-device::after {
  width: min(140%, 784px); z-index: -2;
  background: radial-gradient(circle, rgb(var(--stage-rgb) / 0.16) 0%, rgb(var(--stage-rgb) / 0.07) 45%, rgb(var(--stage-rgb) / 0.02) 70%, transparent 100%);
}
.dth .dth-hero, .dth .dth-split { overflow-x: clip; }

/* the one primary control: a store button */
.dth .dth-stores { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-xl); }
.dth .dth-store {
  display: inline-flex; align-items: center; gap: var(--space-xs);
  min-height: 56px; padding: 0 var(--space-lg);
  border-radius: var(--radius-pill);
  background: var(--color-ink); color: var(--color-accent-ink);
  font-weight: 600; font-size: var(--text-md); text-decoration: none; white-space: nowrap;
  border: 2px solid var(--color-ink);
  transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}
.dth .dth-store i { font-size: 1.25rem; line-height: 1; transition: transform var(--dur-short) var(--ease-out); }
.dth .dth-store img { width: 20px; height: 20px; transition: transform var(--dur-short) var(--ease-out); }
.dth .dth-store:hover { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-ink); }
.dth .dth-store:hover i, .dth .dth-store:hover img { transform: translateY(-2px); }
.dth .dth-store:active { transform: translateY(1px); }
.dth .dth-store:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; transition: none; }
/* on the dark close card the store buttons turn white, ink text */
.dth .dth-store-light { background: #FFFFFF; border-color: #FFFFFF; color: var(--color-ink); }
.dth .dth-store-light:hover { background: var(--color-paper-2); border-color: var(--color-paper-2); color: var(--color-ink); }
.dth .dth-store-light:focus-visible { outline-color: #FFFFFF; }

/* ---------- hero: Stage, the AI Talk lesson live ---------- */
.dth .dth-hero { padding-block: var(--space-2xl) var(--space-3xl); }
.dth .dth-hero-grid {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  column-gap: var(--space-3xl); align-items: center;
  min-height: calc(100dvh - 72px - var(--space-2xl) - var(--space-3xl));
}
.dth .dth-hero h1 { font-size: var(--text-display); line-height: 0.95; }
.dth .dth-hero-lead { margin-top: var(--space-lg); color: var(--color-ink-2); font-size: var(--text-xl); line-height: 1.3; text-wrap: balance; }
.dth .dth-hero-caption { margin-top: var(--space-xl); font-size: var(--text-sm); color: var(--color-muted); max-width: 52ch; }
.dth .dth-hero-stage {
  --stage-rgb: 123 79 240; /* AI Talk purple */
  display: grid; place-items: center;
  height: min(680px, 78dvh); padding: var(--space-xl);
  perspective: 1400px;
}
.dth .dth-hero-screens {
  display: flex; align-items: center; justify-content: center;
  height: 100%;
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform var(--dur-long) var(--ease-out);
}
.dth .dth-phone-hero { width: auto; height: 100%; }

/* ---------- before: rows ---------- */
.dth .dth-pain { padding-top: var(--section-gap-s); }
.dth .dth-pain-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--gap-columns); align-items: start; }
.dth .dth-pain-head { position: sticky; top: var(--space-3xl); display: grid; gap: var(--space-2xl); }
.dth .dth-pain h2 { max-width: 12ch; }
/* Neo (live) invites the visitor to practise: yes goes to their store, later gets a friendly reply */
.dth .dth-pain-visual { display: flex; align-items: flex-start; gap: var(--space-sm); }
.dth .dth-duo-btn.dth-pain-face { width: 132px; flex: none; }
.dth .dth-pain-chat { display: grid; gap: var(--space-xs); margin-top: var(--space-xs); min-width: 0; flex: 1; max-width: 300px; }
.dth .dth-pain-ask {
  justify-self: start; max-width: 30ch; margin: 0; padding: 12px 16px; border-radius: 20px 20px 20px 6px;
  background: #FFFFFF; box-shadow: var(--shadow-card);
  color: var(--color-ink); font-size: var(--text-sm); font-weight: 500; line-height: 1.4;
}
.dth .dth-pain-choices { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-xs); }
.dth .dth-pain-choice {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border-radius: 22px 22px 6px 22px; border: 2px solid var(--color-brand);
  background: transparent; color: var(--color-brand); font: inherit; font-size: var(--text-sm); font-weight: 600;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out);
}
.dth .dth-pain-choice-yes { background: var(--color-brand); color: #FFFFFF; }
.dth .dth-pain-choice:hover { background: var(--color-accent); border-color: var(--color-accent); color: #FFFFFF; }
.dth .dth-pain-choice:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.dth .dth-pain-stores { display: grid; gap: var(--space-xs); }
.dth-js .dth .dth-pain-stores:not(.is-open) { display: none; }
.dth .dth-pain-store-row { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.dth .dth-pain-store-row .dth-store { min-height: 44px; padding: 0 var(--space-md); font-size: var(--text-sm); }
.dth .dth-pain-chat > * { animation: dth-chat-in 260ms var(--ease-out) both; }
@keyframes dth-chat-in { from { opacity: 0; translate: 0 6px; } }
@media (prefers-reduced-motion: reduce) { .dth .dth-pain-chat > * { animation: none; } }
/* Neo "types" his question (home.js): the full text stays in place, transparent, so the bubble keeps
   its size and screen readers read it; the typed copy is drawn over it. The answers wait, invisible
   and unfocusable, until the typing ends. */
.dth .dth-pain-ask.is-typing { position: relative; }
.dth .dth-pain-rest { color: transparent; }
.dth .dth-pain-dots { position: absolute; left: 16px; top: 50%; translate: 0 -50%; display: inline-flex; gap: 5px; }
.dth .dth-pain-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--color-muted); animation: dth-typing 1.2s infinite ease-in-out both; }
.dth .dth-pain-dots i:nth-child(2) { animation-delay: 0.15s; }
.dth .dth-pain-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dth-typing { 0%, 80%, 100% { opacity: 0.3; } 40% { opacity: 1; } }
.dth .dth-pain-choices.is-waiting { visibility: hidden; }
.dth .dth-pain-choices.is-shown { animation: dth-chat-in 260ms var(--ease-out) both; }
/* Two-column layouts with a narrow left column: Neo above his chat, so the answers keep one row */
@media (min-width: 60.01rem) and (max-width: 75rem) {
  .dth .dth-pain-visual { flex-direction: column; }
  .dth .dth-pain-chat { flex: none; width: 100%; }
}
.dth .dth-rows { list-style: none; border-top: var(--rule-hair) solid var(--color-rule); }
.dth .dth-rows li { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: var(--gap-columns); padding-block: var(--space-xl); border-bottom: var(--rule-hair) solid var(--color-rule); }
.dth .dth-rows h3 { font-size: var(--text-2xl); }
.dth .dth-rows p { color: var(--color-muted); font-size: var(--text-lg); line-height: 1.45; }

/* ---------- after: statement band, the page's one reveal ---------- */
.dth .dth-statement { background: var(--color-band); color: var(--color-band-ink); padding-block: var(--section-gap-s); }
.dth .dth-statement .wrap { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); column-gap: var(--gap-columns); align-items: end; }
.dth .dth-statement-intro, .dth .dth-statement-mask { grid-column: 1; }
.dth .dth-statement-intro { color: var(--color-brand-2); font-size: var(--text-lead); font-weight: 600; }
.dth .dth-statement-mask { margin-top: var(--space-lg); overflow: hidden; padding-bottom: 0.08em; }
.dth .dth-statement-head {
  font-size: var(--text-display); max-width: 18ch; line-height: 1;
  transition: transform 900ms var(--ease-out), opacity 600ms var(--ease-out);
}
.dth .dth-statement.is-waiting .dth-statement-head { transform: translateY(105%); opacity: 0; }
.dth .dth-statement-text { grid-column: 2; grid-row: 1 / span 2; align-self: end; color: var(--color-band-muted); }

/* ---------- splits: copy beside a live screen ---------- */
.dth .dth-split-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); column-gap: var(--space-3xl); align-items: center; }
.dth .dth-split-reverse > :first-child { order: 2; }
.dth .dth-split-text .lead { margin-top: var(--space-lg); color: var(--color-ink-2); }
.dth .dth-split-sub { margin-top: var(--space-2xl); font-size: var(--text-2xl); }
.dth .dth-split-sub + p { margin-top: var(--space-sm); color: var(--color-muted); font-size: var(--text-lg); line-height: 1.45; }
.dth .dth-split-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--gap-columns); }
.dth .dth-split-device {
  display: grid; place-items: center;
  padding: var(--space-2xl) var(--space-xl);
}
.dth .dth-split-device .dth-phone { width: min(340px, 100%); }
.dth .dth-split-analysis { --stage-rgb: 22 163 74; }  /* progress green */
.dth .dth-split-groups { --stage-rgb: 2 161 158; }    /* groups teal */
.dth .dth-split-live { --stage-rgb: 58 130 246; }     /* live blue */

/* ---------- AI partners: Trinity and Neo ---------- */
.dth .dth-partners { background: var(--color-paper-2); }
.dth .dth-duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-xl); align-items: start; }
.dth .dth-duo-item { display: grid; justify-items: center; gap: var(--space-sm); text-align: center; }
.dth .dth-duo-btn {
  all: unset; box-sizing: border-box; cursor: pointer; display: block; width: min(260px, 100%); border-radius: 50%;
  box-shadow: var(--shadow-card);
  transition: transform var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out);
}
.dth .dth-duo-btn:hover { transform: translateY(-4px); box-shadow: var(--shadow-card), 0 0 0 4px var(--color-brand); }
.dth .dth-duo-btn:active { transform: translateY(0); }
.dth .dth-duo-btn:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 6px; transition: none; }
.dth .dth-face { position: relative; display: block; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--color-face-bg); }
.dth .dth-face .dth-fallback { object-position: center; }
/* A live face shows once its frames are loaded (Partner.tsx sets data-dt-ready); until then the photo stays. */
.dth .dth-face[data-dt-mounted]:not([data-dt-ready]) > .dth-fallback { visibility: visible; }
.dth .dth-face:not([data-dt-ready]) > .dt-app-root { opacity: 0; }
.dth .dth-duo-name { font-family: var(--font-display); font-weight: 700; font-size: var(--text-2xl); line-height: 1; }

/* ---------- how it works ---------- */
.dth .dth-step-list { list-style: none; counter-reset: dth-step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap-columns); }
.dth .dth-step-list li { counter-increment: dth-step; padding-top: var(--space-lg); border-top: 2px solid var(--color-ink); display: grid; gap: var(--space-md); align-content: start; }
.dth .dth-step-list li::before { content: counter(dth-step); font-family: var(--font-display); font-weight: 700; font-size: var(--text-display); line-height: 0.9; color: var(--color-brand); }
.dth .dth-step-list h3 { font-size: var(--text-2xl); }
.dth .dth-step-list p { color: var(--color-muted); font-size: var(--text-lg); line-height: 1.45; }

/* ---------- safety: three promises, centred, each with a tinted icon disc ---------- */
.dth .dth-head-center { justify-items: center; text-align: center; }
.dth .dth-head-center h2 { max-width: none; }
.dth .dth-head-center .lead { max-width: 56ch; }
.dth .dth-promises { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap-columns); }
.dth .dth-promises li { display: grid; justify-items: center; align-content: start; gap: var(--space-sm); padding: var(--space-lg); text-align: center; }
.dth .dth-promise-icon {
  display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: var(--space-xs);
  border-radius: 50%; background: rgb(var(--promise-rgb) / 0.1); color: rgb(var(--promise-rgb));
  font-size: 1.75rem; line-height: 1;
}
.dth .dth-promise-blue { --promise-rgb: 37 99 235; }
.dth .dth-promise-red { --promise-rgb: 220 38 38; }
.dth .dth-promise-purple { --promise-rgb: 124 58 237; }
.dth .dth-promises h3 { font-family: var(--font-body); font-size: var(--text-lg); font-weight: 700; letter-spacing: 0; }
.dth .dth-promises p { color: var(--color-muted); max-width: 32ch; }

/* ---------- close: the dark download card of the earlier homepage, Trinity live at its top ---------- */
.dth .dth-close { padding-block: var(--section-gap-s); }
.dth .dth-close-card {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; justify-items: center; text-align: center;
  padding: var(--space-3xl) var(--space-xl);
  border-radius: 2rem; color: #FFFFFF;
  background: linear-gradient(145deg, #0e0e1c 0%, #141426 35%, #1b1838 65%, #110e20 100%);
}
.dth .dth-close-card::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(circle at 20% 50%, rgb(255 255 255 / 0.08) 0%, transparent 60%),
              radial-gradient(circle at 80% 50%, rgb(255 255 255 / 0.05) 0%, transparent 50%);
}
.dth .dth-close-card h2 { max-width: 30ch; margin-top: var(--space-lg); color: #FFFFFF; }
.dth .dth-close-card .lead { max-width: 46ch; margin-top: var(--space-md); color: rgb(255 255 255 / 0.85); }
.dth .dth-close-card .dth-stores { justify-content: center; }
.dth .dth-close-face { width: 132px; box-shadow: 0 0 0 4px rgb(255 255 255 / 0.12), var(--shadow-card); }
.dth .dth-close-face:hover { box-shadow: 0 0 0 4px var(--color-brand), var(--shadow-card); }

/* ---------- small screens ---------- */
@media (max-width: 60rem) {
  .dth .dth-hero-grid, .dth .dth-pain-grid, .dth .dth-split-grid, .dth .dth-head-split { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-xl); }
  .dth .dth-split-reverse > :first-child { order: 0; }
  .dth .dth-hero-grid { min-height: 0; }
  .dth .dth-hero-stage { height: auto; padding: var(--space-lg) 0; }
  .dth .dth-phone-hero { width: min(340px, 86vw); height: auto; }
  .dth .dth-statement .wrap { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-xl); }
  .dth .dth-statement-text { grid-column: 1; grid-row: auto; }
  .dth .dth-pain-head { position: static; gap: var(--space-lg); }
  .dth .dth-pain h2 { max-width: 18ch; }
  .dth .dth-duo-btn.dth-pain-face { width: 84px; }
  .dth .dth-rows li { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-xs); }
  .dth .dth-promises, .dth .dth-step-list { grid-template-columns: minmax(0, 1fr); }
  /* promises as rows: the coloured icon beside its title and text */
  .dth .dth-promises { gap: var(--space-lg); }
  .dth .dth-promises li { grid-template-columns: auto minmax(0, 1fr); justify-items: start; column-gap: var(--space-md); row-gap: var(--space-xs); padding: 0; text-align: left; }
  .dth .dth-promise-icon { grid-row: 1 / span 2; width: 52px; height: 52px; font-size: 1.4rem; margin: 0; }
  .dth .dth-promises li > h3, .dth .dth-promises li > p { grid-column: 2; }
}
@media (max-width: 40rem) {
  .dth .dth-split-device { padding: var(--space-xl) var(--space-md); }
  .dth .dth-split-pair { grid-template-columns: minmax(0, 1fr); }
  /* phones: the two store buttons share one row, so the live lesson comes up sooner */
  .dth .dth-store { flex: 1 1 0; justify-content: center; min-height: 52px; padding: 0 var(--space-sm); font-size: var(--text-sm); }
  /* the caption moves under the phone, so the live lesson starts right below the store buttons */
  .dth .dth-hero-grid { row-gap: 0; }
  .dth .dth-hero-text { display: contents; }
  .dth .dth-hero-stage { order: 1; margin-top: var(--space-md); }
  .dth .dth-hero-caption { order: 2; margin-top: var(--space-md); }
  .dth .dth-phone-hero { width: min(330px, 86vw); height: auto; }
  .dth .dth-split-device .dth-phone { width: min(330px, 86vw); }
  /* steps: the number sits beside its title instead of on a line of its own */
  .dth .dth-step-list li { grid-template-columns: auto minmax(0, 1fr); column-gap: var(--space-md); row-gap: var(--space-xs); align-items: baseline; }
  .dth .dth-step-list li::before { grid-row: 1 / span 2; font-size: var(--text-3xl); }
  .dth .dth-step-list li > * { grid-column: 2; }
  .dth .dth-close-card { padding: var(--space-2xl) var(--space-md); border-radius: 1.5rem; }
  .dth .dth-close { padding-bottom: 0; }
}
