:root {
  --steel: #1c1f1b;
  --steel-2: #262a24;
  --concrete: #e7e2d6;
  --paper: #f4f1e8;
  --line: rgba(244, 241, 232, 0.16);
  --line-dark: rgba(28, 31, 27, 0.14);
  --rust: #bb4d26;
  --rust-2: #96391a;
  --blueprint: #22394b;
  --brass: #c69a3d;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--concrete);
  color: var(--steel);
  font-family: "Inter", sans-serif;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 6rem 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 999;
  background: var(--paper);
  color: var(--steel);
  padding: 0.6rem 0.9rem;
  border-radius: 0.25rem;
}

.skip-link:focus {
  top: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 0.95;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-family: "Big Shoulders Display", sans-serif;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  opacity: 0.8;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-family: "IBM Plex Mono", monospace;
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  transition: background 0.3s ease, border-color 0.3s ease, padding 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(28, 31, 27, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.nav-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-header.is-scrolled .nav-wrap {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--paper);
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  font-weight: 900;
  font-family: "Big Shoulders Display", sans-serif;
  white-space: nowrap;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.dot {
  color: var(--rust);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--paper);
  width: 42px;
  height: 42px;
  border-radius: 0.2rem;
  cursor: pointer;
}

.primary-nav {
  margin-left: auto;
  display: flex;
  gap: 1.4rem;
}

.primary-nav a {
  color: var(--paper);
  opacity: 0.82;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: "IBM Plex Mono", monospace;
}

.primary-nav a:hover,
.primary-nav a.active {
  opacity: 1;
  color: var(--rust);
}

.nav-cta {
  color: var(--steel);
  background: var(--paper);
  border: 1px solid transparent;
  padding: 0.7rem 1rem;
  border-radius: 0.2rem;
  font-size: 0.75rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-family: "IBM Plex Mono", monospace;
}

.nav-cta:hover {
  background: var(--rust-2);
  color: var(--paper);
}

.hero {
  min-height: 100vh;
  background: radial-gradient(1100px 550px at 80% -10%, rgba(187, 77, 38, 0.18), transparent 60%), var(--steel);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}

.blueprint-grid {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, black, transparent 88%);
}

.brick-pile-widget {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 150;
  width: 168px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
}

.brick-pile-widget canvas {
  display: block;
  width: 100%;
  height: 168px;
}

.brick-pile-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper);
  background: rgba(28, 31, 27, 0.72);
  border: 1px solid var(--line);
  border-radius: 0.2rem;
  padding: 0.3rem 0.6rem;
  backdrop-filter: blur(6px);
}

@media (max-width: 720px) {
  .brick-pile-widget {
    display: none;
  }
}

.hero-grid {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  padding-top: 7.8rem;
  padding-bottom: 3rem;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.2rem;
  align-items: center;
}

.hero h1 {
  margin-top: 1.1rem;
  font-size: clamp(2.8rem, 7vw, 5.8rem);
}

.hero h1 em {
  font-style: normal;
  color: var(--rust);
}

.lede {
  max-width: 34rem;
  margin-top: 1.3rem;
  opacity: 0.8;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  gap: 0.9rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.btn-primary,
.btn-ghost,
.btn-ghost-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.8rem 1.25rem;
  border-radius: 0.2rem;
  border: 1px solid transparent;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  font-size: 0.78rem;
  font-family: "IBM Plex Mono", monospace;
}

.btn-primary {
  background: var(--rust-2);
  color: var(--paper);
}

.btn-primary:hover {
  background: #7c2f16;
}

.btn-ghost {
  color: var(--paper);
  border-color: var(--line);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--paper);
  background: rgba(244, 241, 232, 0.07);
}

.btn-ghost-dark {
  color: var(--steel);
  border-color: var(--line-dark);
}

.btn-ghost-dark:hover {
  border-color: var(--steel);
}

.hero-media {
  border: 1px solid var(--line);
  background: rgba(244, 241, 232, 0.04);
  padding: 0.7rem;
}

.hero-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.media-badge {
  margin-top: 0.8rem;
  color: var(--brass);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: "IBM Plex Mono", monospace;
}

.stats {
  background: var(--steel);
  color: var(--paper);
  padding: 3.6rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.stat {
  border-left: 1px solid var(--line);
  padding-left: 1rem;
}

.stat .num {
  color: var(--brass);
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 0.95;
  font-family: "Big Shoulders Display", sans-serif;
}

.stat .label {
  margin-top: 0.45rem;
  opacity: 0.72;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  text-transform: uppercase;
  font-family: "IBM Plex Mono", monospace;
}

.section-head {
  margin-bottom: 2.6rem;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
}

.section-head p {
  max-width: 23rem;
  opacity: 0.72;
  line-height: 1.6;
}

.section-head-light {
  color: var(--paper);
}

.service-grid,
.project-grid {
  display: grid;
  gap: 1rem;
}

.service-grid {
  grid-template-columns: repeat(3, 1fr);
}

.project-grid {
  grid-template-columns: repeat(3, 1fr);
}

.tilt-card,
.proj-card {
  perspective: 900px;
}

.tilt-inner,
.proj-inner {
  position: relative;
  height: 100%;
  border: 1px solid var(--line-dark);
  transition: transform 0.14s ease-out, box-shadow 0.2s ease;
  transform-style: preserve-3d;
}

.tilt-inner {
  min-height: 220px;
  background: var(--paper);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tilt-inner:hover,
.proj-inner:hover {
  box-shadow: 0 22px 44px rgba(28, 31, 27, 0.22);
}

.tilt-inner::after,
.proj-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(280px circle at var(--glare-x, 50%) var(--glare-y, 50%), rgba(244, 241, 232, 0.4), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.tilt-card:hover .tilt-inner::after,
.proj-card:hover .proj-inner::after {
  opacity: 1;
}

.tag {
  color: var(--rust);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-family: "IBM Plex Mono", monospace;
}

.tilt-inner h3 {
  margin-top: 0.8rem;
  font-size: 1.7rem;
}

.tilt-inner p {
  margin-top: 0.6rem;
  opacity: 0.7;
  line-height: 1.55;
}

.process {
  position: relative;
  color: var(--paper);
  background: var(--blueprint);
}

.process::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.34;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 40px 40px;
}

.process .wrap {
  position: relative;
  z-index: 2;
}

.timeline {
  position: relative;
  padding-left: 2.5rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.55rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 2px;
  background: var(--line);
}

.timeline-fill {
  position: absolute;
  left: 0.55rem;
  top: 0.4rem;
  width: 2px;
  height: 0;
  background: var(--brass);
  transition: height 0.1s linear;
}

.step {
  position: relative;
  padding: 0 0 2.4rem 1.6rem;
}

.step:last-child {
  padding-bottom: 0;
}

.step::before {
  content: attr(data-n);
  position: absolute;
  left: -2.55rem;
  top: -0.25rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  background: var(--blueprint);
  font-family: "IBM Plex Mono", monospace;
}

.step.active::before {
  border-color: var(--brass);
  color: var(--brass);
}

.step h3 {
  font-size: 1.7rem;
}

.step p {
  margin-top: 0.5rem;
  max-width: 36rem;
  opacity: 0.74;
  line-height: 1.6;
}

.proj-inner {
  position: relative;
  overflow: hidden;
}

.proj-inner img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.proj-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem;
  color: var(--paper);
  background: linear-gradient(180deg, transparent 0%, rgba(28, 31, 27, 0.8) 100%);
}

.proj-info h3 {
  margin-top: 0.4rem;
  font-size: 1.5rem;
}

.quote {
  background: var(--paper);
}

.quote-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.quote-copy h2 {
  margin-top: 1rem;
  font-size: clamp(2rem, 4vw, 3rem);
}

.quote-copy p {
  margin-top: 0.9rem;
  opacity: 0.75;
  line-height: 1.6;
}

.quote-form {
  border: 1px solid var(--line-dark);
  background: #fff;
  padding: 1.4rem;
  display: grid;
  gap: 0.4rem;
}

.quote-form label {
  margin-top: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.quote-form input,
.quote-form textarea {
  width: 100%;
  border: 1px solid #d2ccbc;
  background: #fff;
  color: var(--steel);
  padding: 0.75rem 0.8rem;
  font: inherit;
}

.quote-form input:focus,
.quote-form textarea:focus {
  outline: 2px solid rgba(187, 77, 38, 0.3);
  border-color: var(--rust);
}

.site-footer {
  background: var(--steel);
  color: var(--paper);
  padding: 3.4rem 0 1.3rem;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.6rem;
}

.foot-brand {
  font-size: 1.65rem;
  letter-spacing: 0.06em;
  font-family: "Big Shoulders Display", sans-serif;
}

.site-footer h3 {
  margin-bottom: 0.7rem;
  opacity: 0.74;
  letter-spacing: 0.1em;
  font-size: 1.05rem;
  font-family: "IBM Plex Mono", monospace;
}

.site-footer li {
  list-style: none;
  margin-bottom: 0.55rem;
  opacity: 0.85;
}

.foot-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  opacity: 0.6;
  letter-spacing: 0.03em;
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  font-family: "IBM Plex Mono", monospace;
}

.page-hero {
  min-height: 56vh;
  color: var(--paper);
  background: radial-gradient(700px 380px at 75% -20%, rgba(187, 77, 38, 0.22), transparent 60%), var(--steel);
  padding-top: 7.8rem;
  padding-bottom: 3rem;
  display: flex;
  align-items: end;
}

.page-hero h1 {
  margin-top: 1rem;
  font-size: clamp(2.5rem, 6.3vw, 5.2rem);
}

.page-hero p {
  margin-top: 1rem;
  max-width: 44rem;
  opacity: 0.82;
  line-height: 1.7;
}

.about-grid,
.contact-grid,
.contact-form-grid,
.auth-grid {
  display: grid;
  gap: 1rem;
}

.about-grid {
  grid-template-columns: 1fr 1fr;
}

.panel {
  border: 1px solid var(--line-dark);
  background: var(--paper);
  padding: 1.4rem;
}

.panel h2 {
  font-size: 2.1rem;
}

.panel p,
.panel li {
  margin-top: 0.9rem;
  line-height: 1.7;
  opacity: 0.84;
}

.panel li {
  list-style: none;
  position: relative;
  padding-left: 1.2rem;
}

.panel li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--rust);
}

.contact-grid {
  grid-template-columns: repeat(3, 1fr);
}

.contact-card {
  border: 1px solid var(--line-dark);
  background: var(--paper);
  padding: 1.4rem;
}

.contact-card i {
  color: var(--rust);
  font-size: 1.35rem;
}

.contact-card h3 {
  margin-top: 0.75rem;
  font-size: 1.45rem;
}

.contact-card p,
.contact-card a {
  display: block;
  margin-top: 0.55rem;
  opacity: 0.82;
}

.contact-form-grid {
  grid-template-columns: 1fr 1fr;
}

.map-wrap {
  border: 1px solid var(--line-dark);
  background: #ddd;
  min-height: 100%;
}

.map-wrap iframe {
  width: 100%;
  height: 100%;
  min-height: 350px;
  border: 0;
}

.auth-page {
  min-height: 100vh;
  background: radial-gradient(700px 380px at 75% -20%, rgba(187, 77, 38, 0.18), transparent 60%), var(--steel);
  color: var(--paper);
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.auth-grid {
  width: 100%;
  max-width: 900px;
  grid-template-columns: 1fr 1fr;
}

.auth-card {
  border: 1px solid var(--line);
  background: rgba(38, 42, 36, 0.94);
  padding: 1.4rem;
}

.auth-card h1 {
  font-size: clamp(2.1rem, 4vw, 3rem);
}

.auth-card p {
  margin-top: 0.8rem;
  opacity: 0.8;
  line-height: 1.6;
}

.auth-form {
  border: 1px solid #d2ccbc;
  background: var(--paper);
  color: var(--steel);
  padding: 1.4rem;
}

.auth-form h2 {
  font-size: 2rem;
}

.auth-form label {
  display: block;
  margin-top: 0.75rem;
  margin-bottom: 0.3rem;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
}

.auth-form input {
  width: 100%;
  border: 1px solid #d2ccbc;
  padding: 0.72rem 0.75rem;
  font: inherit;
}

.auth-form input:focus {
  outline: 2px solid rgba(187, 77, 38, 0.3);
  border-color: var(--rust);
}

.auth-form .btn-primary {
  width: 100%;
  margin-top: 1rem;
}

.auth-form .meta {
  margin-top: 0.8rem;
  font-size: 0.88rem;
}

.faq-list {
  display: grid;
  gap: 0.7rem;
}

.faq-item {
  border: 1px solid var(--line-dark);
  background: var(--paper);
  padding: 1rem 1.2rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::before {
  content: "+";
  color: var(--rust);
  margin-right: 0.6rem;
  font-family: "IBM Plex Mono", monospace;
}

.faq-item[open] summary::before {
  content: "-";
}

.faq-item p {
  margin-top: 0.7rem;
  line-height: 1.6;
  opacity: 0.82;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 960px) {
  .hero-grid,
  .about-grid,
  .quote-grid,
  .contact-form-grid,
  .auth-grid {
    grid-template-columns: 1fr;
  }

  .service-grid,
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    background: rgba(28, 31, 27, 0.98);
    border-bottom: 1px solid var(--line);
  }

  .primary-nav a {
    padding: 0.9rem 1.5rem;
    border-top: 1px solid var(--line);
  }

  .primary-nav.open {
    display: flex;
  }

  .nav-cta {
    display: none;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .service-grid,
  .project-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .foot-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
