/* baillawyers.co.za — one family (Archivo), one ground, one ink, one accent */
:root {
  --ground: #f3f4f1;
  --step: #e5e8e3;
  --ink: #0f1720;
  --ink-soft: #3a4550;
  --night: #0f1720;
  --night-step: #1b2631;
  --on-night: #f3f4f1;
  --on-night-soft: #c4ccd3;
  --accent: #ffc21a;
  --accent-ink: #0f1720;
  --link: #0b5cad;

  --margin: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --gap-section: clamp(96px, 12vw, 200px);

  --t-display: clamp(2.75rem, 8.4vw, 7.5rem);
  --t-h2: clamp(2rem, 4.6vw, 3.75rem);
  --t-h3: clamp(1.25rem, 1.8vw, 1.5rem);
  --t-statement: clamp(1.375rem, 2.4vw, 2.125rem);
  --t-body: 1.125rem;
  --t-small: 0.9375rem;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--t-body);
  line-height: 1.55;
  font-feature-settings: "tnum" 0;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }
p, ul, ol, dl, table { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-stretch: 88%; }
h2 { font-size: var(--t-h2); margin-bottom: 0.5em; }
h3 { font-size: var(--t-h3); letter-spacing: -0.015em; line-height: 1.2; margin-bottom: 0.4em; }
strong { font-weight: 700; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--margin); }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--ink); padding: 12px 16px; z-index: 100; }
.skip:focus { left: 16px; }

/* Buttons: square, flat, one fill */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  min-height: 52px; padding: 0 24px;
  font: inherit; font-weight: 700; font-size: 1.0625rem;
  text-decoration: none; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  transition: transform .18s var(--ease), background-color .18s var(--ease);
}
.btn:hover { background: #ffd34d; }
.btn:active { transform: translateY(1px) scale(.985); }
.btn--plain { background: transparent; color: inherit; padding: 0 4px; text-decoration: underline; text-underline-offset: 5px; }
.btn--plain:hover { background: transparent; text-decoration-thickness: 2px; }
.btn--ink { background: var(--ink); color: var(--ground); }
.btn--ink:hover { background: #24313d; }
/* Buttons keep their own ink whatever section link colour surrounds them */
a.btn { color: var(--accent-ink) !important; }
a.btn--ink { color: var(--ground) !important; }
a.btn--plain { color: inherit !important; }

/* Header */
.site-header { background: var(--night); color: var(--on-night); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.wordmark { color: inherit; text-decoration: none; font-weight: 800; font-size: 1.125rem; letter-spacing: -0.02em; line-height: 1.1; font-stretch: 88%; }
.wordmark span { display: block; font-weight: 400; font-size: .875rem; color: var(--on-night-soft); letter-spacing: 0; font-stretch: 100%; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: var(--on-night); text-decoration: none; font-size: 1rem; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.nav .btn { min-height: 44px; padding: 0 18px; font-size: 1rem; }
.nav-toggle { display: none; background: transparent; color: var(--on-night); border: 0; font: inherit; font-weight: 700; min-height: 44px; padding: 0 4px; cursor: pointer; }
@media (max-width: 1000px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 72px; background: var(--night); flex-direction: column; align-items: flex-start; gap: 0; padding: 8px var(--margin) 24px; }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 0; font-size: 1.25rem; }
  .nav .btn { margin-top: 12px; }
}

/* Hero */
.hero { background: var(--night); color: var(--on-night); padding: clamp(48px, 7vw, 104px) 0 clamp(64px, 8vw, 120px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: end; }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 5.75rem); line-height: .92; letter-spacing: -0.045em; }
.hero .lede { font-size: clamp(1.1875rem, 1.6vw, 1.375rem); line-height: 1.45; color: var(--on-night); max-width: 34em; margin: 40px 0 32px; }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.hero .btn--plain { color: var(--on-night); min-height: 52px; }
.hero .meta { margin-top: 28px; color: var(--on-night-soft); font-size: var(--t-small); }

/* The 48-hour clock */
.clock { background: var(--night-step); padding: clamp(24px, 3vw, 40px); }
.clock h2 { font-size: clamp(1.5rem, 2.4vw, 2.125rem); line-height: 1.05; margin-bottom: 16px; }
.clock p { color: var(--on-night-soft); font-size: var(--t-small); }
.clock label { display: block; font-weight: 600; margin: 16px 0 8px; }
.clock input {
  width: 100%; min-height: 52px; padding: 0 14px;
  font: inherit; font-size: 1.0625rem; color: var(--ink); background: var(--ground);
  border: 0; border-radius: 0;
}
.clock-out { margin-top: 24px; }
.clock-out .big { display: block; font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--accent); font-stretch: 88%; font-variant-numeric: tabular-nums; }
.clock-out .why { display: block; margin-top: 12px; color: var(--on-night); font-size: 1rem; }
.clock-out .left { display: block; margin-top: 8px; color: var(--on-night-soft); font-size: var(--t-small); }

/* Fact band */
.facts { background: var(--accent); color: var(--accent-ink); }
.facts ul { list-style: none; margin: 0; padding: clamp(28px, 3.5vw, 48px) 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.facts strong { display: block; font-size: clamp(1.75rem, 3.2vw, 2.75rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1; font-stretch: 88%; margin-bottom: 6px; }
.facts li { font-size: 1rem; line-height: 1.35; }
@media (max-width: 760px) { .facts ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Sections */
.section { padding-top: var(--gap-section); }
.section:last-of-type { padding-bottom: var(--gap-section); }
.split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.split--rev { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.prose { max-width: 40em; }
.prose p, .prose li { color: var(--ink); }
.prose h3 { margin-top: 1.6em; }
.statement { font-size: var(--t-statement); line-height: 1.25; letter-spacing: -0.015em; font-weight: 600; max-width: 26em; margin-bottom: 1em; }
.byline { color: var(--ink-soft); font-size: var(--t-small); margin-bottom: 24px; }

/* Table of contents panel */
.toc { background: var(--step); padding: clamp(24px, 3vw, 40px); position: sticky; top: 96px; }
.toc h2 { font-size: 1.5rem; letter-spacing: -0.02em; margin-bottom: 16px; }
.toc ol { margin: 0; padding-left: 1.25em; }
.toc li { margin: 6px 0; }
.toc a { color: var(--ink); }

/* Checklist */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: none; }
.steps li { padding: 20px 0 20px; }
.steps li + li { border-top: 0; }
.steps h3 { font-size: clamp(1.375rem, 2.2vw, 1.875rem); letter-spacing: -0.025em; }
.steps p { margin: 0; max-width: 38em; }

/* Field sections */
.field { background: var(--night); color: var(--on-night); padding: var(--gap-section) 0; margin-top: var(--gap-section); }
.field + .section { padding-top: var(--gap-section); }
.field a { color: var(--accent); }
.field p, .field li { color: var(--on-night); }
.field .soft { color: var(--on-night-soft); }
.field--step { background: var(--step); color: var(--ink); }
.field--step a { color: var(--link); }
.field--step p, .field--step li { color: var(--ink); }

/* Real data table */
.table-wrap { overflow-x: auto; margin-top: 32px; }
table.routes { width: 100%; border-collapse: collapse; min-width: 720px; font-size: 1.0625rem; }
table.routes th, table.routes td { text-align: left; vertical-align: top; padding: 18px 20px 18px 0; border-bottom: 1px solid #3a4652; }
table.routes thead th { font-size: 1rem; color: var(--on-night-soft); font-weight: 600; }
table.routes tbody th { font-size: 1.375rem; font-weight: 800; letter-spacing: -0.02em; width: 20%; font-stretch: 88%; }
table.routes caption { text-align: left; color: var(--on-night-soft); font-size: var(--t-small); caption-side: bottom; padding-top: 16px; }

/* Burden ladder */
.ladder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.45fr); gap: 0; margin-top: 40px; align-items: end; }
.ladder > div { padding: clamp(20px, 2.5vw, 36px); }
.ladder > div:nth-child(1) { background: var(--step); min-height: 260px; }
.ladder > div:nth-child(2) { background: #c9cfc8; min-height: 330px; }
.ladder > div:nth-child(3) { background: var(--ink); color: var(--on-night); min-height: 400px; }
.ladder > div:nth-child(3) p { color: var(--on-night); }
.ladder h3 { font-size: clamp(1.5rem, 2.6vw, 2.25rem); letter-spacing: -0.03em; line-height: 1; }
.ladder .test { font-weight: 700; margin: 12px 0; }
.ladder p { font-size: 1rem; margin-bottom: .6em; }
@media (max-width: 860px) { .ladder { grid-template-columns: 1fr; } .ladder > div { min-height: 0 !important; } }

/* Two-column lists */
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px clamp(24px, 4vw, 64px); padding: 0; list-style: none; margin-top: 24px; }
.cols li { padding: 14px 0; }
.cols strong { display: block; font-size: 1.1875rem; }
@media (max-width: 700px) { .cols { grid-template-columns: 1fr; } }

/* Portrait */
.portrait { background: var(--step); aspect-ratio: 4 / 5; overflow: hidden; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait-cap { font-size: var(--t-small); color: var(--ink-soft); margin-top: 12px; }
.timeline { list-style: none; padding: 0; margin: 32px 0 0; }
.timeline li { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 16px; padding: 12px 0; }
.timeline b { font-variant-numeric: tabular-nums; font-weight: 800; }

/* Areas */
.areas { columns: 3 12em; column-gap: clamp(24px, 4vw, 64px); padding: 0; list-style: none; margin-top: 24px; }
.areas li { break-inside: avoid; padding: 6px 0; font-size: 1.1875rem; }

/* FAQ */
.faq details { padding: 4px 0; }
.faq details + details { margin-top: 4px; }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 48px 20px 0; position: relative;
  font-size: clamp(1.1875rem, 1.8vw, 1.4375rem); font-weight: 700; letter-spacing: -0.015em; line-height: 1.25;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 14px; font-size: 1.75rem; font-weight: 400; transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 20px; max-width: 42em; }
.faq details { background: transparent; }
.faq details:nth-child(odd) { background: transparent; }
.faq summary:hover { color: var(--link); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); }
.contact-grid dl { display: grid; grid-template-columns: 8em minmax(0, 1fr); gap: 14px 16px; margin: 0; }
.contact-grid dt { color: var(--on-night-soft); }
.contact-grid dd { margin: 0; font-size: 1.1875rem; }
.phone-big { display: inline-block; font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: var(--accent) !important; text-decoration: none; font-stretch: 88%; margin: 8px 0 24px; font-variant-numeric: tabular-nums; }
.phone-big:hover { text-decoration: underline; }

/* Breadcrumbs (subpages) */
.crumbs { font-size: var(--t-small); color: var(--on-night-soft); margin-bottom: 28px; }
.crumbs a { color: var(--on-night-soft); }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs li + li::before { content: "/"; margin-right: 8px; }
.hero--page h1 { max-width: 14ch; font-size: clamp(2.5rem, 6.4vw, 5.75rem); }
.hero--page .wrap { grid-template-columns: minmax(0, 1fr); }

/* Related pages */
.related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 32px; }
.related a { display: block; padding: clamp(24px, 3vw, 40px); text-decoration: none; color: var(--ink); min-height: 200px; transition: background-color .2s var(--ease); }
.related a:nth-child(1) { background: var(--step); }
.related a:nth-child(2) { background: #d6dbd4; }
.related a:nth-child(3) { background: #c9cfc8; }
.related a:hover { background: var(--accent); }
.related b { display: block; font-size: clamp(1.375rem, 2.2vw, 1.875rem); letter-spacing: -0.025em; line-height: 1.1; margin-bottom: 12px; font-stretch: 88%; }
@media (max-width: 860px) { .related { grid-template-columns: 1fr; } .related a { min-height: 0; } }

/* Footer: the name returns */
.site-footer { background: var(--night); color: var(--on-night); padding: clamp(64px, 8vw, 120px) 0 112px; }
.site-footer .name { font-size: clamp(2.75rem, 9vw, 8.5rem); font-weight: 800; letter-spacing: -0.05em; line-height: .88; font-stretch: 85%; margin: 0 0 48px; }
.site-footer .cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.site-footer a { color: var(--on-night); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 4px 0; }
.site-footer h2 { font-size: 1.125rem; letter-spacing: -0.01em; margin-bottom: 12px; }
.site-footer .legal { color: var(--on-night-soft); font-size: var(--t-small); margin-top: 48px; max-width: 60em; }
@media (max-width: 760px) { .site-footer .cols3 { grid-template-columns: 1fr; } }

/* Floating contact buttons: round icon buttons for WhatsApp, call and email */
.fab { position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); z-index: 70; display: flex; flex-direction: column; gap: 12px; }
.fab-btn {
  display: grid; place-items: center;
  width: 60px; height: 60px; border-radius: 50%;
  border: 2px solid var(--ink);
  box-shadow: 0 0 0 2px rgba(243, 244, 241, .9), 0 8px 22px rgba(15, 23, 32, .35);
  text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.fab-btn svg { width: 28px; height: 28px; }
.fab-btn:hover { transform: translateY(-2px) scale(1.05); }
.fab-btn:active { transform: scale(.95); }
.fab-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.fab-btn--wa   { background: #25d366; color: #ffffff !important; }
.fab-btn--call { background: var(--accent); color: var(--ink) !important; }
.fab-btn--mail { background: var(--ground); color: var(--ink) !important; }
@media (max-width: 480px) {
  .fab { right: 14px; bottom: 14px; gap: 10px; }
  .fab-btn { width: 54px; height: 54px; }
  .fab-btn svg { width: 26px; height: 26px; }
}
@media (prefers-reduced-motion: reduce) { .fab-btn { transition: none; } }

/* Responsive layout */
@media (max-width: 960px) {
  .hero .wrap, .split, .split--rev, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; }
  .hero h1 { font-size: clamp(2.5rem, 10.5vw, 5rem); }
}
@media (max-width: 480px) {
  .contact-grid dl { grid-template-columns: 1fr; gap: 2px; }
  .contact-grid dd { margin-bottom: 12px; }
  .timeline li { grid-template-columns: 1fr; gap: 0; }
}

/* Entrance motion (content visible without JS) */
.js .rise { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .rise.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rise { opacity: 1; transform: none; transition: none; }
  .btn, .faq summary::after, .related a { transition: none; }
}
