/* ============================================================
   drbillmorgan.com — global styles
   Tokens, base, buttons, header/nav, footer
============================================================ */

:root {
  /* Color — from Figma DBM-v1 */
  --navy:        #22324a;
  --slate:       #5f7288;
  --orange:        #a8530a;  /* AA on light backgrounds + white text (design value was #e67e22) */
  --orange-bright: #e67e22;  /* design orange: use on navy only */
  --orange-btn:    #b56015;  /* brightest design-hue orange that keeps white button text at AA (4.52:1) */
  --bg:          #f7fbff;
  --bg-alt:      #eef4f8;
  --bg-cta:      #eaf2f7;
  --tint:        #f2f8fc;
  --line:        #d7e6f0;
  --line-dark:   #3f4e52;
  --white:       #ffffff;

  /* Type */
  --font-sans:  'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif: 'Lora', Georgia, serif;

  /* Layout — 120px gutter at the 1600px design width */
  --max:     1600px;
  --gutter:  clamp(20px, 7.5vw, 120px);
  --section: clamp(64px, 8vw, 120px);

  --radius-pill: 100px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--slate);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, address { margin: 0; }
address { font-style: normal; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

p a {
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

.inner {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--navy);
  color: var(--white);
  border-radius: 8px;
}
.skip-link:focus { top: 16px; }

.site-footer :focus-visible,
.locations :focus-visible { outline-color: var(--orange-bright); }

.eyebrow {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--orange);
}

.text-link {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-link:hover { text-decoration-thickness: 2px; }

/* Desktop-only line breaks from the design */
@media (max-width: 767px) {
  .br-desktop { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color .2s, border-color .2s, color .2s, filter .2s;
}
.btn--orange  { background: var(--orange-btn); color: var(--white); }
.btn--orange:hover { background: #9a5212; }

.btn--navy    { background: var(--navy); color: var(--white); }
.btn--navy:hover { background: #2d4260; }

.btn--ghost   { background: var(--tint); border-color: var(--line); color: var(--navy); }
.btn--ghost:hover { border-color: var(--slate); }

.btn--outline-orange {
  padding-inline: 24px;
  border-color: var(--orange);
  color: var(--orange);
  font-weight: 600;
}
.btn--outline-orange:hover { background: rgba(168, 83, 10, .08); }

/* ---------- Tags ---------- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tags li {
  padding: 4px 10px;
  background: var(--tint);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  line-height: normal;
  color: var(--slate);
  white-space: nowrap;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s;
}
.site-header.scrolled { box-shadow: 0 6px 20px rgba(34, 50, 74, .08); }

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 88px;
  padding-block: 20px;
}

.site-header__logo {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: normal;
  white-space: nowrap;
}
.site-header__name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 28px;
  color: var(--navy);
}
.site-header__title {
  font-size: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--slate);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 40px;
}
.site-nav__links {
  display: flex;
  align-items: center;
  gap: 40px;
  font-size: 17px;
  line-height: normal;
}
.site-nav__links a { color: var(--slate); transition: color .2s; }
.site-nav__links a:hover,
.site-nav__links a[aria-current="page"] { color: var(--navy); }
.site-nav__links a[aria-current="page"] { font-weight: 500; }

.site-nav__cta {
  display: flex;
  align-items: center;
  gap: 40px;
}
.site-nav__phone {
  font-size: 16px;
  font-weight: 500;
  color: var(--navy);
  white-space: nowrap;
}
.site-nav__cta .btn { font-size: 16px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  margin-right: -10px;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav-toggle__bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--navy);
  border-radius: 2px;
  transition: transform .25s, opacity .2s;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1280px) {
  .site-nav,
  .site-nav__links,
  .site-nav__cta { gap: 28px; }
}

@media (max-width: 1140px) {
  .nav-toggle { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 28px;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 24px rgba(34, 50, 74, .08);
  }
  .site-nav.is-open { display: flex; }

  .site-nav__links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .site-nav__links a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    color: var(--navy);
  }
  .site-nav__cta {
    justify-content: space-between;
    flex-wrap: wrap;
    padding-top: 20px;
  }
}

@media (max-width: 480px) {
  .site-header .inner { min-height: 72px; padding-block: 14px; }
  .site-header__name  { font-size: 22px; }
  .site-header__title { font-size: 12px; }
}

/* ---------- Contact CTA (shared) ---------- */
.cta {
  background: var(--bg-cta);
  padding: var(--section) 0;
}
.cta .inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  max-width: calc(960px + 2 * var(--gutter));
  text-align: center;
}
.cta__headline {
  font-size: clamp(36px, 1.5rem + 2.8vw, 56px);
  font-weight: 600;
  line-height: 1.1;
  color: var(--navy);
  text-wrap: balance;
}
.cta__body {
  max-width: 640px;
  font-size: 18px;
  line-height: 1.6;
}
.cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

@media (max-width: 767px) {
  .cta .inner { gap: 24px; }
  .cta__body { font-size: 17px; }
}

@media (max-width: 480px) {
  .cta__actions { width: 100%; }
  .cta__actions .btn { flex: 1 1 100%; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  border-top: 1px solid var(--line);
  color: var(--line);
  padding: clamp(56px, 6vw, 80px) 0 40px;
}

.footer__cols {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}
.footer__brand { width: 320px; display: flex; flex-direction: column; gap: 16px; }
.footer__brand-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 24px;
  line-height: normal;
  color: var(--white);
  white-space: nowrap;
}
.footer__brand-desc { font-size: 14px; }

.footer__col { width: 240px; display: flex; flex-direction: column; gap: 16px; }
.footer__col--nav { width: 160px; }

.footer__label {
  font-size: 12px;
  font-weight: 600;
  line-height: normal;
  text-transform: uppercase;
  color: var(--orange-bright);
}
.footer__links { display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: normal; }
.footer__links a:hover { color: var(--white); }
.footer__address { font-size: 14px; line-height: 1.6; }
.footer__phone { font-size: 14px; font-weight: 500; line-height: normal; color: var(--white); }

.footer__bottom {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.footer__disclaimer { max-width: 860px; line-height: 1.5; }
.footer__copyright-row {
  display: flex;
  justify-content: space-between;
  gap: 8px 24px;
  flex-wrap: wrap;
  line-height: normal;
}
.footer__region { font-weight: 500; color: var(--orange-bright); }

@media (max-width: 1080px) {
  .footer__cols {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 48px 40px;
  }
  .footer__brand, .footer__col, .footer__col--nav { width: auto; }
}

@media (max-width: 560px) {
  .footer__cols { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
  .footer__brand { grid-column: 1 / -1; }
  .footer__col--nav { grid-column: 1 / -1; }
  .footer__bottom { margin-top: 48px; }
}
