/* ============================================================
   Kingsway Rehab — conventional modern B2B service layout
   Teal accent on charcoal ink. No editorial moves.
   ============================================================ */

/* Manrope (SIL OFL 1.1, see assets/fonts/OFL.txt), self-hosted so no visitor
   data goes to Google Fonts. Variable font: one file covers weights 200-800. */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/assets/fonts/manrope-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/assets/fonts/manrope-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

:root {
  --ink:        #363d44;
  --ink-muted:  #475569;
  --ink-faint:  #64748B;
  --accent:     #5fc9b0;
  --accent-dark:#4db599;
  --accent-soft:#e7f7f2;

  --bg:         #ffffff;
  --bg-soft:    #f6f8fa;
  --bg-dark:    #1f2428;
  --line:       #e5e7eb;
  --line-dark:  #d1d5db;

  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.04), 0 1px 3px rgba(17, 24, 39, 0.06);
  --shadow-md: 0 4px 12px rgba(17, 24, 39, 0.06), 0 2px 4px rgba(17, 24, 39, 0.04);
  --shadow-lg: 0 20px 40px -20px rgba(17, 24, 39, 0.15), 0 4px 12px rgba(17, 24, 39, 0.06);

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 20px;

  --sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", sans-serif;

  --gutter: clamp(20px, 4vw, 56px);
  --max:    1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  opacity: 1;
  transition: opacity .3s ease;
}
body.is-leaving { opacity: 0; }

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--accent); color: #fff; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 1.8vw, 1.4rem); font-weight: 700; }
h4 { font-size: 1.1rem; font-weight: 600; }
p  { margin: 0 0 1em; }

/* ------------------------------------------------------------ Shell */
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  transition: background .15s, color .15s, transform .1s, box-shadow .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-dark); box-shadow: var(--shadow-md); }
.btn-outline { background: #fff; color: var(--ink); border: 1.5px solid var(--line-dark); }
.btn-outline:hover { border-color: var(--ink); }
.btn-ghost { color: var(--ink); }
.btn-ghost:hover { color: var(--accent-dark); }
.btn .arrow { font-size: 1.1em; line-height: 0; margin-top: 1px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.lede { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--ink-muted); line-height: 1.6; max-width: 60ch; }

/* ------------------------------------------------------------ Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  height: 88px;
}
.nav-logo img { height: 52px; width: auto; }
.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
  margin-inline: auto;
}
.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  padding: 8px 0;
  transition: color .15s;
}
.nav-links a:hover { color: var(--accent-dark); }
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-phone { font-weight: 600; color: var(--ink); font-size: 0.95rem; }
.nav-phone:hover { color: var(--accent-dark); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border-radius: 8px;
}
.nav-toggle:hover { background: var(--bg-soft); }
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--ink);
  position: relative; border-radius: 2px;
}
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: var(--ink); border-radius: 2px;
}
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after  { top:  7px; }

.mnav {
  position: fixed; inset: 0;
  background: #fff;
  z-index: 50;
  padding: 24px var(--gutter) 32px;
  display: none;
  flex-direction: column;
}
.mnav.is-open { display: flex; }
.mnav-top { display: flex; justify-content: space-between; align-items: center; height: 52px; }
.mnav-close {
  position: relative;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 8px;
}
.mnav-close:hover { background: var(--bg-soft); }
.mnav-close::before, .mnav-close::after {
  content: ""; position: absolute; width: 20px; height: 2px; background: var(--ink); border-radius: 2px;
}
.mnav-close::before { transform: rotate(45deg); }
.mnav-close::after  { transform: rotate(-45deg); }
.mnav-links {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mnav-links a {
  padding: 14px 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.mnav-cta { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; }

/* ------------------------------------------------------------ Hero */
.hero {
  padding-block: clamp(48px, 8vw, 96px) clamp(48px, 8vw, 96px);
  background: linear-gradient(180deg, var(--bg-soft) 0%, #fff 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.hero-copy .chip { margin-bottom: 24px; }
.hero-copy h1 { margin-bottom: 20px; }
.hero-copy h1 .accent { color: var(--accent-dark); }
.hero-copy .lede { margin-bottom: 32px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-micro {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 0.9rem;
}
.hero-micro .check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
/* flex: none stops narrow screens squashing the ticks (they shrank to 0px on phones). */
.hero-micro svg { flex: none; width: 16px; height: 16px; color: var(--accent-dark); }

.hero-visual { position: relative; }
.hero-figure {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--bg-soft);
}
.hero-figure img { width: 100%; height: 100%; object-fit: cover; }

.hero-badge {
  position: absolute;
  left: -20px;
  bottom: 24px;
  background: #fff;
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 260px;
}
.hero-badge .icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: grid; place-items: center;
}
.hero-badge .icon svg { width: 20px; height: 20px; }
.hero-badge .num { font-weight: 700; font-size: 1.05rem; color: var(--ink); line-height: 1.1; }
.hero-badge .lab { font-size: 0.78rem; color: var(--ink-muted); margin-top: 2px; }

/* ------------------------------------------------------------ Trust strip */
.trust {
  padding-block: 48px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.trust-cell {
  display: flex;
  align-items: center;
  gap: 14px;
}
.trust-cell .icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.trust-cell .icon svg { width: 22px; height: 22px; }
.trust-cell .num { font-weight: 700; font-size: 1.35rem; color: var(--ink); line-height: 1; }
.trust-cell .lab { font-size: 0.85rem; color: var(--ink-muted); margin-top: 4px; }

/* ------------------------------------------------------------ Generic section */
.section { padding-block: clamp(64px, 9vw, 112px); }
.section-soft { background: var(--bg-soft); }
.section-dark { background: var(--bg-dark); color: #e5e7eb; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .lede { color: #cbd5e1; }

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(40px, 5vw, 64px);
}
.section-head .kicker {
  display: inline-block;
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-head h2 { margin-bottom: 16px; }
.section-head p { color: var(--ink-muted); font-size: 1.05rem; margin: 0 auto; max-width: 56ch; }
.section-dark .section-head p { color: #cbd5e1; }

/* ------------------------------------------------------------ About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.about-copy h2 { margin-bottom: 20px; }
.about-copy > p { color: var(--ink-muted); margin-bottom: 28px; max-width: 54ch; }
.about-list {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 24px;
}
.about-list li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 0.95rem; color: var(--ink); font-weight: 500;
}
.about-list svg { flex-shrink: 0; width: 20px; height: 20px; color: var(--accent-dark); margin-top: 2px; }

.about-figure {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--bg-soft);
}
.about-figure img { width: 100%; height: 100%; object-fit: cover; }

/* ------------------------------------------------------------ Services */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.svc-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
}
.svc-card:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.svc-card .icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: grid; place-items: center;
  margin-bottom: 24px;
}
.svc-card .icon svg { width: 28px; height: 28px; }
.svc-card h3 { margin-bottom: 12px; }
.svc-card > p { color: var(--ink-muted); margin-bottom: 20px; font-size: 0.95rem; }
.svc-card ul {
  list-style: none; padding: 0; margin: 0 0 24px;
  display: flex; flex-direction: column; gap: 8px;
}
.svc-card li {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.9rem; color: var(--ink);
}
.svc-card li::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.svc-card .more {
  margin-top: auto;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-dark);
}

/* ------------------------------------------------------------ Process */
.process {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}
.process::before {
  content: "";
  position: absolute;
  top: 28px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent) 80%, var(--line) 100%);
  z-index: 0;
}
.process-step {
  position: relative;
  text-align: center;
  z-index: 1;
}
.process-step .n {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
  color: var(--accent-dark);
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 auto 16px;
  box-shadow: 0 0 0 6px #fff;
}
.process-step.active .n { background: var(--accent); color: #fff; }
.process-step h4 { margin-bottom: 8px; font-size: 1rem; font-weight: 600; }
.process-step p { font-size: 0.88rem; color: var(--ink-muted); margin: 0; }
.process-time {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.72rem;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
}

/* ------------------------------------------------------------ Why / features */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.why-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color .2s, box-shadow .2s;
}
.why-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.why-card .icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: grid; place-items: center;
  margin-bottom: 18px;
}
.why-card .icon svg { width: 22px; height: 22px; }
.why-card h4 { margin-bottom: 8px; font-size: 1.05rem; font-weight: 600; }
.why-card p { color: var(--ink-muted); font-size: 0.9rem; margin: 0; }

/* ------------------------------------------------------------ Testimonials */
.test-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.test-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
}
.test-card .stars {
  display: flex; gap: 2px;
  color: var(--accent);
  margin-bottom: 16px;
}
.test-card .stars svg { width: 16px; height: 16px; }
.test-card > p {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 24px;
  flex-grow: 1;
}
.test-card .author {
  display: flex; align-items: center; gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.test-card .avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.test-card .author-meta .name { font-weight: 600; font-size: 0.92rem; color: var(--ink); }
.test-card .author-meta .role { font-size: 0.82rem; color: var(--ink-muted); }

/* ------------------------------------------------------------ CTA band */
.ctaband {
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 72px);
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}
.ctaband h2 { color: #fff; margin-bottom: 12px; }
.ctaband p { color: rgba(255, 255, 255, 0.9); margin: 0; max-width: 48ch; }
.ctaband-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}
.ctaband .btn-primary {
  background: #fff;
  color: var(--accent-dark);
}
.ctaband .btn-primary:hover { background: rgba(255, 255, 255, 0.9); }
.ctaband .btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}
.ctaband .btn-outline:hover { border-color: #fff; background: rgba(255, 255, 255, 0.1); }

/* ------------------------------------------------------------ Footer */
.foot {
  background: var(--bg-dark);
  color: #cbd5e1;
  padding-block: 64px 28px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.foot-brand img { height: 56px; filter: brightness(0) invert(1); margin-bottom: 20px; }
.foot-brand p { color: #94a3b8; font-size: 0.92rem; max-width: 36ch; margin: 0; }
.foot-col h5 {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.foot-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.foot-col a { color: #94a3b8; font-size: 0.92rem; transition: color .15s; }
.foot-col a:hover { color: var(--accent); }
.foot-contact .val { color: #e5e7eb; font-weight: 600; display: block; margin-bottom: 4px; }
.foot-contact .val:hover { color: var(--accent); }
.foot-contact .sub { color: #64748b; font-size: 0.82rem; }

.foot-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid #334155;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: #64748b;
}
.foot-bottom a { color: #94a3b8; }
.foot-bottom a:hover { color: var(--accent); }
.foot-bottom .policy-links { display: flex; gap: 24px; flex-wrap: wrap; }

/* ------------------------------------------------------------ Sub-hero (inner pages) */
.sub-hero {
  padding-block: clamp(56px, 8vw, 96px) clamp(40px, 6vw, 72px);
  background: linear-gradient(180deg, var(--bg-soft) 0%, #fff 100%);
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.sub-hero .chip { margin-bottom: 20px; }
.sub-hero h1 { margin-bottom: 16px; }
.sub-hero p { color: var(--ink-muted); font-size: 1.1rem; margin: 0 auto; max-width: 58ch; }
.sub-hero--404 { padding-block: clamp(80px, 14vw, 160px); }
.sub-hero .hero-cta { justify-content: center; margin-top: 28px; }
.sub-hero .date {
  color: var(--ink-faint);
  font-size: 0.85rem;
  margin-top: 16px;
}

/* ------------------------------------------------------------ Contact form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 56px;
  align-items: start;
}
.contact-info {
  background: var(--bg-soft);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.contact-info h3 { margin-bottom: 12px; }
.contact-info > p { color: var(--ink-muted); margin-bottom: 28px; font-size: 0.95rem; }
.contact-channel {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: #fff;
  border-radius: var(--radius);
  margin-bottom: 12px;
  border: 1px solid var(--line);
  transition: border-color .15s;
}
.contact-channel:hover { border-color: var(--accent); }
.contact-channel .icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.contact-channel .icon svg { width: 20px; height: 20px; }
.contact-channel .lab { font-size: 0.78rem; color: var(--ink-muted); }
.contact-channel .val { font-weight: 600; color: var(--ink); font-size: 0.98rem; }

.contact-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}
.contact-form h3 { margin-bottom: 24px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-field label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
}
.form-field label .req { color: var(--accent-dark); }
.form-field input,
.form-field select,
.form-field textarea {
  font: inherit;
  font-size: 0.95rem;
  padding: 12px 14px;
  border: 1.5px solid var(--line-dark);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  outline: 0;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-field textarea { min-height: 120px; resize: vertical; }
.form-submit { margin-top: 24px; }
.form-submit button { width: 100%; }
.form-note {
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--ink-muted);
  text-align: center;
}

.form-success {
  display: none;
  text-align: center;
  padding: 48px 24px;
}
.form-success.is-on { display: block; }
.form-success .icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  margin: 0 auto 24px;
  display: grid; place-items: center;
}
.form-success .icon svg { width: 32px; height: 32px; }
.form-success h3 { margin-bottom: 12px; }
.form-success p { color: var(--ink-muted); margin: 0 auto; max-width: 40ch; }
.form-success h3:focus { outline: none; }

/* Invalid fields (set by assets/js/contact.js) */
.form-field [aria-invalid="true"] { border-color: #c2410c; }
.form-field [aria-invalid="true"]:focus { box-shadow: 0 0 0 3px #fde4d6; }

/* Error message above the submit button. Empty = hidden. */
.form-error {
  margin: 8px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff4ed;
  border: 1px solid #fdc9a8;
  color: #9a3412;
  font-size: 0.9rem;
  line-height: 1.5;
}
.form-error:empty { display: none; }
.form-error a { color: inherit; text-decoration: underline; }

/* Cloudflare Turnstile. Managed mode, interaction-only: the box is 0px tall for
   almost everyone and only takes space when Cloudflare shows a checkbox. */
.form-turnstile { display: flex; justify-content: center; }
.form-turnstile.is-interactive { margin-top: 8px; }

/* Spam honeypot: off-screen for people and screen readers, filled in by bots. */
.form-hp {
  position: absolute !important;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-submit .btn[aria-disabled="true"] { opacity: .7; cursor: progress; }

/* ------------------------------------------------------------ Legal pages (no TOC sidebar) */
.legal {
  padding-block: clamp(48px, 6vw, 80px) clamp(64px, 8vw, 112px);
}
.legal-body {
  max-width: 760px;
  margin: 0 auto;
}
.legal-body h2 {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  margin: 48px 0 14px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.legal-body h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.legal-body h3 { font-size: 1rem; margin: 24px 0 8px; font-weight: 600; }
.legal-body p, .legal-body li { color: var(--ink-muted); font-size: 0.98rem; line-height: 1.7; }
.legal-body ul { padding-left: 20px; }
.legal-body li { padding: 3px 0; }
.legal-body strong { color: var(--ink); font-weight: 600; }
.legal-body a { color: var(--accent-dark); border-bottom: 1px solid var(--accent); }
.legal-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.legal-body th, .legal-body td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.legal-body th {
  font-weight: 600; color: var(--ink);
  background: var(--bg-soft);
}
.legal-body td { color: var(--ink-muted); }
.legal-body tr:last-child td { border-bottom: 0; }
/* Phones: four columns don't fit, so each row stacks into label / value lines. */
@media (max-width: 560px) {
  .legal-body table, .legal-body tbody, .legal-body tr, .legal-body td { display: block; }
  .legal-body table { position: relative; }
  .legal-body thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }
  .legal-body td { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 12px; }
  .legal-body td::before { content: attr(data-label); font-weight: 600; color: var(--ink); }
  .legal-body tr:last-child td:not(:last-child) { border-bottom: 1px solid var(--line); }
}

/* ------------------------------------------------------------ Reveal */
.r { opacity: 0; transform: translateY(8px); transition: opacity .6s ease, transform .6s ease; }
.r.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .r { opacity: 1; transform: none; transition: none; }
  body, body.is-leaving { transition: none; }
}

/* ------------------------------------------------------------ Responsive */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { aspect-ratio: 16 / 10; max-width: 560px; margin: 0 auto; }
  .hero-badge { left: 12px; }

  .trust-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }

  .about-grid { grid-template-columns: 1fr; }
  .about-figure { max-width: 540px; margin: 0 auto; }

  .svc-grid { grid-template-columns: 1fr; }
  .svc-card { padding: 28px; }

  .process { grid-template-columns: 1fr; gap: 28px; }
  .process::before { display: none; }
  .process-step { text-align: left; display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: start; }
  .process-step .n { margin: 0; box-shadow: none; }

  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .test-grid { grid-template-columns: 1fr; }

  .ctaband { grid-template-columns: 1fr; text-align: center; }
  .ctaband-right { align-items: center; }

  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .foot-brand { grid-column: 1 / -1; }

  .contact-grid { grid-template-columns: 1fr; gap: 32px; }

  .nav-links { display: none; }
  .nav-right .nav-phone { display: none; }
  .nav-toggle { display: inline-flex; }
}
@media (max-width: 560px) {
  .trust-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .foot-bottom { flex-direction: column; align-items: flex-start; }
  .form-row { grid-template-columns: 1fr; }
  .hero-cta .btn { flex: 1; }
}
/* Small phones (under 375px, e.g. the first iPhone SE) and text zoomed right in: without this the
   hero ticks and the email address push the page sideways. 375px and up are unchanged. */
@media (max-width: 374px) {
  .hero-micro { flex-wrap: wrap; row-gap: 10px; }
  .contact-info, .contact-form { padding: 24px; }
}
