/* Kylpyhuonetarjous: site styles. Mobile first. */

/* Self-hosted fonts (latin subset covers Finnish ä/ö). No request to Google = faster and GDPR-safe. */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("/assets/fonts/montserrat-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
}

:root {
  --bg: #F3F1EC;
  --dark: #1D2624;
  --dark-2: #26312E;
  --teal: #5C9385;        /* brand accent, buttons (large bold text only) */
  --teal-ink: #3E6F63;    /* teal for small text / selected pills on light backgrounds */
  --teal-light: #8FC0B2;  /* teal for text on dark backgrounds */
  --card: #FBFAF6;
  --trust: #E7E2D3;
  --navy: #124883;     /* logo blue */

  --ink: #1D2624;
  --muted: #4C5754;
  --on-dark: #F3F1EC;
  --on-dark-muted: #C4CCC9;
  --line: #DDD7C9;
  --line-strong: #8A8577;
  --error: #A33A2B;

  --focus: var(--teal-ink);
  --radius: 16px;
  --shadow: 0 24px 60px rgba(10, 16, 14, 0.28);

  --font-head: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(1.75rem, 6vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.8vw, 2.25rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }
a { color: var(--teal-ink); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
img, svg { max-width: 100%; }
img { display: block; height: auto; }

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

.container {
  width: 100%;
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: 20px;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  background: var(--dark);
  color: var(--on-dark);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--on-dark); }

/* ---------- Header ---------- */

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.brand-logo { height: 36px; width: auto; }
.header-note {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.3;
  font-weight: 600;
  color: var(--muted);
  text-align: right;
  max-width: 9.5rem;
}

@media (min-width: 560px) {
  .brand-logo { height: 46px; }
  .header-note { font-size: 0.95rem; max-width: none; }
  .header-inner { min-height: 80px; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 54px;
  padding: 12px 28px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: 1.1875rem; /* 19px bold = WCAG "large text" so white on teal passes AA */
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-ink); color: #fff; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--bg); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.75; cursor: progress; }

.on-dark .btn-secondary { color: var(--on-dark); border-color: var(--on-dark); }
.on-dark .btn-secondary:hover { background: var(--on-dark); color: var(--dark); }

/* ---------- Dark sections ---------- */

.on-dark {
  --focus: var(--teal-light);
  color: var(--on-dark);
}
.on-dark a { color: var(--on-dark); }

/* ---------- Hero ---------- */

.hero {
  --hero-img-h: min(150vw, 720px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--dark);
  padding: 32px 0 48px;
}
.hero-media {
  position: absolute;
  inset: 0 0 auto 0;
  height: var(--hero-img-h);
  z-index: -1;
  overflow: hidden;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 70%;
  will-change: transform;
}
/* Phone: dark at the top for the headline, clear over the bathtub, dark again under the form. */
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(20, 27, 25, 0.86) 0%,
    rgba(20, 27, 25, 0.62) 34%,
    rgba(20, 27, 25, 0.10) 58%,
    rgba(20, 27, 25, 0.35) 80%,
    var(--dark) 100%);
}
.hero-grid {
  display: grid;
  gap: 0;
}
/* Push the form down so the bathtub stays visible between headline and form. */
.hero-copy { min-height: calc(var(--hero-img-h) * 0.8 - 32px); }
.hero h1 {
  margin-bottom: 0.45em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}
.hero-points { display: none; }
.hero-lead {
  font-size: 1.125rem;
  color: #E3E8E6;
  max-width: 38ch;
  margin: 0;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}

@media (min-width: 960px) {
  /* The form is tall: the headline starts at the top and stays in view (sticky) next to it. */
  .hero { padding: 64px 0 88px; min-height: 760px; overflow: clip; }
  .hero > .container { width: 100%; }
  .hero-media { inset: 0; height: auto; }
  .hero-media img { height: calc(100% + 80px); object-position: center 60%; }
  .hero-media::after {
    background:
      linear-gradient(90deg, rgba(20, 27, 25, 0.9) 0%, rgba(20, 27, 25, 0.74) 38%, rgba(20, 27, 25, 0.3) 68%, rgba(20, 27, 25, 0.2) 100%),
      linear-gradient(0deg, rgba(20, 27, 25, 0.55) 0%, rgba(20, 27, 25, 0) 40%);
  }
  .hero-copy { min-height: 0; position: sticky; top: 40px; padding-top: 40px; }
  .hero-grid {
    grid-template-columns: minmax(300px, 1fr) minmax(460px, 600px);
    gap: clamp(32px, 4vw, 56px);
    align-items: start;
  }
  .hero h1 { font-size: clamp(2rem, 3.4vw, 2.9rem); }
  .hero-points {
    display: grid;
    gap: 14px;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--on-dark);
  }
  .hero-points li { display: flex; align-items: center; gap: 12px; }
  .hero-points svg { width: 22px; height: 22px; flex: none; color: var(--teal-light); }
  .hero-lead { font-size: 1.2rem; }

  /* Wider, more compact form card */
  .form-card { padding: 32px 36px; }
  .form-card .field { margin-bottom: 16px; }
  .form-card .field-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .form-card .pill span { min-height: 46px; font-size: 0.95rem; }
  .form-card .pills-5, .form-card .pills-d3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Entrance animation on page load (only when JS is running). */
.js .hero-copy > *,
.js .hero .form-card {
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.js .hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.js .hero-copy > :nth-child(3) { animation-delay: 0.16s; }
.js .hero .form-card { animation-delay: 0.24s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Form card ---------- */

.form-card {
  --focus: var(--teal-ink);
  background: var(--card);
  color: var(--ink);
  border-radius: 20px;
  padding: 24px 20px;
  box-shadow: var(--shadow);
  scroll-margin-top: 16px;
}
.form-card a { color: var(--teal-ink); }
.form-title {
  font-size: 1.5rem;
  margin-bottom: 4px;
}
.form-sub {
  color: var(--muted);
  margin-bottom: 20px;
  font-size: 0.975rem;
}

@media (min-width: 560px) {
  .form-card { padding: 32px; }
  .form-title { font-size: 1.75rem; }
}

.field { margin: 0 0 18px; }
fieldset.field { border: 0; padding: 0; min-width: 0; }
.field legend,
.field > label {
  display: block;
  padding: 0;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 1rem;
}

.pills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.pills-1 { grid-template-columns: 1fr; }
@media (min-width: 480px) {
  .pills-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.pill {
  position: relative;
  display: block;
  cursor: pointer;
}
.pill input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.pill span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  height: 100%;
  padding: 8px 10px;
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.pill small {
  display: block;
  margin-top: 2px;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
}
.pill:hover span { border-color: var(--teal-ink); }
.pill input:checked + span {
  background: var(--teal-ink);
  border-color: var(--teal-ink);
  color: #fff;
}
.pill input:checked + span small { color: rgba(255, 255, 255, 0.9); }
.pill input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.field.is-invalid .pill span { border-color: var(--error); }

.text-input {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 11px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1.0625rem; /* >=16px avoids iOS zoom on focus */
}
.text-area { min-height: 92px; resize: vertical; line-height: 1.5; }
.text-input::placeholder { color: #6B7471; }
.optional { font-weight: 400; color: var(--muted); }
.text-input:focus {
  border-color: var(--teal-ink);
  outline: 3px solid rgba(62, 111, 99, 0.35);
  outline-offset: 0;
}
.text-input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.text-input[aria-invalid="true"] { border-color: var(--error); }

.field-row {
  display: grid;
  gap: 0 16px;
}
@media (min-width: 480px) {
  .field-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
}

.field-error {
  margin: 6px 0 0;
  color: var(--error);
  font-size: 0.925rem;
  font-weight: 600;
}
.field-error[hidden] { display: none; }

/* Consent checkbox: large tap target, the whole label is clickable. */
.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.check input {
  flex: none;
  width: 24px;
  height: 24px;
  margin: 1px 0 0;
  accent-color: var(--teal-ink);
  cursor: pointer;
}
.check label { font-size: 0.975rem; line-height: 1.45; cursor: pointer; padding: 2px 0; }
.check input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.field.is-invalid .check input { outline: 2px solid var(--error); outline-offset: 2px; }
.consent-link { margin: 6px 0 0 36px; font-size: 0.925rem; }

/* Send error: shown above the button, the filled-in data stays. */
.form-status {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--error);
  border-radius: 12px;
  background: #FBEDEA;
  color: var(--error);
  font-size: 0.95rem;
  font-weight: 600;
}
.form-status[hidden] { display: none; }
.form-status:focus { outline: none; }
.form-status:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Honeypot: off-screen for humans, still present for bots. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Trust bar ---------- */

.trust-bar {
  background: var(--trust);
  padding: 18px 0;
}
.trust-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 32px;
  font-weight: 600;
}
.trust-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.trust-list svg { width: 20px; height: 20px; color: var(--teal-ink); flex: none; }

/* ---------- Generic sections ---------- */

.section { padding: 64px 0; }
@media (min-width: 960px) { .section { padding: 96px 0; } }

.section-head {
  max-width: 660px;
  margin-bottom: 36px;
}
.section-head p { color: var(--muted); font-size: 1.125rem; margin: 0; }

/* ---------- Examples ---------- */

.examples { background: var(--card); border-block: 1px solid var(--line); }
.examples-grid {
  display: grid;
  gap: 20px;
}
@media (min-width: 720px) {
  .examples-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
}
.example { margin: 0; }
.example img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--trust);
}
.js .example img { opacity: 0; transition: opacity 0.6s ease; }
.js .example img.is-loaded { opacity: 1; }
.example figcaption {
  margin-top: 12px;
  font-weight: 600;
}
.examples-note {
  margin: 24px 0 0;
  font-size: 0.925rem;
  color: var(--muted);
}

/* ---------- FAQ ---------- */

.faq-list { max-width: 780px; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  position: relative;
  display: block;
  padding: 20px 48px 20px 0;
  font-size: 1.125rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before,
.faq-item summary::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 16px;
  height: 2px;
  background: var(--teal-ink);
  transition: transform 0.2s ease;
}
.faq-item summary::after { transform: rotate(90deg); }
.faq-item[open] summary::after { transform: rotate(0deg); }
.faq-item summary:hover { color: var(--teal-ink); }
.faq-answer { padding: 0 0 20px; color: var(--muted); max-width: 68ch; }
.faq-answer p:last-child { margin-bottom: 0; }

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--dark-2);
  padding: 64px 0;
  text-align: center;
}
.cta-band h2 { max-width: 22ch; margin-inline: auto; }
.cta-band p {
  color: var(--on-dark-muted);
  font-size: 1.125rem;
  max-width: 48ch;
  margin: 0 auto 28px;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--dark);
  color: var(--on-dark-muted);
  padding: 40px 0;
  font-size: 0.95rem;
}
.footer-inner {
  display: grid;
  gap: 20px;
}
@media (min-width: 720px) {
  .footer-inner { grid-template-columns: 1fr auto; align-items: end; }
}
.footer-logo { height: 40px; width: auto; margin-bottom: 14px; }
.footer-text { margin: 0; max-width: 52ch; }
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.footer-links li:has(> [hidden]) { display: none; }
.footer-links a,
.footer-links button {
  color: var(--on-dark);
}
.link-button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}
.footer-contact { margin: 24px 0 0; }
.footer-copy { margin: 6px 0 0; font-size: 0.875rem; }

/* ---------- Simple pages (kiitos, 404) ---------- */

.center-page {
  padding: 64px 0 88px;
  text-align: center;
}
.center-page .container { max-width: 720px; }
.center-page .illustration {
  width: 200px;
  height: auto;
  margin: 0 auto 28px;
  color: var(--navy);
}
.center-page .illustration-sm { width: 112px; }
.center-page .lead {
  font-size: 1.1875rem;
  color: var(--muted);
  max-width: 46ch;
  margin: 0 auto 32px;
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
@media (max-width: 479px) {
  .btn-row .btn { width: 100%; }
}

.next-steps {
  text-align: left;
  max-width: 560px;
  margin: 0 auto 36px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.next-steps h2 { font-size: 1.375rem; }
.next-steps ol { margin: 0; padding-left: 1.3em; }
.next-steps li { margin-bottom: 0.6em; }
.next-steps li:last-child { margin-bottom: 0; }

/* ---------- Legal / prose pages ---------- */

.prose-page { padding: 48px 0 80px; }
.prose {
  max-width: 760px;
}
.prose h1 { margin-bottom: 0.3em; }
.prose h2 { font-size: 1.375rem; margin-top: 2em; }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
.prose .updated { color: var(--muted); margin-bottom: 2em; }
.todo {
  background: #F2E3B3;
  color: var(--ink);
  padding: 0 0.25em;
  border-radius: 3px;
}

/* ---------- Cookie banner (only rendered by tracking.js when tracking is enabled) ---------- */

.cookie-banner {
  --focus: var(--teal-ink);
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 50;
  max-width: 560px;
  margin-inline: auto;
  padding: 20px;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 0.975rem;
}
.cookie-banner h2 { font-size: 1.2rem; margin-bottom: 0.3em; }
.cookie-banner p { margin-bottom: 14px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-actions .btn { flex: 1 1 180px; min-height: 48px; font-size: 1.0625rem; }
/* Consent buttons use dark-on-light / light-on-dark so the smaller text stays AA. */
.cookie-actions .btn-primary { background: var(--teal-ink); }
.cookie-actions .btn-primary:hover { background: var(--dark); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* =====================================================================
   HOW IT WORKS: scroll-driven timeline
   Default (no JS): plain stacked cards. main.js adds .is-live and
   is-active / is-reached / is-seen classes as the visitor scrolls.
   ===================================================================== */

.section-head-center { text-align: center; margin-inline: auto; }

.timeline { position: relative; }
.tl-line, .tl-node { display: none; }
.tl-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 28px;
}
.tl-card {
  max-width: 520px;
  margin-inline: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(29, 38, 36, 0.07);
  transform-origin: center;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.6s ease,
              filter 0.6s ease, box-shadow 0.6s ease;
}
.tl-visual {
  display: grid;
  place-items: center;
  min-height: 214px;
  padding: 22px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.tl-body { padding: 22px 24px 26px; }
.tl-eyebrow {
  margin: 0 0 6px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-ink);
}
.tl-body h3 { font-size: 1.4rem; margin-bottom: 0.35em; }
.tl-body p:last-child { margin: 0; color: var(--muted); }

/* Phone / tablet: the card in view is full size, the others shrink and turn grey.
   Text is never faded, so contrast stays WCAG AA in every state. */
.timeline.is-live .tl-card {
  transform: scale(0.92);
  filter: saturate(0.15);
  background: var(--card);
}

.timeline.is-live .tl-step.is-active .tl-card {
  transform: none;
  filter: none;
  background: #fff;
  box-shadow: 0 24px 60px rgba(29, 38, 36, 0.16);
}

/* Desktop: curved line in the middle, cards alternate left and right. */
@media (min-width: 1024px) {
  .timeline { padding: 24px 0; }
  .tl-steps { gap: 0; }
  .tl-step {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px minmax(0, 1fr);
    align-items: center;
  }
  .tl-step + .tl-step { margin-top: -90px; }
  .tl-card { grid-row: 1; width: 100%; max-width: 440px; margin: 0; }
  .tl-step:nth-child(odd) .tl-card { grid-column: 1; justify-self: end; }
  .tl-step:nth-child(even) .tl-card { grid-column: 3; justify-self: start; }

  .tl-line {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
  }
  .tl-base, .tl-progress { fill: none; stroke-linecap: round; }
  .tl-base { stroke: var(--line); stroke-width: 3; }
  .tl-progress { stroke: var(--teal); stroke-width: 3.5; }

  .tl-node {
    display: grid;
    place-items: center;
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    position: relative;
    z-index: 1;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--line);
    color: #9AA3A0;
    box-shadow: 0 6px 18px rgba(29, 38, 36, 0.12);
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, transform 0.4s ease;
  }
  .tl-node svg { width: 26px; height: 26px; }
  .tl-step.is-reached .tl-node { color: var(--teal-ink); border-color: var(--teal); }
  .tl-step.is-active .tl-node {
    background: var(--teal-ink);
    border-color: var(--teal-ink);
    color: #fff;
    transform: scale(1.1);
  }
  .timeline.is-live .tl-card { transform: scale(0.96); }
}

/* ---------- Card mockups ---------- */

.mock {
  width: 100%;
  max-width: 320px;
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 8px 24px rgba(29, 38, 36, 0.08);
  font-size: 0.8rem;
  line-height: 1.35;
  text-align: left;
}
.mock p { margin: 0; }
.mock .mock-label { font-weight: 700; font-size: 0.72rem; margin-bottom: 6px; }
.mock-pills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.mock-pills span {
  padding: 5px 4px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mock-pills .on { background: var(--teal-ink); border-color: var(--teal-ink); color: #fff; }
.mock-input {
  padding: 6px 10px;
  margin-bottom: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-size: 0.74rem;
  color: var(--muted);
}
.mock-btn {
  padding: 8px;
  border-radius: 999px;
  background: var(--teal-ink); /* small white text needs the darker teal for AA */
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  text-align: center;
}

.sms-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.sms-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg);
  flex: none;
}
.sms-head strong { display: block; font-size: 0.78rem; }
.sms-head small { display: block; font-size: 0.68rem; color: var(--muted); }
.mock .bubble {
  max-width: 86%;
  margin-bottom: 6px;
  padding: 7px 10px;
  border-radius: 14px;
  font-size: 0.74rem;
}
.bubble.in { background: #E9ECEB; border-bottom-left-radius: 4px; }
.mock .mock-note { margin-top: 8px; font-size: 0.72rem; color: var(--muted); }
.bubble.out { background: var(--teal-ink); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.mock .bubble.typing { display: inline-flex; gap: 4px; padding: 9px 12px; margin-bottom: 0; }
.bubble.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8A9591;
  animation: typing 1.2s infinite ease-in-out;
}
.bubble.typing span:nth-child(2) { animation-delay: 0.15s; }
.bubble.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing {
  0%, 60%, 100% { transform: none; opacity: 0.5; }
  30% { transform: translateY(-3px); opacity: 1; }
}
/* Messages pop in one by one the first time the step becomes active. */
.timeline.is-live .bubble {
  opacity: 0;
  transform: translateY(8px) scale(0.97);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.timeline.is-live .is-seen .bubble { opacity: 1; transform: none; }
.timeline.is-live .is-seen .bubble:nth-of-type(2) { transition-delay: 0.5s; }
.timeline.is-live .is-seen .bubble:nth-of-type(3) { transition-delay: 1s; }

.cal-head strong { display: block; font-size: 0.82rem; }
.cal-head small { display: block; font-size: 0.7rem; color: var(--muted); }
.cal-week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 12px 0; }
.cal-week span {
  display: grid;
  place-items: center;
  padding: 6px 0;
  border-radius: 10px;
  background: var(--bg);
  font-weight: 700;
  font-size: 0.85rem;
  transition: background-color 0.5s ease 0.3s, color 0.5s ease 0.3s;
}
.cal-week small { font-size: 0.6rem; font-weight: 700; color: var(--muted); }
.cal-week .on,
.timeline.is-live .is-seen .cal-week .on { background: var(--teal-ink); color: #fff; }
.cal-week .on small { color: rgba(255, 255, 255, 0.85); }
.timeline.is-live .cal-week .on { background: var(--bg); color: var(--ink); }
.timeline.is-live .cal-week .on small { color: var(--muted); }
.timeline.is-live .is-seen .cal-week .on small { color: rgba(255, 255, 255, 0.85); }
.cal-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px dashed var(--teal);
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.76rem;
}
.cal-slot .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); flex: none; }

/* ---------- Scroll reveal ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal-d1 { transition-delay: 0.12s; }
.js .reveal-d2 { transition-delay: 0.24s; }

/* ---------- Sticky CTA (phones only) ---------- */

.sticky-cta {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 12px;
  z-index: 40;
  box-shadow: 0 12px 30px rgba(10, 16, 14, 0.35);
  transform: translateY(160%);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.sticky-cta.is-shown { transform: none; }
@media (min-width: 960px) { .sticky-cta { display: none; } }

/* ---------- Breadcrumbs ---------- */

.breadcrumbs { margin-bottom: 28px; font-size: 0.925rem; }
.breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
}
.breadcrumbs li { display: inline-flex; align-items: center; color: var(--muted); }
.breadcrumbs li + li::before {
  content: "";
  width: 7px;
  height: 7px;
  margin: 0 12px 0 10px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.breadcrumbs a { color: var(--teal-ink); font-weight: 600; }
.breadcrumbs [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ---------- Tables (legal pages) ---------- */

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1em;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}
.table-wrap:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 560px; }
.table-wrap th,
.table-wrap td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table-wrap th { font-weight: 700; background: var(--trust); }
.table-wrap tr:last-child td { border-bottom: 0; }

/* ---------- Reduced motion: show everything, no movement ---------- */

@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .example img { opacity: 1; transform: none; }
  .js .hero-copy > *, .js .hero .form-card { animation: none; }
  .timeline.is-live .tl-card { transform: none; filter: none; }
  .timeline.is-live .bubble { opacity: 1; transform: none; }
  .bubble.typing span { animation: none; }
  .hero-media img { transform: none !important; }
}
