/* Lexington Custom Cabinets
   Palette derived programmatically from the logo mark: one navy cluster, mean rgb(1,39,145).
   Type: Bodoni Moda echoes the logo's high-contrast serif wordmark.
   IBM Plex Sans for body, IBM Plex Mono for specs (the shop-drawing voice). */

:root {
  --accent:        #012791;
  --accent-dark:   #011A63;
  --accent-light:  #E7ECF8;
  --ink:           #111A2E;
  --ink-soft:      #3A4358;
  --muted:         #6B7385;
  --cream:         #FAF8F4;
  --cream-alt:     #F2EEE6;
  --border:        #DFD8CB;
  --rule:          #C9BFAD;
  --white:         #FFFFFF;
  --shadow:        0 1px 2px rgba(17,26,46,.06), 0 8px 24px rgba(17,26,46,.07);
  --shadow-lift:   0 2px 4px rgba(17,26,46,.08), 0 16px 40px rgba(17,26,46,.12);
  --radius:        3px;
  --radius-lg:     5px;
  --wrap:          1180px;
  --display: Georgia, "Times New Roman", serif;
  --body:    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --mono:    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: #fff; padding: 12px 18px; font-weight: 600;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------- Type ---------- */
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; color: var(--ink); margin: 0 0 .5em; line-height: 1.15; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.05rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); margin-top: 0; }
h3 { font-size: clamp(1.15rem, 1.9vw, 1.32rem); line-height: 1.25; }
h4 { font-size: 1.02rem; }
p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--mono); font-size: .70rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--accent);
  margin: 0 0 .85rem; display: flex; align-items: center; gap: .7rem;
}
.eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--rule); max-width: 90px; }
.eyebrow--light { color: #B9C6EA; }
.eyebrow--light::after { background: rgba(255,255,255,.28); }

.lede { font-size: 1.09rem; color: var(--ink-soft); }
.section { padding: 68px 0; }
.section--alt { background: var(--cream-alt); }
.section--tight { padding: 48px 0; }

/* ---------- Header ---------- */
.hdr {
  position: sticky; top: 0; z-index: 100;
  background: var(--cream); border-bottom: 1px solid var(--border);
}
.hdr__in { display: flex; align-items: center; gap: 18px; height: 76px; }
.hdr__logo { flex: 0 0 auto; }
.hdr__logo img { height: 42px; width: auto; }
.hdr__nav { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.hdr__nav a { color: var(--ink); text-decoration: none; font-size: .93rem; font-weight: 500; }
.hdr__nav a:hover { color: var(--accent); }

.navtrig {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-size: .93rem; font-weight: 500; color: var(--ink);
  display: inline-flex; align-items: center; gap: 6px;
}
.navtrig svg { width: 10px; height: 10px; transition: transform .18s ease; }
.megawrap { position: relative; }
.megawrap:hover .navtrig svg, .megawrap:focus-within .navtrig svg { transform: rotate(180deg); }

/* Fixed + viewport-centred so it never runs off-screen on wide viewports */
.mega {
  position: fixed; left: 50%; transform: translateX(-50%);
  top: 76px; width: min(1120px, calc(100vw - 32px));
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lift);
  padding: 26px 28px; z-index: 110;
  display: none; grid-template-columns: repeat(4, 1fr); gap: 26px;
}
.megawrap:hover .mega, .megawrap:focus-within .mega { display: grid; }
.mega h4 {
  font-family: var(--mono); font-size: .66rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); font-weight: 600;
  margin: 0 0 .7rem; padding-bottom: .5rem; border-bottom: 1px solid var(--border);
}
.mega ul { list-style: none; margin: 0; padding: 0; }
.mega li { margin-bottom: .34rem; }
.mega a { display: block; font-size: .845rem; line-height: 1.35; color: var(--ink-soft); text-decoration: none; }
.mega a:hover { color: var(--accent); }

.pill {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  background: var(--accent); color: #fff !important; text-decoration: none;
  font-weight: 600; font-size: .9rem; padding: 10px 17px; border-radius: 100px;
}
.pill:hover { background: var(--accent-dark); color: #fff !important; }
.pill svg { width: 14px; height: 14px; flex: 0 0 auto; }

.burger { display: none; background: none; border: 0; padding: 8px; cursor: pointer; margin-left: auto; }
.burger span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; }

.drawer { display: none; border-top: 1px solid var(--border); background: var(--cream); }
.drawer[open] { display: block; }
.drawer__in { padding: 14px 22px 26px; }
.drawer a { display: block; padding: 9px 0; color: var(--ink); text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--border); }
.drawer details > summary {
  list-style: none; cursor: pointer; padding: 9px 0; font-weight: 500;
  border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center;
}
.drawer details > summary::-webkit-details-marker { display: none; }
.drawer details > summary::after { content: "+"; font-family: var(--mono); color: var(--accent); font-size: 1.1rem; }
.drawer details[open] > summary::after { content: "\2212"; }
.drawer details details { padding-left: 12px; }
/* Critical: nested links default to inline and run together as wrapped text. */
.drawer details details a,
.drawer details > div > a {
  display: block; font-size: .9rem; color: var(--ink-soft); font-weight: 400; padding: 7px 0;
}

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--accent-dark); }
.hero__bg { position: absolute; inset: 0; overflow: hidden; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(1,26,99,.93) 0%, rgba(1,26,99,.82) 42%, rgba(1,26,99,.52) 100%);
}
.hero__in { position: relative; z-index: 2; padding: 72px 0 78px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 52px; align-items: start; }
.hero__copy h1 { color: #fff; margin-bottom: .55rem; }
.hero__copy .lede { color: #DCE3F5; font-size: 1.1rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; align-items: center; }
.btn-lg {
  display: inline-flex; align-items: center; gap: 9px; background: #fff; color: var(--accent-dark) !important;
  font-weight: 700; text-decoration: none; padding: 14px 24px; border-radius: 100px; font-size: 1.02rem;
}
.btn-lg:hover { background: var(--accent-light); }
.hero__note { color: #B9C6EA; font-size: .86rem; font-family: var(--mono); }

/* ---------- Lead form ---------- */
.leadform { background: var(--white); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-lift); }
.leadform .formhead { font-family: var(--display); font-weight: 700; font-size: 1.2rem; margin: 0 0 .2rem; line-height: 1.2; }
.leadform p.small { font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }
.leadform label { display: block; font-size: .76rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 5px; }
.leadform input, .leadform select, .leadform textarea {
  width: 100%; padding: 10px 12px; margin-bottom: 13px; font: inherit; font-size: .93rem;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--cream); color: var(--ink);
}
.leadform textarea { min-height: 78px; resize: vertical; }
.leadform button {
  width: 100%; background: var(--accent); color: #fff; border: 0; border-radius: 100px;
  padding: 13px; font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer;
}
.leadform button:hover { background: var(--accent-dark); }

/* ---------- Stat strip ---------- */
.stats { background: var(--accent-dark); color: #fff; }
.stats__in { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.stats--4 .stats__in { grid-template-columns: repeat(4, 1fr); }
.stat { padding: 26px 20px; border-left: 1px solid rgba(255,255,255,.14); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat b { display: block; font-family: var(--display); font-size: 1.85rem; line-height: 1; margin-bottom: 7px; }
.stat span { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #B9C6EA; }

/* ---------- Two column ---------- */
.two {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 44px;
  align-items: center;
}

.two > div {
  min-width: 0;
}

.two > div:last-child > img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 520px;
  height: auto;
  object-fit: contain;
  object-position: center;
  margin: 0 auto !important;
}

.checks { list-style: none; margin: 0 0 1.2em; padding: 0; }
.checks li { position: relative; padding-left: 27px; margin-bottom: .6em; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .52em;
  width: 11px; height: 6px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.contrast { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin: 1.4em 0; }
.contrast > div { padding: 15px 18px; }
.contrast__a { background: var(--cream-alt); color: var(--muted); }
.contrast__a s { text-decoration-color: var(--rule); }
.contrast__b { background: var(--white); border-top: 1px solid var(--border); }
.contrast b {
  display: block; font-family: var(--mono); font-size: .65rem; letter-spacing: .13em;
  text-transform: uppercase; margin-bottom: 5px;
}
.contrast__a b { color: var(--muted); }
.contrast__b b { color: var(--accent); }

.databox { background: var(--accent-dark); color: #fff; border-radius: var(--radius-lg); padding: 28px; margin: 1.6em 0; }
.databox h3 { color: #fff; }
.databox p { color: #D3DCF2; margin-bottom: 0; }
.databox__n { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 18px 0; }
.databox__n b { display: block; font-family: var(--display); font-size: 1.5rem; line-height: 1.1; }
.databox__n span { font-family: var(--mono); font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; color: #B9C6EA; }

.note {
  border-left: 3px solid var(--accent); background: var(--accent-light);
  padding: 15px 18px; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5em 0; font-size: .95rem;
}
.note b { display: block; margin-bottom: 3px; }

/* ---------- Process ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: s; }
.steps li { counter-increment: s; padding-top: 16px; border-top: 2px solid var(--accent); }
.steps li::before {
  content: counter(s, decimal-leading-zero);
  display: block; font-family: var(--mono); font-size: .74rem; color: var(--accent); font-weight: 600; margin-bottom: 7px;
}
.steps h3 { font-size: 1.06rem; margin-bottom: .3rem; }
.steps p { font-size: .92rem; color: var(--ink-soft); }

/* ---------- Cards ---------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .18s ease, transform .18s ease;
}
.card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.card img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
.card__b { padding: 15px 17px 18px; }
.card h3 { font-size: 1.02rem; margin-bottom: .3rem; }
.card h3 a { text-decoration: none; color: var(--ink); }
.card:hover h3 a { color: var(--accent); }
.card p { font-size: .88rem; color: var(--ink-soft); margin: 0; }

.clusterhead {
  font-family: var(--mono); font-size: .70rem; letter-spacing: .15em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin: 44px 0 16px;
  padding-bottom: 9px; border-bottom: 1px solid var(--rule);
}
.clusterhead:first-of-type { margin-top: 26px; }

/* ---------- Areas ---------- */
.areas { columns: 4; column-gap: 26px; font-size: .94rem; }
.areas p { margin: 0 0 .42em; break-inside: avoid; color: var(--ink-soft); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  list-style: none; cursor: pointer; padding: 17px 40px 17px 0; position: relative;
  font-weight: 600; font-size: 1.02rem; font-family: var(--display);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 1.25rem; color: var(--accent); font-weight: 400;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 0 18px; color: var(--ink-soft); font-size: .97rem; max-width: 78ch; }

/* ---------- CTA ---------- */
.cta { background: var(--accent); color: #fff; text-align: center; padding: 58px 0; }
.cta h2 { color: #fff; }
.cta p { color: #D3DCF2; max-width: 62ch; margin: 0 auto 24px; }

/* ---------- Map ---------- */
.map { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; line-height: 0; }
.map iframe { width: 100%; height: 340px; border: 0; }

/* ---------- Footer ---------- */
.ftr { background: var(--cream-alt); border-top: 1px solid var(--border); padding: 52px 0 26px; }
.ftr__in { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.4fr; gap: 34px; }
.ftr img.mark { height: 44px; width: auto; margin-bottom: 14px; }
.ftr p { font-size: .9rem; color: var(--ink-soft); }
.ftr h4 { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: .8rem; }
.ftr ul { list-style: none; margin: 0; padding: 0; }
.ftr li { margin-bottom: .42em; }
.ftr a { font-size: .9rem; color: var(--ink-soft); text-decoration: none; }
.ftr a:hover { color: var(--accent); }
.nap { font-family: var(--mono); font-size: .84rem; color: var(--ink-soft); line-height: 1.9; }
.nap a { font-family: var(--mono); font-size: .84rem; }
.ftr__bot { margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--border); font-size: .82rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; }

/* ---------- 404 ---------- */
.err { text-align: center; padding: 96px 0; }
.err .code { font-family: var(--mono); font-size: 3.4rem; color: var(--accent); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero__in { grid-template-columns: 1fr; gap: 34px; padding: 52px 0 58px; }
  .two { grid-template-columns: 1fr; gap: 30px; }
  .grid, .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .areas { columns: 3; }
  .ftr__in { grid-template-columns: 1fr 1fr; }
  .mega { width: calc(100vw - 32px); }
}
@media (max-width: 860px) {
  .hdr__nav { display: none; }
  .burger { display: block; }
  .hdr__in { height: 66px; gap: 10px; }
  .hdr__logo img { height: 34px; }
  .areas { columns: 2; }
  .stats__in, .stats--4 .stats__in { grid-template-columns: repeat(2, 1fr); }
  .stat { border-left: 0; padding: 20px 0; border-top: 1px solid rgba(255,255,255,.14); }
  .stat:first-child, .stat:nth-child(2) { border-top: 0; }
  .databox__n { grid-template-columns: 1fr; gap: 12px; }
  .section { padding: 50px 0; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .grid, .grid--3, .steps { grid-template-columns: 1fr; }
  .areas { columns: 1; }
  .ftr__in { grid-template-columns: 1fr; }
  .hero__in { padding: 40px 0 46px; }
}
/* 320px is the narrowest common viewport and the one that breaks phone pills. */
@media (max-width: 380px) {
  .wrap { padding: 0 14px; }
  .hdr__in { gap: 6px; }
  .hdr__logo img { height: 28px; }
  .pill { padding: 8px 12px; font-size: .8rem; gap: 5px; }
  .pill svg { width: 12px; height: 12px; }
  .burger { padding: 6px; }
  h1 { font-size: 1.72rem; }
}

/* Keep city+state together so H1 never breaks as "Lexington, / KY" */
.nb { white-space: nowrap; }


@media (max-width: 760px) {
  .hero__copy {
    padding-left: 18px;
    padding-right: 18px;
  }
}


@media (max-width: 1000px) {
  .hero__in {
    padding-left: 22px !important;
    padding-right: 22px !important;
  }
}

@media (max-width: 620px) {
  .hero__in {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
}


@media (max-width: 620px) {
  .hero h1,
  .hero__in h1 {
    font-size: 48px !important;
    line-height: 1.02 !important;
  }
}


.hero__copy p a {
  color: #fff !important;
}







/* Hero link colors */
.hero__copy p a {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* Hero CTA must have dark text on white button */
.hero .hero__cta a.btn-lg,
.hero .hero__cta a.btn-lg:link,
.hero .hero__cta a.btn-lg:visited,
.hero .hero__cta a.btn-lg:hover,
.hero .hero__cta a.btn-lg:active {
  background: #fff !important;
  color: #021a63 !important;
  -webkit-text-fill-color: #021a63 !important;
  text-decoration: none !important;
}


/* Mobile header phone CTA */
.mobile-phone-pill {
  display: none;
}

@media (max-width: 860px) {
  .mobile-phone-pill {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;

    margin-left: auto;
    margin-right: 8px;

    padding: 9px 13px;
    border-radius: 999px;

    background: var(--accent);
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;

    font-weight: 700;
    font-size: .82rem;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
  }

  .mobile-phone-pill svg {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
  }

  .burger {
    margin-left: 0;
  }
}

@media (max-width: 420px) {
  .mobile-phone-pill {
    font-size: .74rem;
    padding: 8px 9px;
    margin-right: 5px;
  }

  .mobile-phone-pill svg {
    width: 13px;
    height: 13px;
  }
}

/* ---------- Mobile width + spacing cleanup ---------- */
@media (max-width: 620px) {

  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

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

  /* Consistent mobile gutters across normal page sections */
  .wrap {
    width: 100%;
    max-width: 100%;
    padding-left: 24px !important;
    padding-right: 24px !important;
    margin-left: auto;
    margin-right: auto;
  }

  .section > .wrap,
  main > .section > .wrap {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }

  /* Prevent grid/flex children from forcing viewport wider */
  .two,
  .grid,
  .grid--3,
  .steps,
  .databox,
  .databox__n,
  .hero__in,
  .hero__copy,
  .leadform {
    min-width: 0;
    max-width: 100%;
  }

  img,
  input,
  select,
  textarea,
  button {
    max-width: 100%;
  }

  /* Do not let city/state nowrap create mobile overflow */
  .hero h1 .nb {
    white-space: normal;
  }
}


/* ---------- Hero paragraph normalization ---------- */
.hero .hero__copy > p,
.hero .hero__copy .lede {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-family: inherit;
  font-size: 1.1rem !important;
  font-weight: 400;
  line-height: 1.62;
}

.hero .hero__copy > p {
  margin-bottom: 1.15rem;
}

.hero .hero__copy > p:last-of-type {
  margin-bottom: 0;
}

@media (max-width: 620px) {
  .hero .hero__copy > p,
  .hero .hero__copy .lede {
    font-size: 1rem !important;
    line-height: 1.58;
  }
}


/* ---------- Mobile hero image framing ---------- */
@media (max-width: 620px) {
  .hero {
    background: var(--accent-dark);
  }

  .hero__bg {
    bottom: auto !important;
    height: calc(100% - 620px);
    min-height: 900px;
  }

  .hero__bg img {
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
  }
}


/* ---------- Mobile hero image depth ---------- */
@media (max-width: 620px) {
  .hero__bg {
    bottom: auto !important;
    height: 72% !important;
  }

  .hero__bg img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
  }
}

/* ---------- Mobile drawer phone CTA cleanup ---------- */
@media (max-width: 860px) {
  .drawer .pill {
    display: inline-flex !important;
    width: auto !important;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 13px 18px !important;
    margin-top: 2px;

    border-radius: 999px;
    font-size: 1rem !important;
    line-height: 1;
    white-space: nowrap;

    background: var(--accent);
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
  }

  .drawer .pill svg {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
  }
}
