/* Three Sixty-Four Metal Works — "Shop Floor" */
:root {
  --bg: #15181c;
  --surface: #1e232a;
  --border: #2a2f36;
  --text: #e9ecef;
  --text-2: #aab3be;
  --accent: #1f6fc0;
  --accent-hover: #185da3;
  --link: #6cb0f0;
  --label: #b3ada6;
  --radius: 8px;
  --head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--link); outline-offset: 2px;
}
h1, h2, h3 { font-family: var(--head); font-weight: 700; text-transform: uppercase; letter-spacing: .01em; line-height: 1.05; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 7vw, 4rem); }
h2 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); }
h3 { font-size: 1.35rem; letter-spacing: .02em; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 12px; border-radius: var(--radius); z-index: 100; }
.skip:focus { left: 8px; }
.label { font: 600 .8rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--label); margin: 0 0 .75rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .5em; min-height: 44px; padding: .6em 1.1em; border-radius: var(--radius);
  background: var(--accent); color: #fff; font: 600 1rem/1.2 var(--body); text-decoration: none; border: 0; cursor: pointer; }
.btn:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 2px var(--border); }
.btn-ghost:hover { background: var(--surface); }

/* Header: welding-symbol icon + wordmark (full logo is unreadable at header height) */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(21, 24, 28, .96); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { flex: none; display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none;
  font: 700 1.25rem/1 var(--head); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.brand img { width: 40px; height: 40px; }
.brand > span { color: var(--accent); } /* matches the buttons; large bold text, AA 3:1 */
.brand small { display: block; font-size: .7rem; letter-spacing: .18em; color: var(--label); margin-top: 4px; }
.nav { margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.nav a, .navdrop > summary { display: block; padding: 10px 12px; color: var(--text); text-decoration: none; font-weight: 500; border-radius: 6px; cursor: pointer; }
.nav a:hover, .navdrop > summary:hover { background: var(--surface); }
.nav a[aria-current="page"] { color: var(--link); }
.navdrop { position: relative; }
.navdrop > summary { list-style: none; }
.navdrop > summary::-webkit-details-marker { display: none; }
.navdrop > summary::after { content: " ▾"; font-size: .8em; }
.navdrop ul { position: absolute; top: 100%; left: 0; min-width: 300px; flex-direction: column; align-items: stretch;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px; }
.call { flex: none; }
.nav-toggle { display: none; }

/* Hero */
.hero { position: relative; background-color: #0d0f12; background-size: cover; background-position: 70% center; min-height: min(78vh, 620px); display: grid; align-items: center; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13,15,18,.96) 0%, rgba(13,15,18,.8) 45%, rgba(13,15,18,.2) 100%); }
.hero .wrap { position: relative; padding-block: 72px; }
.hero h1 { max-width: 14ch; }
.hero p { max-width: 52ch; color: var(--text-2); font-size: 1.125rem; margin: 0 0 1.5rem; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Three paths */
.paths { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: -40px; position: relative; }
.path { display: block; background: var(--surface); border-top: 3px solid var(--accent); border-radius: var(--radius); padding: 20px; color: var(--text); text-decoration: none; }
.path:hover { background: #252b33; }
.path h2 { font-size: 1.35rem; letter-spacing: .02em; margin-bottom: .25em; }
.path p { margin: 0; color: var(--text-2); font-size: .95rem; }

/* Sections */
.section { padding-block: 72px; }
.section + .section { border-top: 1px solid var(--border); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--surface); border-radius: var(--radius); overflow: hidden; border-top: 3px solid var(--accent); display: flex; flex-direction: column; }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; max-width: 360px; }
.card .body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card p { margin: 0; color: var(--text-2); }
.card a.more { margin-top: auto; font-weight: 600; }
.certs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.certs li { background: var(--surface); border-left: 3px solid var(--accent); padding: 14px 16px; border-radius: 0 var(--radius) var(--radius) 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.tile { display: block; border-radius: 6px; overflow: hidden; }
.tile img { width: 100%; max-width: 360px; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .2s; }
.tile:hover img { transform: scale(1.03); }

/* Inner pages */
.page-head { padding-block: 56px 32px; border-bottom: 1px solid var(--border); }
.page-head p { color: var(--text-2); max-width: 60ch; font-size: 1.125rem; margin: 0; }
.prose { max-width: 68ch; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: start; }
.gallery h2 { margin-top: 1.5em; }

/* Contact */
.contact { background: #101317; }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; }
.contact .direct { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.contact .direct p { color: var(--text-2); margin: 0; }
.form { display: grid; gap: 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 4px; }
.field input, .field select, .field textarea { width: 100%; min-height: 44px; padding: 10px 12px; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid #3a414a; border-radius: 6px; }
.field textarea { min-height: 140px; resize: vertical; }
.hp { position: absolute; left: -9999px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding-block: 40px; color: var(--text-2); font-size: .95rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 24px; }
.site-footer .logo { width: 100%; max-width: 340px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer a { color: var(--text-2); }
.site-footer .copy { grid-column: 1 / -1; font-size: .85rem; margin: 0; }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 95vw; }
.lightbox::backdrop { background: rgba(0, 0, 0, .88); }
.lightbox img { max-height: 80vh; max-width: min(90vw, 480px); width: auto; margin: auto; } /* ≤ 1.5× the 320px originals */
.lightbox figure { margin: 0; }
.lightbox figcaption { color: var(--text); text-align: center; padding: 10px; }
.lightbox .lb-controls { display: flex; justify-content: center; gap: 8px; }

/* Mobile sticky call bar */
.sticky-call { display: none; }

@media (max-width: 900px) {
  .cards, .paths { grid-template-columns: 1fr 1fr; }
  .split, .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .cards, .paths { grid-template-columns: 1fr; }
  .paths { margin-top: 24px; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .brand { font-size: 1.2rem; } /* stays >= 18.66px bold so the blue name passes AA */
  .brand img { width: 34px; height: 34px; }
  .call { display: none; }
  .sticky-call { display: flex; justify-content: center; position: fixed; inset: auto 0 0 0; z-index: 60; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(21,24,28,.97); border-top: 1px solid var(--border); }
  .sticky-call .btn { width: 100%; justify-content: center; }
  body { padding-bottom: 72px; }
  /* Without JS the nav wraps under the logo; with JS it collapses behind the toggle. */
  .site-header .wrap { flex-wrap: wrap; }
  .nav { width: 100%; margin-left: 0; }
  .nav ul { flex-wrap: wrap; }
  .navdrop ul { position: static; min-width: 0; }
  html.js .nav-toggle { display: inline-flex; margin-left: auto; }
  html.js .nav { display: none; }
  html.js .nav.open { display: block; max-height: calc(100vh - 64px - 72px); max-height: calc(100dvh - 64px - 72px); overflow-y: auto; }
  html.js .nav ul { flex-direction: column; align-items: stretch; padding-bottom: 12px; }
}
@media (max-width: 360px) {
  /* smallest phones: keep the 19.2px blue name (AA large text) and the Menu button on one row */
  .site-header .wrap { gap: 8px; }
  .brand { gap: 8px; letter-spacing: .02em; }
  .brand img { width: 28px; height: 28px; }
  .brand small { letter-spacing: .1em; }
  html.js .nav-toggle { padding-inline: .7em; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
