/* CANTILEVER ENGINEERING — site styles.
   Design tokens (deliberate, not defaults):
   - Cool "blueprint" palette: a blue-charcoal near-black with a genuine steel
     undertone (not a tinted #111), paired with drafting-paper off-white —
     grounded in the literal origin of the word "blueprint" (cyanotype prints),
     rather than the common navy-corporate or hard-hat-yellow engineering-site look.
   - A single warm accent — a redline / engineer's-pencil rust — used only for
     small emphasis: annotation, key figures, focus states. Never as a wash.
   - Space Grotesk for display type (geometric, technical character), IBM Plex
     Sans for body/UI (drawn by IBM for technical clarity), IBM Plex Mono
     reserved for genuine technical data — spec values, stats, project figures —
     the way a drawing's title block or data sheet would set them.
   - Square corners throughout (2px max radius): technical drawings are built
     from right angles. Corner "registration marks" echo drafting/print crop
     marks and recur only at the hero and project imagery, not on every card.
   - Left-aligned, asymmetric layout. Numbered steps used only for the Process
     section, because it is the one section that is genuinely sequential.
*/

:root {
  --paper: #f1f2ed;
  --paper-dim: #e6e8e0;
  --ink: #10161c;
  --ink-soft: #1b232b;
  --ink-softer: #2a333c;
  --blue: #1b3a5c;
  --blue-bright: #3e7cb1;
  --rust: #c1440e;
  --steel: #5b6570;
  --line: rgba(16, 22, 28, 0.13);
  --line-dark: rgba(241, 242, 237, 0.16);

  --font-display: 'Space Grotesk', 'Arial Narrow', sans-serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0 0 0.5em; line-height: 1.15; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 2px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: #ffffff; }
.btn-outline { border-color: var(--line-dark); color: var(--paper); }
.btn-outline:hover { border-color: var(--paper); }
.btn-dark { background: var(--ink); color: var(--paper); border: none; }
.btn-dark:hover { background: var(--blue); }
.btn-block { width: 100%; }

/* ---------- Header / nav ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: linear-gradient(to bottom, rgba(16,22,28,0.82), transparent);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.site-header.scrolled {
  background: var(--paper);
  box-shadow: 0 1px 0 var(--line);
}
.nav-inner {
  max-width: 1240px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 32px;
}
.brand {
  font-family: var(--font-display); font-weight: 700; font-size: 1.25rem;
  color: var(--paper); text-decoration: none; letter-spacing: -0.01em;
  display: inline-flex; align-items: center; gap: 8px;
}
.site-header.scrolled .brand { color: var(--ink); }
.brand-mark { width: 8px; height: 8px; background: var(--rust); display: inline-block; }
.primary-nav { display: flex; align-items: center; gap: 30px; }
.primary-nav a {
  color: rgba(241,242,237,0.82); text-decoration: none; font-size: 0.92rem;
  position: relative; padding-bottom: 3px;
}
.site-header.scrolled .primary-nav a { color: var(--ink-soft); }
.primary-nav a:not(.nav-cta)::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px;
  background: currentColor; transition: right 0.2s ease;
}
.primary-nav a:not(.nav-cta):hover::after { right: 0; }
.nav-cta {
  border: 1px solid var(--line-dark); padding: 9px 16px; border-radius: 2px;
  color: var(--paper) !important; transition: border-color 0.2s ease, background 0.2s ease;
}
.site-header.scrolled .nav-cta { border-color: var(--line); color: var(--ink) !important; }
.nav-cta:hover { background: rgba(241,242,237,0.1); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--paper); margin: 5px 0; transition: background 0.2s ease; }
.site-header.scrolled .nav-toggle span { background: var(--ink); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(to right, rgba(241,242,237,0.07) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(to bottom, rgba(241,242,237,0.07) 0 1px, transparent 1px 64px);
  mix-blend-mode: overlay;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(16,22,28,0.94) 8%, rgba(16,22,28,0.5) 50%, rgba(16,22,28,0.62) 100%);
}
.hero-content { position: relative; max-width: 660px; padding: 0 32px 110px; color: var(--paper); }
.hero-frame { position: absolute; inset: -28px -20px auto -20px; height: calc(100% + 56px); pointer-events: none; }
.corner { position: absolute; width: 22px; height: 22px; border-color: var(--rust); opacity: 0; animation: cornerIn 0.6s ease forwards; animation-delay: 0.15s; }
.corner.tl { top: 0; left: 0; border-top: 2px solid; border-left: 2px solid; }
.corner.tr { top: 0; right: 0; border-top: 2px solid; border-right: 2px solid; }
.corner.bl { bottom: 0; left: 0; border-bottom: 2px solid; border-left: 2px solid; }
.corner.br { bottom: 0; right: 0; border-bottom: 2px solid; border-right: 2px solid; }
@keyframes cornerIn { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: scale(1); } }

.hero-stamp {
  font-family: var(--font-mono); font-size: 0.8rem; color: rgba(241,242,237,0.68);
  margin-bottom: 20px; opacity: 0; animation: riseIn 0.7s ease forwards; animation-delay: 0.3s;
}
.hero-content h1 {
  font-size: clamp(2.3rem, 5.2vw, 3.8rem); margin-bottom: 22px;
  opacity: 0; animation: riseIn 0.7s ease forwards; animation-delay: 0.45s;
}
.hero-lede {
  font-size: 1.08rem; color: rgba(241,242,237,0.82); max-width: 48ch; margin-bottom: 34px; font-weight: 300;
  opacity: 0; animation: riseIn 0.7s ease forwards; animation-delay: 0.6s;
}
.hero-actions {
  display: flex; gap: 14px; flex-wrap: wrap;
  opacity: 0; animation: riseIn 0.7s ease forwards; animation-delay: 0.75s;
}
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .corner, .hero-stamp, .hero-content h1, .hero-lede, .hero-actions { opacity: 1; animation: none; }
}

/* ---------- Sections ---------- */
.section { padding: 116px 0; }
.section-inner { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.section-dim { background: var(--paper-dim); }
.section-head { max-width: 680px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); }
.section-lede { color: var(--steel); font-size: 1.03rem; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 72px; align-items: center; }
.about-copy h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); max-width: 15ch; }
.about-copy p { color: var(--ink-soft); max-width: 56ch; }
.about-image img { width: 100%; height: 460px; object-fit: cover; }
.credential-row { display: flex; gap: 44px; margin-top: 34px; flex-wrap: wrap; }
.credential-row strong { display: block; font-family: var(--font-display); font-size: 1.3rem; color: var(--blue); margin-bottom: 4px; }
.credential-row span { font-size: 0.82rem; color: var(--steel); }

/* ---------- Services ---------- */
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.service-card { background: var(--paper-dim); padding: 34px 28px; transition: background 0.2s ease; }
.service-card:hover { background: var(--paper); }
.service-code {
  font-family: var(--font-mono); font-size: 0.82rem; color: var(--rust);
  margin: 0 0 22px; letter-spacing: 0.02em;
}
.service-card h3 { font-size: 1.08rem; margin-bottom: 10px; }
.service-card p { font-size: 0.9rem; color: var(--steel); margin: 0; }

/* ---------- Expertise ---------- */
.expertise-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
.expertise-copy h2 { max-width: 16ch; }
.expertise-copy p { color: var(--ink-soft); max-width: 54ch; }
.spec-sheet { border-top: 1px solid var(--line); }
.spec-row { display: grid; grid-template-columns: 40% 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.spec-label { font-size: 0.82rem; color: var(--steel); }
.spec-value { font-family: var(--font-mono); font-size: 0.86rem; color: var(--ink); }

/* ---------- Projects ---------- */
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }
.project-card { background: var(--paper); }
.project-image { position: relative; overflow: hidden; }
.project-image img { width: 100%; height: 260px; object-fit: cover; transition: transform 0.4s ease; }
.project-card:hover .project-image img { transform: scale(1.04); }
.project-image::before, .project-image::after {
  content: ''; position: absolute; width: 16px; height: 16px; border-color: var(--paper); z-index: 1;
}
.project-image::before { top: 10px; left: 10px; border-top: 2px solid; border-left: 2px solid; }
.project-image::after { bottom: 10px; right: 10px; border-bottom: 2px solid; border-right: 2px solid; }
.project-body { padding: 24px 4px 0; }
.project-body h3 { font-size: 1.15rem; margin-bottom: 16px; }
.project-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.project-meta div { display: flex; flex-direction: column; gap: 3px; }
.project-meta span:first-child { font-size: 0.74rem; color: var(--steel); text-transform: lowercase; }
.project-meta span:last-child { font-size: 0.88rem; font-family: var(--font-mono); color: var(--ink); }

/* ---------- Why choose us ---------- */
.why-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px 56px; }
.why-item { display: flex; gap: 22px; align-items: flex-start; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.why-icon { width: 34px; height: 34px; flex-shrink: 0; color: var(--blue); margin-top: 2px; }
.why-item h3 { font-size: 1.05rem; margin-bottom: 8px; }
.why-item p { font-size: 0.92rem; color: var(--steel); margin: 0; }

/* ---------- Process ---------- */
.process-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; position: relative; }
.process-list::before {
  content: ''; position: absolute; top: 14px; left: 0; right: 0; height: 1px; background: var(--line);
}
.process-step { position: relative; padding: 0 20px 0 0; }
.process-step:first-child { padding-left: 0; }
.process-index {
  display: block; font-family: var(--font-mono); font-size: 0.85rem; color: var(--rust);
  background: var(--paper-dim); width: fit-content; padding-right: 10px; margin-bottom: 22px; position: relative; z-index: 1;
}
.process-step h3 { font-size: 1.02rem; margin-bottom: 8px; }
.process-step p { font-size: 0.87rem; color: var(--steel); margin: 0; }

/* ---------- Stats ---------- */
.stats-band { background: var(--ink); color: var(--paper); padding: 84px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; text-align: left; }
.stat { display: flex; flex-direction: column; }
.stat-value { display: flex; align-items: baseline; }
.stat-number { font-family: var(--font-mono); font-size: clamp(2.4rem, 4.5vw, 3.4rem); font-weight: 500; color: var(--paper); }
.stat-suffix { font-family: var(--font-mono); font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--rust); margin-left: 2px; }
.stat-label { font-size: 0.86rem; color: rgba(241,242,237,0.6); margin-top: 8px; }

/* ---------- CTA ---------- */
.cta { position: relative; background: var(--blue); color: var(--paper); padding: 110px 0; overflow: hidden; }
.cta-grid {
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(to right, rgba(241,242,237,0.06) 0 1px, transparent 1px 56px),
    repeating-linear-gradient(to bottom, rgba(241,242,237,0.06) 0 1px, transparent 1px 56px);
}
.cta-inner { position: relative; max-width: 640px; }
.cta h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
.cta p { color: rgba(241,242,237,0.82); font-size: 1.04rem; margin-bottom: 30px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 72px; align-items: start; }
.office-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.office-details h3 { font-size: 0.85rem; text-transform: none; color: var(--steel); margin-bottom: 10px; font-family: var(--font-body); font-weight: 500; }
.office-details p { font-size: 0.92rem; margin: 0; }
.office-details a { text-decoration: none; border-bottom: 1px solid var(--line); }
.office-details a:hover { border-color: var(--ink); }

.contact-form { display: flex; flex-direction: column; gap: 18px; }
.contact-form label { display: block; font-size: 0.84rem; color: var(--ink-soft); }
.contact-form label span { display: block; margin-bottom: 6px; }
.contact-form input, .contact-form textarea, .contact-form select {
  width: 100%; background: var(--paper); border: 1px solid var(--line);
  color: var(--ink); padding: 12px 14px; border-radius: 2px; font-family: var(--font-body); font-size: 0.94rem;
}
.contact-form select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235b6570' fill='none' stroke-width='1.4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus { outline: none; border-color: var(--blue); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-note { color: var(--blue); font-size: 0.86rem; margin-top: 2px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(241,242,237,0.72); padding: 72px 0 0; }
.footer-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 32px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px;
}
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h4 { font-family: var(--font-body); font-weight: 500; font-size: 0.82rem; color: var(--paper); margin: 0 0 6px; }
.footer-col a { text-decoration: none; color: rgba(241,242,237,0.68); font-size: 0.9rem; }
.footer-col a:hover { color: var(--paper); }
.footer-brand-col { gap: 14px; }
.footer-brand { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--paper); text-decoration: none; }
.footer-brand-col p { font-size: 0.88rem; margin: 0; max-width: 32ch; color: rgba(241,242,237,0.6); }
.footer-legal { margin-top: 56px; border-top: 1px solid var(--line-dark); padding: 22px 32px; }
.footer-legal p { margin: 0; font-size: 0.78rem; color: rgba(241,242,237,0.45); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .process-list { grid-template-columns: repeat(3, 1fr); row-gap: 36px; }
  .process-list::before { display: none; }
}
@media (max-width: 960px) {
  .about-grid, .expertise-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-image img { height: 320px; }
  .about-image { order: -1; }
  .why-list { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 36px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .section { padding: 80px 0; }
}
@media (max-width: 700px) {
  .primary-nav {
    position: fixed; top: 66px; left: 0; right: 0; bottom: 0; background: var(--ink);
    flex-direction: column; align-items: flex-start; padding: 24px 32px; gap: 20px;
    transform: translateY(-120%); transition: transform 0.25s ease; overflow-y: auto;
  }
  .primary-nav.open { transform: translateY(0); }
  .primary-nav a { color: rgba(241,242,237,0.85); }
  .nav-toggle { display: block; }
  .site-header .nav-toggle span { background: var(--paper); }
  .site-header.scrolled .nav-toggle span { background: var(--ink); }
  .site-header:has(.primary-nav.open) { background: var(--ink); }

  .services-grid { grid-template-columns: 1fr; }
  .process-list { grid-template-columns: 1fr; gap: 28px; }
  .credential-row { gap: 28px; }
  .office-details { grid-template-columns: 1fr; gap: 20px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
