/* ==========================================================
   CBC Communications LLC: site styles
   Colors are sampled from the CBC logo. Change them here and
   they update everywhere.
   ========================================================== */
:root {
  --navy: #0c276f;        /* logo "COMMUNICATIONS LLC" navy: text & headings */
  --navy-deep: #002774;   /* left edge of the CBC wordmark */
  --royal: #0057d3;       /* middle of the wordmark */
  --blue: #006ef0;        /* bright royal blue */
  --sky: #00abff;         /* right edge of the wordmark */
  --cyan: #28d5f3;        /* glowing fiber tips: highlights */
  --gradient: linear-gradient(90deg, var(--navy-deep) 0%, var(--royal) 55%, var(--sky) 100%);
  --btn-gradient: linear-gradient(90deg, var(--navy-deep) 0%, var(--blue) 100%);
  --text: #1c2a4a;
  --muted: #5b6785;
  --light: #f2f6fc;       /* light section background */
  --white: #ffffff;
  --radius: 10px;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--white);
}
a { color: var(--royal); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; color: var(--navy); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
img { max-width: 100%; height: auto; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.small { font-size: .9rem; }
.muted { color: var(--muted); font-size: .95rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  position: sticky; top: 0; z-index: 10;
  box-shadow: 0 2px 10px rgba(0,39,116,.08);
}
.site-header::after { content: ""; display: block; height: 3px; background: var(--gradient); }
.nav { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; padding-bottom: 10px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo img { height: 42px; width: auto; }
.logo span { color: var(--navy); font-weight: 600; font-size: .8rem; letter-spacing: 3px; text-transform: uppercase; white-space: nowrap; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; }
.site-header nav a { color: var(--navy); text-decoration: none; font-size: .95rem; font-weight: 500; }
.site-header nav a:hover { color: var(--blue); }
.site-header nav .nav-cta { color: var(--white); background: var(--btn-gradient); padding: 7px 16px; border-radius: 6px; font-weight: 600; }
.site-header nav .nav-cta:hover { color: var(--white); filter: brightness(1.1); }

/* ---------- Hero (light, so the full-color logo shows well) ---------- */
.hero {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(40,213,243,.14) 0%, rgba(40,213,243,0) 60%),
    linear-gradient(180deg, #ffffff 0%, var(--light) 100%);
  padding: 56px 0 64px;
  text-align: center;
}
.hero-logo { display: block; width: min(460px, 82vw); margin: 0 auto 18px; }
.eyebrow { text-transform: uppercase; letter-spacing: 2px; font-size: .8rem; font-weight: 700; color: var(--royal); margin-bottom: .8em; }
.eyebrow.dark { color: var(--royal); }
.tagline { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--navy); max-width: 720px; margin: 0 auto; }
.hero-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 28px 0 36px; }
.hero-facts { list-style: none; padding: 24px 0 0; margin: 0 auto; max-width: 760px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 48px; color: var(--muted); border-top: 1px solid #d9e3f3; }
.hero-facts strong { display: block; font-size: 1.15rem; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: 12px 22px; border-radius: 8px; font-weight: 700; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-size: 1rem; text-align: center; font-family: inherit; }
.btn-primary { background: var(--btn-gradient); color: var(--white); box-shadow: 0 4px 14px rgba(0,87,211,.25); }
.btn-primary:hover { filter: brightness(1.12); }
.btn-outline { border-color: var(--royal); color: var(--royal); background: var(--white); }
.btn-outline:hover { background: var(--royal); color: var(--white); }
.btn-outline-dark { border-color: var(--navy); color: var(--navy); background: var(--white); }
.btn-outline-dark:hover { background: var(--navy); color: var(--white); }
.btn-light { background: var(--white); color: var(--navy-deep); }
.btn-light:hover { background: var(--cyan); color: var(--navy-deep); }
.btn-lg { padding: 16px 28px; font-size: 1.05rem; white-space: nowrap; }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-alt { background: var(--light); }
.section-intro { color: var(--muted); max-width: 640px; margin-bottom: 32px; }
.two-col { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.card { position: relative; background: var(--white); border-radius: var(--radius); padding: 28px; box-shadow: 0 4px 18px rgba(0,39,116,.09); overflow: hidden; }
.card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--gradient); }
.highlights h3 + .checklist { margin-bottom: 20px; }

.checklist { list-style: none; padding: 0; margin: 0 0 1em; }
.checklist li { position: relative; padding-left: 28px; margin-bottom: 8px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .42em; width: 14px; height: 14px; background: linear-gradient(135deg, var(--royal), var(--sky)); clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0, 43% 62%); }

/* Services grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service .icon { font-weight: 800; font-size: 1.4rem; margin-bottom: 8px; font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block; }
.service p { color: #46536f; margin: 0; }

/* CTA band (dark navy-to-blue) */
.cta-band { background: linear-gradient(110deg, var(--navy-deep) 0%, #00399f 60%, var(--royal) 100%); color: #dbe7ff; }
.cta-band h2 { color: var(--white); }
.cta-band .eyebrow { color: var(--cyan); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.cta-inner > div { max-width: 680px; }

.quote-card { background: var(--navy-deep); color: #dbe7ff; }
.quote-card h3 { color: var(--cyan); }

/* Contact */
.contact-line span { display: inline-block; min-width: 64px; font-weight: 700; color: var(--navy); }
.contact-line a { word-break: break-all; }
.contact-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.contact-form label { display: block; font-weight: 600; font-size: .9rem; margin: 12px 0 4px; color: var(--navy); }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #c5d3ea; border-radius: 6px; font: inherit; background: var(--white); color: var(--text);
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: 2px solid var(--sky); border-color: var(--sky); }
.contact-form button { margin-top: 18px; width: 100%; }

/* Footer */
.site-footer { background: var(--navy-deep); color: #a9bce0; padding: 28px 0; text-align: center; }
.site-footer::before { content: ""; display: block; height: 3px; background: var(--gradient); margin-top: -28px; margin-bottom: 25px; }
.site-footer strong { color: var(--white); }
.site-footer p { margin: 4px 0; }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; gap: 32px; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
  .nav { flex-direction: column; align-items: flex-start; gap: 8px; }
  .site-header { position: static; }
  .site-header nav { gap: 6px 14px; }
  .site-header nav a { font-size: .9rem; }
  .hero { padding: 36px 0 44px; }
  .section { padding: 56px 0; }
  .grid { grid-template-columns: 1fr; }
  .hero-buttons .btn, .cta-inner .btn { width: 100%; }
  .btn-lg { white-space: normal; }
  .card { padding: 22px; }
}

/* ---------- About: field photo (top of sidebar) ---------- */
.about-side { display: flex; flex-direction: column; gap: 24px; }
.field-photo { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: 0 10px 28px rgba(0,39,116,.18); }
.field-photo::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--gradient); }
.field-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 62%; }
.field-photo figcaption { position: absolute; left: 12px; bottom: 14px; background: rgba(0,39,116,.85); color: var(--white); font-size: .78rem; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; padding: 4px 10px; border-radius: 4px; }

/* ---------- Called in to fix it ---------- */
.fix-grid { display: grid; grid-template-columns: 1fr 1fr 1.6fr; gap: 24px; align-items: start; }
.photo-card { margin: 0; position: relative; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: 0 8px 24px rgba(0,39,116,.14); }
.photo-card img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.fix-wide img { aspect-ratio: 4 / 3; }
.photo-card figcaption { padding: 14px 16px 16px; font-size: .92rem; color: #46536f; border-top: 4px solid transparent; border-image: var(--gradient) 1; }
.photo-card figcaption strong { color: var(--navy); }
.tag { position: absolute; top: 12px; left: 12px; color: var(--white); font-size: .75rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; padding: 4px 10px; border-radius: 4px; }
.tag-before { background: #5b6785; }
.tag-after { background: var(--btn-gradient); }
.tag-found { background: var(--navy-deep); }

/* ---------- Work gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery figure { margin: 0; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: 0 4px 18px rgba(0,39,116,.10); }
.gallery a { display: block; overflow: hidden; }
.gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .25s ease; }
.gallery img.pos-bottom { object-position: 50% 88%; }
.gallery a:hover img { transform: scale(1.04); }
.gallery figcaption { padding: 12px 14px; font-size: .9rem; color: var(--navy); font-weight: 500; border-top: 3px solid transparent; border-image: var(--gradient) 1; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0,20,60,.92); display: flex; align-items: center; justify-content: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 1100px; text-align: center; }
.lightbox img { max-width: 100%; max-height: 80vh; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lightbox figcaption { color: #dbe7ff; margin-top: 12px; font-size: .95rem; }
.lb-close { position: absolute; top: 12px; right: 18px; background: none; border: 0; color: var(--white); font-size: 2.4rem; line-height: 1; cursor: pointer; }

/* Contract band: moody jumper photo under a navy overlay */
.cta-band {
  background:
    linear-gradient(110deg, rgba(0,39,116,.94) 0%, rgba(0,45,130,.86) 55%, rgba(0,87,211,.78) 100%),
    url("assets/photos/bg-jumpers-dark.jpg") center / cover no-repeat;
}

@media (max-width: 900px) {
  .fix-grid { grid-template-columns: 1fr 1fr; }
  .fix-wide { grid-column: 1 / -1; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .fix-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .photo-card figcaption { font-size: .85rem; padding: 10px 12px 12px; }
  .gallery { grid-template-columns: 1fr; }
}

/* Wide (panorama) gallery item spans two columns */
.gallery { grid-auto-flow: row dense; }
.gallery figure.wide { grid-column: span 2; }
.gallery figure.wide img { aspect-ratio: 11 / 4; }
@media (max-width: 640px) {
  .gallery figure.wide { grid-column: auto; }
  .gallery figure.wide img { aspect-ratio: 16 / 7; }
}

/* ---------- Emergency Restoration ---------- */
.storm-intro { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; margin-bottom: 32px; }
.storm-intro .section-intro { margin: 0; font-size: 1.1rem; color: var(--text); }
.badges { display: flex; gap: 20px; }
.badges img { width: 200px; height: auto; filter: drop-shadow(0 6px 14px rgba(0,39,116,.25)); }
.storm-grid { grid-template-columns: repeat(4, 1fr); }
.storm-grid figure.lead { grid-column: span 2; grid-row: span 2; display: flex; flex-direction: column; }
.storm-grid figure.lead a { flex: 1; }
.storm-grid figure.lead img { height: 100%; aspect-ratio: auto; }
@media (max-width: 900px) {
  .storm-intro { grid-template-columns: 1fr; justify-items: start; }
  .storm-intro .badges { justify-self: center; }
  .storm-grid { grid-template-columns: repeat(2, 1fr); }
  .storm-grid figure.lead { grid-row: auto; }
  .storm-grid figure.lead img { height: auto; aspect-ratio: 4 / 3; }
}
@media (max-width: 640px) {
  .badges { gap: 14px; }
  .badges img { width: calc(50vw - 34px); max-width: 200px; }
  .storm-grid { grid-template-columns: 1fr; }
  .storm-grid figure.lead { grid-column: auto; }
}

/* ---------- Safety ---------- */
.safety-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.safety-photo { margin: 0; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: 0 4px 18px rgba(0,39,116,.10); }
.safety-photo a { display: block; }
.safety-photo img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 100%; }
.safety-photo figcaption { padding: 12px 14px; font-size: .9rem; color: var(--navy); font-weight: 500; border-top: 3px solid transparent; border-image: var(--gradient) 1; }
.safety-copy > p { font-size: 1.1rem; }
.safety-copy ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 14px; }
.safety-copy li { position: relative; padding: 14px 16px 14px 48px; background: var(--white); border-radius: var(--radius); box-shadow: 0 2px 10px rgba(0,39,116,.07); }
.safety-copy li::before { content: "✓"; position: absolute; left: 14px; top: 13px; width: 24px; height: 24px; border-radius: 50%; background: var(--btn-gradient); color: #fff; font-size: .8rem; font-weight: 700; display: grid; place-items: center; }
.safety-copy li strong { color: var(--navy); }
@media (max-width: 900px) {
  .safety-grid { grid-template-columns: 1fr; gap: 28px; }
  .safety-photo { max-width: 520px; }
}

/* Safety: paired photos */
.safety-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
.safety-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.safety-photo { display: flex; flex-direction: column; }
.safety-photo a { flex: 1; min-height: 0; }
.safety-photo img { height: 100%; aspect-ratio: auto; min-height: 320px; object-position: 50% 100%; }
.safety-copy { align-self: center; }
@media (max-width: 900px) {
  .safety-grid { grid-template-columns: 1fr; }
  .safety-photo { max-width: none; }
  .safety-photo img { height: auto; min-height: 0; aspect-ratio: 3 / 4; }
}
@media (max-width: 640px) {
  .safety-photos { gap: 12px; }
  .safety-photo figcaption { font-size: .8rem; padding: 10px; }
}
.safety-photo figcaption { min-height: calc(2 * 1.45em + 24px); line-height: 1.45; }

/* Emergency v2: lead across the top, three tiles below */
.storm-grid { grid-template-columns: repeat(3, 1fr); }
.storm-grid figure.lead { grid-column: 1 / -1; grid-row: auto; }
.storm-grid figure.lead img { height: auto; aspect-ratio: 2 / 1; object-position: 50% 60%; }
@media (max-width: 900px) { .storm-grid { grid-template-columns: repeat(3, 1fr); } .storm-grid figure.lead img { aspect-ratio: 16 / 9; } }
@media (max-width: 640px) { .storm-grid { grid-template-columns: 1fr; } .storm-grid figure.lead img { aspect-ratio: 4 / 3; } }

/* ---------- Any weather strip ---------- */
.weather-band { background: linear-gradient(110deg, var(--navy-deep) 0%, #00399f 60%, var(--royal) 100%); color: #dbe7ff; padding: 56px 0; }
.weather-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.weather-band h2 { color: #fff; margin-bottom: .4em; }
.weather-band p { font-size: 1.15rem; margin: 0; }
.weather-photos { display: grid; grid-template-columns: 1fr; gap: 16px; }
.weather-photos figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: rgba(255,255,255,.08); }
.weather-photos a { display: block; }
.weather-photos img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.weather-photos figcaption { padding: 10px 12px; font-size: .9rem; color: #fff; font-weight: 500; }
@media (max-width: 900px) { .weather-inner { grid-template-columns: 1fr; gap: 24px; } }
@media (max-width: 640px) { .weather-photos { gap: 12px; } .weather-photos figcaption { font-size: .8rem; padding: 8px 10px; } }

/* Safety v3: copy on top, three photos below */
.safety-grid { grid-template-columns: 1fr; gap: 32px; }
.safety-copy ul { grid-template-columns: 1fr 1fr; }
.safety-photos { grid-template-columns: repeat(3, 1fr); gap: 20px; }
.safety-photo img { height: auto; min-height: 0; aspect-ratio: 3 / 4; }
.safety-photo figcaption { min-height: 0; }
@media (max-width: 900px) { .safety-copy ul { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .safety-photos { grid-template-columns: 1fr; }
  .safety-photo img { aspect-ratio: 4 / 5; }
}
@media (max-width: 640px) { .safety-photo img { aspect-ratio: 1 / 1; } }
