:root {
  --navy: #0b2e97;
  --navy-soft: #3c5ab4;
  --cream: #f6f9f5;
  --terracotta: #7a2333;
  --terracotta-soft: #d99aa3;
  --maxw: 1240px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

h1, h2, h3, .display {
  font-family: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  line-height: 1.0;
  margin: 0;
  letter-spacing: -0.02em;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--cream);
  border-bottom: 1px solid rgba(11,46,151,0.12);
}

.header-row {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 32px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  justify-self: start;
}
.logo-mark {
  width: 34px;
  height: auto;
  flex-shrink: 0;
}
.logo-text {
  font-family: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.01em;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.logo-sub {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-top: 2px;
}

.menu-toggle, .search-toggle {
  background: none;
  border: none;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy);
  cursor: pointer;
  padding: 8px 4px;
}
.menu-toggle { justify-self: center; }
.search-toggle { justify-self: end; }
.menu-toggle:hover, .search-toggle:hover { color: var(--terracotta); }

/* Mega menu */
.mega-menu {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: var(--navy);
  color: var(--cream);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  height: 100vh;
  transform: translateY(-100%);
  transition: transform 0.45s cubic-bezier(.77,0,.18,1);
}
.mega-menu.open { transform: translateY(0); }
.mega-menu a {
  font-family: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: clamp(36px, 7vw, 70px);
  color: var(--cream);
  transition: color 0.2s;
}
.mega-menu a:hover { color: var(--terracotta-soft); }
.mega-close {
  position: absolute;
  top: 26px;
  right: 32px;
  background: none;
  border: none;
  color: var(--cream);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.16em;
  font-size: 13px;
  cursor: pointer;
  text-transform: uppercase;
}
.mega-tagline {
  position: absolute;
  bottom: 34px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terracotta-soft);
}

/* Search overlay */
.search-overlay {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: var(--cream);
  z-index: 45;
  padding: 100px 32px 40px;
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(.77,0,.18,1);
  box-shadow: 0 10px 40px rgba(11,46,151,0.12);
}
.search-overlay.open { transform: translateY(0); }
.search-inner { max-width: 780px; margin: 0 auto; }
.search-inner input {
  width: 100%;
  border: none;
  border-bottom: 2px solid var(--navy);
  background: transparent;
  font-family: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(24px, 4vw, 38px);
  color: var(--navy);
  padding: 10px 0;
  outline: none;
}
.search-inner input::placeholder { color: rgba(11,46,151,0.35); }
.search-results { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.search-results a {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  padding: 8px 0;
  border-bottom: 1px solid rgba(11,46,151,0.12);
}
.search-results a:hover { color: var(--terracotta); }
.search-empty { color: rgba(11,46,151,0.5); font-size: 14px; margin-top: 10px; }
.search-close {
  position: absolute;
  top: 26px;
  right: 32px;
  background: none;
  border: none;
  color: var(--navy);
  font-weight: 700;
  letter-spacing: 0.16em;
  font-size: 13px;
  cursor: pointer;
  text-transform: uppercase;
}

/* ---------- Hero ---------- */
.hero {
  padding-top: 90px;
  padding-bottom: 70px;
}
.hero h1 {
  font-size: clamp(30px, 5.6vw, 80px);
  white-space: normal;
}
.hero .lede {
  max-width: 900px;
  margin-top: 26px;
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  color: rgba(11,46,151,0.78);
}
.hero .lede + .lede { margin-top: 14px; }
.hero-cta {
  margin-top: 34px;
  display: inline-flex;
}

.btn-pill {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 999px;
  background: var(--terracotta);
  color: var(--cream);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.2s, transform 0.2s;
}
.btn-pill:hover { background: var(--navy); transform: translateY(-2px); }

.btn-pill.outline {
  background: transparent;
  border: 1.5px solid var(--navy);
  color: var(--navy);
}
.btn-pill.outline:hover { background: var(--navy); color: var(--cream); }

/* ---------- Section headings ---------- */
.page-title {
  padding-top: 60px;
  padding-bottom: 10px;
}
.page-title h2 {
  font-size: clamp(38px, 6.5vw, 76px);
}
.page-lede {
  max-width: 640px;
  margin-top: 18px;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  color: rgba(11,46,151,0.78);
}

/* ---------- Projects grid ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px 22px;
  padding-top: 50px;
  padding-bottom: 20px;
}
@media (max-width: 980px) { .projects-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .projects-grid { grid-template-columns: 1fr; } }

.project-tile { display: block; }
.project-tile .thumb {
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 4px;
  background: var(--navy);
}
.project-tile .thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.project-tile:hover .thumb img { transform: scale(1.05); }
.project-tile .cap {
  margin-top: 12px;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.03em;
  line-height: 1.45;
  text-transform: uppercase;
}
.project-tile .cap .loc { color: var(--terracotta); }

.projects-explore {
  display: flex;
  justify-content: center;
  padding-top: 30px;
  padding-bottom: 50px;
}

.projects-cta {
  text-align: center;
  padding-top: 50px;
  padding-bottom: 90px;
}
.projects-cta-text {
  max-width: 520px;
  margin: 0 auto 26px;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  color: rgba(11,46,151,0.78);
}

/* ---------- Project detail ---------- */
.detail-back {
  display: inline-block;
  margin: 40px 0 20px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.detail-back:hover { color: var(--terracotta); }
.detail-hero img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 4px;
}
.detail-meta {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  margin: 30px 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.detail-meta span.k { color: var(--terracotta); display: block; font-size: 11px; margin-bottom: 4px; }
.detail-title { margin: 26px 0 18px; font-size: clamp(32px, 5.5vw, 56px); }
.detail-body { max-width: 700px; font-size: 16px; line-height: 1.75; padding-bottom: 90px; font-weight: 400; color: rgba(11,46,151,0.78); }
.detail-body p + p { margin-top: 16px; }
.detail-credit {
  margin-top: 24px !important;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--terracotta);
}
.detail-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  padding-bottom: 90px;
}
.detail-gallery-item {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 4px;
  background: var(--navy);
}
.detail-gallery-item img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
@media (max-width: 980px) { .detail-gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .detail-gallery { grid-template-columns: 1fr; } }
.detail-hero img { cursor: zoom-in; }

/* ---------- Lightbox ---------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(11,15,46,0.92);
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 28px;
  background: none;
  border: none;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 10px;
}
@media (max-width: 640px) {
  .lightbox { padding: 20px; }
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding-top: 60px;
  padding-bottom: 100px;
  align-items: start;
}
@media (max-width: 800px) { .about-grid { grid-template-columns: 1fr; } }
.about-grid img { border-radius: 4px; width: 100%; }
.about-copy p { font-size: 16px; line-height: 1.75; margin: 0 0 16px; font-weight: 400; color: rgba(11,46,151,0.78); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding-top: 60px;
  padding-bottom: 110px;
}
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info a.line { display: block; font-weight: 700; font-size: 18px; margin-bottom: 14px; }
.contact-info a.line:hover { color: var(--terracotta); }
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.contact-form input, .contact-form textarea {
  width: 100%;
  border: none;
  border-bottom: 1.5px solid var(--navy);
  background: transparent;
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
  padding: 10px 2px;
  color: var(--navy);
  outline: none;
}
.contact-form textarea { resize: vertical; min-height: 100px; }
.contact-form button { align-self: flex-start; margin-top: 6px; border: none; cursor: pointer; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid rgba(11,46,151,0.12);
  padding: 40px 0;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  font-weight: 600;
}
.footer-row a:hover { color: var(--terracotta); }
.footer-legal {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(11,46,151,0.08);
  font-size: 11px;
  font-weight: 400;
  color: rgba(11,46,151,0.55);
}
.footer-legal a { color: rgba(11,46,151,0.55); text-decoration: underline; }
.footer-legal a:hover { color: var(--terracotta); }

/* ---------- Services ---------- */
.services-section {
  padding-top: 80px;
  padding-bottom: 10px;
  border-top: 1px solid rgba(11,46,151,0.12);
}
.services-intro h2 { font-size: clamp(32px, 5vw, 52px); }
.services-intro .lede { margin-top: 18px; max-width: 480px; }

.services-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 60px;
  margin-top: 44px;
}
.service-card {
  padding: 24px 0;
  border-bottom: 1px solid rgba(11,46,151,0.12);
}
.services-cards .service-card:nth-child(-n+2) { padding-top: 0; }

.service-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.service-title::before {
  content: "•";
  color: var(--terracotta);
  margin-right: 9px;
}
.service-text {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.6;
  font-weight: 400;
  color: rgba(11,46,151,0.75);
}

.services-note {
  margin: 26px 0 0;
  font-size: 14px;
  font-style: italic;
  color: rgba(11,46,151,0.6);
}
@media (max-width: 700px) {
  .services-cards { grid-template-columns: 1fr; }
  .services-cards .service-card:nth-child(-n+2) { padding-top: 24px; }
  .services-cards .service-card:first-child { padding-top: 0; }
}

/* ---------- Home teaser ---------- */
.home-teaser-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 70px;
  padding-bottom: 10px;
}
.home-teaser-head h2 { font-size: clamp(30px, 4.6vw, 52px); }
.home-teaser-head a { font-weight: 700; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }
.home-teaser-head a:hover { color: var(--terracotta); }

/* ---------- Mobile side spacing (kept last so it always wins) ---------- */
@media (max-width: 640px) {
  .wrap { padding-left: 28px !important; padding-right: 28px !important; }
  .header-row { padding-left: 28px !important; padding-right: 28px !important; }
  .search-overlay { padding-left: 28px !important; padding-right: 28px !important; }
}
