/* ==========================================================================
   KNU Construction — Global Stylesheet
   Palette inspired by coastal Florida roofing brands:
   dark navy / charcoal, white, light gray, blue accent, coastal teal.
   ========================================================================== */

:root {
  /* Brand palette */
  --navy: #0f2540;
  --navy-deep: #0a1c30;
  --charcoal: #1c2b3a;
  --blue: #1f6fd6;
  --blue-dark: #1857ad;
  --teal: #17b6b0;
  --sky: #4cb8f0;
  --white: #ffffff;
  --gray-50: #f6f8fb;
  --gray-100: #eef2f7;
  --gray-200: #dde4ee;
  --gray-300: #c3cedd;
  --gray-500: #6b7a8f;
  --gray-700: #3a4859;
  --ink: #16222f;

  /* Typography */
  --font-sans: "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;

  /* Layout */
  --maxw: 1180px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(15, 37, 64, 0.08);
  --shadow-md: 0 10px 30px rgba(15, 37, 64, 0.12);
  --shadow-lg: 0 24px 60px rgba(10, 28, 48, 0.22);
  --transition: 0.25s ease;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blue-dark); }
h1, h2, h3, h4 { line-height: 1.18; color: var(--navy); margin: 0 0 0.5em; font-weight: 800; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }
ul { margin: 0 0 1rem; padding-left: 1.2rem; }
li { margin-bottom: 0.4rem; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }
.section--gray { background: var(--gray-50); }
.section--navy { background: var(--navy); color: #d9e3f0; }
.section--navy h2, .section--navy h3 { color: #fff; }
.center { text-align: center; }
.lead { font-size: 1.15rem; color: var(--gray-700); max-width: 720px; }
.center .lead { margin-left: auto; margin-right: auto; }
.eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 0.78rem; font-weight: 700; color: var(--blue); margin-bottom: 0.6rem;
}
.section--navy .eyebrow { color: var(--sky); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 14px 26px; border-radius: var(--radius); font-weight: 700;
  font-size: 1rem; cursor: pointer; border: 2px solid transparent;
  transition: all var(--transition); text-align: center; line-height: 1.1;
}
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-dark); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--accent { background: var(--teal); color: #fff; }
.btn--accent:hover { background: #129a95; color: #fff; transform: translateY(-2px); }
.btn--outline { background: transparent; color: var(--navy); border-color: var(--gray-300); }
.btn--outline:hover { border-color: var(--blue); color: var(--blue); }
.btn--ghost-light { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.4); }
.btn--ghost-light:hover { background: #fff; color: var(--navy); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.center .btn-row { justify-content: center; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--gray-200);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 46px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--navy); font-weight: 600; font-size: 0.95rem; padding: 8px 12px;
  border-radius: 8px;
}
.nav-links a:hover, .nav-links a.active { background: var(--gray-100); color: var(--blue); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-phone { font-weight: 800; color: var(--navy); white-space: nowrap; }
.nav-phone:hover { color: var(--blue); }

/* Dropdown for services */
.has-dropdown { position: relative; }
.dropdown {
  position: absolute; top: 100%; left: 0; min-width: 270px; background: #fff;
  border: 1px solid var(--gray-200); border-radius: var(--radius); box-shadow: var(--shadow-md);
  padding: 8px; list-style: none; margin: 6px 0 0; opacity: 0; visibility: hidden;
  transform: translateY(8px); transition: all var(--transition);
}
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown a { display: block; padding: 10px 12px; font-size: 0.92rem; }

/* Mobile nav */
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer; padding: 8px;
  flex-direction: column; gap: 5px;
}
.nav-toggle span { width: 26px; height: 3px; background: var(--navy); border-radius: 2px; transition: all var(--transition); }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background:
    linear-gradient(115deg, rgba(10,28,48,0.94) 0%, rgba(15,37,64,0.86) 55%, rgba(24,87,173,0.78) 100%),
    url("../images/hero-pattern.svg") center/cover no-repeat,
    var(--navy);
}
.hero__inner { padding: 92px 0 104px; max-width: 760px; }
.hero h1 { color: #fff; }
.hero p { font-size: 1.2rem; color: #d3e0f0; max-width: 640px; }
.hero .badges { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 26px 0 30px; padding: 0; list-style: none; }
.hero .badges li { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #e7eef8; margin: 0; }
.hero .badges svg { flex: none; }

/* Page hero (interior) */
.page-hero {
  background: linear-gradient(120deg, var(--navy-deep), var(--navy) 60%, #163a63);
  color: #fff; padding: 64px 0;
}
.page-hero h1 { color: #fff; margin-bottom: 0.4rem; }
.page-hero p { color: #cdd9e8; max-width: 700px; margin: 0; font-size: 1.12rem; }
.breadcrumbs { font-size: 0.85rem; color: #9fb3cc; margin-bottom: 1rem; }
.breadcrumbs a { color: var(--sky); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow-sm); transition: all var(--transition);
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--gray-300); }
.card h3 { margin-bottom: 0.4rem; }
.card p { color: var(--gray-700); font-size: 0.97rem; }
.card .card__icon {
  width: 54px; height: 54px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--teal)); margin-bottom: 16px;
}
.card .card__icon svg { stroke: #fff; }
.card a.card__link { margin-top: auto; font-weight: 700; padding-top: 12px; }

/* Service card as a link */
a.card { color: inherit; }
a.card:hover h3 { color: var(--blue); }

/* Trust / feature row */
.trust-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.trust-item { text-align: center; padding: 22px 12px; }
.trust-item .ticon {
  width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(31,111,214,0.1);
}
.section--navy .trust-item .ticon { background: rgba(76,184,240,0.16); }
.trust-item h3 { font-size: 1.02rem; margin-bottom: 0.2rem; }
.trust-item p { font-size: 0.88rem; color: var(--gray-500); margin: 0; }
.section--navy .trust-item p { color: #aebfd4; }

/* Process steps */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step {
  position: relative; background: #fff; border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 28px 24px 24px; box-shadow: var(--shadow-sm);
}
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  display: inline-block; font-size: 1.1rem; font-weight: 800; color: #fff;
  background: var(--navy); width: 44px; height: 44px; border-radius: 10px;
  text-align: center; line-height: 44px; margin-bottom: 14px;
}
.step h3 { font-size: 1.1rem; }
.step p { color: var(--gray-700); font-size: 0.94rem; margin: 0; }

/* Feature split */
.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.split--reverse .split__media { order: 2; }
.split__media {
  border-radius: var(--radius-lg); overflow: hidden; min-height: 320px;
  background: linear-gradient(135deg, var(--navy), #1b4a82); box-shadow: var(--shadow-md);
  display: grid; place-items: center; color: #fff; padding: 30px;
}
.split__media svg { width: 100%; height: auto; max-width: 360px; }

/* Checklist */
.checklist { list-style: none; padding: 0; columns: 2; column-gap: 32px; }
.checklist li { position: relative; padding-left: 30px; margin-bottom: 12px; break-inside: avoid; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--teal);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}

/* CTA band */
.cta-band {
  background: linear-gradient(120deg, var(--blue-dark), var(--blue) 60%, var(--teal));
  color: #fff; border-radius: var(--radius-lg); padding: 48px; text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #e6f0fb; max-width: 640px; margin: 0 auto 1.4rem; }

/* ---------- Contact / forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 0.9rem; color: var(--navy); }
.field label .req { color: #d23f3f; }
.field input, .field select, .field textarea {
  font: inherit; padding: 12px 14px; border: 1px solid var(--gray-300);
  border-radius: 8px; background: #fff; color: var(--ink); width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,111,214,0.15);
}
.field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.82rem; color: var(--gray-500); }
.form-success {
  display: none; background: #e8f7ef; border: 1px solid #a9e0c2; color: #1a7a45;
  padding: 16px 18px; border-radius: 8px; margin-bottom: 18px; font-weight: 600;
}

.contact-card {
  background: var(--navy); color: #d9e3f0; border-radius: var(--radius-lg); padding: 32px;
}
.contact-card h3 { color: #fff; }
.contact-card a { color: var(--sky); }
.contact-line { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 18px; }
.contact-line svg { flex: none; margin-top: 3px; }
.map-embed { border: 0; width: 100%; height: 320px; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #aebfd4; padding: 56px 0 24px; font-size: 0.92rem; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.site-footer a { color: #aebfd4; }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-brand img { height: 48px; margin-bottom: 14px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12); margin-top: 40px; padding-top: 20px;
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; font-size: 0.82rem;
}
.footer-license {
  background: rgba(76,184,240,0.1); border: 1px dashed rgba(76,184,240,0.4);
  border-radius: 8px; padding: 12px 14px; margin-top: 14px; font-size: 0.82rem; color: #cdd9e8;
}

/* ---------- Sticky mobile call button ---------- */
.sticky-call {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  background: var(--teal); color: #fff; text-align: center; padding: 14px;
  font-weight: 800; font-size: 1.05rem; box-shadow: 0 -4px 16px rgba(0,0,0,0.18);
}
.sticky-call:hover { color: #fff; background: #129a95; }

/* ---------- Misc ---------- */
.tag {
  display: inline-block; background: var(--gray-100); color: var(--gray-700);
  padding: 4px 12px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; margin: 0 6px 6px 0;
}
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; }
.muted { color: var(--gray-500); }

/* ---------- Team / leadership bios ---------- */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.bio-card {
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: all var(--transition);
  display: flex; flex-direction: column;
}
.bio-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.bio-card__photo { width: 100%; aspect-ratio: 3 / 3.4; object-fit: cover; object-position: top center; display: block; background: var(--navy); }
.bio-card__body { padding: 24px; }
.bio-card__name { font-size: 1.25rem; margin-bottom: 2px; }
.bio-card__role { color: var(--blue); font-weight: 700; font-size: 0.92rem; margin-bottom: 12px; display: block; }
.bio-card__body p { color: var(--gray-700); font-size: 0.95rem; margin-bottom: 0; }
.bio-tags { margin-top: 14px; }

/* ---------- Ownership credential badges ---------- */
.creds {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 4px 0 0; padding: 0; list-style: none;
}
.cred-badge {
  display: inline-flex; align-items: center; gap: 9px; background: #fff;
  border: 1px solid var(--gray-200); border-radius: 999px; padding: 10px 18px;
  font-weight: 700; font-size: 0.92rem; color: var(--navy); box-shadow: var(--shadow-sm);
}
.cred-badge svg { flex: none; }
.section--navy .cred-badge { background: rgba(255,255,255,0.06); border-color: rgba(76,184,240,0.4); color: #fff; }
.hero .creds { justify-content: flex-start; }
.hero .cred-badge { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.28); color: #fff; backdrop-filter: blur(4px); }

/* ---------- License numbers display ---------- */
.license-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
.license-item {
  background: rgba(76,184,240,0.08); border: 1px solid rgba(76,184,240,0.3);
  border-radius: var(--radius); padding: 18px 20px; text-align: center;
}
.license-item .lic-label { display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--blue); font-weight: 700; margin-bottom: 6px; }
.section--navy .license-item .lic-label { color: var(--sky); }
.license-item .lic-num { font-size: 1.15rem; font-weight: 800; color: var(--navy); letter-spacing: 0.5px; }
.section--navy .license-item .lic-num { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .license-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 28px; }
  .split--reverse .split__media { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  .nav-links {
    position: fixed; top: 76px; left: 0; right: 0; background: #fff; flex-direction: column;
    align-items: stretch; gap: 0; padding: 12px 18px 22px; box-shadow: var(--shadow-md);
    border-top: 1px solid var(--gray-200); transform: translateY(-130%);
    transition: transform var(--transition); max-height: calc(100vh - 76px); overflow-y: auto;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 12px 8px; border-radius: 0; border-bottom: 1px solid var(--gray-100); }
  .dropdown {
    position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none;
    border: none; padding: 0 0 0 14px; margin: 0;
  }
  .has-dropdown:hover .dropdown { transform: none; }
  .nav-toggle { display: flex; }
  .nav-phone { display: none; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .section { padding: 52px 0; }
  .grid--3, .grid--4, .grid--2, .trust-grid, .steps, .form-grid, .team-grid { grid-template-columns: 1fr; }
  .checklist { columns: 1; }
  .cta-band { padding: 32px 22px; }
  .sticky-call { display: block; }
  body { padding-bottom: 54px; }
  .btn { width: 100%; justify-content: center; }
  .hero .btn { width: auto; }
}
