/* ================================================================
   Senior IT of Dallas-Ft Worth — site stylesheet
   Design notes:
   - Body type 18px (1.125rem) minimum. Easy reading at 70+.
   - Line height 1.65. Plenty of room.
   - High contrast: navy text on cream. Tested at WCAG AAA.
   - Sans-serif body for screen readability; serif headings for warmth.
   - Touch targets >= 44x44 px. Phone and email always tappable.
   - Limited palette. Palette stays out of the content's way.
   ================================================================ */

/* ---------- Tokens ---------- */
:root {
  --brand:        #1F70C1;   /* logo blue — headings, links */
  --brand-deep:   #155491;   /* hover states */
  --brand-darker: #0D3B6A;   /* footer / deepest blue */
  --accent:       #B85033;   /* terracotta clay — CTAs (white-on-accent passes WCAG AA) */
  --accent-deep:  #8E3A22;   /* CTA hover */
  --cream:        #FBF6EF;   /* warm page background */
  --paper:        #FFFFFF;   /* card / surface */
  --ink:          #1A1A1A;   /* body text — near-black */
  --muted:        #5A5A5A;   /* secondary text */
  --rule:         #DDD1BF;   /* hairline rules */
  --shadow:       0 2px 6px rgba(31,112,193,.07), 0 8px 24px rgba(31,112,193,.06);

  --font-body:   system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head:   "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Source Serif Pro", serif;

  --content-max: 44rem;     /* ~700px — narrow column for easy reading */
  --wide-max:    62rem;     /* ~990px — for grids */
  --pad:         clamp(1rem, 4vw, 2rem);
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 18px; -webkit-text-size-adjust: 100%; }
@media (min-width: 60rem) { html { font-size: 19px; } }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
a:hover, a:focus { color: var(--accent-deep); }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -9999px; top: auto;
  background: var(--brand); color: var(--cream);
  padding: .5rem 1rem; z-index: 1000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--wide-max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ---------- Header ---------- */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .15rem;
}
.logo-link { line-height: 0; }
.logo-link img { height: auto; max-width: 280px; }
.brand-tagline {
  margin: 0;
  font-family: var(--font-head);
  font-style: italic;
  font-size: 1rem;
  color: var(--brand-deep);
  letter-spacing: 0.01em;
  padding-left: 4px;
}
.phone-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: .85rem 1.25rem;
  border-radius: 8px;
  font-weight: 700;
  min-height: 44px;
  white-space: nowrap;
}
.phone-link:hover, .phone-link:focus { background: var(--accent-deep); color: #fff; }
.phone-label { font-size: .9rem; font-weight: 500; opacity: .9; }
.phone-number { font-size: 1.1rem; }

/* ---------- Nav ---------- */
.site-nav {
  background: var(--brand);
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}
.site-nav a {
  display: inline-block;
  color: #fff;
  padding: .85rem 1rem;
  text-decoration: none;
  font-weight: 500;
  min-height: 44px;
}
.site-nav a:hover, .site-nav a:focus { background: var(--brand-deep); color: #fff; }
.site-nav a[aria-current="page"] {
  background: var(--cream);
  color: var(--brand);
}

/* ---------- Headings ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--brand);
  line-height: 1.25;
  margin-top: 2.4rem;
  margin-bottom: .5rem;
}
h1 {
  font-size: clamp(1.85rem, 4.6vw, 2.7rem);
  margin-top: 1.4rem;
  letter-spacing: -0.01em;
}
h2 {
  font-size: clamp(1.4rem, 3.2vw, 1.85rem);
  border-bottom: 1px solid var(--rule);
  padding-bottom: .35rem;
}
h3 { font-size: 1.25rem; }

p, ul, ol { margin-block: 0 1.1rem; }

/* ---------- Main column ---------- */
main {
  padding-block: 2.5rem 4rem;
}
main p, main ul, main ol, main h1, main h2, main h3, main blockquote {
  max-width: var(--content-max);
}

/* ---------- Lists ---------- */
ul, ol { padding-left: 1.4rem; }
li { margin-bottom: .35rem; }

/* ---------- Cards / Boxes ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-block: 1.5rem;
  max-width: var(--wide-max);
}
.card h3 { margin-top: 0; }

/* package cards on home */
.packages {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-block: 2rem;
  max-width: var(--wide-max);
}
@media (min-width: 50rem) {
  .packages { grid-template-columns: repeat(3, 1fr); }
}
.package {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 6px solid var(--brand);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}
.package h3 { margin-top: 0; }
.package .price {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--brand);
  margin: .2rem 0 .8rem;
  font-family: var(--font-head);
}
.package--featured { border-top-color: var(--accent); }
.package--featured .badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: .8rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .15rem .55rem;
  border-radius: 4px;
  margin-bottom: .4rem;
}

/* CTA */
.cta {
  display: inline-block;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none;
  padding: .9rem 1.5rem;
  border-radius: 8px;
  font-weight: 700;
  margin-block: .5rem 1.25rem;
  min-height: 44px;
}
.cta:hover, .cta:focus { background: var(--accent-deep); color: #fff !important; }
.cta--ghost {
  background: transparent;
  color: var(--brand) !important;
  border: 2px solid var(--brand);
}
.cta--ghost:hover, .cta--ghost:focus { background: var(--brand); color: #fff !important; }

/* Hero */
.hero {
  padding-block: 1.25rem 1.75rem;
}
.hero h1 { margin-top: 0; }
.hero .lead {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 38rem;
  margin-bottom: 1.25rem;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
  max-width: var(--wide-max);
}
@media (min-width: 50rem) {
  .hero-grid { grid-template-columns: 1.25fr 1fr; gap: 2.5rem; }
}
.hero-text > *:last-child { margin-bottom: 0; }
.hero-image img {
  width: 100%;
  height: auto;
  max-width: 440px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  margin-inline: auto;
  display: block;
}

/* Two-column section blocks (text + photo) */
.section-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
  max-width: var(--wide-max);
  margin-block: 2.5rem;
}
@media (min-width: 50rem) {
  .section-grid { grid-template-columns: 1fr 1.5fr; gap: 2.5rem; }
  .section-grid--image-right { grid-template-columns: 1.5fr 1fr; }
}
.section-grid__image img {
  width: 100%;
  height: auto;
  max-width: 360px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: block;
  margin-inline: auto;
}
.section-grid__text > *:first-child { margin-top: 0; }
.section-grid__text > *:last-child { margin-bottom: 0; }

/* Floated portrait photo for content pages (About, etc) */
.page-photo {
  width: 100%;
  height: auto;
  max-width: 280px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  margin-block: .5rem 1.25rem;
  display: block;
}
@media (min-width: 50rem) {
  .page-photo--right {
    float: right;
    max-width: 320px;
    margin: .25rem 0 1.25rem 2rem;
    shape-outside: margin-box;
  }
  .page-photo--left {
    float: left;
    max-width: 320px;
    margin: .25rem 2rem 1.25rem 0;
    shape-outside: margin-box;
  }
}

/* Trust strip */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  align-items: center;
  margin-block: 2rem;
  padding: 1rem 1.25rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
  font-weight: 600;
  color: var(--brand);
  max-width: var(--wide-max);
}
.trust-strip span { display: inline-flex; align-items: center; gap: .4rem; }
.trust-strip span::before { content: "✓"; color: var(--accent); font-weight: 800; }
.trust-strip .caps-inline-icon { width: 26px; height: 26px; margin-right: .15rem; }
.trust-strip span.has-icon::before { content: ""; }

/* CAPS credential — inline icon (small, used in trust strip / inline mentions) */
.caps-inline-icon {
  display: inline-block;
  width: 28px;
  height: 28px;
  vertical-align: middle;
  flex-shrink: 0;
}

/* CAPS credential — full hexagonal badge (used in section grids and the About page) */
.caps-badge {
  display: block;
  width: 100%;
  height: auto;
  max-width: 200px;
  margin-inline: auto;
}
@media (min-width: 50rem) {
  .caps-badge--float-right {
    float: right;
    max-width: 160px;
    margin: .25rem 0 1rem 1.5rem;
    shape-outside: margin-box;
  }
}

/* CAPS certificate thumbnail — clickable proof on the About page */
.caps-cert {
  margin-block: 1.25rem 1.5rem;
  max-width: var(--content-max);
}
.caps-cert a {
  display: inline-block;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: .5rem;
  background: var(--paper);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform .15s ease;
}
.caps-cert a:hover, .caps-cert a:focus { transform: translateY(-2px); }
.caps-cert img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 380px;
  border-radius: 4px;
}
.caps-cert figcaption {
  margin-top: .5rem;
  font-size: .9rem;
  color: var(--muted);
  font-style: italic;
}

/* Footer CAPS credential */
.footer-credential {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1rem;
  color: #fff;
}
.footer-credential img {
  width: 32px;
  height: 32px;
  display: inline-block;
}
.footer-credential span {
  font-size: .9rem;
  color: #d8dde6;
}

/* FAQ items */
details.faq {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: .9rem;
  max-width: var(--content-max);
}
details.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--brand);
  font-size: 1.05rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+";
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
}
details.faq[open] summary::after { content: "–"; }
details.faq > *:not(summary) { margin-top: .8rem; }

/* Blockquote */
blockquote {
  border-left: 4px solid var(--accent);
  background: var(--paper);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--ink);
  border-radius: 0 8px 8px 0;
}

/* Definition / what's included lists */
.included {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-block: 1rem 1.25rem;
}
.included h4 {
  margin-top: 0;
  margin-bottom: .4rem;
  color: var(--brand);
  font-size: 1.05rem;
}

/* Footer */
.site-footer {
  background: var(--brand-darker);
  color: #d8dde6;
  padding-block: 2rem 2.5rem;
  margin-top: 4rem;
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--accent); }
.footer-inner p { margin-block: .35rem; }
.footer-name { font-size: 1.1rem; }
.footer-tagline { color: #b9c1cf; }
.footer-trust {
  font-size: .95rem;
  color: #fff;
  font-weight: 600;
  margin-top: 1rem;
}
.footer-legal {
  font-size: .85rem;
  color: #b4bdcc;
  margin-top: 1.25rem;
}

/* Print: keep it simple */
@media print {
  .site-nav, .site-footer, .skip-link, .phone-link { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
  main { padding: 0; }
}
