/* Martin's Metal Supply — palette and type taken from the previous TSI site
   so the rebuild reads as the same brand.
     navy   #213661   headings, nav, footer
     accent #3FA6CC   buttons, links, rules
     light  #98CFE3   subtle accents                                        */

:root {
  --navy: #213661;
  --navy-dark: #18284a;
  --accent: #3fa6cc;
  --accent-dark: #2f8bae;
  --light-blue: #98cfe3;
  --ink: #32373b;
  --muted: #616161;
  --rule: #e2e6ec;
  --bg-alt: #f7f9fb;
  --white: #fff;
  --wrap: 1180px;
  --radius: 3px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */

.topbar {
  background: var(--navy-dark);
  color: rgba(255,255,255,.85);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.topbar .wrap { display: flex; justify-content: flex-end; gap: 18px; padding-block: 7px; }
.topbar a { color: inherit; text-decoration: none; }
.topbar a:hover { color: var(--white); }

.masthead { background: var(--white); border-bottom: 1px solid var(--rule); }
.masthead .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding-block: 18px; flex-wrap: wrap;
}
.brand { display: block; flex: 0 0 auto; }
.brand img { width: 290px; max-width: 60vw; }
.masthead-right { margin-left: auto; text-align: right; }

.tel {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 30px; font-weight: 700; color: var(--navy);
  text-decoration: none; line-height: 1.2;
}
.tel:hover { color: var(--accent-dark); }
.tel svg { width: 24px; height: 24px; fill: currentColor; flex: none; }

/* ---------- nav ---------- */

.nav { margin-top: 8px; }
.nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 4px 22px; justify-content: flex-end;
}
.nav a {
  display: block; padding: 4px 0;
  font-size: 14.5px; font-weight: 600; letter-spacing: .045em;
  text-transform: uppercase; color: var(--navy); text-decoration: none;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }

.nav-toggle {
  display: none; background: var(--navy); color: var(--white);
  border: 0; border-radius: var(--radius); cursor: pointer;
  padding: 10px 16px; font: inherit; font-size: 15px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
}

/* ---------- hero ---------- */

.hero { position: relative; background: var(--navy) center/cover no-repeat; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,25,45,.35), rgba(15,25,45,.62));
}
.hero .wrap {
  position: relative; z-index: 1;
  min-height: 460px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding-block: 72px; color: var(--white);
}
.hero h1 {
  margin: 0 0 14px; font-size: clamp(30px, 4.6vw, 50px);
  font-weight: 400; line-height: 1.15;
  text-shadow: 0 2px 12px rgba(0,0,0,.45);
}
.hero p {
  margin: 0 auto 26px; max-width: 720px;
  font-size: clamp(15px, 1.7vw, 18px); font-weight: 600;
  text-transform: uppercase; letter-spacing: .035em; line-height: 1.55;
  text-shadow: 0 1px 8px rgba(0,0,0,.5);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block; padding: 13px 30px;
  background: var(--accent); color: var(--white);
  font-size: 15px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  text-decoration: none; border: 0; border-radius: var(--radius); cursor: pointer;
  transition: background .15s ease;
}
.btn:hover { background: var(--accent-dark); color: var(--white); }
.btn-navy { background: var(--navy); }
.btn-navy:hover { background: var(--navy-dark); }

/* ---------- page furniture ---------- */

.page-head { background: var(--navy); color: var(--white); padding-block: 44px; }
.page-head h1 { margin: 0; font-size: clamp(27px, 3.6vw, 40px); font-weight: 400; }

section { padding-block: 58px; }
section.alt { background: var(--bg-alt); }

h2, h3, h4 { color: var(--navy); line-height: 1.25; }
h2 { font-size: clamp(24px, 3vw, 33px); font-weight: 400; margin: 0 0 18px; }
h3 { font-size: clamp(20px, 2.3vw, 25px); font-weight: 700; margin: 34px 0 12px; }
h4 { font-size: 19px; font-weight: 700; margin: 26px 0 10px; }

.prose { max-width: 860px; }
.prose p { margin: 0 0 17px; }
.prose > h2:first-child, .prose > h3:first-child { margin-top: 0; }

.lede { font-size: 20px; color: var(--muted); }

/* ---------- service cards ---------- */

.cards {
  display: grid; gap: 26px;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
}
.card {
  background: var(--white); border: 1px solid var(--rule);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow .18s ease, transform .18s ease;
}
.card:hover { box-shadow: 0 10px 26px rgba(33,54,97,.15); transform: translateY(-3px); }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card-body { padding: 18px 20px 22px; text-align: center; }
.card h3 { margin: 0 0 10px; font-size: 20px; }
.card a { font-weight: 700; text-transform: uppercase; font-size: 13.5px;
          letter-spacing: .05em; text-decoration: none; }
.card a:hover { text-decoration: underline; }

/* ---------- galleries ---------- */

.gallery {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.gallery img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: var(--radius); background: var(--bg-alt);
}

/* ---------- reviews ---------- */

.reviews { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.review {
  background: var(--white); border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: 26px 28px;
}
.review p { margin: 0 0 14px; }
.stars { color: #f5a623; letter-spacing: 2px; }
.review cite { display: block; font-style: normal; font-weight: 700; color: var(--navy); }

/* ---------- contact ---------- */

.contact-grid { display: grid; gap: 40px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.hours { list-style: none; margin: 0; padding: 0; max-width: 320px; }
.hours li { display: flex; justify-content: space-between; gap: 20px;
            padding: 7px 0; border-bottom: 1px solid var(--rule); }
.hours .closed { color: var(--muted); }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: 14px;
               color: var(--navy); margin-bottom: 5px; }
.field input, .field textarea {
  width: 100%; padding: 11px 13px; font: inherit; font-size: 16px;
  color: var(--ink); background: var(--white);
  border: 1px solid #c6ccd6; border-radius: var(--radius);
}
.field input:focus, .field textarea:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
.field textarea { min-height: 150px; resize: vertical; }

/* ---------- service area ---------- */

.cities { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px;
          grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.cities li { padding: 11px 15px; background: var(--bg-alt);
             border-left: 3px solid var(--accent); border-radius: var(--radius);
             font-weight: 600; color: var(--navy); }

/* ---------- footer ---------- */

.site-footer { background: var(--navy); color: rgba(255,255,255,.82); padding-block: 46px 26px; }
.site-footer h2 { color: var(--white); font-size: 21px; font-weight: 700; margin: 0 0 14px; }
.site-footer a { color: var(--light-blue); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; gap: 34px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { padding: 4px 0; }
.legal {
  margin-top: 34px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.18);
  font-size: 14px; color: rgba(255,255,255,.6);
}

/* ---------- utility ---------- */

.skip-link {
  position: absolute; left: -9999px;
  background: var(--navy); color: var(--white); padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 10px; top: 10px; }

/* ---------- mobile ---------- */

@media (max-width: 880px) {
  .masthead .wrap { flex-direction: column; align-items: flex-start; }
  .masthead-right { margin-left: 0; text-align: left; width: 100%; }
  .nav-toggle { display: block; margin-top: 12px; }
  .nav { width: 100%; }
  .nav ul { display: none; flex-direction: column; align-items: stretch;
            gap: 0; margin-top: 12px; }
  .nav.open ul { display: flex; }
  .nav a { padding: 11px 2px; border-bottom: 1px solid var(--rule); }
  .nav a[aria-current="page"] { border-bottom-color: var(--accent); }
  .hero .wrap { min-height: 340px; padding-block: 54px; }
  section { padding-block: 42px; }
}

/* ---------- contact form status ---------- */

.hp { position: absolute; left: -9999px; opacity: 0; }

#form-status { margin: 14px 0 0; font-weight: 600; }
#form-status.ok  { color: #1a7f4b; }
#form-status.err { color: #a60202; }

button[disabled] { opacity: .6; cursor: progress; }

/* Inline calls to action recovered from the old site's buttons. They sit
   between prose blocks, so they need their own spacing rather than the
   paragraph rhythm. */
.cta-inline { margin: 1.75rem 0; }
.cta-inline + .cta-inline { margin-top: -0.75rem; }

/* Review call to action below the testimonials. */
.review-cta { text-align: center; max-width: 46rem; }
.review-cta h2 { margin-bottom: .5rem; }
.review-cta p { margin: 0 auto .75rem; }

/* Logo ships at full resolution for hi-dpi screens; CSS fixes the drawn size. */
.brand-logo { width: 290px; height: auto; display: block; }
@media (max-width: 700px) { .brand-logo { width: 220px; } }
