/* ============================================================================
   Tilli — shared site chrome + interior-page components
   Uses the design-system tokens from _ds/.../tokens/colors.css (--tl-*).
   Everything here is namespaced `.tl-` so it never collides with the
   home page's bespoke seamless-scroll styles.
   ========================================================================== */

/* ── Interior page base ──────────────────────────────────────────────────── */
.tl-page {
  margin: 0;
  font-family: var(--tl-font-core);
  color: var(--tl-text-body);
  background: var(--tl-surface-page);
  -webkit-font-smoothing: antialiased;
}
.tl-page * { box-sizing: border-box; }
.tl-container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.tl-narrow { max-width: 780px; }

/* Colour rail that runs along the very top of every page (matches home). */
.tl-topbar { position: fixed; top: 0; left: 0; right: 0; height: 6px; display: flex; z-index: 60; }
.tl-topbar > div { flex: 1; }

/* ── Typography ──────────────────────────────────────────────────────────── */
.tl-eyebrow { font-size: var(--tl-fs-xs); font-weight: 800; letter-spacing: var(--tl-tracking-kicker); text-transform: uppercase;
  color: var(--tl-green-600); margin: 0 0 12px; }
.tl-h1 { font-size: var(--tl-fs-2xl); font-weight: 800; letter-spacing: var(--tl-tracking-tight);
  line-height: 1.05; color: var(--tl-text-heading); margin: 0 0 20px; }
.tl-h2 { font-size: var(--tl-fs-xl); font-weight: 800; letter-spacing: var(--tl-tracking-tight);
  line-height: 1.12; color: var(--tl-text-heading); margin: 0 0 16px; }
.tl-h3 { font-size: var(--tl-fs-lg); font-weight: 800; letter-spacing: var(--tl-tracking-tight);
  color: var(--tl-ink-700); margin: 0 0 10px; }
.tl-lead { font-size: var(--tl-fs-lg); line-height: 1.65; color: var(--tl-ink-500); margin: 0 0 18px; }
.tl-body { font-size: var(--tl-fs-base); line-height: 1.7; color: var(--tl-text-body); }
.tl-muted { color: var(--tl-text-muted); }

/* ── Tones ───────────────────────────────────────────────────────────────────
   Per-item brand colour pair for components that read --c (accent fill / border)
   and --ct (accent text on white). One class instead of inline style="--c:…". */
.tone-cyan   { --c: var(--tl-cyan-500);   --ct: var(--tl-cyan-700); }
.tone-green  { --c: var(--tl-green-500);  --ct: var(--tl-green-600); }
.tone-yellow { --c: var(--tl-yellow-500); --ct: var(--tl-yellow-700); }
.tone-pink   { --c: var(--tl-pink-400);   --ct: var(--tl-pink-600); }
.tone-orange { --c: var(--tl-orange-500); --ct: var(--tl-yellow-700); }

/* ── Sections ────────────────────────────────────────────────────────────── */
.tl-section { padding: clamp(56px, 8vw, 104px) 0; }
.tl-section--tint { background: var(--tl-surface-100); }
.tl-section--cyan { background: var(--tl-wash-cyan); }
.tl-section--green { background: var(--tl-wash-green); }
.tl-section--pink { background: var(--tl-wash-pink); }
.tl-section-head { max-width: 720px; margin: 0 0 44px; }
.tl-section-head.tl-center { margin-left: auto; margin-right: auto; text-align: center; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.tl-btn { display: inline-flex; align-items: center; gap: 8px; font-family: inherit; font-size: var(--tl-fs-base);
  font-weight: 700; letter-spacing: var(--tl-tracking-normal); padding: 13px 26px; border-radius: var(--tl-radius-pill); border: 2px solid transparent;
  cursor: pointer; transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
  text-decoration: none; white-space: nowrap; }
.tl-btn:hover { transform: translateY(-2px); }
.tl-btn--primary { background: var(--tl-pink-600); color: var(--tl-white); box-shadow: var(--tl-shadow-glow-pink); }
.tl-btn--primary:hover { background: var(--tl-pink-700); color: var(--tl-white); }
.tl-btn--green { background: var(--tl-green-500); color: var(--tl-white); box-shadow: var(--tl-shadow-glow-green); }
.tl-btn--green:hover { background: var(--tl-green-600); color: var(--tl-white); }
.tl-btn--ghost { background: var(--tl-white); color: var(--tl-ink-700); border-color: var(--tl-line-200); }
.tl-btn--ghost:hover { border-color: var(--tl-pink-600); color: var(--tl-pink-600); }
.tl-btn--lg { padding: 16px 34px; font-size: var(--tl-fs-base); }

/* ── Header (interior pages) ─────────────────────────────────────────────── */
.tl-header { position: fixed; top: 6px; left: 0; right: 0; z-index: 55;
  background: var(--tl-glass); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--tl-line-200);
  transition: transform .35s cubic-bezier(.4,0,.2,1); will-change: transform; }
/* scroll-down: tuck the bar up out of view (extra 8px clears the top strip) */
.tl-header--hidden { transform: translateY(calc(-100% - 8px)); }
/* final ("Let's talk") scene: always bring the header back down (beats --hidden) */
body.tl-at-end .tl-header { transform: none; }
.tl-header__inner { display: flex; align-items: center; justify-content: space-between;
  height: 66px; }
.tl-logo { display: flex; align-items: center; }
.tl-logo img { height: 30px; width: auto; display: block; }
.tl-nav { display: flex; align-items: center; gap: 6px; }
.tl-nav a { font-family: var(--tl-font-core); text-decoration: none; font-size: var(--tl-fs-sm); font-weight: 700;
  color: var(--tl-ink-600); padding: 9px 14px; border-radius: var(--tl-radius-pill); transition: color .2s ease, background .2s ease; }
.tl-nav a:hover { color: var(--tl-ink-900); background: var(--tl-surface-100); }
.tl-nav a[aria-current="page"] { color: var(--tl-pink-600); }
.tl-nav__cta { margin-left: 8px; }
.tl-burger { display: none; width: 42px; height: 42px; border: 1px solid var(--tl-line-200); border-radius: var(--tl-radius-md);
  background: var(--tl-white); cursor: pointer; align-items: center; justify-content: center; flex-direction: column; gap: 4px; }
.tl-burger span { display: block; width: 18px; height: 2px; background: var(--tl-ink-700); border-radius: var(--tl-radius-xs); }
/* push interior page content below the fixed header + rail */
.tl-page .tl-main { padding-top: 72px; }

/* keep the WhatsApp bubble clear of Home's prev/next arrows (bottom-right) */
.tl-home .tl-wa { bottom: 130px; }

@media (max-width: 860px) {
  .tl-burger { display: flex; }
  .tl-header .tl-nav { position: absolute; top: 66px; right: 12px; left: 12px; flex-direction: column;
    align-items: stretch; gap: 4px; background: var(--tl-white); border: 1px solid var(--tl-line-200);
    border-radius: var(--tl-radius-md); padding: 10px; box-shadow: var(--tl-shadow-raised); display: none; }
  .tl-header .tl-nav--open { display: flex; }
  .tl-header .tl-nav a { padding: 12px 14px; }
  .tl-nav__cta { margin: 4px 0 0; text-align: center; }
  .tl-home .tl-wa { bottom: 122px; }
}

/* ── Cards & grids ───────────────────────────────────────────────────────── */
.tl-grid { display: grid; gap: 24px; }
.tl-grid--2 { grid-template-columns: repeat(2, 1fr); }
.tl-grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .tl-grid--2, .tl-grid--3 { grid-template-columns: 1fr; } }
.tl-card { background: var(--tl-surface-card); border: 1px solid var(--tl-line-200); border-radius: var(--tl-radius-lg);
  padding: 28px; box-shadow: var(--tl-shadow-card); }
.tl-card--pop { border: 2px solid var(--tl-green-500); }
.tl-card__media { border-radius: var(--tl-radius-md); overflow: hidden; margin: -28px -28px 22px; aspect-ratio: 16/9;
  background: var(--tl-surface-200); display: flex; align-items: center; justify-content: center; }
.tl-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Stat strip ──────────────────────────────────────────────────────────── */
.tl-statstrip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 780px) { .tl-statstrip { grid-template-columns: repeat(2, 1fr); } }
.tl-stat { text-align: center; padding: 18px 12px; }
.tl-stat__num { font-size: var(--tl-fs-display); font-weight: 800; letter-spacing: var(--tl-tracking-tight);
  color: var(--snum, var(--tl-pink-600)); line-height: 1; }
.tl-stat__lbl { font-size: var(--tl-fs-sm); font-weight: 600; color: var(--tl-text-stat-label); margin-top: 8px; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.tl-footer { background: var(--tl-white); border-top: 1px solid var(--tl-line-200); color: var(--tl-ink-600); padding: 48px 0 40px; }
.tl-footer a { color: var(--tl-ink-600); text-decoration: none; }
.tl-footer a:hover { color: var(--tl-ink-900); }
.tl-footer__row { display: flex; flex-wrap: wrap; gap: 28px 40px; justify-content: space-between; align-items: center; }
.tl-footer__row--meta { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--tl-line-200); }
.tl-footer__brand { display: flex; align-items: center; gap: 16px; }
.tl-footer__tag { font-size: var(--tl-fs-sm); font-style: italic; color: var(--tl-ink-500); }
.tl-footer__links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.tl-footer__links a { font-weight: 600; font-size: var(--tl-fs-sm); }
.tl-footer__reach { font-size: var(--tl-fs-sm); color: var(--tl-ink-500); }
.tl-footer__reach a { font-weight: 700; color: var(--tl-ink-700); }
.tl-footer__legal { font-size: var(--tl-fs-sm); color: var(--tl-ink-300); margin: 0; }
.tl-footer img { height: 26px; }
/* PHONES: the one phone footer standard (same as the m/ pages' .ft and Home's
   .foot): centred column — logo, italic tagline, page links, socials, Reach
   out, © line. Desktop keeps the two-row layout above. */
@media (max-width: 860px) and (pointer: coarse) {
  .tl-footer { padding: 32px 0 calc(32px + env(safe-area-inset-bottom)); text-align: center; line-height: 1.55; }
  .tl-footer .tl-container { padding: 0 20px; }
  .tl-footer__row { flex-direction: column; align-items: center; justify-content: flex-start; gap: 0; }
  .tl-footer__row--meta { margin-top: 0; padding-top: 0; border-top: 0; }
  .tl-footer__brand { flex-direction: column; gap: 6px; }
  .tl-footer img { height: 28px; }
  .tl-footer__links { justify-content: center; gap: 18px; margin: 20px 0 14px; }
  .tl-footer__social { order: 1; gap: 16px; margin: 0 0 16px; }
  .tl-footer__social a { color: var(--tl-ink-500); }
  .tl-footer__reach { order: 2; }
  .tl-footer__reach a { font-weight: 400; color: var(--tl-ink-500); }
  .tl-footer__legal { order: 3; margin-top: 16px; font-size: var(--tl-fs-xs); }
}
/* desktop: keep the footer's right end 96px clear of the screen edge so the
   WhatsApp bubble (right: 22px, 62px wide) never sits on the links */
@media (min-width: 861px) {
  .tl-footer .tl-container { padding-right: max(24px, calc(96px - max(0px, (100vw - 1120px) / 2))); }
}

/* ── WhatsApp bubble + Kavi card ─────────────────────────────────────────── */
.tl-wa { position: fixed; right: 22px; bottom: 22px; z-index: 70; transition: opacity .25s ease, transform .25s ease; }
.tl-wa__bubble { width: 62px; height: 62px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--tl-whatsapp); color: var(--tl-white); display: flex; align-items: center; justify-content: center;
  box-shadow: var(--tl-shadow-glow-whatsapp); transition: transform .2s ease; }
.tl-wa__bubble:hover { transform: scale(1.06); }
.tl-wa__bubble svg { width: 32px; height: 32px; }
.tl-wa__card { position: absolute; right: 0; bottom: 78px; width: 300px; border-radius: var(--tl-radius-lg); overflow: hidden;
  background: var(--tl-white); box-shadow: var(--tl-shadow-overlay); transform-origin: bottom right;
  transform: scale(0.9) translateY(10px); opacity: 0; pointer-events: none; transition: transform .22s ease, opacity .22s ease; }
.tl-wa--open .tl-wa__card { transform: scale(1) translateY(0); opacity: 1; pointer-events: auto; }
.tl-wa__head { background: var(--tl-green-500); padding: 26px 22px 24px; text-align: center; position: relative; color: var(--tl-white); }
.tl-wa__close { position: absolute; top: 12px; right: 14px; background: none; border: 0; color: var(--tl-white);
  font-size: var(--tl-fs-lg); line-height: 1; cursor: pointer; opacity: .9; }
.tl-wa__avatar { width: 84px; height: 84px; border-radius: 50%; border: 3px solid var(--tl-white); object-fit: cover;
  margin: 0 auto 12px; display: block; background: var(--tl-white); position: relative; }
.tl-wa__avwrap { position: relative; width: 84px; margin: 0 auto 12px; }
.tl-wa__dot { position: absolute; right: 4px; bottom: 4px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--tl-whatsapp); border: 3px solid var(--tl-green-500); }
.tl-wa__name { font-size: var(--tl-fs-lg); font-weight: 800; margin: 0; }
.tl-wa__role { font-size: var(--tl-fs-sm); opacity: .95; margin: 3px 0 0; }
.tl-wa__foot { padding: 16px; }
.tl-wa__start { width: 100%; justify-content: center; }

/* ── Back-to-top arrow (phones only) ─────────────────────────────────────────
   Stacked on the WhatsApp bubble's vertical axis, 12px above it. Shown on
   phones running Home (html.tl-mobile) or any touch screen ≤860px wide. */
.tl-totop { --totop-size: 44px; position: fixed; z-index: 69; display: none;
  right: calc(22px + (62px - var(--totop-size)) / 2); bottom: calc(22px + 62px + 12px + env(safe-area-inset-bottom));
  width: var(--totop-size); height: var(--totop-size); border-radius: 50%; cursor: pointer;
  align-items: center; justify-content: center; color: var(--tl-ink-700);
  background: var(--tl-glass-strong); border: 1px solid var(--tl-line-200); box-shadow: var(--tl-shadow-raised);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .22s ease, transform .22s ease; }
.tl-totop svg { width: 20px; height: 20px; }
html.tl-mobile .tl-totop { display: flex; }
@media (max-width: 860px) and (pointer: coarse) { .tl-totop { display: flex; } }
.tl-totop--show { opacity: 1; pointer-events: auto; transform: translateY(0); }
/* the open Kavi card rises over this spot — get out of its way */
.tl-wa--open ~ .tl-totop { opacity: 0; pointer-events: none; }
/* phones: both buttons fade away while the footer is on screen so they never
   sit on its text (body.tl-over-footer is set by site-chrome.js) */
body.tl-over-footer .tl-wa:not(.tl-wa--open),
body.tl-over-footer .tl-totop { opacity: 0 !important; pointer-events: none !important; transform: translateY(8px); }

/* ── Get-in-touch modal ──────────────────────────────────────────────────── */
.tl-modal { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center;
  padding: 20px; background: var(--tl-scrim); backdrop-filter: blur(3px); }
.tl-modal--open { display: flex; }
.tl-modal__panel { width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; background: var(--tl-white);
  border-radius: var(--tl-radius-lg); padding: 30px; box-shadow: var(--tl-shadow-overlay); position: relative; }
.tl-modal__close { position: absolute; top: 16px; right: 18px; background: none; border: 0; font-size: var(--tl-fs-lg);
  line-height: 1; color: var(--tl-ink-300); cursor: pointer; }
.tl-modal__close:hover { color: var(--tl-ink-900); }
.tl-form { display: grid; gap: 15px; margin-top: 18px; }
.tl-field { display: grid; gap: 6px; }
.tl-field label { font-size: var(--tl-fs-sm); font-weight: 700; color: var(--tl-ink-700); }
.tl-field label .tl-req { color: var(--tl-pink-600); }
.tl-input, .tl-select, .tl-textarea { font-family: inherit; font-size: var(--tl-fs-base); color: var(--tl-ink-700);
  padding: 12px 14px; border: 1.5px solid var(--tl-line-200); border-radius: var(--tl-radius-md); background: var(--tl-white); width: 100%; }
.tl-input:focus, .tl-select:focus, .tl-textarea:focus { outline: none; border-color: var(--tl-cyan-500);
  box-shadow: var(--tl-ring); }
.tl-textarea { min-height: 92px; resize: vertical; }
.tl-input--err, .tl-select--err { border-color: var(--tl-pink-600); }
.tl-field__err { font-size: var(--tl-fs-xs); font-weight: 600; color: var(--tl-pink-600); display: none; }
.tl-field__err--show { display: block; }
.tl-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
@media (max-width: 520px) { .tl-form__row { grid-template-columns: 1fr; } }
.tl-form__submit { justify-content: center; margin-top: 4px; }
.tl-form__note { font-size: var(--tl-fs-xs); color: var(--tl-text-muted); text-align: center; }
.tl-form__ok { display: none; text-align: center; padding: 20px 0; }
.tl-form__ok h3 { color: var(--tl-green-600); }
.tl-modal--done .tl-form { display: none; }
.tl-modal--done .tl-form__ok { display: block; }

/* Hero helper for interior pages */
.tl-hero { padding: clamp(96px, 12vw, 150px) 0 clamp(48px, 6vw, 76px); }
.tl-hero--cyan { background: linear-gradient(180deg, var(--tl-wash-cyan), var(--tl-white)); }
.tl-hero--green { background: linear-gradient(180deg, var(--tl-wash-green), var(--tl-white)); }

/* ── 3JS dot-field stages ────────────────────────────────────────────────────
   Empty boxes that reserve room for a dot formation (js/dot-field.js). Same
   gate as the module (desktop + fine pointer), so phones never get the gap. */
.dots-stage { display: none; }
@media (min-width: 861px) and (pointer: fine) { .dots-stage { display: block; } }
