/* TQA Business Solutions - design system
   Register: editorial authority. Headings Libre Caslon Text, body Inter.
   Palette locked by computed WCAG ratios (see docs/redesign-decisions.md). */

/* ---------- Fonts (self-hosted) ---------- */
@font-face {
  font-family: "Libre Caslon Text";
  src: url("../fonts/libre-caslon-text-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Libre Caslon Text";
  src: url("../fonts/libre-caslon-text-400-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Libre Caslon Text";
  src: url("../fonts/libre-caslon-text-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --ink: #16233a;          /* headings on light: 15.7:1 on white */
  --body: #3b4a61;         /* body on light: 9.0:1 */
  --muted: #5a6b84;        /* secondary on light: 5.4:1 */
  --brand: #0b4dad;        /* deep logo blue, text-safe on light: 7.8:1 */
  --azure: #2f8bfd;        /* bright logo azure, DECORATIVE only on light */
  --field: #f4f7fb;        /* cool light section bg */
  --surface: #ffffff;
  --line: #d9e2ee;
  --navy: #0e1b2f;         /* dark section bg */
  --navy-2: #132440;       /* dark card bg */
  --ondark: #ffffff;
  --ondark-body: #c7d4e6;  /* 11.5:1 on navy */
  --ondark-muted: #9fb2cc; /* 8.0:1 on navy */
  --ondark-accent: #7fb3ff;/* 8.1:1 on navy */
  --font-head: "Libre Caslon Text", Georgia, serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
  --wrap: 72rem;
  --radius: 10px;
  --cut: 22px;             /* signature clipped corner */
  --shadow: 0 10px 30px rgba(14, 27, 47, 0.10);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--body);
  background: var(--surface);
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.18;
  margin: 0 0 0.6em;
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 1.4rem + 3.2vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 1.25rem + 1.6vw, 2.35rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 2px; }
ul { padding-left: 1.2rem; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  opacity: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -3.5rem; z-index: 200;
  background: var(--brand); color: #fff; padding: 0.6rem 1rem;
  border-radius: 6px; transition: top 0.15s;
}
.skip-link:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-weight: 600; font-size: 1rem;
  padding: 0.8rem 1.6rem; border-radius: 6px; text-decoration: none;
  border: 2px solid transparent; transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: #0a4396; box-shadow: var(--shadow); }
.btn-secondary { background: transparent; color: var(--brand); border-color: var(--brand); }
/* on-dark variants: a dark component must set these explicitly */
.hero .btn-secondary, .cta-band .btn-secondary, .page-hero .btn-secondary, .notfound .btn-secondary,
.section--navy .btn-secondary {
  color: #fff; border-color: rgba(255, 255, 255, 0.65);
}
.hero .btn-secondary:hover, .cta-band .btn-secondary:hover, .section--navy .btn-secondary:hover {
  border-color: #fff;
}
.mt-4{margin-top: 1rem !important}
/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 4.25rem;
}
.brand {
  display: inline-flex; align-items: center; text-decoration: none;
}
.brand img { height: 38px; width: auto; }
.brand .logo-mark { display: none; }
.wa-float {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 200;
  display: inline-flex; align-items: center; justify-content: center;
  width: 3.5rem; height: 3.5rem; border-radius: 50%;
  background: #25d366; color: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.wa-float:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32); }
.wa-float:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.nav-toggle-box { display: none; }
.nav-toggle { display: none; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.4rem; align-items: center; }
.site-nav a {
  display: block; padding: 0.55rem 0.7rem; color: var(--ink); text-decoration: none;
  font-weight: 600; font-size: 0.82rem; border-radius: 6px;
  text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap;
}
.site-nav a:hover { background: var(--field); color: var(--brand); }
.site-nav a[aria-current="page"] { color: var(--brand); box-shadow: inset 0 -2px 0 var(--brand); border-radius: 6px 6px 0 0; }

@media (max-width: 860px) {
  .brand .logo-wide { display: none; }
  .brand .logo-mark { display: block; height: 62px; }
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 10px; cursor: pointer;
    border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  }
  .nav-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    display: none; box-shadow: var(--shadow);
  }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 0.5rem 1rem 1rem; }
  .site-nav a { padding: 0.8rem 0.6rem; font-size: 0.9rem; }
  .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--brand); border-radius: 0 6px 6px 0; }
  .nav-toggle-box:checked ~ .site-nav { display: block; }
  .nav-toggle-box:focus-visible + .nav-toggle { outline: 3px solid var(--brand); outline-offset: 2px; }
}

/* ---------- Hero (home) ---------- */
.hero {
  position: relative; background: var(--navy); color: var(--ondark-body);
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0.28;
}
.hero::after { /* signature angular keyline echoing the logo's door emblem */
  content: ""; position: absolute; right: -6rem; top: -4rem; width: 30rem; height: 34rem;
  background: linear-gradient(160deg, rgba(47, 139, 253, 0.22), rgba(47, 139, 253, 0));
  clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 78%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; padding-top: 5.5rem; padding-bottom: 5.5rem; max-width: 56rem; }
.hero h1 { color: #fff; margin-bottom: 0.5em; }
.hero p.lede { font-size: 1.2rem; max-width: 40rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.8rem; }

/* ---------- Page hero (inner) ---------- */
.page-hero { background: var(--navy); color: var(--ondark-body); position: relative; overflow: hidden; }
.page-hero::after {
  content: ""; position: absolute; right: -5rem; top: -3rem; width: 22rem; height: 26rem;
  background: linear-gradient(160deg, rgba(47, 139, 253, 0.20), rgba(47, 139, 253, 0));
  clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 78%);
  pointer-events: none;
}
.page-hero .wrap { position: relative; z-index: 1; padding-top: 3.5rem; padding-bottom: 3.2rem; }
.page-hero h1 { color: #fff; margin-bottom: 0.3em; }
.page-hero p { max-width: 46rem; margin-bottom: 0; font-size: 1.1rem; }
.crumbs { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0; margin: 0 0 1rem; font-size: 0.88rem; }
.crumbs a { color: var(--ondark-accent); }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 0.35rem; color: var(--ondark-muted); }
.crumbs li:last-child { color: var(--ondark-muted); }

/* ---------- Sections ---------- */
.section { padding: 4.25rem 0; }
.section--field { background: var(--field); }
.section--navy { background: var(--navy); color: var(--ondark-body); }
.section--navy h2, .section--navy h3 { color: #fff; }
.section--navy a:not(.btn) { color: var(--ondark-accent); }
.section-head { max-width: 46rem; margin-bottom: 2.4rem; }
.section-head p:not(.eyebrow) { font-size: 1.1rem; }
.eyebrow {
  display: inline-block; font-family: var(--font-body); font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand); margin: 0 0 0.9rem;
}
.section--navy .eyebrow, .hero .eyebrow, .page-hero .eyebrow, .cta-band .eyebrow { color: var(--ondark-accent); }
.rule { border: 0; height: 2px; width: 4.5rem; background: var(--azure); margin: 0 0 1.2rem; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.7rem 1.6rem;
  transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3 { margin-bottom: 0.45em; }
.card p:last-child { margin-bottom: 0; }
.card .more { font-weight: 600; text-decoration: none; }
.card .more:hover { text-decoration: underline; }
.section--navy .card { background: var(--navy-2); border-color: #24395c; }
.section--navy .card h3 { color: #fff; }
.section--navy .card p { color: var(--ondark-body); }

/* line icons */
.ico {
  width: 44px; height: 44px; display: inline-flex; margin-bottom: 1rem;
  color: var(--brand);
}
.ico svg { width: 100%; height: 100%; }
.section--navy .ico { color: var(--ondark-accent); }

/* ---------- Split (photo + copy) ---------- */
.split { display: grid; gap: 2.6rem; align-items: center; }
@media (min-width: 800px) { .split { grid-template-columns: 1fr 1fr; } }
.split figure { margin: 0; position: relative; }
.split img {
  border-radius: var(--radius); width: 100%; object-fit: cover;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.split figure::after { /* azure keyline offset frame */
  content: ""; position: absolute; inset: 1rem -0.8rem -0.8rem 1rem;
  border: 2px solid var(--azure); border-radius: var(--radius); z-index: -1;
}

/* ---------- Value strip ---------- */
.value-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.value-strip .wrap { display: grid; gap: 1.5rem; padding-top: 2.2rem; padding-bottom: 2.2rem; }
@media (min-width: 700px) { .value-strip .wrap { grid-template-columns: repeat(3, 1fr); } }
.value-strip h3 { font-family: var(--font-body); font-size: 1.02rem; font-weight: 700; margin-bottom: 0.25em; }
.value-strip p { margin: 0; font-size: 0.95rem; color: var(--muted); }
.value-strip .vnum {
  font-family: var(--font-head); font-size: 1.9rem; color: var(--brand); line-height: 1;
  display: block; margin-bottom: 0.4rem;
}

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.4rem; counter-reset: step; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.3rem; }
.steps li::before {
  content: "0" counter(step);
  font-family: var(--font-head); font-size: 1.6rem; color: var(--brand);
  display: block; margin-bottom: 0.5rem;
}
.steps h3 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.steps p { margin: 0; font-size: 0.95rem; }

/* ---------- FAQ ---------- */
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 0.9rem; overflow: hidden;
}
.faq summary {
  cursor: pointer; padding: 1.1rem 1.3rem; font-weight: 600; color: var(--ink);
  list-style: none; position: relative; padding-right: 3rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 1.2rem; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; color: var(--brand); font-weight: 400;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 1.3rem 1.2rem; }
.faq details > div p:last-child { margin-bottom: 0; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--navy); color: var(--ondark-body); position: relative; overflow: hidden; }
.cta-band::before {
  content: ""; position: absolute; left: -4rem; bottom: -6rem; width: 20rem; height: 22rem;
  background: linear-gradient(340deg, rgba(47, 139, 253, 0.18), rgba(47, 139, 253, 0));
  clip-path: polygon(0 22%, 100% 0, 70% 100%, 0 100%);
}
.cta-band .wrap { position: relative; z-index: 1; padding-top: 3.6rem; padding-bottom: 3.6rem; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p:not(.eyebrow) { max-width: 42rem; margin: 0 auto 1.6rem; }
.cta-band .hero-ctas { justify-content: center; }

/* ---------- Contact ---------- */
.starter-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.starter-list a.card { display: block; text-decoration: none; }
.starter-list .card h3 { color: var(--brand); font-family: var(--font-body); font-size: 1.08rem; font-weight: 700; }
.starter-list .card p { color: var(--body); font-size: 0.96rem; }
.address-card { background: var(--field); border-radius: var(--radius); padding: 1.6rem; border: 1px solid var(--line); }
.address-card p { margin-bottom: 0.6em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: var(--ondark-body); padding: 3.4rem 0 2rem; }
.site-footer .cols { display: grid; gap: 2.2rem; margin-bottom: 2.4rem; }
@media (min-width: 800px) { .site-footer .cols { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer-brand .brand { background: var(--surface); border-radius: 8px; padding: 0.5rem 0.7rem; }
.footer-brand .brand img { height: 74px; }
.footer-brand p { margin-top: 1rem; font-size: 0.95rem; color: var(--ondark-muted); }
.site-footer h2 { color: #fff; font-family: var(--font-body); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.5rem; }
.site-footer a { color: var(--ondark-body); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer address { font-style: normal; color: var(--ondark-body); font-size: 0.95rem; line-height: 1.7; }
.standards { border-top: 1px solid #24395c; padding-top: 1.4rem; display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem; font-size: 0.85rem; color: var(--ondark-muted); }
.copyright { margin-top: 1.4rem; font-size: 0.85rem; color: var(--ondark-muted); }
.copyright a { color: var(--ondark-accent); }

/* ---------- 404 ---------- */
.notfound { background: var(--navy); color: var(--ondark-body); min-height: 60vh; display: flex; align-items: center; }
.notfound .wrap { text-align: center; padding: 4rem 1.25rem; }
.notfound h1 { color: #fff; }
.notfound .code { font-family: var(--font-head); font-size: 5rem; color: var(--ondark-accent); line-height: 1; display: block; margin-bottom: 1rem; }

/* ---------- Reveal on scroll (JS adds .reveal; no-JS shows everything) ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s, transform 0.5s; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- Misc ---------- */
.checklist { list-style: none; padding: 0; }
.checklist li { padding-left: 1.7rem; position: relative; margin-bottom: 0.55rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 0.32em; width: 1.05rem; height: 1.05rem;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat;
  color: var(--brand);
}
.section--navy .checklist li::before { color: var(--ondark-accent); }
.note { font-size: 0.9rem; color: var(--muted); }
.section--navy .note, .cta-band .note { color: var(--ondark-muted); }
