/* I&D Engineering Group - site styles. Blueprint paper, drafting navy, logo red. */

:root {
  --paper: #f6f8fa;
  --white: #ffffff;
  --grid: #dce5ee;
  --line: #b9c7d6;
  --ink: #10243b;
  --graphite: #44546a;
  --red: #e31e26;
  --red-dark: #b9141b;
  --tint: #fdecec;
  --max: 1160px;
  --gutter: clamp(18px, 4vw, 36px);
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Barlow Condensed", "Barlow", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font: 400 18px/1.55 var(--font-body);
  color: var(--ink);
  background: var(--paper);
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--white); padding: 10px 16px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Type */
.h-display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}
.h1 { font-size: clamp(2.7rem, 6.6vw, 4.9rem); }
.h2 { font-size: clamp(2rem, 4.2vw, 3rem); line-height: 1.05; }
.h3 { font-size: 1.7rem; font-weight: 600; line-height: 1.1; }
.lede { font-size: clamp(1.15rem, 2vw, 1.35rem); line-height: 1.5; color: var(--graphite); max-width: 60ch; margin: 0; }
.prose p { max-width: 64ch; margin: 0 0 1em; }
.muted { color: var(--graphite); }
.small { font-size: 0.95rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 12px 26px;
  font: 600 1.1rem/1 var(--font-body);
  text-decoration: none; cursor: pointer;
  border: 2px solid var(--ink); background: transparent; color: var(--ink);
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--ink); color: var(--white); }
.btn--red { background: var(--red); border-color: var(--red); color: var(--white); }
.btn--red:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn--light { border-color: var(--white); color: var(--white); }
.btn--light:hover { background: var(--white); color: var(--ink); }
.btn--small { min-height: 44px; padding: 8px 18px; font-size: 1rem; }

.textlink { font-weight: 600; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--red); }
.textlink:hover { color: var(--red-dark); }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.site-header__bar { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.site-header__logo { flex: none; display: block; }
.site-header__logo img { height: 32px; width: auto; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav__link { padding: 10px 14px; font-weight: 500; text-decoration: none; }
.nav__link:hover { color: var(--red-dark); }
.nav__link[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--red); }
.nav__phone { font-weight: 600; text-decoration: none; padding: 10px 12px 10px 18px; white-space: nowrap; }
.nav__phone:hover { color: var(--red-dark); }
.nav-toggle { display: none; margin-left: auto; min-height: 44px; padding: 8px 16px; font: 600 1rem var(--font-body); background: transparent; border: 2px solid var(--ink); color: var(--ink); cursor: pointer; }

/* Hero */
.hero {
  position: relative;
  padding: clamp(40px, 7vw, 88px) 0 0;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--paper);
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 120px;
  background: linear-gradient(to bottom, rgba(246, 248, 250, 0), var(--paper));
  pointer-events: none;
}
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.hero__copy .lede { margin-top: 24px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero__diagram { color: var(--ink); max-width: 440px; margin-left: auto; width: 100%; }
.hero__diagram figcaption { margin-top: 6px; font-size: 0.9rem; color: var(--graphite); text-align: center; }

.diagram text { font-family: var(--font-display); font-size: 19px; font-weight: 500; fill: var(--graphite); }
.diagram .sym-text { font-size: 24px; font-weight: 700; fill: var(--ink); }
.diagram .live { stroke: var(--red); }
.js .draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.5s ease-out forwards; }
.js .draw-late { animation-delay: 0.2s; }
.js .live { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s ease-in-out 1.6s forwards; }
.js .diagram text { opacity: 0; animation: fade 0.6s ease-out 1.2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }

/* Title block (credentials) */
.titleblock {
  position: relative; z-index: 1; margin-top: clamp(40px, 6vw, 72px);
  display: grid; grid-template-columns: 1.1fr 1.3fr 1.2fr 0.9fr;
  background: var(--white); border: 2px solid var(--ink);
}
.titleblock__cell { padding: 16px 20px 18px; border-left: 1px solid var(--ink); min-width: 0; }
.titleblock__cell:first-child { border-left: 0; }
.titleblock__label { display: block; font-size: 0.9rem; color: var(--graphite); margin-bottom: 4px; }
.titleblock__value { display: block; font-weight: 600; line-height: 1.3; }
.titleblock__sub { display: block; font-size: 0.95rem; color: var(--graphite); font-weight: 400; }

/* Sections */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--white { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--navy { background: var(--ink); color: var(--white); }
.section__head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.section__head .lede { margin-top: 16px; }
.section--navy .lede { color: #c5d2e0; }

/* Offers */
.offers { border-top: 2px solid var(--ink); }
.offer { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr) auto; gap: 12px clamp(20px, 4vw, 56px); align-items: start; padding: 28px 0; border-bottom: 1px solid var(--line); }
.offer__name { margin: 0; }
.offer__text p { margin: 0 0 10px; max-width: 58ch; }
.offer__sheets { color: var(--graphite); font-size: 1rem; }
.offer__sheets strong { color: var(--ink); font-weight: 600; }
.offer__cta { align-self: center; }
.also { margin: 28px 0 0; padding: 18px 22px; background: var(--tint); border-left: 4px solid var(--red); max-width: 780px; }
.also p { margin: 0; }

/* Steps (a real sequence) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: step; border-top: 2px solid var(--ink); }
.step { counter-increment: step; padding: 24px 24px 8px 0; position: relative; }
.step + .step { padding-left: 24px; border-left: 1px solid var(--line); }
.step::before { content: counter(step); display: block; font: 700 3.4rem/1 var(--font-display); color: var(--red); margin-bottom: 10px; }
.step__title { margin: 0 0 8px; }
.step p { margin: 0; color: var(--graphite); font-size: 1.02rem; }

/* Reasons */
.reasons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
.reason { border-top: 4px solid var(--red); padding-top: 18px; }
.reason h3 { margin: 0 0 10px; }
.reason p { margin: 0; color: var(--graphite); }

/* Jobs */
.jobs { border-top: 2px solid var(--ink); }
.job { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.75fr) minmax(0, 1.6fr); gap: 8px clamp(16px, 3vw, 40px); padding: 22px 0; border-bottom: 1px solid var(--line); }
.job__title { margin: 0; font: 600 1.35rem/1.15 var(--font-display); }
.job__place { margin: 0; color: var(--graphite); }
.job__what { margin: 0; }
.job__what .sealed { font-weight: 600; }

/* FAQ */
.faq { border-top: 2px solid var(--ink); max-width: 860px; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; font: 600 1.3rem/1.2 var(--font-display); position: relative; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; position: absolute; right: 6px; top: 16px; font: 500 1.8rem/1 var(--font-body); color: var(--red); }
.faq__item[open] summary::after { content: "\2212"; }
.faq__item p { margin: 0 0 20px; max-width: 64ch; color: var(--graphite); }

/* CTA band */
.cta-band { background: var(--ink); color: var(--white); padding: clamp(48px, 7vw, 88px) 0; }
.cta-band__grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: center; }
.cta-band .lede { color: #c5d2e0; margin-top: 12px; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Page heads (inner pages) */
.pagehead { padding: clamp(40px, 6vw, 72px) 0 clamp(28px, 4vw, 48px); background:
  linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 32px 32px,
  linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 32px 32px,
  var(--paper); border-bottom: 1px solid var(--line); }
.pagehead .lede { margin-top: 18px; }

/* Service detail */
.svc { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 20px clamp(24px, 5vw, 72px); padding: clamp(32px, 5vw, 56px) 0; border-bottom: 1px solid var(--line); }
.svc:first-of-type { border-top: 2px solid var(--ink); }
.svc__intro p { margin: 12px 0 20px; color: var(--graphite); }
.svc__lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 32px; }
.svc__lists h4 { margin: 0 0 8px; font: 600 1.15rem/1.2 var(--font-display); }
.svc__lists ul { margin: 0; padding-left: 1.1em; }
.svc__lists li { margin-bottom: 6px; }

/* About */
.twocol { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); }
.people { display: grid; gap: 24px; margin-top: 8px; }
.person { border-top: 4px solid var(--red); padding-top: 14px; }
.person h3 { margin: 0 0 4px; }
.person p { margin: 0; color: var(--graphite); }

/* Contact / form */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 1rem; }
.field label span { font-weight: 400; color: var(--graphite); }
.field input, .field select, .field textarea {
  font: 400 1.05rem/1.3 var(--font-body); color: var(--ink);
  background: var(--white); border: 1.5px solid var(--line); border-radius: 0; padding: 13px 14px; min-height: 50px; width: 100%;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--red); outline-offset: 0; border-color: var(--ink); }
.form__note { grid-column: 1 / -1; margin: 0; color: var(--graphite); font-size: 0.98rem; }
.form__status { grid-column: 1 / -1; margin: 0; padding: 14px 18px; background: var(--tint); border-left: 4px solid var(--red); }
.form__status[hidden] { display: none; }
.aside { background: var(--white); border: 2px solid var(--ink); padding: 24px; }
.aside h3 { margin: 0 0 10px; }
.aside p { margin: 0 0 14px; }
.aside ul { margin: 0 0 18px; padding-left: 1.1em; }
.aside li { margin-bottom: 6px; }
.bigphone { display: block; font: 700 2.1rem/1.1 var(--font-display); text-decoration: none; margin: 4px 0 10px; }
.bigphone:hover { color: var(--red-dark); }

/* Footer */
.site-footer { background: var(--ink); color: #c5d2e0; padding: 56px 0 40px; }
.site-footer a { color: var(--white); }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.site-footer h2 { margin: 0 0 10px; font: 600 1.15rem/1.2 var(--font-display); color: var(--white); }
.site-footer p { margin: 0 0 8px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer__logo { background: var(--white); display: inline-block; padding: 10px 14px; margin-bottom: 16px; }
.site-footer__logo img { height: 30px; width: auto; }
.site-footer__legal { margin-top: 36px; padding-top: 20px; border-top: 1px solid #2f4864; font-size: 0.92rem; }

/* Mobile action bar */
.mobilebar { display: none; }

/* 404 */
.notfound { padding: 96px 0; }

/* Responsive */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__diagram { margin: 8px auto 0; max-width: 360px; }
  .titleblock { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .titleblock__cell:nth-child(3) { border-left: 0; }
  .titleblock__cell:nth-child(n+3) { border-top: 1px solid var(--ink); }
  .offer { grid-template-columns: 1fr; }
  .offer__cta { align-self: start; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:nth-child(3) { padding-left: 0; border-left: 0; }
  .step:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 24px; }
  .reasons { grid-template-columns: 1fr; }
  .job { grid-template-columns: 1fr; }
  .svc { grid-template-columns: 1fr; }
  .twocol, .contact-grid { grid-template-columns: 1fr; }
  .cta-band__grid { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: var(--white); border-bottom: 2px solid var(--ink); padding: 8px var(--gutter) 16px; margin: 0; }
  .nav.is-open { display: flex; }
  .nav__link, .nav__phone { padding: 14px 4px; border-bottom: 1px solid var(--grid); }
  .nav__link[aria-current="page"] { box-shadow: none; color: var(--red-dark); }
  .nav .btn { margin-top: 12px; }
  .site-header__logo img { height: 28px; }
  body { padding-bottom: 72px; }
  .mobilebar { display: grid; grid-template-columns: 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--white); border-top: 2px solid var(--ink); }
  .mobilebar a { display: flex; align-items: center; justify-content: center; min-height: 60px; font-weight: 600; text-decoration: none; font-size: 1.1rem; }
  .mobilebar a + a { background: var(--red); color: var(--white); }
  .form { grid-template-columns: 1fr; }
  .svc__lists { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 20px 0 8px; border-left: 0; margin-top: 0; }
  .step + .step { border-top: 1px solid var(--line); }
  .titleblock { grid-template-columns: 1fr; }
  .titleblock__cell, .titleblock__cell:nth-child(3) { border-left: 0; }
  .titleblock__cell + .titleblock__cell { border-top: 1px solid var(--ink); }
  .site-footer__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .draw, .js .live { animation: none; stroke-dashoffset: 0; }
  .js .diagram text { animation: none; opacity: 1; }
}
