/* ====================================================
   1. RESET & TOKENS
   ==================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--graphite);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }

:root {
  --ink: #0D1218;
  --ink-2: #1A2128;
  --paper: #EAE4D4;
  --paper-deep: #DDD5BE;
  --paper-card: #F2EDDF;
  --graphite: #2D343B;
  --steel: #5C6671;
  --steel-light: #8D95A0;
  --rust: #B7501F;
  --rust-light: #D26939;
  --white: #FFFFFF;
  --rule: rgba(13, 18, 24, 0.12);
  --rule-strong: rgba(13, 18, 24, 0.25);

  --font-display: 'Syne', 'Inter', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --maxw: 1320px;
  --gutter: clamp(20px, 4vw, 56px);
  --section-y: clamp(80px, 10vw, 140px);

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

::selection { background: var(--ink); color: var(--paper); }

/* Skip navigation link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--gutter, 20px);
  z-index: 9999;
  background: var(--rust);
  color: var(--white);
  padding: 12px 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: top 0.2s;
  white-space: nowrap;
}
.skip-link:focus {
  top: 0;
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

/* Screen-reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ====================================================
   2. UTILITY CLASSES
   ==================================================== */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: 920px; margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--steel);
  display: inline-block;
}

.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.h-display {
  font-family: var(--font-display);
  font-size: clamp(48px, 7.5vw, 104px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.h-section {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.h-3 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
}

.lead {
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.55;
  color: var(--graphite);
  font-weight: 400;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 26px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  transition: all 0.35s var(--ease);
  cursor: pointer;
}
.btn:hover { background: var(--rust); border-color: var(--rust); transform: translateY(-1px); }
.btn .arrow { transition: transform 0.35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.btn-light {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}
.btn-light:hover {
  background: var(--rust);
  border-color: var(--rust);
  color: var(--paper);
}

/* Section markers (engineering style) */
.section-marker {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 28px;
}
.section-marker .code {
  color: var(--ink);
  background: var(--ink);
  color: var(--paper);
  padding: 4px 9px;
  font-size: 10px;
}
.section-marker .rule {
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* Dimension/measurement aesthetic */
.dim {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--steel);
}

/* Animation base */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
[data-reveal].in {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
[data-reveal-stagger].in > * { opacity: 1; transform: translateY(0); }
[data-reveal-stagger].in > *:nth-child(2) { transition-delay: 0.08s; }
[data-reveal-stagger].in > *:nth-child(3) { transition-delay: 0.16s; }
[data-reveal-stagger].in > *:nth-child(4) { transition-delay: 0.24s; }
[data-reveal-stagger].in > *:nth-child(5) { transition-delay: 0.32s; }
[data-reveal-stagger].in > *:nth-child(6) { transition-delay: 0.40s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  [data-reveal], [data-reveal-stagger] > * { opacity: 1; transform: none; }
}

/* ====================================================
   3. TOP UTILITY BAR
   ==================================================== */
.utility-bar {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 10px 0;
  position: relative;
  z-index: 60;
}
.utility-bar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.utility-bar .items {
  display: flex;
  gap: 32px;
  align-items: center;
}
.utility-bar .item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--paper);
  opacity: 0.82;
}
.utility-bar .item:hover { opacity: 1; }
.utility-bar .label {
  color: var(--steel-light);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.16em;
}
.utility-bar .est {
  color: var(--steel-light);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
@media (max-width: 880px) {
  .utility-bar .items { gap: 18px; }
  .utility-bar .item .label { display: none; }
  .utility-bar .est { display: none; }
}
@media (max-width: 540px) {
  .utility-bar .items > a:first-child { display: none; }
}

/* ====================================================
   4. HEADER / NAVIGATION
   ==================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow 0.3s var(--ease);
}
.header.scrolled { box-shadow: 0 12px 32px -16px rgba(13, 18, 24, 0.08); }
.header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.logo .mark {
  width: 28px;
  height: 28px;
  display: inline-block;
  position: relative;
  align-self: center;
}
.logo .mark svg { width: 100%; height: 100%; }
.logo .sub {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel);
  margin-left: 4px;
}

.nav {
  display: flex;
  gap: 6px;
  align-items: center;
}
.nav a {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 10px 14px;
  position: relative;
  transition: color 0.25s var(--ease);
}
.nav a::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 1px;
  background: var(--rust);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s var(--ease);
}
.nav a:hover { color: var(--rust); }
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }
.nav a.active { color: var(--rust); }

.header-tools {
  display: flex;
  align-items: center;
  gap: 14px;
}
.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule-strong);
  transition: all 0.25s var(--ease);
  color: var(--ink);
}
.icon-btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }

.header-cta {
  background: var(--ink);
  color: var(--paper);
  padding: 12px 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: background 0.25s var(--ease);
}
.header-cta:hover { background: var(--rust); }

.menu-toggle { display: none; }

@media (max-width: 1080px) {
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .header-cta { display: none; }
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--paper);
  z-index: 70;
  padding: 60px var(--gutter);
  display: none;
  flex-direction: column;
  overflow-y: auto;
}
.mobile-menu.open { display: flex; }
.mobile-menu .close {
  position: absolute;
  top: 24px;
  right: var(--gutter);
}
.mobile-menu nav {
  margin-top: 60px;
  display: flex;
  flex-direction: column;
}
.mobile-menu nav a {
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mobile-menu nav a .num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--steel);
  letter-spacing: 0.1em;
}
.mobile-menu .contact-block {
  margin-top: auto;
  padding-top: 40px;
}
.mobile-menu .contact-block .dim { display: block; margin-bottom: 4px; }
.mobile-menu .contact-block .line {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--ink);
  margin-bottom: 20px;
}

/* Search overlay */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 18, 24, 0.94);
  z-index: 80;
  display: none;
  padding: 0 var(--gutter);
}
.search-overlay.open {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 18vh;
}
.search-overlay .search-wrap {
  width: 100%;
  max-width: 760px;
}
.search-overlay .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel-light);
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
}
.search-overlay input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(234, 228, 212, 0.3);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 48px);
  padding: 16px 0;
  letter-spacing: -0.02em;
}
.search-overlay input:focus { outline: none; border-bottom-color: var(--rust); }
.search-overlay .hint {
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--steel-light);
}
.search-overlay .results {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
}
.search-overlay .results a {
  padding: 14px 0;
  border-bottom: 1px solid rgba(234, 228, 212, 0.1);
  color: var(--paper);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-body);
  font-size: 17px;
  transition: color 0.25s var(--ease), padding 0.25s var(--ease);
}
.search-overlay .results a:hover { color: var(--rust-light); padding-left: 6px; }
.search-overlay .results a .cat {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel-light);
}
.search-overlay .close-search {
  position: absolute;
  top: 32px;
  right: var(--gutter);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* ====================================================
   5. PAGE SWITCHING
   ==================================================== */
.page { display: none; }
.page.active { display: block; animation: pageFade 0.5s var(--ease-out); }
@keyframes pageFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ====================================================
   6. HERO
   ==================================================== */
.hero {
  position: relative;
  padding: clamp(60px, 9vw, 120px) 0 clamp(80px, 10vw, 140px);
  overflow: hidden;
}
.hero .grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 60px;
}
.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: clamp(40px, 6vw, 80px);
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
}
.hero-top .tags {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.hero-top .tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel);
}
.hero-top .tag strong {
  color: var(--ink);
  font-weight: 500;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(56px, 10vw, 148px);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: var(--ink);
  max-width: 14ch;
}
.hero-headline .accent {
  color: var(--rust);
  font-style: italic;
  font-weight: 500;
}
.hero-headline .underline-line {
  position: relative;
  display: inline-block;
}
.hero-headline .underline-line::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 6%;
  height: 6px;
  background: var(--rust);
  transform: scaleX(0);
  transform-origin: left;
  animation: heroUnderline 1.4s 0.6s var(--ease-out) forwards;
}
@keyframes heroUnderline { to { transform: scaleX(1); } }

.hero-bottom {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 80px;
  align-items: end;
  margin-top: clamp(40px, 6vw, 80px);
}
.hero-bottom .lead { max-width: 56ch; }
.hero-bottom .cta-stack { display: flex; flex-direction: column; gap: 16px; }
.hero-bottom .cta-stack .btn { justify-content: space-between; }

/* Hero technical drawing */
.hero-drawing {
  position: absolute;
  top: 50%;
  right: -5%;
  width: 45%;
  max-width: 600px;
  transform: translateY(-50%);
  opacity: 0.07;
  pointer-events: none;
}
.hero-drawing svg { width: 100%; }

@media (max-width: 880px) {
  .hero-bottom { grid-template-columns: 1fr; gap: 32px; }
  .hero-drawing { display: none; }
}
@media (max-width: 480px) {
  .hero-headline { font-size: clamp(36px, 11vw, 56px); }
}

/* ====================================================
   7. SERVICE GRID
   ==================================================== */
.section { padding: var(--section-y) 0; }
.section.alt { background: var(--paper-deep); }
.section.dark { background: var(--ink); color: var(--paper); }
.section.dark .section-marker { color: var(--steel-light); }
.section.dark .section-marker .rule { background: rgba(234, 228, 212, 0.15); }
.section.dark .h-section, .section.dark h1, .section.dark h2, .section.dark h3 { color: var(--paper); }

.section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  margin-bottom: clamp(48px, 6vw, 80px);
  align-items: end;
}
.section-head .titles { max-width: 720px; }
.section-head .titles .lead { margin-top: 18px; }
.section-head .head-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
  text-align: right;
  white-space: nowrap;
}
@media (max-width: 760px) {
  .section-head { grid-template-columns: 1fr; }
  .section-head .head-meta { text-align: left; }
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule-strong);
  border: 1px solid var(--rule-strong);
}
.service-card {
  background: var(--paper-card);
  padding: 36px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  transition: background 0.4s var(--ease);
  cursor: pointer;
  min-height: 320px;
}
.service-card:hover { background: var(--ink); color: var(--paper); }
.service-card:hover .h-3, .service-card:hover .service-num { color: var(--paper); }
.service-card:hover .service-arrow { color: var(--rust-light); transform: translateX(4px) translateY(-4px); }
.service-card:hover .service-num { color: var(--rust-light); }
.service-card .top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.service-card .service-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--steel);
  transition: color 0.4s var(--ease);
}
.service-card .service-arrow {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink);
  transition: color 0.4s var(--ease), transform 0.4s var(--ease);
}
.service-card .h-3 { transition: color 0.4s var(--ease); }
.service-card p {
  font-size: 14px;
  color: var(--steel);
  line-height: 1.55;
  margin-bottom: auto;
  transition: color 0.4s var(--ease);
}
.service-card:hover p { color: var(--steel-light); }
.service-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.service-card .tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel);
  padding: 4px 8px;
  border: 1px solid var(--rule-strong);
  transition: all 0.4s var(--ease);
}
.service-card:hover .tag { color: var(--steel-light); border-color: rgba(234,228,212,0.2); }

@media (max-width: 980px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .services-grid { grid-template-columns: 1fr; } }

/* ====================================================
   8. PROJECTS
   ==================================================== */
.projects-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
}
.filter-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 10px 16px;
  border: 1px solid var(--rule-strong);
  background: transparent;
  color: var(--ink);
  transition: all 0.25s var(--ease);
}
.filter-chip:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.filter-chip.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 980px) { .projects-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .projects-grid { grid-template-columns: 1fr; } }

.project-card {
  display: block;
  background: var(--paper-card);
  border: 1px solid var(--rule);
  transition: all 0.4s var(--ease);
}
.project-card:hover { transform: translateY(-4px); border-color: var(--ink); }
.project-card .visual {
  aspect-ratio: 4/3;
  background: var(--ink);
  position: relative;
  overflow: hidden;
}
.project-card .project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease);
}
.project-card:hover .project-img {
  transform: scale(1.04);
}
.project-card .visual .corner {
  position: absolute;
  top: 16px;
  right: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
  padding: 5px 9px;
  background: rgba(13,18,24,0.7);
  border: 1px solid rgba(234,228,212,0.2);
}
.project-card .body { padding: 24px 24px 28px; }
.project-card .meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--steel);
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
  text-transform: uppercase;
}
.project-card .title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.18;
  margin-bottom: 16px;
}
.project-card .specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.project-card .spec {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--steel);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.project-card .spec strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  margin-top: 2px;
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-body);
}

/* ====================================================
   9. STATS
   ==================================================== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid rgba(234,228,212,0.2);
  border-bottom: 1px solid rgba(234,228,212,0.2);
}
.stat {
  padding: 60px 32px;
  border-right: 1px solid rgba(234,228,212,0.2);
  position: relative;
}
.stat:last-child { border-right: none; }
.stat .num {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 84px);
  font-weight: 600;
  color: var(--paper);
  line-height: 1;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.stat .num .unit {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--rust-light);
  font-weight: 500;
  letter-spacing: 0.06em;
}
.stat .label {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel-light);
}
.stat::before {
  content: attr(data-code);
  position: absolute;
  top: 24px;
  right: 24px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--steel-light);
  opacity: 0.7;
}
@media (max-width: 880px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid rgba(234,228,212,0.2); }
}
@media (max-width: 480px) {
  .stat { padding: 32px 16px; }
  .stat .num { font-size: clamp(32px, 9vw, 48px); }
}

/* ====================================================
   10. ABOUT PREVIEW
   ==================================================== */
.about-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-preview .visual {
  position: relative;
  aspect-ratio: 4/5;
  background: var(--ink);
  overflow: hidden;
}
.about-preview .visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(234,228,212,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(234,228,212,0.08) 1px, transparent 1px);
  background-size: 40px 40px;
}
.about-preview .visual .draw {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}
.about-preview .visual .draw svg { width: 100%; opacity: 0.9; }
.about-preview .visual .label {
  position: absolute;
  bottom: 24px;
  left: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rust-light);
}
.about-preview .visual .corners {
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(234,228,212,0.15);
  pointer-events: none;
}
.about-preview .copy p {
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 18px;
  color: var(--graphite);
}
.about-preview .copy .btn { margin-top: 16px; }
@media (max-width: 880px) {
  .about-preview { grid-template-columns: 1fr; gap: 40px; }
  .about-preview .visual { aspect-ratio: 16/10; max-height: 340px; }
}

/* ====================================================
   11. BLOG
   ==================================================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 880px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .blog-grid { grid-template-columns: 1fr; } }

.blog-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  cursor: pointer;
  padding-top: 28px;
  border-top: 1px solid var(--rule-strong);
  transition: padding-top 0.3s var(--ease);
}
.blog-card:hover { padding-top: 22px; }
.blog-card:hover::before { transform: scaleX(1); }
.blog-card .meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
}
.blog-card .meta .cat { color: var(--rust); }
.blog-card .title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.blog-card .excerpt {
  font-size: 14px;
  color: var(--steel);
  line-height: 1.6;
}
.blog-card .read {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  display: inline-flex;
  gap: 8px;
  align-items: center;
  text-decoration: none;
}
.blog-card .read:hover,
.blog-card:hover .read { color: var(--rust); }

/* ====================================================
   12. CONTACT SECTION
   ==================================================== */
.contact-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}
@media (max-width: 880px) { .contact-block { grid-template-columns: 1fr; gap: 40px; } }

.contact-info .value { overflow-wrap: break-word; }
@media (max-width: 480px) {
  .contact-info { padding: 36px 24px; }
  .contact-info .value { font-size: 18px; }
}

.contact-form { display: flex; flex-direction: column; gap: 20px; }
.contact-form .field { display: flex; flex-direction: column; gap: 8px; }
.contact-form .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 600px) { .contact-form .field-row { grid-template-columns: 1fr; } }
.contact-form label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
}
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 14px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule-strong);
  color: var(--ink);
  font-size: 16px;
  transition: border-color 0.25s var(--ease);
}
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-bottom-color: var(--ink);
}
.contact-form textarea { resize: vertical; min-height: 80px; }
.contact-form .btn { align-self: flex-start; margin-top: 12px; }

.contact-info {
  background: var(--ink);
  color: var(--paper);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.contact-info .group { display: flex; flex-direction: column; gap: 6px; }
.contact-info .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel-light);
}
.contact-info .value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--paper);
}
.contact-info .value a { color: var(--paper); }
.contact-info .value a:hover { color: var(--rust-light); }
.contact-info .map {
  margin-top: auto;
  aspect-ratio: 16/10;
  background: var(--ink-2);
  border: 1px solid rgba(234,228,212,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-image:
    linear-gradient(rgba(234,228,212,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(234,228,212,0.08) 1px, transparent 1px);
  background-size: 24px 24px;
}
.contact-info .map .pin {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rust-light);
  padding: 8px 14px;
  border: 1px solid var(--rust-light);
}

/* ====================================================
   13. FOOTER
   ==================================================== */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding: 80px 0 32px;
}
.footer .grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(234,228,212,0.15);
}
@media (max-width: 880px) { .footer .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer .grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .footer { padding: 56px 0 24px; } }

.footer .brand { font-family: var(--font-display); font-size: 28px; font-weight: 700; margin-bottom: 16px; color: var(--paper); }
.footer .brand-desc { color: var(--steel-light); font-size: 14px; line-height: 1.6; max-width: 40ch; }
.footer .col-head {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rust-light);
  margin-bottom: 20px;
}
.footer .col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer .col a { color: var(--paper); opacity: 0.78; font-size: 14px; transition: opacity 0.25s var(--ease); }
.footer .col a:hover { opacity: 1; color: var(--rust-light); }

.footer .bottom {
  margin-top: 32px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--steel-light);
}

/* ====================================================
   14. PAGE: HAKKIMIZDA / SERVICES / DETAIL / PROJECTS / BLOG / CONTACT
   ==================================================== */
.page-hero {
  padding: clamp(60px, 8vw, 120px) 0 clamp(50px, 6vw, 80px);
  border-bottom: 1px solid var(--rule);
}
.page-hero .crumbs {
  display: flex;
  gap: 8px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 36px;
}
.page-hero .crumbs a:hover { color: var(--rust); }
.page-hero .crumbs .sep { color: var(--steel); opacity: 0.5; }

.page-hero .h-display { margin-bottom: 24px; }
.page-hero .lead { max-width: 64ch; }

.two-col {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 80px;
}
@media (max-width: 980px) { .two-col { grid-template-columns: 1fr; gap: 40px; } }

.timeline { display: flex; flex-direction: column; }
.timeline-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 32px;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
}
.timeline-row:last-child { border-bottom: 1px solid var(--rule); }
.timeline-row .year {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--rust);
  letter-spacing: 0.06em;
}
.timeline-row .title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}
.timeline-row p { font-size: 15px; color: var(--steel); line-height: 1.6; }

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 880px) { .values-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .values-grid { grid-template-columns: 1fr; } }
.value-card {
  padding: 32px 28px;
  background: var(--paper-card);
  border: 1px solid var(--rule);
}
.value-card .num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--rust);
  margin-bottom: 20px;
}
.value-card h3 { margin-bottom: 12px; }
.value-card p { font-size: 14px; color: var(--steel); line-height: 1.6; }

/* Service detail */
.service-detail-hero {
  padding: clamp(60px, 8vw, 120px) 0 clamp(60px, 7vw, 100px);
  border-bottom: 1px solid var(--rule);
}
.service-detail-hero .grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: end;
}
@media (max-width: 980px) { .service-detail-hero .grid { grid-template-columns: 1fr; } }
.service-detail-hero .h-display { margin-bottom: 20px; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--rule-strong);
  border: 1px solid var(--rule-strong);
}
@media (max-width: 880px) { .features-grid { grid-template-columns: 1fr; } }
.feature {
  background: var(--paper);
  padding: 32px 28px;
}
.feature .num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--rust);
  letter-spacing: 0.14em;
  margin-bottom: 18px;
}
.feature h3 { font-size: 19px; margin-bottom: 10px; }
.feature p { font-size: 14px; color: var(--steel); line-height: 1.6; }

.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
@media (max-width: 880px) { .process { grid-template-columns: 1fr 1fr; gap: 24px; } }
@media (max-width: 540px) { .process { grid-template-columns: 1fr; } }
.process-step { border-top: 2px solid var(--ink); padding-top: 20px; }
.process-step .num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--steel);
  letter-spacing: 0.14em;
  margin-bottom: 10px;
}
.process-step h3 { font-size: 18px; margin-bottom: 10px; }
.process-step p { font-size: 13px; color: var(--steel); line-height: 1.6; }

.faq { border-top: 1px solid var(--rule); }
.faq-item {
  border-bottom: 1px solid var(--rule);
  padding: 24px 0;
  cursor: pointer;
}
.faq-item .q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  color: var(--ink);
  width: 100%;
  text-align: left;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}
.faq-item .icon {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--rust);
  transition: transform 0.3s var(--ease);
}
.faq-item.open .icon { transform: rotate(45deg); }
.faq-item .a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s var(--ease), margin 0.45s var(--ease);
  color: var(--steel);
  font-size: 15px;
  line-height: 1.65;
}
.faq-item.open .a { max-height: 500px; margin-top: 16px; }

/* CTA band */
.cta-band {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(80px, 9vw, 120px) 0;
}
.cta-band .h-section { color: var(--paper); margin-bottom: 24px; }
.cta-band .lead { color: var(--steel-light); margin-bottom: 36px; max-width: 60ch; }
.cta-band .actions { display: flex; gap: 16px; flex-wrap: wrap; }
.cta-band .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.cta-band .btn:hover { background: var(--rust); border-color: var(--rust); color: var(--paper); }
.cta-band .btn-ghost-light { background: transparent; color: var(--paper); border-color: rgba(234,228,212,0.4); }
.cta-band .btn-ghost-light:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* Blog detail/list */
.blog-list .blog-card { padding: 36px 0; border-top: 1px solid var(--rule); }
.blog-list .blog-card:hover { padding-left: 12px; transition: padding 0.3s var(--ease); }

/* Helper */
.mt-section { margin-top: var(--section-y); }
.mb-section { margin-bottom: var(--section-y); }

/* ====================================================
   15. MOBILE RESPONSIVE IMPROVEMENTS
   ==================================================== */

/* Timeline: stack year and content on small screens */
@media (max-width: 600px) {
  .timeline-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .timeline-row .year { font-size: 12px; }
}

/* Filter chips: larger touch targets on mobile */
@media (max-width: 760px) {
  .filter-chip {
    padding: 12px 16px;
    min-height: 44px;
  }
}

/* Icon buttons: 44px minimum touch target on mobile */
@media (max-width: 760px) {
  .icon-btn { width: 44px; height: 44px; }
}

/* About preview drawing: less padding on small screens */
@media (max-width: 540px) {
  .about-preview .visual .draw { padding: 28px; }
}

/* CTA band: full-width stacked buttons on phones */
@media (max-width: 480px) {
  .cta-band .actions { flex-direction: column; }
  .cta-band .actions .btn { width: 100%; justify-content: space-between; }
}

/* Contact form submit button: full-width on phones */
@media (max-width: 480px) {
  .contact-form .btn { width: 100%; justify-content: space-between; }
}

/* Service card: better spacing on small screens */
@media (max-width: 480px) {
  .service-card { padding: 28px 22px 24px; min-height: 280px; }
}

/* Page hero headings: tighter on small phones */
@media (max-width: 480px) {
  .page-hero { padding: 44px 0 36px; }
  .page-hero .crumbs { margin-bottom: 24px; }
}

/* Section head extra gap on narrow screens */
@media (max-width: 480px) {
  .section-head { margin-bottom: 36px; }
}

/* Process steps: single column on very small screens */
@media (max-width: 400px) {
  .process { grid-template-columns: 1fr; }
}

/* Mobile menu: smaller nav font on tiny screens */
@media (max-width: 380px) {
  .mobile-menu nav a { font-size: 22px; }
  .mobile-menu { padding: 60px 20px; }
}

/* Remove forced line breaks in headings on phones (they naturally reflow) */
@media (max-width: 640px) {
  .hero-headline br,
  .h-display br,
  .h-section br { display: none; }
}
