/* =========================================================
   ClearPath Computing - main stylesheet
   Sections: 1 Tokens · 2 Base · 3 Layout · 4 Header/Nav
   5 Buttons · 6 Hero · 7 Cards/Sections · 8 Steps · 9 Callouts
   10 Accordion · 11 Tables · 12 Forms · 13 Footer
   14 Cookie banner · 15 Utilities · 16 Print · 17 Motion
   ========================================================= */

/* 1. Tokens */
:root {
  --navy: #0B2545;
  --navy-2: #13315C;
  --teal: #13A89E;
  --teal-dark: #0E7C74; /* AA on white for text/links */
  --bg: #F6F8FB;
  --white: #FFFFFF;
  --accent: #F4A259;
  --text: #1F2937;
  --muted: #4B5563;
  --border: #D9E1EC;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 6px 24px rgba(11, 37, 69, .08);
  --font: system-ui, sans-serif;
  --measure: 70ch;
  --max: 1160px;
}

/* 2. Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.7;
  color: var(--text); background: var(--bg);
}
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--teal-dark); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: .4em; }
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--navy); color: #fff; padding: .7rem 1rem; border-radius: 8px;
}
.skip-link:focus { top: 1rem; color: #fff; }

/* 3. Layout */
.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section--white { background: var(--white); }
.section--navy { background: var(--navy); color: #E7EEF7; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section-head { max-width: 720px; margin-bottom: 2.5rem; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.eyebrow { display: inline-block; font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-dark); margin-bottom: .5rem; }
.grid { display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 640px) and (max-width: 959px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
.split { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1.1fr .9fr; } .split--rev > :first-child { order: 2; } }
.prose { max-width: var(--measure); }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.6rem; }
.article-layout { display: grid; gap: 2.5rem; }
@media (min-width: 1000px) { .article-layout { grid-template-columns: 260px 1fr; } .toc { position: sticky; top: 6rem; align-self: start; } }

/* 4. Header / Nav */
.site-header { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--navy); font-weight: 800; font-size: 1.1rem; letter-spacing: .01em; }
.brand svg { width: 36px; height: 36px; }
.brand span small { display: block; font-weight: 500; font-size: .72rem; color: var(--muted); letter-spacing: .04em; }
.nav-toggle {
  display: inline-flex; align-items: center; gap: .4rem; background: none; border: 2px solid var(--border);
  border-radius: 10px; padding: .45rem .8rem; font: inherit; font-weight: 600; color: var(--navy); cursor: pointer;
}
.nav-toggle .bars { width: 18px; height: 2px; background: currentColor; position: relative; }
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor; }
.nav-toggle .bars::before { top: -6px; } .nav-toggle .bars::after { top: 6px; }
.primary-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
.primary-nav.is-open { display: block; }
.primary-nav ul { list-style: none; margin: 0; padding: .5rem 1.25rem 1rem; }
.primary-nav a { display: block; padding: .7rem .25rem; text-decoration: none; color: var(--text); font-weight: 600; border-bottom: 1px solid var(--border); }
.primary-nav a[aria-current="page"] { color: var(--teal-dark); }
.header-phone { display: none; text-decoration: none; font-weight: 700; color: var(--navy); font-size: .95rem; white-space: nowrap; }
.nav-phone-mobile a { color: var(--teal-dark); }
@media (min-width: 1100px) {
  .nav-toggle, .nav-phone-mobile { display: none; }
  .primary-nav { display: block; position: static; box-shadow: none; border: 0; background: none; }
  .primary-nav ul { display: flex; gap: .2rem; padding: 0; }
  .primary-nav a { border: 0; padding: .5rem .6rem; font-size: .95rem; border-radius: 8px; }
  .primary-nav a:hover { background: var(--bg); }
  .primary-nav a[aria-current="page"] { background: #E6F5F3; }
  .header-phone { display: inline-block; }
}
.no-js .primary-nav { display: block; position: static; }

/* Breadcrumbs */
.breadcrumbs { font-size: .9rem; padding: 1rem 0 0; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.breadcrumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--muted); }
.breadcrumbs [aria-current] { color: var(--muted); }

/* 5. Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px;
  padding: .75rem 1.4rem; border-radius: 999px; font: inherit; font-weight: 700; text-decoration: none;
  border: 2px solid transparent; cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--teal-dark); color: #fff; }
.btn-primary:hover { background: var(--navy); color: #fff; }
.btn-secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover { background: var(--navy); color: #fff; }
.btn-ghost { background: transparent; color: var(--teal-dark); padding-inline: .5rem; }
.btn-ghost:hover { text-decoration: underline; }
.section--navy .btn-secondary { color: #fff; border-color: #fff; }
.section--navy .btn-secondary:hover { background: #fff; color: var(--navy); }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.5rem; }

/* 6. Hero / page header */
.hero { background: linear-gradient(180deg, #fff 0%, var(--bg) 100%); padding: clamp(2.5rem, 6vw, 5rem) 0; }
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }
.page-hero { background: var(--white); border-bottom: 1px solid var(--border); padding: 1rem 0 3rem; }
.page-hero .split { margin-top: 1.5rem; }
.page-hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.meta-line { font-size: .9rem; color: var(--muted); }

/* 7. Cards */
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.6rem; box-shadow: var(--shadow); }
.card h3 { margin-top: .8rem; }
.card p:last-child { margin-bottom: 0; }
.card-icon { width: 52px; height: 52px; border-radius: 14px; background: #E6F5F3; display: grid; place-items: center; }
.card-icon svg { width: 30px; height: 30px; }
.card-img { border-radius: var(--radius); background: var(--bg); margin-bottom: 1rem; }
.link-card { text-decoration: none; color: inherit; display: block; transition: transform .2s, border-color .2s; }
.link-card:hover { border-color: var(--teal); transform: translateY(-2px); color: inherit; }
.link-card .more { color: var(--teal-dark); font-weight: 700; }

/* 8. Steps */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: 1rem; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(5, 1fr); } }
.steps li { counter-increment: step; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; position: relative; margin: 0; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--navy); color: #fff; font-weight: 800; margin-bottom: .8rem;
}
.steps h3 { font-size: 1.1rem; }
.steps p { margin: 0; font-size: .97rem; color: var(--muted); }

/* 9. Callouts */
.callout { border-left: 5px solid var(--teal); background: #E9F6F4; padding: 1.2rem 1.4rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5rem 0; }
.callout--accent { border-color: var(--accent); background: #FDF1E6; }
.callout h2, .callout h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.callout ul { margin-bottom: 0; }
.takeaways { background: var(--navy); color: #E7EEF7; border-radius: var(--radius-lg); padding: 1.6rem 1.8rem; margin: 1.5rem 0 2rem; }
.takeaways h2 { color: #fff; font-size: 1.25rem; margin-top: 0; }
.takeaways ul { margin: 0; }
.toc { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 1.4rem; font-size: .95rem; }
.toc h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .6rem; }
.toc ol { margin: 0; padding-left: 1.1em; }
.dodont { display: grid; gap: 1.2rem; }
@media (min-width: 700px) { .dodont { grid-template-columns: 1fr 1fr; } }
.dodont ul { list-style: none; padding: 0; margin: 0; }
.dodont li { padding-left: 1.8rem; position: relative; }
.dodont .do li::before { content: "\2713"; position: absolute; left: 0; color: var(--teal-dark); font-weight: 800; }
.dodont .dont li::before { content: "\2715"; position: absolute; left: 0; color: #9A3412; font-weight: 800; }
.checklist { list-style: none; padding: 0; }
.checklist li { padding: .7rem .9rem .7rem 2.8rem; position: relative; background: var(--white); border: 1px solid var(--border); border-radius: 10px; margin-bottom: .6rem; }
.checklist li::before { content: ""; position: absolute; left: .9rem; top: .95rem; width: 1.1rem; height: 1.1rem; border: 2px solid var(--teal-dark); border-radius: 4px; }

/* 10. Accordion */
.accordion details { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: .75rem; }
.accordion summary { cursor: pointer; padding: 1.1rem 3rem 1.1rem 1.3rem; font-weight: 700; color: var(--navy); list-style: none; position: relative; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; position: absolute; right: 1.2rem; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--teal-dark); }
.accordion details[open] summary::after { content: "\2212"; }
.accordion .answer { padding: 0 1.3rem 1.2rem; }
.accordion .answer p:last-child { margin: 0; }

/* 11. Tables */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; }
table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; font-size: .97rem; }
caption { text-align: left; font-weight: 700; padding: .5rem 0; color: var(--navy); }
th, td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--navy); color: #fff; }
tbody tr:nth-child(even) { background: #F9FBFD; }

/* 12. Forms */
.form-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(1.4rem, 4vw, 2.2rem); box-shadow: var(--shadow); }
.field { margin-bottom: 1.2rem; }
.field label { display: block; font-weight: 700; margin-bottom: .35rem; color: var(--navy); }
.field .hint { font-size: .9rem; color: var(--muted); font-weight: 400; }
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%; font: inherit; padding: .75rem .9rem; border: 2px solid #A9B6C8; border-radius: 10px; background: #fff; color: var(--text);
}
textarea { min-height: 150px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--teal-dark); outline: 3px solid rgba(19,168,158,.3); outline-offset: 0; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #B42318; }
.error-msg { color: #B42318; font-size: .92rem; margin-top: .3rem; min-height: 0; }
.check { display: flex; gap: .7rem; align-items: flex-start; }
.check input { width: 1.25rem; height: 1.25rem; margin-top: .3rem; flex: none; accent-color: var(--teal-dark); }
.check label { font-weight: 400; color: var(--text); }
.form-success { display: none; background: #E9F6F4; border: 2px solid var(--teal-dark); border-radius: var(--radius); padding: 1.2rem 1.4rem; }
.form-success.is-visible { display: block; }
.form-note { font-size: .92rem; color: var(--muted); }
.address-card { background: var(--navy); color: #E7EEF7; border-radius: var(--radius-lg); padding: 1.8rem; }
.address-card h2, .address-card h3 { color: #fff; }
.address-card a { color: #8FE3DA; }
.address-card dl { margin: 0; }
.address-card dt { font-weight: 700; color: #fff; margin-top: 1rem; }
.address-card dd { margin: 0; }

/* 13. Footer */
.site-footer { background: #071A33; color: #C9D4E3; padding: 3.5rem 0 1.5rem; font-size: .95rem; }
.site-footer a { color: #8FE3DA; }
.site-footer h2 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer address { font-style: normal; }
.footer-disclaimer { border-top: 1px solid #22385A; margin-top: 2.5rem; padding-top: 1.5rem; font-size: .9rem; }
.footer-disclaimer p { margin-bottom: .5rem; }

/* 14. Cookie banner (non-blocking) */
.cookie-banner {
  position: fixed; right: 1rem; bottom: 1rem; left: 1rem; z-index: 60; max-width: 420px; margin-left: auto;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(11,37,69,.18);
  padding: 1.1rem 1.2rem; font-size: .93rem;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin-bottom: .8rem; }
.cookie-banner .btn { min-height: 40px; padding: .45rem 1rem; font-size: .9rem; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* 15. Utilities */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.cta-band { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #E7EEF7; border-radius: var(--radius-lg); padding: clamp(2rem, 5vw, 3.5rem); }
.cta-band h2 { color: #fff; }
.cta-band a:not(.btn) { color: #8FE3DA; }
.cta-band .btn-primary { background: var(--accent); color: var(--navy); }
.cta-band .btn-primary:hover { background: #fff; }
.illus { border-radius: var(--radius-lg); }
.error-page { text-align: center; padding: 4rem 0; }
.error-page img { margin: 0 auto 2rem; }

/* 16. Print */
@media print {
  .site-header, .site-footer .footer-grid, .cookie-banner, .btn-row, .toc, .breadcrumbs, .no-print { display: none !important; }
  body { background: #fff; font-size: 11pt; color: #000; }
  .page-hero, .section { padding: 1rem 0; border: 0; }
  .checklist li { break-inside: avoid; border: 1px solid #999; }
  a { color: #000; }
  .site-footer { background: #fff; color: #000; padding: 0; }
}

/* 17. Motion */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* 18. Generated photos */
.photo { width: 100%; aspect-ratio: 1200 / 670; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow); background: #EEF2F7; }
.prose .photo { margin: 1rem 0 1.5rem; }
.card-img { width: 100%; aspect-ratio: 1200 / 670; object-fit: cover; }
.cta-band .photo { box-shadow: none; }
@media print { .photo { display: none; } }
