/* ============================================================
   Tylum — tylumvoice.com
   Hand-authored. No build step, no framework.

   Design idea: the product writes down every call, so the visual
   language is the *written record of a conversation* — ruled lines,
   timestamps, dialogue set as type. Warm paper, ink, and a single
   petrol-green accent. Printed, not backlit.

   Deliberately avoided: purple/violet gradients, glow effects,
   glassmorphism, floating drop-shadow cards, neural/constellation
   motifs. The audience is a 35-60 year old practice owner who needs
   to feel this is established, not novel.
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  /* Warm paper ground. Slightly warmer than the parent brand so Tylum
     reads as its own product, not a Calmax subpage. */
  --paper:      #FBF8F3;
  --paper-2:    #F4EEE4;   /* alternating section band */
  --paper-3:    #EDE5D8;   /* inset wells */

  --ink:        #1A1917;   /* 15.8:1 on --paper  */
  --ink-2:      #4A453F;   /*  8.1:1 on --paper  */
  --ink-3:      #6E675D;   /*  5.27:1 on paper, 4.84:1 on band — AA on both */

  --rule:       rgba(26, 25, 23, 0.14);
  --rule-soft:  rgba(26, 25, 23, 0.07);

  /* Petrol green: trustworthy and calm, appropriate for dental/legal/
     medical buyers, and nowhere near AI-startup purple. */
  --accent:     #0F5245;   /*  8.9:1 on --paper  */
  --accent-2:   #14685A;
  --accent-ink: #FBF8F3;
  --accent-soft:#E6EFEB;

  /* Warm ochre for the "line is open" signal. Amber rather than red so
     it reads as welcoming rather than alarming. */
  /* Amber is a STATUS colour, never a text colour: #A86B1F is only
     3.80:1 on the band, which fails AA for text but passes the 3:1
     non-text rule. Labels therefore use the darker --signal-text. */
  --signal:     #A86B1F;   /* dot / borders only — non-text */
  --signal-text:#8C5A19;   /*  5.52:1 on paper, 5.07:1 on band */
  --signal-soft:#F7EEDD;

  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* 4px base scale */
  --s1: 4px;   --s2: 8px;   --s3: 12px;  --s4: 16px;
  --s5: 24px;  --s6: 32px;  --s7: 48px;  --s8: 64px;
  --s9: 96px;  --s10: 128px;

  --container: 1140px;
  --prose: 64ch;
  --radius: 3px;          /* almost square — printed, not app-like */

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #15140F;
    --paper-2:    #1C1A15;
    --paper-3:    #23201A;
    --ink:        #F3EEE4;
    --ink-2:      #C9C2B6;
    --ink-3:      #9A9286;
    --rule:       rgba(243, 238, 228, 0.16);
    --rule-soft:  rgba(243, 238, 228, 0.08);
    --accent:     #6FBFAA;
    --accent-2:   #8AD2BE;
    --accent-ink: #12211D;
    --accent-soft:#1B2E29;
    --signal:     #D6A05A;
    --signal-text:#E7B877;
    --signal-soft:#2A2118;
  }
}
:root[data-theme="dark"] {
  --paper: #15140F; --paper-2: #1C1A15; --paper-3: #23201A;
  --ink: #F3EEE4; --ink-2: #C9C2B6; --ink-3: #9A9286;
  --rule: rgba(243,238,228,0.16); --rule-soft: rgba(243,238,228,0.08);
  --accent: #6FBFAA; --accent-2: #8AD2BE; --accent-ink: #12211D;
  --accent-soft: #1B2E29; --signal: #D6A05A; --signal-text: #E7B877; --signal-soft: #2A2118;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.018em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.95rem, 3.8vw, 2.9rem); }
h3 { font-family: var(--font-body); font-size: 1.0625rem; font-weight: 600; letter-spacing: 0; line-height: 1.4; }

em { font-style: italic; color: var(--accent); }
p { margin: 0; }
a { color: inherit; text-decoration-color: var(--rule); text-underline-offset: 3px; }

img, svg { max-width: 100%; height: auto; }

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

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--accent-ink);
  padding: var(--s3) var(--s4); z-index: 200;
}
.skip:focus { left: var(--s4); top: var(--s4); }

/* ---------- 3. Layout ---------- */
.wrap {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--s5);
}
@media (min-width: 800px) { .wrap { padding-inline: var(--s7); } }

section { padding-block: clamp(var(--s8), 11vw, var(--s10)); }
.band { background: var(--paper-2); }
.ruled { border-top: 1px solid var(--rule); }

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  margin: 0 0 var(--s5);
}
.lede { font-size: clamp(1.0625rem, 1.6vw, 1.2rem); color: var(--ink-2); max-width: var(--prose); line-height: 1.7; }
.prose { max-width: var(--prose); }
.mt4 { margin-top: var(--s4); } .mt5 { margin-top: var(--s5); }
.mt6 { margin-top: var(--s6); } .mt7 { margin-top: var(--s7); }

/* ---------- 4. Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.nav.is-stuck { border-bottom-color: var(--rule); }
.nav__in {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s5);
  padding-block: var(--s4);
}
.logo {
  font-family: var(--font-display);
  font-size: 1.3rem; letter-spacing: 0.01em;
  text-decoration: none; display: inline-flex; align-items: baseline; gap: var(--s2);
}
.logo b { font-weight: 600; }
.logo span { font-size: 0.6875rem; font-family: var(--font-body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); }
.nav__links { display: none; gap: var(--s6); align-items: center; }
@media (min-width: 860px) { .nav__links { display: flex; } }
/* :not(.btn) matters. `.nav__links a` is (0,1,1) and `.btn--solid` is only
   (0,1,0), so without the exclusion the nav link colour wins and the primary
   CTA renders --ink-2 on --accent: 1.04:1, effectively invisible. */
.nav__links a:not(.btn) { font-size: 0.9375rem; color: var(--ink-2); text-decoration: none; }
.nav__links a:not(.btn):hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); }

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--s2);
  font: 500 0.9375rem/1 var(--font-body);
  padding: 14px var(--s5);
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn--solid { background: var(--accent); color: var(--accent-ink); }
.btn--solid:hover { background: var(--accent-2); }
.btn--line { border-color: var(--rule); color: var(--ink); }
.btn--line:hover { border-color: var(--ink); background: var(--paper-3); }
.btn--quiet { padding-inline: 0; color: var(--ink-2); }
.btn--quiet:hover { color: var(--accent); }

/* ---------- 6. Hero ---------- */
.hero { padding-block: clamp(var(--s7), 8vw, var(--s9)) clamp(var(--s8), 10vw, var(--s10)); text-align: center; }
.hero__in { display: grid; justify-items: center; gap: var(--s5); }
.hero h1 { max-width: 16ch; }
.hero h1 span { display: block; }
.hero .lede { max-width: 54ch; margin-inline: auto; }
.hero__alt { display: flex; flex-wrap: wrap; gap: var(--s5); justify-content: center; align-items: center; margin-top: var(--s2); }

/* ---------- 7. The phone plaque — the page's main object ----------
   Treated as an engraved office placard: double rule, warm ground,
   tabular numerals. Printed rather than backlit, which is the
   deliberate anti-tell against typical AI landing pages. */
.plaque {
  position: relative;
  margin-inline: auto;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: var(--s6) var(--s5) var(--s5);
  text-align: center;
  max-width: 520px;
  width: 100%;
}
.plaque::after {
  /* the inner engraved rule */
  content: ""; position: absolute; inset: 6px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  pointer-events: none;
}
.plaque__status {
  display: inline-flex; align-items: center; gap: var(--s2);
  font: 500 0.6875rem/1 var(--font-body);
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--signal-text);
  margin-bottom: var(--s5);
}
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--signal) 55%, transparent);
  animation: ring 2.4s var(--ease) infinite;
}
@keyframes ring {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--signal) 55%, transparent); }
  70%  { box-shadow: 0 0 0 9px color-mix(in srgb, var(--signal) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--signal) 0%, transparent); }
}
.plaque__num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 4.25rem);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.1;
  word-break: keep-all;
}
.plaque__num:hover { color: var(--accent); }
.plaque__hint { font-size: 0.9375rem; color: var(--ink-2); margin-top: var(--s4); }
.plaque__tap { display: none; font-size: 0.8125rem; color: var(--ink-3); margin-top: var(--s3); }
@media (hover: none) and (pointer: coarse) { .plaque__tap { display: block; } }
.plaque__rule { height: 1px; background: var(--rule); margin: var(--s5) 0 0; }
.plaque__foot { font-size: 0.8125rem; color: var(--ink-3); margin-top: var(--s4); }

/* A loud, easily-deleted marker so placeholder content can never ship
   as fact by accident. Remove the element and this rule together. */
.todo {
  display: inline-block;
  font: 600 0.6875rem/1.4 var(--font-mono);
  letter-spacing: 0.04em;
  background: var(--signal-soft); color: var(--signal-text);
  border: 1px dashed var(--signal);
  padding: 3px var(--s2); border-radius: 2px;
  margin-top: var(--s3);
}

/* ---------- 8. Ruled feature list (not floating cards) ---------- */
.rows { display: grid; gap: 0; margin-top: var(--s7); }
.row {
  display: grid; gap: var(--s3);
  padding-block: var(--s5);
  border-top: 1px solid var(--rule);
  align-items: start;
}
.row:last-child { border-bottom: 1px solid var(--rule); }
@media (min-width: 760px) { .row { grid-template-columns: 1.5fr 2.5fr; gap: var(--s6); } }
.row__k { font-weight: 600; font-size: 1.0625rem; }
.row__v { color: var(--ink-2); }
.row__n {
  font: 500 0.75rem/1 var(--font-mono);
  color: var(--accent); letter-spacing: 0.08em;
}

/* ---------- 9. Transcript — the visual signature ---------- */
.script {
  border-left: 2px solid var(--accent);
  padding-left: clamp(var(--s4), 3vw, var(--s6));
  display: grid; gap: var(--s5);
  max-width: 640px;
}
.turn { display: grid; gap: var(--s1); }
.turn__meta {
  font: 500 0.6875rem/1 var(--font-mono);
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-3);
  display: flex; gap: var(--s3); align-items: baseline;
}
.turn__who { color: var(--accent); }
.turn--caller .turn__who { color: var(--ink-3); }
.turn__say { font-size: 1.0625rem; color: var(--ink); line-height: 1.6; }
.turn--caller .turn__say { color: var(--ink-2); }
.script__note {
  font: 0.8125rem/1.6 var(--font-mono);
  color: var(--ink-3);
  background: var(--paper-3);
  padding: var(--s3) var(--s4);
  border-radius: var(--radius);
}

/* ---------- 10. Verticals ---------- */
.verts { display: grid; gap: var(--s4); margin-top: var(--s7); }
@media (min-width: 640px) { .verts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .verts { grid-template-columns: repeat(3, 1fr); } }
.vert {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: var(--s5);
  text-decoration: none;
  display: grid; gap: var(--s2);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.vert:hover { border-color: var(--accent); background: var(--accent-soft); }
.vert__t { font-weight: 600; }
.vert__d { font-size: 0.9375rem; color: var(--ink-2); }

/* ---------- 11. Pricing ---------- */
.tiers { display: grid; gap: var(--s5); margin-top: var(--s7); align-items: start; }
@media (min-width: 900px) { .tiers { grid-template-columns: repeat(3, 1fr); max-width: 1100px; margin-inline: auto; } }
.tier {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: var(--s6) var(--s5);
  background: var(--paper);
  display: grid; gap: var(--s4);
}
.tier--pick { border-color: var(--accent); border-width: 2px; }
.tier__tag {
  font: 500 0.6875rem/1 var(--font-body);
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
}
.tier__name { font-family: var(--font-display); font-size: 1.5rem; }
.tier__price { font-family: var(--font-display); font-size: 2.75rem; line-height: 1; font-variant-numeric: tabular-nums; }
.tier__price small { font-family: var(--font-body); font-size: 0.875rem; color: var(--ink-3); font-weight: 400; }
.tier__mins { font-size: 0.9375rem; color: var(--ink-2); padding-bottom: var(--s4); border-bottom: 1px solid var(--rule); }
.tier ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); font-size: 0.9375rem; }
.tier li { display: grid; grid-template-columns: 18px 1fr; gap: var(--s2); color: var(--ink-2); }
.tier li::before { content: "—"; color: var(--accent); }
.tier li.no { color: var(--ink-3); }
.tier li.no::before { content: "·"; color: var(--ink-3); }

/* ---------- 12. FAQ ---------- */
.faq { margin-top: var(--s7); max-width: 780px; }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-of-type { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; list-style: none;
  padding-block: var(--s5);
  font-weight: 600;
  display: flex; justify-content: space-between; gap: var(--s4); align-items: baseline;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.25rem; line-height: 1; flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq__a { color: var(--ink-2); padding-bottom: var(--s5); max-width: var(--prose); }

/* ---------- 13. Footer ---------- */
.foot { border-top: 1px solid var(--rule); padding-block: var(--s8) var(--s6); font-size: 0.9375rem; }
.foot__grid { display: grid; gap: var(--s6); }
@media (min-width: 760px) { .foot__grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.foot h4 { font: 500 0.6875rem/1 var(--font-body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 var(--s4); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
/* Same specificity trap as .nav__links above: guard it now so a button
   dropped into the footer later does not silently lose its colour. */
.foot a:not(.btn) { color: var(--ink-2); text-decoration: none; }
.foot a:not(.btn):hover { color: var(--accent); text-decoration: underline; }
.foot__base { margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--rule-soft); color: var(--ink-3); font-size: 0.875rem; display: flex; flex-wrap: wrap; gap: var(--s4); justify-content: space-between; }

/* ---------- 14. Motion ---------- */
.rise { opacity: 0; transform: translateY(14px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.rise.in { opacity: 1; transform: none; }

/* No JS: never leave content invisible. */
.no-js .rise { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .rise { opacity: 1; transform: none; transition: none; }
  .dot { animation: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}


/* ---------- 15. Resting line ----------
   The entire "sound" motif for the site: one nearly-flat path, low
   amplitude, in one place only. A connected line that is quiet — not a
   bar-chart visualiser. */
.plaque__wave { display: block; width: 100%; height: 22px; margin-top: var(--s4); overflow: visible; }
.plaque__wave path {
  fill: none; stroke: var(--rule); stroke-width: 1.25; stroke-linecap: round;
  transition: stroke 0.3s var(--ease);
}
.plaque:hover .plaque__wave path,
.plaque:focus-visible .plaque__wave path { stroke: var(--accent); }

/* ---------- 16. Mini call chip ----------
   Once the hero scrolls away the number must stay one tap from the
   reader. Mobile only: on desktop the nav CTA already covers it. */
.callbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: var(--paper);
  border-top: 1px solid var(--rule);
  padding: var(--s3) var(--s5) max(var(--s3), env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  transform: translateY(110%);
  transition: transform 0.35s var(--ease);
}
.callbar.in { transform: none; }
.callbar__l { font-size: 0.8125rem; color: var(--ink-3); line-height: 1.3; }
.callbar__l b { display: block; color: var(--ink); font-size: 0.9375rem; font-weight: 600; }
@media (min-width: 860px) { .callbar { display: none; } }
@media (prefers-reduced-motion: reduce) { .callbar { transition: none; } }

/* ---------- 17. Product scoping ----------
   Tylum Outreach ships later under the same brand. It gets its own accent
   by setting data-product on <body>; every other primitive is untouched. */
body[data-product="outreach"] {
  --accent: #1F4A6B; --accent-2: #27608A; --accent-soft: #E6EDF3;
}

/* ---------- 18. Launch-offer note on a pricing tier ----------
   Forward-facing claim ("double what we'll offer after launch"), not a
   struck-through former price the product was never sold at. */
.tier__promo {
  display: block;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--signal-text);
  background: var(--signal-soft);
  border-left: 2px solid var(--signal);
  padding: var(--s3) var(--s4);
  border-radius: 2px;
  margin-top: calc(var(--s3) * -1);
}

/* ── Comparison tables (compare + cost pages) ─────────────────────────
   Scrolls sideways inside its own box on phones so the page never does. */
.tablewrap { margin-top: var(--s6); overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); }
.cmp { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 0.95rem; line-height: 1.5; }
.cmp th, .cmp td { text-align: left; vertical-align: top; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--rule-soft); }
.cmp thead th { font-weight: 600; background: var(--paper-2); border-bottom: 1px solid var(--rule); }
.cmp tbody th { font-weight: 600; color: var(--ink); width: 22%; }
.cmp td { color: var(--ink-2); }
.cmp tr:last-child th, .cmp tr:last-child td { border-bottom: 0; }
.cmp .us { background: var(--accent-soft); color: var(--ink); }
.sources { margin-top: var(--s5); font-size: 0.9rem; color: var(--ink-3); max-width: var(--prose); }
.sources a { color: var(--ink-2); }
.prose h3 { margin-top: var(--s6); }
.prose p + p, .prose ul { margin-top: var(--s4); }
.prose ul { padding-left: 1.2em; color: var(--ink-2); }
.prose li + li { margin-top: var(--s2); }
.formula { font-family: var(--font-mono); font-size: 0.92rem; background: var(--paper-2); border: 1px solid var(--rule); border-radius: 6px; padding: var(--s4); margin-top: var(--s4); overflow-x: auto; }
.cmp tbody th, .cmp thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--paper); }
.cmp thead th:first-child { background: var(--paper-2); }
