/* ============================================
   DOCON Fire Safety Engineering — styles.css
   ============================================ */

:root {
  --ink: #1c1b18;
  --ink-soft: #45423c;
  --muted: #716d64;
  --paper: #faf9f6;
  --paper-2: #f2f0ea;
  --line: #e3e0d7;
  --line-strong: #c9c5ba;
  --red: #b3261c;
  --red-deep: #8f1a12;
  --radius: 3px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

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

.wrap {
  width: min(1080px, 92vw);
  margin-inline: auto;
}

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem;
  z-index: 200; text-decoration: none;
}
.skip-link:focus { left: 0; }

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

/* ============================================
   Header / Nav
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.05rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}
.brand-mark {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--red);
  border-radius: var(--radius);
  flex-shrink: 0;
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-text { line-height: 1.15; }
.brand-text strong {
  display: block;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.brand-text span {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav-links a:not(.nav-phone) {
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease;
}
.nav-links a:not(.nav-phone):hover { color: var(--ink); }
.nav-links a.active {
  color: var(--ink);
  border-bottom-color: var(--red);
}
.nav-phone {
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--red);
}
.nav-phone:hover { color: var(--red-deep); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 110;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--ink);
  margin: 6px 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.btn-primary:hover { background: var(--red-deep); border-color: var(--red-deep); }
.btn-outline {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-outline:hover { border-color: var(--ink); }
.btn-outline.on-dark {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}
.btn-outline.on-dark:hover { border-color: #fff; }

/* ---------- Small caps label ---------- */
.kicker {
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--red);
  margin-bottom: 1.1rem;
}

/* ============================================
   Hero
   ============================================ */
.hero { border-bottom: 1px solid var(--line); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
  padding: 5rem 0 5.5rem;
}
.hero h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.4rem);
  margin-bottom: 1rem;
  max-width: 16ch;
}
.hero-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--red);
  margin-bottom: 1.4rem;
}
.lede {
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 33rem;
  margin-bottom: 2.2rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
  margin-bottom: 2.4rem;
}
.hero-photo { position: relative; }
.hero-photo img {
  width: 100%;
  aspect-ratio: 4 / 4.4;
  object-fit: cover;
  object-position: 50% 22%;
  border-radius: var(--radius);
}
.hero-photo figcaption,
.photo-caption {
  margin-top: 0.7rem;
  font-size: 0.82rem;
  color: var(--muted);
}

/* ---------- facts strip ---------- */
.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  padding: 2.4rem 0 2.6rem;
  gap: 2rem;
}
.fact-num {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.fact-label {
  font-size: 0.86rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

/* ============================================
   Sections
   ============================================ */
.section { padding: 5.5rem 0; }
.section.alt { background: var(--paper-2); border-block: 1px solid var(--line); }
.section-head { max-width: 40rem; margin-bottom: 3rem; }
.section-head h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  margin-bottom: 0.9rem;
}
.section-head p { color: var(--muted); font-size: 1.04rem; }

/* ---------- service index (home) ---------- */
.service-index {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 3.5rem;
}
.service-index li { border-top: 1px solid var(--line); }
.service-index a {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1rem;
  padding: 1.7rem 0.4rem 1.9rem 0;
  text-decoration: none;
}
.service-index a:hover h3 { color: var(--red); }
.service-num {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
  padding-top: 0.25rem;
}
.service-index h3 {
  font-size: 1.22rem;
  margin-bottom: 0.45rem;
  transition: color 0.15s ease;
}
.service-index p { color: var(--muted); font-size: 0.94rem; }
.service-index .more {
  display: inline-block;
  margin-top: 0.7rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--red);
}

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 4rem;
  align-items: center;
}
.about-photo img {
  width: 100%;
  aspect-ratio: 4 / 4.6;
  object-fit: cover;
  object-position: 50% 18%;
  border-radius: var(--radius);
}
.about-photo figure + figure { margin-top: 1.8rem; }
.about-photo .fire-photo img { aspect-ratio: auto; }
.about-copy h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); margin-bottom: 1.2rem; }
.about-copy > p { color: var(--ink-soft); margin-bottom: 1.2rem; }
.cred-list {
  list-style: none;
  margin: 1.6rem 0 2.2rem;
}
.cred-list li {
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.96rem;
  color: var(--ink-soft);
}
.cred-list li:last-child { border-bottom: 1px solid var(--line); }

/* ---------- quote ---------- */
.quote-band { text-align: center; }
.quote-band blockquote {
  max-width: 42rem;
  margin-inline: auto;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.45;
}
.quote-band blockquote::before {
  content: "";
  display: block;
  width: 44px; height: 3px;
  background: var(--red);
  margin: 0 auto 2rem;
}
.quote-band cite {
  display: block;
  margin-top: 1.6rem;
  font-family: "Inter", sans-serif;
  font-style: normal;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ---------- testimonial (quote-band variant for longer client quotes) ---------- */
.quote-band.testimonial blockquote {
  font-size: 1.2rem;
  font-weight: 500;
  max-width: 46rem;
}
.quote-band.testimonial cite {
  font-weight: 600;
  color: var(--ink-soft);
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--ink);
  color: #fff;
}
.cta-band .wrap {
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 3rem;
  align-items: center;
  padding-block: 4.5rem;
}
.cta-band h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 0.8rem; }
.cta-band p { color: rgba(255, 255, 255, 0.7); max-width: 32rem; }
.cta-actions { display: grid; gap: 0.8rem; }
.cta-actions .btn { text-align: center; }

/* ============================================
   Page head (interior pages)
   ============================================ */
.page-head {
  padding: 4.5rem 0 3.5rem;
  border-bottom: 1px solid var(--line);
}
.page-head h1 {
  font-size: clamp(2.1rem, 4vw, 3rem);
  margin-bottom: 1rem;
  max-width: 20ch;
}
.page-head p { color: var(--muted); font-size: 1.08rem; max-width: 36rem; }

/* ============================================
   Services page — detail rows
   ============================================ */
.service-detail {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1.5rem;
  padding: 2.6rem 0;
  border-bottom: 1px solid var(--line);
}
.service-detail:first-of-type { padding-top: 0; }
.service-detail:last-of-type { border-bottom: 0; }
.service-detail .service-num { font-size: 1.05rem; padding-top: 0.4rem; }
.service-detail h3 { font-size: 1.5rem; margin-bottom: 0.7rem; }
.service-detail p { color: var(--ink-soft); max-width: 56rem; }
.service-meta {
  margin-top: 0.9rem;
  font-size: 0.86rem;
  color: var(--muted);
}

/* ---------- process ---------- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
  counter-reset: step;
}
.process-step {
  border-top: 2px solid var(--ink);
  padding-top: 1.2rem;
}
.process-step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  font-weight: 600;
  font-size: 1rem;
  color: var(--red);
  margin-bottom: 0.8rem;
}
.process-step h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.process-step p { font-size: 0.92rem; color: var(--muted); }

/* ============================================
   Contact page
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 4.5rem;
  align-items: start;
}
.contact-intro > p { color: var(--muted); }
.contact-photo { margin-top: 2rem; }
.contact-photo img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  object-position: 50% 28%;
  border-radius: var(--radius);
}
.contact-photo figcaption {
  margin-top: 0.7rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.contact-methods {
  list-style: none;
  margin-top: 2rem;
}
.contact-methods li { border-top: 1px solid var(--line); }
.contact-methods li:last-child { border-bottom: 1px solid var(--line); }
.contact-methods a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1.1rem 0.2rem;
  text-decoration: none;
}
.contact-methods a:hover strong { color: var(--red); }
.contact-methods strong { font-size: 1rem; transition: color 0.15s ease; }
.contact-methods span { font-size: 0.85rem; color: var(--muted); }

.info-panel { margin-top: 2.4rem; }
.info-panel h3 { font-size: 1.08rem; margin-bottom: 0.8rem; }
.info-panel ul { list-style: none; }
.info-panel li {
  position: relative;
  padding: 0.45rem 0 0.45rem 1.3rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.info-panel li::before {
  content: "";
  position: absolute;
  left: 0; top: 1.05em;
  width: 7px; height: 2px;
  background: var(--red);
}

.contact-form-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.6rem;
  background: #fff;
}
.contact-form-card h2 { font-size: 1.6rem; margin-bottom: 0.5rem; }
.contact-form-card > p { color: var(--muted); font-size: 0.94rem; margin-bottom: 2rem; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.field { display: grid; gap: 0.4rem; }
.field.full { grid-column: 1 / -1; }
.field label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.field input, .field select, .field textarea {
  font-family: inherit;
  font-size: 0.98rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.15s ease;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 130px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  font-size: 0.94rem;
  line-height: 1.5;
}
.form-status.ok { background: #eaf3ea; color: #1f5a2a; border: 1px solid #bcd9c0; }
.form-status.error { background: #fbeceb; color: var(--red-deep); border: 1px solid #efc2be; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--ink);
}
.form-note { font-size: 0.84rem; color: var(--muted); margin-top: 1rem; }
.form-note a { color: var(--red); }

/* ============================================
   Projects page — card grid
   ============================================ */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.4rem 2rem;
}
.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.project-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 14px 30px -20px rgba(28, 27, 24, 0.4);
  transform: translateY(-2px);
}
.project-card-media {
  aspect-ratio: 16 / 9;
  background: var(--paper-2);
  overflow: hidden;
}
.project-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.project-card-media.is-drawing img {
  object-fit: contain;
  padding: 0.6rem;
}
.project-placeholder {
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  background: var(--red);
  color: #fff;
}
.project-placeholder svg { width: 44px; height: 44px; }
.project-placeholder span {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.85);
}
.project-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem 1.6rem 1.7rem;
}
.project-card-body p {
  color: var(--ink-soft);
  font-size: 0.96rem;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 3.5rem 0 2rem;
  color: var(--muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 0.75fr 0.9fr;
  gap: 3rem;
  padding-bottom: 2.5rem;
}
.footer-brand p { font-size: 0.9rem; max-width: 26rem; margin-top: 1rem; }
.footer-col h4 {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink);
  margin-bottom: 1rem;
  font-weight: 600;
}
.footer-col ul { list-style: none; display: grid; gap: 0.55rem; }
.footer-col a {
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--muted);
  transition: color 0.15s ease;
}
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
}
.footer-bottom a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-bottom a:hover { color: var(--ink); }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 3rem; padding: 3.5rem 0 4rem; }
  .hero-photo { max-width: 480px; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .service-index { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  .about-photo { max-width: 420px; }
  .cta-band .wrap { grid-template-columns: 1fr; }
  .cta-actions { justify-items: start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .project-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 2.2rem;
    background: var(--paper);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
  .nav-links.open { opacity: 1; pointer-events: auto; }
  .nav-links a:not(.nav-phone) { font-size: 1.25rem; }
  .nav-links .nav-phone { font-size: 1.1rem; }
  .process-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .service-detail { grid-template-columns: 1fr; gap: 0.6rem; }
  .section { padding: 4rem 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .contact-form-card { padding: 1.8rem 1.4rem; }
  .project-grid { grid-template-columns: 1fr; }
}
