/* Fiberglass Unlimited Inc. — site styles
   Colors and type follow the original WordPress theme (Rubik; red #bf1e2e; navy #020d26 / #06163a). */

@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/rubik-latin.woff2") format("woff2");
}

:root {
  --red: #bf1e2e;
  --red-dark: #a31926;
  --navy: #020d26;
  --navy-2: #06163a;
  --text: #45545e;
  --line: #ededed;
  --gray-bg: #f1f1f1;
  --container: 1280px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 80px;
  --shadow-card: 0 20px 50px rgba(2, 13, 38, 0.08);
  --shadow-red: 0 10px 24px rgba(191, 30, 46, 0.28);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: #fff;
}
img { max-width: 100%; height: auto; display: block; }
picture { display: contents; } /* lets the <img> inside size/position itself as if <picture> weren't there */
picture > source { display: none; } /* otherwise <source> becomes an empty grid/flex item */
[hidden] { display: none !important; }
a { color: var(--navy-2); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--red); }
h1, h2, h3, h4 { color: var(--navy); font-weight: 500; line-height: 1.2; margin: 0 0 0.6em; }
p { margin: 0 0 1.1em; }
ul { margin: 0 0 1.1em; padding-left: 1.25em; }
li { margin: 0 0 0.15em; }
strong { color: #2c3b45; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.container {
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 16px;
}
.skip-link:focus { left: 8px; top: 8px; color: #fff; }
.icon {
  width: 1em; height: 1em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Top bar ---------- */
.topbar { background: var(--navy); color: #fff; font-size: 14.3px; line-height: 1.4; }
.topbar .container {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px clamp(28px, 6.8vw, 95px);
  min-height: 47px; padding-top: 8px; padding-bottom: 8px;
}
.topbar a, .topbar span { color: #fff; display: inline-flex; align-items: center; gap: 11px; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar .icon { width: 16px; height: 16px; opacity: 0.85; }

/* ---------- Header ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.site-header .container { display: flex; align-items: stretch; min-height: var(--header-h); }
.brand { display: flex; align-items: center; padding-right: 28px; border-right: 1px solid var(--line); }
.brand img { width: 90px; }
.main-nav { flex: 1; display: flex; justify-content: center; }
.main-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(12px, 3.7vw, 52px); }
.main-nav li { margin: 0; }
.main-nav > ul > li { position: relative; display: flex; }
.main-nav > ul > li > a {
  position: relative; display: flex; align-items: center;
  padding: 0 12px; font-size: 18px; letter-spacing: 0.02em; color: var(--navy);
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li > a[aria-current="page"],
.main-nav > ul > li.is-active > a { color: var(--red); }
.main-nav > ul > li > a[aria-current="page"]::after,
.main-nav > ul > li.is-active > a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 4px; background: var(--red);
}
.submenu {
  list-style: none; margin: 0; padding: 10px 0;
  position: absolute; top: 100%; left: 0; min-width: 280px;
  background: #fff; border-top: 3px solid var(--red);
  box-shadow: 0 18px 40px rgba(2, 13, 38, 0.12);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
}
.has-sub:hover .submenu, .has-sub:focus-within .submenu { opacity: 1; visibility: visible; transform: none; }
/* Escape hides the open dropdown (WCAG 1.4.13); set by src/site.ts */
@media (min-width: 901px) { .has-sub.is-dismissed .submenu { opacity: 0; visibility: hidden; } }
.submenu a { display: block; padding: 9px 24px; font-size: 15px; color: var(--navy); line-height: 1.4; }
.submenu a:hover, .submenu a[aria-current="page"] { color: var(--red); background: #fafafa; }
.header-cta {
  display: flex; align-items: center; margin-left: 12px; padding: 0 31px;
  background: var(--red); color: #fff; font-size: 16px; box-shadow: var(--shadow-red);
  /* run 1px past the header's bottom border so the red meets the photo with no light line */
  margin-bottom: -1px; position: relative; z-index: 1;
}
.header-cta:hover { background: var(--red-dark); color: #fff; }
.nav-toggle {
  display: none; align-items: center; justify-content: center; align-self: center;
  width: 48px; height: 48px; margin-left: auto; padding: 0;
  background: none; border: 0; color: var(--navy); cursor: pointer;
}
.nav-toggle .icon { width: 28px; height: 28px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 900px) {
  :root { --header-h: 70px; }
  .brand { border-right: 0; padding-right: 0; }
  .brand img { width: 76px; }
  .nav-toggle { display: flex; }
  .main-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-top: 1px solid var(--line); box-shadow: 0 24px 40px rgba(2, 13, 38, 0.14);
  }
  .main-nav.open { display: block; }
  .main-nav > ul { flex-direction: column; gap: 0; padding: 8px 0 14px; }
  .main-nav > ul > li { display: block; }
  .main-nav > ul > li > a { padding: 11px var(--gutter); font-size: 17px; }
  .main-nav > ul > li > a::after { display: none; }
  /* current page: a red bar and heavier text, not just color */
  .main-nav > ul > li > a[aria-current="page"], .submenu a[aria-current="page"] {
    font-weight: 500; box-shadow: inset 4px 0 0 var(--red);
  }
  .submenu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; padding: 0; min-width: 0;
  }
  .submenu a { padding: 8px var(--gutter) 8px calc(var(--gutter) + 18px); font-size: 16px; }
  .header-cta { margin-left: 8px; padding: 0 18px; font-size: 14px; }
}
@media (max-width: 640px) {
  .topbar .container { gap: 4px 20px; min-height: 0; }
  .topbar .topbar-email { display: none; }
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--red); color: #fff; padding: 14px 26px; font-size: 15px; line-height: 1.2;
  box-shadow: var(--shadow-red); transition: background 0.2s;
}
.btn:hover { background: var(--red-dark); color: #fff; }
.btn .icon { width: 20px; height: 20px; stroke-width: 1.5; }
.btn-light {
  display: inline-block; background: #fff; color: var(--red);
  padding: 15px 34px; font-size: 14px; font-weight: 500; letter-spacing: 0.12em; line-height: 1.2;
}
.btn-light:hover { background: var(--red); color: #fff; }
.read-more { color: var(--red); }
.read-more:hover { color: var(--navy); }

/* ---------- Home slider ---------- */
.hero-slider { position: relative; height: clamp(480px, 42vw, 610px); overflow: hidden; background: var(--navy); }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; }
.slide.is-active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-slider::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  /* dark enough on the left for white text to stay readable over any photo (WCAG 1.4.3) */
  background: linear-gradient(90deg, rgba(2, 13, 38, 0.78) 0%, rgba(2, 13, 38, 0.62) 50%, rgba(2, 13, 38, 0.2) 100%);
}
@media (max-width: 768px) { .hero-slider::after { background: rgba(2, 13, 38, 0.62); } }
.hero-copy {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; padding-bottom: clamp(70px, 9vw, 120px);
}
.hero-copy .container { width: 100%; }
.hero-copy h1 {
  color: #fff; font-weight: 500; font-size: clamp(42px, 5vw, 72px); line-height: 1.02;
  letter-spacing: -0.01em; margin: 0 0 16px;
}
.hero-copy h1 span { display: block; }
.hero-copy p {
  color: #fff; font-weight: 300; font-size: clamp(18px, 1.6vw, 23px); line-height: 1.35;
  max-width: 520px; margin: 0 0 30px;
}
/* Slider controls (previous / pause-play / next), grouped in the top-right of the photo and lined up
   with the content's right edge (under the Contact Us button), so they never cover the slider text.
   Each white icon sits on a soft, edgeless dark glow that keeps it at 3:1+ against bright photos
   (WCAG 1.4.11) without looking like a button badge. */
.slider-controls {
  position: absolute; z-index: 3; top: 20px;
  right: calc(max(var(--gutter), (100% - var(--container)) / 2) - 11px);
  display: flex; gap: 2px;
}
.slider-arrow, .slider-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; color: #fff; cursor: pointer;
  background: radial-gradient(circle closest-side, rgba(2, 13, 38, 0.75) 0%, rgba(2, 13, 38, 0.6) 50%, rgba(2, 13, 38, 0) 100%);
}
.slider-arrow .icon, .slider-toggle .icon { opacity: 0.9; transition: opacity 0.2s; }
.slider-arrow:hover .icon, .slider-arrow:focus-visible .icon,
.slider-toggle:hover .icon, .slider-toggle:focus-visible .icon { opacity: 1; }
.slider-arrow .icon { width: 22px; height: 22px; stroke-width: 2; }
.slider-toggle .icon { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.slider-toggle .icon-play { display: none; }
.slider-toggle.is-paused .icon-pause { display: none; }
.slider-toggle.is-paused .icon-play { display: block; }
/* two-tone focus ring that shows on both light and dark parts of the photos */
.hero-slider :focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 3px var(--navy); }
@media (prefers-reduced-motion: reduce) { .slide { transition: none; } .slider-toggle { display: none; } }

/* ---------- Inner page banner ---------- */
.page-hero {
  position: relative; overflow: hidden; background: var(--navy);
  height: clamp(300px, 40vw, 580px);
  display: flex; align-items: center; justify-content: center;
}
.page-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: rgba(2, 13, 38, 0.4); }
.page-hero h1 {
  position: relative; z-index: 1; margin: 0; padding: 0 var(--gutter);
  color: #fff; font-weight: 700; font-size: clamp(36px, 4.3vw, 60px); text-align: center;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.25);
}
.page-hero.has-cards { height: clamp(380px, 41vw, 580px); }
.page-hero.has-cards h1 { margin-bottom: clamp(60px, 7vw, 110px); }

/* ---------- Service cards ---------- */
.service-cards {
  position: relative; z-index: 5; margin-top: -80px; margin-bottom: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fff; box-shadow: var(--shadow-card);
}
.service-cards.overlap-more { margin-top: -100px; }
.service-card { padding: 56px 50px 58px; border-right: 1px solid var(--line); }
.service-card:last-child { border-right: 0; }
.service-card h2 { font-size: clamp(21px, 1.8vw, 26px); line-height: 1.2; margin: 0 0 22px; }
.service-card h2 a { color: var(--navy); }
.service-card h2 a:hover { color: var(--red); }
.service-card p { margin: 0 0 16px; }
.cards-section { padding-bottom: clamp(40px, 4vw, 40px); }
@media (max-width: 1000px) {
  .service-cards { grid-template-columns: repeat(2, 1fr); }
  .service-card { border-bottom: 1px solid var(--line); }
  .service-card:nth-child(2n) { border-right: 0; }
  .service-card:nth-last-child(-n + 2) { border-bottom: 0; }
}
@media (max-width: 600px) {
  .service-cards { grid-template-columns: 1fr; }
  .service-card { border-right: 0; border-bottom: 1px solid var(--line); padding: 30px 26px 32px; }
  .service-card:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .service-card:last-child { border-bottom: 0; }
  .service-card h2 { margin-bottom: 12px; }
}

/* ---------- Home: history ---------- */
.history { padding: clamp(56px, 7vw, 54px) 0 clamp(70px, 9vw, 160px); }
.history .container { display: grid; grid-template-columns: 0.72fr 1fr; gap: clamp(32px, 6.5vw, 92px); align-items: center; }
.history h2 { font-size: clamp(30px, 3vw, 40px); line-height: 1.15; font-weight: 300; margin-bottom: 26px; }
.history h2 strong { display: block; font-weight: 700; color: var(--navy); }
.history .btn { margin-top: 10px; }
.history img { width: 100%; aspect-ratio: 8 / 7; object-fit: cover; } /* old site showed the truck photo as a taller crop */
@media (max-width: 860px) {
  .history .container { grid-template-columns: 1fr; }
}

/* ---------- Content pages ---------- */
.intro { padding: clamp(36px, 4vw, 44px) 0 clamp(16px, 3vw, 30px); }
.content { padding: clamp(28px, 3vw, 32px) 0 clamp(48px, 6vw, 24px); }
.content .lead-strong { font-weight: 700; color: #2c3b45; margin-top: 4px; }
.two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 50px);
  align-items: start; margin-top: 28px;
}
.two-col figure { margin: 0; }
.two-col .narrow { max-width: 500px; margin: 0 auto; }
.list-2col { columns: 2; column-gap: 60px; margin: 46px 0 30px; }
.list-2col li { break-inside: avoid; }
.half { max-width: 50%; }
.content-end { padding-bottom: clamp(48px, 6vw, 24px); }
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
  .half { max-width: 100%; }
}
@media (max-width: 520px) { .list-2col { columns: 1; } }

/* ---------- Company: photo / text panels ----------
   Same breakpoints as the original page builder: 4 across above 992px, 2 across down to 769px,
   stacked below that. Photos are the old site's square crops, filled into each panel.
   The HTML lists each photo right before its text (what phones show and screen readers read);
   wider layouts rearrange them visually to match the original site. */
.panels { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(450px, auto); }
.panel-photo { position: relative; background: var(--gray-bg); }
.panel-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.panel-copy { padding: clamp(32px, 3.4vw, 50px) clamp(20px, 2.4vw, 40px) clamp(32px, 3vw, 44px); }
.panel-copy h2 { font-size: 26px; margin-bottom: 14px; }
.panel-copy p, .panel-copy li { font-size: 15px; line-height: 1.65; }
/* desktop second row: text | photo | text | photo */
.p-leadership { order: 5; } .p-leadership-photo { order: 6; }
.p-values { order: 7; } .p-values-photo { order: 8; }
@media (max-width: 992px) {
  .panels { grid-template-columns: 1fr 1fr; }
  /* zigzag: photo | text, then text | photo */
  .p-history-photo { order: 1; } .p-history { order: 2; }
  .p-industries { order: 3; } .p-industries-photo { order: 4; }
  .p-leadership-photo { order: 5; } .p-leadership { order: 6; }
  .p-values { order: 7; } .p-values-photo { order: 8; }
}
@media (max-width: 768px) {
  .panels { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .panels > * { order: 0; } /* stacked: plain HTML order, each photo above its text */
  .panel-photo { aspect-ratio: 16 / 10; }
}

/* ---------- Contact ---------- */
.map iframe { display: block; width: 100%; height: clamp(300px, 31vw, 450px); border: 0; }
.contact-block { padding: clamp(40px, 5vw, 60px) 0 clamp(48px, 5vw, 60px); }
.contact-block .container { padding-left: calc(var(--gutter) + clamp(0px, 3vw, 46px)); }
.contact-block h1 { font-size: clamp(34px, 3.6vw, 48px); font-weight: 700; margin: 0 0 34px; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; }
.contact-list li { display: flex; align-items: center; gap: 22px; margin: 0; color: var(--navy); line-height: 1.45; }
.contact-list a { color: var(--navy); }
/* long email addresses may wrap instead of forcing sideways scrolling on narrow screens (WCAG 1.4.10) */
.contact-list a, .footer-contact a { overflow-wrap: anywhere; }
.contact-list a:hover { color: var(--red); }
.contact-list strong { display: block; color: var(--navy); }
.tile { display: grid; place-items: center; flex: none; width: 46px; height: 46px; background: var(--red); color: #fff; }
.tile .icon { width: 22px; height: 22px; }

/* ---------- 404 ---------- */
.not-found { padding: clamp(60px, 10vw, 120px) 0; text-align: center; }
.not-found h1 { font-size: clamp(34px, 4vw, 52px); font-weight: 700; }
.not-found ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--gray-bg); padding: 46px 0 40px; font-size: 15px; line-height: 1.7; }
.site-footer .container { display: grid; grid-template-columns: 1.2fr 1fr 0.75fr; gap: 32px 48px; align-items: start; }
.footer-title { font-size: 17px; margin: 0 0 16px; }
.footer-about { display: flex; gap: 18px; align-items: flex-start; }
.footer-about img { width: 88px; flex: none; margin-top: 4px; }
.footer-about p { margin: 0; }
.footer-contact p { margin: 0 0 8px; }
.footer-contact a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.footer-contact a:hover { color: var(--red); }
.footer-cta { padding-top: 2px; }
.copyright { background: var(--navy-2); color: #fff; font-size: 14px; line-height: 1.5; padding: 24px 0; }
@media (max-width: 860px) {
  .site-footer .container { grid-template-columns: 1fr; }
}

/* utility */
.nowrap { white-space: nowrap; }
