/* KLO Roofing — shared styles
   Brand colors sampled from KLO LOGO.JPG:
   navy #1B3F7D, magenta #D71B67 */

:root {
  --navy: #1B3F7D;
  --navy-dark: #142F5E;
  --navy-light: #2A548F;
  --magenta: #D71B67;
  --magenta-dark: #B01452;
  --ink: #1F2933;
  --muted: #5A6474;
  --line: #E3E8EF;
  --bg-soft: #F5F7FA;
  --white: #FFFFFF;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(20, 47, 94, 0.10);
  --shadow-sm: 0 2px 8px rgba(20, 47, 94, 0.08);
  --maxw: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.15; color: var(--navy); margin: 0 0 0.5em; font-weight: 800; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 1rem; line-height: 1;
  padding: 15px 26px; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
  min-height: 52px; /* big tap target */
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-call { background: var(--magenta); color: #fff; box-shadow: var(--shadow-sm); }
.btn-call:hover { background: var(--magenta-dark); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-lg { font-size: 1.1rem; padding: 18px 34px; min-height: 58px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.97);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 16px; padding: 10px 20px; }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-logo { height: 54px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-nav a {
  color: var(--ink); font-weight: 600; padding: 10px 14px; border-radius: 8px; font-size: 0.98rem;
}
.site-nav a:hover { background: var(--bg-soft); color: var(--navy); text-decoration: none; }
.site-nav a.active { color: var(--magenta); }
.header-call { margin-left: 8px; }
.nav-call { display: none; } /* only shown inside mobile menu */
.nav-toggle {
  display: none; margin-left: auto; background: none; border: 0; cursor: pointer;
  width: 46px; height: 46px; padding: 10px; flex-direction: column; justify-content: space-between;
}
.nav-toggle span { display: block; height: 3px; width: 100%; background: var(--navy); border-radius: 3px; transition: .2s; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: #fff; padding: 72px 0 80px; text-align: center;
}
.hero h1 { color: #fff; max-width: 900px; margin: 0 auto 18px; }
.hero .lede { font-size: clamp(1.05rem, 2.5vw, 1.35rem); color: #DCE4F2; max-width: 720px; margin: 0 auto 32px; }
.hero .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-accent { color: #FF6FA6; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-weight: 800; font-size: .8rem; color: var(--magenta); margin-bottom: 8px; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); margin-bottom: 14px; }
.card .card-link { font-weight: 700; color: var(--magenta); }
.card-icon {
  width: 48px; height: 48px; border-radius: 12px; background: rgba(215,27,103,.10);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px; font-size: 22px;
}

/* ---------- Trust strip ---------- */
.trust { background: var(--navy); color: #fff; }
.trust .trust-inner { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; text-align: center; padding: 26px 20px; }
.trust .trust-item { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.02rem; }
.trust .trust-item span.dot { color: var(--magenta); font-size: 1.4rem; line-height: 1; }

/* ---------- Feature list ---------- */
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.feature-list li { position: relative; padding-left: 32px; font-size: 1.05rem; }
.feature-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0; color: #fff; background: var(--magenta);
  width: 22px; height: 22px; border-radius: 50%; font-size: .8rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; margin-top: 4px;
}

/* ---------- Split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.split .panel { background: var(--bg-soft); border-radius: var(--radius); padding: 34px; border: 1px solid var(--line); }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tile {
  aspect-ratio: 4 / 3; border-radius: var(--radius);
  background: repeating-linear-gradient(135deg, #EEF1F6, #EEF1F6 12px, #E7EBF2 12px, #E7EBF2 24px);
  border: 2px dashed #C3CCDA; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--navy); text-align: center; padding: 12px;
}
.tile .tile-icon { font-size: 30px; margin-bottom: 8px; opacity: .8; }
.tile .tile-label { font-weight: 800; font-size: .95rem; }
.tile .tile-sub { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-top: 4px; }

/* Real photo tiles + lightbox */
.gallery-item {
  position: relative; display: block; padding: 0; border: 0; cursor: pointer;
  border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3;
  background: #e7ebf2; box-shadow: var(--shadow-sm); width: 100%;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.gallery-item:hover img, .gallery-item:focus-visible img { transform: scale(1.06); }
.gallery-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 12px 9px;
  font-size: .8rem; font-weight: 700; color: #fff; text-align: left; line-height: 1.25;
  background: linear-gradient(transparent, rgba(15,34,71,.86));
}
.lb { position: fixed; inset: 0; background: rgba(10,18,38,.93); z-index: 1000; display: none; align-items: center; justify-content: center; padding: 20px; }
.lb.open { display: flex; }
.lb-img { max-width: 92vw; max-height: 82vh; border-radius: 10px; box-shadow: 0 12px 44px rgba(0,0,0,.55); }
.lb-cap { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #fff; font-weight: 700; font-size: 1rem; padding: 0 24px; }
.lb-close { position: absolute; top: 12px; right: 16px; width: 50px; height: 50px; background: none; border: 0; color: #fff; font-size: 2.3rem; line-height: 1; cursor: pointer; font-family: inherit; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 56px; height: 56px; border: 0; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; font-size: 1.7rem; cursor: pointer; font-family: inherit; display: flex; align-items: center; justify-content: center; }
.lb-nav:hover { background: rgba(255,255,255,.28); }
.lb-prev { left: 14px; } .lb-next { right: 14px; }
@media (max-width: 860px) { .lb-nav { width: 46px; height: 46px; font-size: 1.4rem; } .lb-prev { left: 8px; } .lb-next { right: 8px; } }

/* ---------- Contact / forms ---------- */
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: start; }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-weight: 700; margin-bottom: 6px; color: var(--navy); }
.form-field .req { color: var(--magenta); }
.form-control {
  width: 100%; padding: 14px 16px; font-size: 1rem; font-family: inherit;
  border: 1px solid #CBD3DF; border-radius: 10px; background: #fff; color: var(--ink); min-height: 52px;
}
textarea.form-control { min-height: 130px; resize: vertical; }
.form-control:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(27,63,125,.15); }
/* Honeypot — hidden from humans, present for bots */
.hp-field { position: absolute; left: -9999px; top: -9999px; height: 0; width: 0; overflow: hidden; }
.form-note { color: var(--muted); font-size: .9rem; }
.form-status { margin-top: 14px; padding: 14px 16px; border-radius: 10px; font-weight: 600; display: none; }
.form-status.show { display: block; }
.form-status.info { background: rgba(215,27,103,.08); color: var(--magenta-dark); border: 1px solid rgba(215,27,103,.3); }

.contact-aside { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.phone-block { display: flex; flex-direction: column; gap: 4px; margin-bottom: 22px; }
.phone-block .phone-label { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.phone-block a { font-size: 1.6rem; font-weight: 800; color: var(--navy); }
.phone-block a:hover { color: var(--magenta); text-decoration: none; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(135deg, var(--magenta) 0%, var(--magenta-dark) 100%); color: #fff; text-align: center; padding: 56px 0; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #FCE1EC; font-size: 1.1rem; max-width: 620px; margin: 0 auto 26px; }
.cta-band .btn-navy { background: #fff; color: var(--navy); }
.cta-band .btn-navy:hover { background: var(--navy-dark); color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: #C9D3E6; padding: 48px 0 0; margin-top: 0; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding-bottom: 34px; }
.footer-name { font-size: 1.4rem; font-weight: 800; color: #fff; margin-bottom: 8px; }
.footer-inner p { color: #A9B6D0; max-width: 340px; }
.footer-col h3 { color: #fff; font-size: .9rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; }
.footer-col a { display: block; color: #DCE4F2; font-weight: 700; font-size: 1.05rem; margin-bottom: 4px; }
.footer-col a:hover { color: #fff; }
.footer-col .sub { color: #A9B6D0; font-size: .85rem; margin-bottom: 12px; }
.footer-cred { color: #DCE4F2; margin-bottom: 6px; font-weight: 600; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; text-align: center; font-size: .88rem; color: #94A3C4; }
.footer-bottom a { color: #94A3C4; text-decoration: underline; }
.footer-bottom a:hover { color: #fff; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.lead { font-size: 1.15rem; color: var(--muted); }

/* Digital business card styles now live in card.css (scoped .pc-* namespace). */

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px 16px; gap: 2px;
    margin-left: 0; display: none; box-shadow: var(--shadow);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 14px; font-size: 1.05rem; border-bottom: 1px solid var(--bg-soft); }
  .header-call { display: none; }
  .site-nav .nav-call { display: inline-flex; margin-top: 10px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 24px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .hero { padding: 56px 0 60px; }
  .section { padding: 48px 0; }
}
@media (max-width: 420px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .hero .cta-row .btn { width: 100%; }
}

/* ============================================================
   Design polish pass — guided by UI/UX Pro Max skill
   (variance 3 / motion 3 / density 4: established, trustworthy,
   restrained). Brand colors are fixed; no framework/library.
   ============================================================ */

/* Gallery section labels (Residential Shingle / Metal / Commercial Flat / In Progress) */
.gallery-section { margin-bottom: 44px; }
.gallery-section:last-child { margin-bottom: 0; }
.gallery-section-title {
  display: flex; align-items: center; gap: 12px;
  font-size: 1rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em;
  color: var(--navy); margin: 0 0 20px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.gallery-section-title::before { content: ""; width: 26px; height: 4px; border-radius: 2px; background: var(--magenta); flex: 0 0 auto; }

/* Typography rhythm — consistent hierarchy & readable measure */
h1 { letter-spacing: -0.02em; }
h2 { letter-spacing: -0.015em; }
.section-head h2 { margin-bottom: 10px; }
.lede, .lead { text-wrap: pretty; }
p { text-wrap: pretty; }

/* Card interactivity — subtle lift on hover/focus (150–300ms) */
.card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #D4DCE8; }
.card .card-link { transition: color .15s ease; }

/* Buttons — smoother, consistent motion (respect brand fill) */
.btn { transition: transform .08s ease, background .18s ease, box-shadow .18s ease, color .18s ease; }
.pc-action .pc-ic, .pc-work, .pc-share, .pc-qrbtn { transition: transform .1s ease, background .18s ease, color .18s ease, box-shadow .18s ease; }

/* Accessibility — visible keyboard focus everywhere (brand ring) */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.gallery-item:focus-visible,
.pc-action:focus-visible,
.pc-share:focus-visible,
.pc-qrbtn:focus-visible,
.pc-work:focus-visible,
.nav-toggle:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--magenta);
  outline-offset: 2px;
  border-radius: 6px;
}
.gallery-item:focus-visible { outline-offset: 3px; }
/* Keep the inner icon highlight aligned with keyboard focus */
.pc-action:focus-visible .pc-ic { background: var(--magenta); }

/* Touch targets — ensure footer/inline links are comfortably tappable */
.footer-col a { padding: 2px 0; min-height: 24px; }
@media (max-width: 860px) {
  .footer-col a { padding: 6px 0; }
}

/* ---------- Motion: subtle scroll reveal (opt-in, reduced-motion safe) ----------
   JS adds .reveal only to below-the-fold targets, then .is-visible on enter.
   Above-the-fold content is never touched (no flash), and users who prefer
   reduced motion — or have JS off — always see everything. */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; will-change: opacity, transform; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}
