:root {
  --navy: #173460;
  --navy-deep: #102544;
  --title: #003584;
  --blue: #0096ff;
  --ink: #1c2836;
  --muted: #5c6b7c;
  --line: #d7e0ea;
  --paper: #f3f6fa;
  --card: #ffffff;
  --shadow: 0 10px 28px rgba(23, 52, 96, 0.08);
  --header: 112px;
  font-family: "Open Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background: #fff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--title); }
h1, h2, h3, h4, .brand, .btn, .site-nav, .kicker, .stat strong {
  font-family: Roboto, "Open Sans", sans-serif;
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: #fff;
  color: var(--navy);
  padding: 8px 12px;
  z-index: 90;
}
.skip:focus { top: 12px; }

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}
.topbar {
  max-width: 1240px;
  margin: 0 auto;
  padding: 10px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand img {
  height: 46px;
  width: auto;
  max-width: min(240px, 52vw);
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.phone {
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.phone:hover { color: var(--title); }
.social {
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
  font-size: 14px;
}
.preview-tag {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.nav-toggle {
  display: none;
  border: 2px solid var(--navy);
  background: #fff;
  color: var(--navy);
  border-radius: 10px;
  min-height: 44px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}
.nav-toggle:focus-visible,
.site-nav button:focus-visible,
.site-nav a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.site-nav {
  max-width: 1240px;
  margin: 0 auto;
  padding: 6px 12px 10px;
}
.nav-contact { display: none; }
.site-nav > ul {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
.site-nav li { position: relative; }
.site-nav a,
.site-nav button.nav-parent {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  color: var(--navy);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}
.site-nav a:hover,
.site-nav button.nav-parent:hover { background: var(--paper); }
.site-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 8px;
  z-index: 50;
  list-style: none;
  margin: 0;
}
.site-nav .sub-menu .sub-menu {
  top: 0;
  left: calc(100% - 8px);
}
.site-nav li:hover > .sub-menu,
.site-nav li:focus-within > .sub-menu,
.site-nav li.is-open > .sub-menu { display: block; }
.site-nav .sub-menu a,
.site-nav .sub-menu button.nav-parent { width: 100%; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 12px 16px;
  min-height: 48px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  line-height: 1.2;
  text-align: center;
}
.btn-navy { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-navy:hover { background: var(--navy-deep); border-color: var(--navy-deep); color: #fff; }
.btn-outline { background: #fff; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-light { background: #fff; color: var(--navy); border-color: #fff; }
.btn-light:hover { background: var(--paper); color: var(--navy-deep); }
.btn-ghost { background: transparent; color: #fff; border-color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--navy); }
.btn-text {
  background: transparent;
  color: var(--navy);
  border-color: transparent;
  min-height: 40px;
  padding: 6px 4px;
}

.section { scroll-margin-top: 12px; }
.section {
  padding: 56px 20px;
}
.section-inner { max-width: 1240px; margin: 0 auto; }
.section h2 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.section .intro {
  margin: 0 0 22px;
  max-width: 48em;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
}
.kicker {
  margin: 0 0 8px;
  color: var(--title);
  font-weight: 700;
  font-size: 14px;
}
.paper { background: var(--paper); }
.band {
  background: var(--navy-deep) center/cover no-repeat;
  color: #fff;
}
.band h2, .band .kicker, .band .intro { color: #fff; }
.band .intro { max-width: 40em; }

.checks { margin: 0; padding: 0; list-style: none; }
.checks li {
  position: relative;
  padding: 8px 0 8px 22px;
  border-bottom: 1px solid var(--line);
  line-height: 1.4;
}
.checks li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--navy);
  position: absolute;
  left: 0;
  top: 0.85em;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.site-footer {
  background: var(--navy-deep);
  color: #e8eef5;
  padding: 28px 20px 36px;
}
.site-footer .section-inner { display: grid; gap: 8px; }
.site-footer a { color: #fff; }
.site-footer p { margin: 0; line-height: 1.45; }

.quote-dialog {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(16, 37, 68, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.quote-dialog[hidden] { display: none; }
.quote-panel {
  background: #fff;
  width: min(480px, 100%);
  max-height: min(88vh, 760px);
  overflow: auto;
  border-radius: 16px;
  padding: 16px;
}
.quote-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.quote-panel h2 { margin: 0; color: var(--navy); font-size: 20px; }
.quote-note { margin: 8px 0 12px; color: var(--muted); font-size: 14px; line-height: 1.4; }
#quote-body .form_page { margin-bottom: 8px; }
#quote-body .hidden { display: none; }
#quote-body label { display: block; font-weight: 700; margin: 10px 0 4px; color: var(--navy); }
#quote-body select, #quote-body input, #quote-body textarea {
  width: 100%;
  border: 1px solid #c5d0dc;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}
#quote-body a { font-weight: 700; }
body.nav-open, body.sheet-open { overflow: hidden; }


/* ---------- About preview ---------- */
.about-hero {
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 100%);
  color: #fff;
  padding: 48px 20px 52px;
}
.about-hero-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 36px;
  align-items: center;
}
.about-hero .kicker { color: #9fd3ff; }
.about-hero h1 {
  margin: 0 0 14px;
  color: #fff;
  font-size: clamp(32px, 3.6vw, 50px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 900;
}
.about-hero .lede { margin: 0 0 12px; font-size: 18px; line-height: 1.5; max-width: 34em; }
.about-hero .lede-sub { margin: 0; font-size: 16px; line-height: 1.5; color: #d6e2f0; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.about-hero-media { margin: 0; }
.about-hero-media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  background: #22406e;
}
.about-hero-media figcaption,
figure figcaption,
.caption {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.35;
}
.about-hero-media figcaption { color: #c9d7e8; }

.card-grid { display: grid; gap: 16px; }
.card-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card, .panel, .flow li, .link-card, .feature-card, .type-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.card { padding: 20px 18px 14px; }
.card h3, .panel h3, .flow h3 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 20px;
  line-height: 1.25;
}
.card p, .panel p, .flow p { margin: 0 0 10px; line-height: 1.55; }
.card-num {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  font-family: Roboto, sans-serif;
  margin-bottom: 10px;
}
.split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
  margin-top: 18px;
}
.panel { padding: 22px 20px; }
.panel-navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.panel-navy h3 { color: #fff; }
.note { margin: 12px 0 0; font-weight: 700; color: var(--navy); }
.checks.compact li { font-size: 15px; padding: 7px 0 7px 20px; }
.checks li:last-child { border-bottom: 0; }

.flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  counter-reset: flow;
}
.flow li { padding: 18px 16px 8px; counter-increment: flow; border-top: 4px solid var(--blue); }
.flow li::before {
  content: counter(flow);
  display: block;
  font-family: Roboto, sans-serif;
  font-weight: 800;
  color: var(--blue);
  font-size: 14px;
  margin-bottom: 4px;
}
.flow h3 { font-size: 17px; }
.flow p { font-size: 15px; }

.steel-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.photo-stack { display: grid; gap: 14px; }
.photo-stack figure { margin: 0; }
.photo-stack img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 14px; background: #e6eef6; }

.feature-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  margin-bottom: 16px;
  border-color: var(--navy);
}
.feature-card img { width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: #e6eef6; }
.feature-copy { padding: 26px 24px; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.feature-copy h3 { margin: 0; color: var(--navy); font-size: clamp(24px, 2.4vw, 32px); }
.feature-copy p { margin: 0; line-height: 1.55; font-size: 17px; }
.link-arrow { font-weight: 700; color: var(--title); font-family: Roboto, sans-serif; }
.link-arrow::after { content: " \2192"; }
.feature-card:hover { box-shadow: 0 14px 34px rgba(23, 52, 96, 0.16); }

.type-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.type-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  color: var(--navy);
}
.type-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: #e6eef6; }
.type-card strong { padding: 12px 14px 0; font-family: Roboto, sans-serif; font-size: 18px; line-height: 1.3; }
.type-card .caption { padding: 0 14px 14px; margin-top: 4px; }
.type-card:hover { border-color: var(--navy); }
.more-links { margin: 18px 0 0; line-height: 1.8; }
.more-links a { font-weight: 700; }

.step-list { margin: 0 0 22px; padding-left: 1.4em; max-width: 52em; }
.step-list li { padding: 6px 0; line-height: 1.5; font-size: 16px; }
.step-list strong { color: var(--navy); }
.link-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.link-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; text-decoration: none; color: var(--ink); border-left: 4px solid var(--blue); }
.link-card strong { color: var(--navy); font-family: Roboto, sans-serif; font-size: 18px; }
.link-card strong::after { content: " \2192"; }
.link-card span { color: var(--muted); font-size: 15px; line-height: 1.4; }
.link-card:hover { border-color: var(--navy); }

.closing { text-align: center; }
.closing .intro { margin-left: auto; margin-right: auto; }
.closing .cta-row { justify-content: center; }
.closing .call { margin: 14px 0 0; color: #d6e2f0; }
.closing .call a { color: #fff; font-weight: 700; }

@media (max-width: 1100px) {
  .about-hero-inner { grid-template-columns: 1fr; }
  .about-hero-media { max-width: 760px; }
  .flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steel-layout { grid-template-columns: 1fr; }
  .photo-stack { grid-template-columns: 1fr 1fr; }
  .type-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  :root { --header: 64px; }
  .topbar { padding: 8px 12px; }
  .brand img { height: 36px; }
  .preview-tag, .social { display: none; }
  .nav-toggle { display: inline-flex; }
  .top-actions .js-quote { display: none; }
  .nav-contact { display: block; padding: 8px 0 12px; }
  .site-nav {
    display: none;
    max-height: calc(100dvh - var(--header));
    overflow: auto;
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 8px 12px 20px;
  }
  .site-nav.is-open { display: block; }
  .site-nav > ul { flex-direction: column; align-items: stretch; }
  .site-nav .sub-menu,
  .site-nav li:hover > .sub-menu,
  .site-nav li:focus-within > .sub-menu {
    display: none;
    position: static;
    box-shadow: none;
    border: 0;
    padding: 0 0 0 12px;
    min-width: 0;
  }
  .site-nav li.is-open > .sub-menu { display: block; }
  .about-hero { padding: 28px 16px 32px; }
  .about-hero h1 { font-size: 32px; }
  .about-hero .lede { font-size: 17px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .section { padding: 36px 16px; }
  .card-grid.three, .card-grid.two, .split, .flow, .photo-stack, .type-grid, .link-cards, .feature-card { grid-template-columns: 1fr; }
  .feature-copy { padding: 18px 16px 20px; }
  .closing .cta-row .btn { width: 100%; }
  .quote-dialog { align-items: flex-end; padding: 0; }
  .quote-panel { border-radius: 16px 16px 0 0; max-height: 88vh; }
}


/* ---------- Gable roof preview ---------- */
.use-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.use-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 20px 18px; text-decoration: none; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--blue);
  border-radius: 16px; box-shadow: var(--shadow);
}
.use-card h3 { margin: 0; color: var(--navy); font-size: 19px; line-height: 1.25; }
.use-card p { margin: 0; line-height: 1.5; font-size: 15px; flex: 1; }
.use-card:hover { border-color: var(--navy); }
.kit-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kit-card {
  display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: var(--navy);
  background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
}
.kit-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: #e6eef6; }
.kit-label {
  align-self: flex-start; margin: 12px 14px 0; padding: 3px 8px; border-radius: 999px;
  background: var(--paper); color: var(--title); font-size: 12px; font-weight: 700; font-family: Roboto, sans-serif;
}
.kit-card strong { padding: 8px 14px 0; font-family: Roboto, sans-serif; font-size: 17px; line-height: 1.3; }
.kit-meta { padding: 6px 14px 14px; color: var(--ink); font-size: 14px; line-height: 1.4; }
.kit-card .caption { padding: 0 14px 14px; margin-top: auto; padding-top: 8px; }
.kit-card:hover { border-color: var(--navy); box-shadow: 0 14px 34px rgba(23, 52, 96, 0.16); }
.card-grid.three + .split { margin-top: 22px; }
#kits, #uses, #gallery { scroll-margin-top: 120px; }
@media (max-width: 860px) { #kits, #uses, #gallery { scroll-margin-top: 72px; } }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.gallery figure { margin: 0; }
.gallery figure.wide { grid-column: 1 / -1; }
.gallery a { display: block; border-radius: 14px; overflow: hidden; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #e6eef6; transition: transform 0.2s; }
.gallery figure.wide img { aspect-ratio: 21 / 9; }
.gallery a:hover img { transform: scale(1.02); }
.next-links { margin: 14px 0 0; line-height: 1.8; }
.next-links a { color: #fff; font-weight: 700; }
.lightbox {
  position: fixed; inset: 0; z-index: 85; background: rgba(10, 22, 40, 0.9);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.lightbox[hidden] { display: none; }
.lightbox-panel { max-width: min(1200px, 100%); max-height: 100%; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.lightbox-panel img { max-width: 100%; max-height: calc(100dvh - 140px); width: auto; border-radius: 10px; }
.lightbox-panel p { margin: 0; align-self: flex-start; color: #e8eef5; font-size: 14px; }
@media (max-width: 1100px) {
  .use-grid, .kit-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .use-grid, .kit-grid, .gallery { grid-template-columns: 1fr; }
  .kit-card { display: grid; grid-template-columns: 132px minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; column-gap: 0; }
  .kit-card img { grid-row: 1 / span 4; height: 100%; aspect-ratio: auto; min-height: 120px; }
  .kit-label { margin: 10px 12px 0; }
  .kit-card strong { padding: 6px 12px 0; font-size: 16px; }
  .kit-meta { padding: 4px 12px 10px; font-size: 13px; }
  .kit-card .caption { padding: 4px 12px 10px; font-size: 12px; }
  #design .card-grid.three { grid-template-columns: 1fr 1fr; gap: 10px; }
  #design .card { padding: 14px 12px 6px; }
  #design .card h3 { font-size: 16px; }
  #design .card p { font-size: 14px; }
  .gallery figure.wide img { aspect-ratio: 4 / 3; }
}


/* ---------- Modern Leanto preview: compact mobile hero ---------- */
@media (max-width: 860px) {
  .leanto-hero { padding: 20px 16px 24px; }
  .leanto-hero h1 { font-size: 30px; margin-bottom: 10px; }
  .leanto-hero .lede { font-size: 16px; margin-bottom: 8px; }
  .leanto-hero .lede-sub { font-size: 15px; }
  .leanto-hero .hero-actions { margin-top: 14px; }
  .leanto-hero .about-hero-inner { gap: 16px; }
  .leanto-hero .about-hero-media img { aspect-ratio: 16 / 7; }
  .leanto-hero .about-hero-media figcaption { margin-top: 6px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Header: "Steel building kits" is a link with its own submenu toggle
   (same rules as steel-building-kits/styles.css, t97u). */
.site-nav .nav-split {
  display: flex;
  align-items: center;
}
.site-nav .nav-split > .nav-split-link {
  padding-right: 4px;
}
.site-nav .nav-split > button.nav-split-toggle {
  padding: 8px 6px;
  font-size: 12px;
  line-height: 1;
}
.site-nav .nav-split > .sub-menu { top: 100%; }

@media (max-width: 860px) {
  .site-nav .nav-split { flex-wrap: wrap; }
  .site-nav .nav-split > .nav-split-link { flex: 1 1 auto; }
  .site-nav .nav-split > button.nav-split-toggle {
    min-width: 44px;
    min-height: 40px;
    justify-content: center;
    border: 1px solid var(--line);
  }
  .site-nav .nav-split > .sub-menu { flex: 1 0 100%; }
  .site-nav .nav-split.is-open > button.nav-split-toggle span { display: inline-block; transform: rotate(180deg); }
}
