/* Tobin Steel — shared styles for every page.
   To change a brand color site-wide, edit the values in :root below. */

:root {
  --navy: #2E2A6E;        /* brand navy — matches the logo */
  --navy-deep: #1c1947;
  --rust: #A3461A;        /* Structural accent */
  --rust-deep: #7f3512;
  --teal: #1B6464;        /* Specialty Hardware accent */
  --teal-deep: #134949;
  --ink: #17181f;
  --body: #3b3f4b;
  --muted: #5a5f6b;
  --paper: #f2f3f5;
  --card: #ffffff;
  --line: #d8dbe1;
  --accent: var(--navy);  /* each page sets its own accent on <body> */
  --accent-deep: var(--navy-deep);

  --display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --text: "Source Sans 3", "Segoe UI", "Helvetica Neue", sans-serif;
  --wrap: 1200px;
}
body.page-structural { --accent: var(--rust);  --accent-deep: var(--rust-deep); }
body.page-hardware   { --accent: var(--navy);  --accent-deep: var(--navy-deep); }
body.page-specialty  { --accent: var(--teal);  --accent-deep: var(--teal-deep); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0;
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--body);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-deep); }
:focus-visible { outline: 3px solid #f0b429; outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); line-height: 1.05; margin: 0; }
h2 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 800; }
h3 { font-size: 1.6rem; font-weight: 700; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; top: 0; background: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { left: 12px; top: 12px; }

/* ---------- Site header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 28px;
  min-height: 76px;
}
.brand img { height: 52px; width: auto; }
.main-nav { display: flex; gap: 6px; margin-left: auto; }
.main-nav a {
  font-weight: 600; font-size: 1rem; color: var(--ink); text-decoration: none;
  padding: 10px 14px; border-radius: 4px; border-bottom: 3px solid transparent;
}
.main-nav a:hover { background: var(--paper); color: var(--ink); }
.main-nav a[aria-current="page"] { border-bottom-color: var(--accent); border-radius: 4px 4px 0 0; }
.call-btn {
  background: var(--navy); color: #fff; text-decoration: none; font-weight: 700;
  padding: 11px 18px; border-radius: 4px; white-space: nowrap;
}
.call-btn:hover { background: var(--navy-deep); color: #fff; }

@media (max-width: 860px) {
  .site-header .wrap { flex-wrap: wrap; gap: 0 12px; padding-top: 10px; }
  .brand img { height: 42px; }
  .call-btn { margin-left: auto; padding: 9px 14px; font-size: 0.95rem; }
  .main-nav {
    order: 3; width: 100%; margin: 6px -8px 0; overflow-x: auto;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .main-nav a { white-space: nowrap; padding: 10px 10px; font-size: 0.95rem; }
}
@media (max-width: 560px) { .nav-x { display: none; } }

/* ---------- Landing hero ---------- */
.hero {
  position: relative; isolation: isolate; color: #fff; overflow: hidden;
  background: var(--navy-deep);
  min-height: min(86vh, 800px);
  display: flex; align-items: flex-end;
}
.hero > img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 64%; z-index: 0;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: rgba(16, 14, 44, 0.6);
}
.hero .wrap { position: relative; z-index: 2; width: 100%; padding-top: 64px; padding-bottom: 150px; }
.logo-plate {
  display: inline-block; background: #fff; border-radius: 8px;
  padding: 20px 26px; margin-bottom: 30px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.35);
}
.logo-plate img { width: min(420px, 62vw); height: auto; }
.hero h1 {
  color: #fff; font-weight: 800;
  font-size: clamp(2.6rem, 6.4vw, 4.9rem);
  max-width: 17ch; letter-spacing: -0.5px;
}
.hero p {
  margin-top: 18px; font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  color: #e8e9f0; max-width: 46ch;
}

/* ---------- Category tiles ---------- */
.tiles {
  position: relative; z-index: 3; margin-top: -100px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px;
}
.tile {
  --t: var(--navy); --t-deep: var(--navy-deep);
  background: var(--card); text-decoration: none; color: var(--body);
  border-top: 8px solid var(--t); border-radius: 6px;
  padding: 30px 30px 28px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 10px 30px rgba(20, 20, 50, 0.13);
}
.tile.structural { --t: var(--rust); --t-deep: var(--rust-deep); }
.tile.specialty  { --t: var(--teal); --t-deep: var(--teal-deep); }
.tile .kicker { font-weight: 700; font-size: 0.95rem; color: var(--t-deep); }
.tile h2 { font-size: clamp(2rem, 3vw, 2.6rem); }
.tile p { flex-grow: 1; }
.tile .go { font-weight: 700; color: var(--t-deep); text-decoration: underline; text-underline-offset: 4px; }
.tile:hover { color: var(--body); box-shadow: 0 14px 36px rgba(20, 20, 50, 0.2); }
.tile:hover .go { color: var(--t); }

@media (max-width: 900px) {
  .tiles { grid-template-columns: 1fr; margin-top: -70px; }
  .hero .wrap { padding-bottom: 110px; }
}

/* ---------- Generic sections ---------- */
.section { padding: 96px 0 0; }
.section:last-of-type { padding-bottom: 96px; }
.section-head { max-width: 62ch; margin-bottom: 32px; }
.section-head p { margin-top: 14px; font-size: 1.15rem; }

.split {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px; align-items: start;
}
.split .copy { display: flex; flex-direction: column; gap: 18px; max-width: 60ch; }
.split .copy p { font-size: 1.12rem; }
.photo-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
}
.photo-grid img { width: 100%; height: 230px; object-fit: cover; border-radius: 6px; }
.photo-grid .wide { grid-column: span 2; height: 320px; object-position: center 25%; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 36px; }
  .section { padding-top: 72px; }
}

/* Why Tobin */
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.pillar { background: var(--card); border-radius: 6px; padding: 28px; border: 1px solid var(--line); }
.pillar h3 { margin-bottom: 10px; }
@media (max-width: 900px) { .pillars { grid-template-columns: 1fr; } }

/* Services list */
.services {
  list-style: none; margin: 0; padding: 28px 32px;
  background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  columns: 3 220px; column-gap: 32px;
}
.services li { padding: 7px 0; break-inside: avoid; border-bottom: 1px solid #eceef2; color: var(--ink); }

/* ---------- Department page hero ---------- */
.page-hero {
  position: relative; isolation: isolate; color: #fff; background: var(--accent-deep);
  min-height: 380px; display: flex; align-items: flex-end; overflow: hidden;
  border-bottom: 8px solid var(--accent);
}
.page-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: rgba(12, 12, 30, 0.55); z-index: 1; }
.page-hero .wrap { position: relative; z-index: 2; width: 100%; padding-top: 56px; padding-bottom: 48px; }
.page-hero h1 { color: #fff; font-weight: 800; font-size: clamp(2.8rem, 6vw, 4.5rem); }
.page-hero p { margin-top: 14px; font-size: 1.25rem; color: #eceef4; max-width: 52ch; }
.page-hero.plain { min-height: 300px; }
.page-hero.plain::before { display: none; }

/* ESR info band (hardware page) */
.esr-band {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 6px; padding: 28px 32px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center;
}
.esr-band h2 { font-size: 2rem; }
.esr-band p { margin-top: 8px; }
.btn {
  display: inline-block; background: var(--accent); color: #fff; font-weight: 700;
  text-decoration: none; padding: 13px 22px; border-radius: 4px; text-align: center;
}
.btn:hover { background: var(--accent-deep); color: #fff; }
@media (max-width: 700px) { .esr-band { grid-template-columns: 1fr; } }

/* Product cards */
.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.product {
  background: var(--card); border-radius: 6px; padding: 26px 28px;
  border: 1px solid var(--line); border-top: 5px solid var(--accent);
  display: flex; flex-direction: column; gap: 8px;
}
.product .codes { font-weight: 700; color: var(--accent-deep); letter-spacing: 0.3px; }
.table-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.table-links a {
  font-size: 0.92rem; font-weight: 600; text-decoration: none;
  color: var(--accent-deep); background: #ecebf6;
  padding: 7px 12px; border-radius: 4px;
}
body.page-specialty .table-links a { background: #e2efee; }
.table-links a:hover { text-decoration: underline; }
@media (max-width: 800px) { .products { grid-template-columns: 1fr; } }

/* Feature block (specialty: HTB) */
.feature {
  background: var(--card); border-radius: 6px; border: 1px solid var(--line);
  border-top: 5px solid var(--accent); padding: 36px;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px;
}
.feature .copy { display: flex; flex-direction: column; gap: 14px; }
.feature .codes { font-weight: 700; color: var(--accent-deep); }
.spec-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; }
.spec-list li { padding: 12px 0; border-bottom: 1px solid #eceef2; }
.spec-list li:first-child { padding-top: 0; }
.spec-list strong { display: block; color: var(--ink); }
.spec-list span { color: var(--muted); font-size: 0.97rem; }
@media (max-width: 900px) { .feature { grid-template-columns: 1fr; gap: 28px; padding: 28px; } }

/* Structural: capabilities list */
.capabilities {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
}
.capabilities li {
  background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  padding: 18px 20px; font-weight: 600; color: var(--ink);
  border-left: 5px solid var(--accent);
}
@media (max-width: 900px) { .capabilities { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .capabilities { grid-template-columns: 1fr; } }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; gap: 12px; }
.gallery a { display: block; border-radius: 6px; overflow: hidden; }
.gallery img { width: 100%; height: 240px; object-fit: cover; transition: transform 0.25s ease; }
.gallery a:hover img { transform: scale(1.03); }
.gallery .big { grid-column: span 2; grid-row: span 2; }
.gallery .big img { height: 492px; }
.gallery .big.right { grid-column: 3 / span 2; }
.gallery-note { margin-top: 12px; color: var(--muted); font-size: 0.95rem; }
@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery img { height: 180px; }
  .gallery .big img { height: 372px; }
  .gallery .big.right { grid-column: span 2; }
}
@media (prefers-reduced-motion: reduce) { .gallery img { transition: none; } .gallery a:hover img { transform: none; } }

/* Contact */
.contact-band { background: var(--navy); color: #fff; }
.contact-band .wrap { padding-top: 64px; padding-bottom: 64px; }
.contact-band h2 { color: #fff; margin-bottom: 32px; }
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.contact-grid h3 { color: #fff; font-size: 1.35rem; margin-bottom: 10px; }
.contact-grid p, .contact-grid li { color: #dfe0ee; }
.contact-grid a { color: #fff; font-weight: 600; }
.contact-grid a:hover { color: #fff; text-decoration-thickness: 2px; }
.contact-grid .big-phone { font-family: var(--display); font-size: 2.4rem; font-weight: 800; text-decoration: none; }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.people strong { display: block; color: #fff; font-size: 1.1rem; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 28px; } }

/* Callout */
.callout {
  background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  padding: 28px 32px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.callout p { font-size: 1.15rem; color: var(--ink); max-width: 60ch; }

/* ---------- Footer ---------- */
.site-footer { background: #fff; border-top: 1px solid var(--line); }
.site-footer .wrap {
  padding-top: 36px; padding-bottom: 36px;
  display: flex; gap: 24px 48px; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
}
.site-footer img { height: 44px; width: auto; }
.site-footer p { font-size: 0.97rem; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer nav a { color: var(--ink); font-weight: 600; font-size: 0.97rem; }
