/* Layout concept: a construction drawing sheet — fine grid, title blocks and dimension lines frame real project facts */
:root {
  --navy: #14275f;
  --navy-deep: #0c1838;
  --steel: #8e98ad;
  --sand: #c9a96a;
  --sand-deep: #9c7c3c;
  --paper: #f4f5f8;
  --white: #ffffff;
  --ink: #131a2c;
  --muted: #586179;
  --line: #d8dce6;
  --line-dark: rgba(255, 255, 255, 0.14);

  --font-display: 'Archivo', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'IBM Plex Sans', 'Segoe UI', Roboto, Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem);
  --step-4: clamp(2.25rem, 1.4rem + 3.6vw, 4.25rem);

  --wrap: 1240px;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-stretch: 108%;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
  color: var(--navy-deep);
}
p { margin: 0; }
:focus-visible { outline: 2px solid var(--sand); outline-offset: 3px; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 64px);
  margin: 0 auto;
  padding-left: max(var(--gutter), 32px);
  padding-right: max(var(--gutter-r), 32px);
}
@media (max-width: 640px) {
  .wrap { padding-left: var(--gutter); padding-right: var(--gutter-r); }
}

.label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sand-deep);
}
.on-dark .label { color: var(--sand); }

/* ---------- Header ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 60;
  background: var(--white);
}
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 52px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-display); font-stretch: 112%; font-size: 1.2rem; color: var(--navy); letter-spacing: 0.02em; }
.brand-text span { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  position: relative;
  padding: 10px 14px;
  font-size: 0.94rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 2px;
  background: var(--sand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--navy); font-weight: 600; }
.nav .btn { margin-left: 12px; }
.nav .btn::after { display: none; }

.menu-toggle {
  display: none;
  width: 46px; height: 46px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
}
.menu-toggle svg { width: 22px; height: 22px; margin: auto; }

@media (max-width: 900px) {
  .menu-toggle { display: flex; }
  .nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter-r) 20px var(--gutter);
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -28px rgba(12, 24, 56, 0.45);
  }
  .nav:not(.open) { display: none; }
  .nav a { padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .nav a::after { left: 4px; right: auto; width: 32px; bottom: 8px; }
  .nav .btn { margin: 16px 0 0; justify-content: center; border-bottom: 0; }
  .brand img { height: 44px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn svg { width: 18px; height: 18px; transition: transform 0.2s; }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--sand); color: var(--navy-deep); }
.btn-primary:hover { background: #d8bc85; }
.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: var(--navy-deep); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.45); color: var(--white); }
.btn-ghost:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.08); }
.btn-line { border-color: var(--navy); color: var(--navy); }
.btn-line:hover { background: var(--navy); color: var(--white); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy-deep);
  color: var(--white);
}
.hero-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 24, 56, 0.96) 0%, rgba(12, 24, 56, 0.82) 42%, rgba(12, 24, 56, 0.25) 100%),
    linear-gradient(0deg, rgba(12, 24, 56, 0.7) 0%, rgba(12, 24, 56, 0) 40%);
}
.grid-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-dark) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.35) 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.35) 60%, transparent 100%);
  opacity: 0.55;
}
.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  align-items: end;
  gap: 48px;
  padding-top: clamp(72px, 10vw, 136px);
  padding-bottom: clamp(56px, 7vw, 96px);
}
.hero h1 {
  margin-top: 20px;
  font-size: var(--step-4);
  font-stretch: 118%;
  color: var(--white);
}
.hero h1 em { font-style: normal; color: var(--sand); }
.hero-lead {
  margin-top: 24px;
  max-width: 54ch;
  font-size: var(--step-1);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* Drawing title block */
.title-block {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(12, 24, 56, 0.6);
  backdrop-filter: blur(6px);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.title-block div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.title-block div:first-child { border-top: 0; }
.title-block dt, .title-block dd { margin: 0; padding: 10px 14px; }
.title-block dt { color: rgba(255, 255, 255, 0.55); text-transform: uppercase; letter-spacing: 0.1em; border-right: 1px solid rgba(255, 255, 255, 0.2); }
.title-block dd { color: var(--white); }
.title-block .tb-head { display: block; padding: 12px 14px; background: var(--sand); color: var(--navy-deep); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .hero-media::after { background: linear-gradient(180deg, rgba(12, 24, 56, 0.75) 0%, rgba(12, 24, 56, 0.95) 100%); }
}

/* ---------- Page header (inner pages) ---------- */
.page-head {
  position: relative;
  overflow: hidden;
  background: var(--navy-deep);
  color: var(--white);
}
.page-head .hero-media::after { background: linear-gradient(90deg, rgba(12, 24, 56, 0.97) 0%, rgba(12, 24, 56, 0.8) 55%, rgba(12, 24, 56, 0.45) 100%); }
.page-head .wrap { position: relative; padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(48px, 6vw, 80px); }
.page-head h1 { margin-top: 16px; font-size: var(--step-4); font-stretch: 116%; color: var(--white); }
.page-head p { margin-top: 18px; max-width: 60ch; font-size: var(--step-1); color: rgba(255, 255, 255, 0.8); }
.crumbs { display: flex; gap: 10px; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); }
.crumbs a { color: rgba(255, 255, 255, 0.75); text-decoration: none; }
.crumbs a:hover { color: var(--sand); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 9vw, 120px); }
.section-paper { background: var(--paper); }
.section-dark { background: var(--navy-deep); color: var(--white); position: relative; overflow: hidden; }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 { margin-top: 14px; font-size: var(--step-3); max-width: 22ch; }
.section-head p { max-width: 46ch; color: var(--muted); }
.section-dark .section-head p { color: rgba(255, 255, 255, 0.7); }

/* Dimension line: a measured rule used as a divider */
.dim {
  position: relative;
  height: 14px;
  margin-top: 22px;
  width: 160px;
  border-left: 1px solid var(--sand);
  border-right: 1px solid var(--sand);
}
.dim::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--sand); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 32px 28px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat b { display: block; font-family: var(--font-display); font-stretch: 118%; font-size: clamp(2.4rem, 1.8rem + 2vw, 3.4rem); font-weight: 800; line-height: 1; color: var(--navy); font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 12px; color: var(--muted); font-size: 0.95rem; line-height: 1.45; }
@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 24px 20px; }
  .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* Split blocks */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.split > * { min-width: 0; }
.split h2 { margin-top: 14px; font-size: var(--step-3); }
.split .prose { margin-top: 24px; display: grid; gap: 16px; color: var(--muted); font-size: 1.05rem; max-width: 60ch; }
.figure { position: relative; }
.figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.figure .tag {
  position: absolute;
  left: -1px; bottom: -1px;
  padding: 18px 22px;
  background: var(--navy);
  color: var(--white);
}
.figure .tag b { display: block; font-family: var(--font-display); font-stretch: 118%; font-size: 2.4rem; line-height: 1; color: var(--sand); }
.figure .tag span { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; }
.figure::before {
  content: "";
  position: absolute;
  top: -14px; right: -14px;
  width: 42%; height: 42%;
  border-top: 2px solid var(--sand);
  border-right: 2px solid var(--sand);
}
@media (max-width: 860px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .figure::before { right: 0; }
}

/* Services */
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.service { position: relative; display: flex; flex-direction: column; background: var(--white); min-width: 0; }
.service img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; filter: saturate(0.85); transition: filter 0.3s; }
.service:hover img { filter: saturate(1); }
.service-body { padding: 26px 26px 30px; display: flex; flex-direction: column; gap: 10px; }
.service .code { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; color: var(--sand-deep); }
.service h3 { font-size: 1.3rem; }
.service p { color: var(--muted); font-size: 0.97rem; }
.service-cta { justify-content: center; background: var(--navy); color: var(--white); padding: 32px 28px; gap: 16px; }
.service-cta h3 { color: var(--white); }
.service-cta p { color: rgba(255, 255, 255, 0.72); }
@media (max-width: 960px) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .services { grid-template-columns: minmax(0, 1fr); } }

/* Projects: each card carries a drawing title block */
.projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.project { display: flex; flex-direction: column; min-width: 0; background: var(--white); border: 1px solid var(--line); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.project:hover { transform: translateY(-4px); box-shadow: 0 28px 50px -34px rgba(12, 24, 56, 0.55); }
.project-media { position: relative; overflow: hidden; background: var(--paper); }
.project-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.project-media .chip {
  position: absolute; top: 14px; left: 14px;
  padding: 6px 10px;
  background: var(--white);
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--navy);
}
.project-body { padding: 24px 24px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.project-body h3 { font-size: 1.25rem; }
.project-body p { color: var(--muted); font-size: 0.96rem; }
.spec { margin: 0; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.76rem; }
.spec div { display: grid; grid-template-columns: 104px minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.spec div:last-child { border-bottom: 0; }
.spec dt, .spec dd { margin: 0; padding: 9px 14px; }
.spec dt { color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; border-right: 1px solid var(--line); background: var(--paper); }
.spec dd { color: var(--ink); }
@media (max-width: 960px) { .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .projects { grid-template-columns: minmax(0, 1fr); } }

/* Feature project (large) */
.feature { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); background: var(--white); border: 1px solid var(--line); }
.feature > * { min-width: 0; }
.feature-gallery { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: 1fr 1fr; gap: 4px; background: var(--white); }
.feature-gallery img { width: 100%; height: 100%; object-fit: cover; min-height: 150px; }
.feature-gallery img:first-child { grid-row: span 2; }
.feature-body { padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; gap: 18px; }
.feature-body h3 { font-size: var(--step-3); }
.feature-body p { color: var(--muted); }
.feature-body .spec { margin-top: auto; border: 1px solid var(--line); }
@media (max-width: 900px) { .feature { grid-template-columns: minmax(0, 1fr); } .feature-gallery { min-height: 320px; } }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.filter {
  padding: 10px 16px;
  border: 1px solid var(--line);
  background: var(--white);
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s;
}
.filter:hover { border-color: var(--navy); }
.filter[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* Principles */
.principles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line-dark); position: relative; }
.principle { padding: 32px 28px 8px 0; min-width: 0; }
.principle + .principle { padding-left: 28px; border-left: 1px solid var(--line-dark); }
.principle .n { font-family: var(--font-mono); font-size: 0.75rem; color: var(--sand); letter-spacing: 0.14em; }
.principle h3 { margin-top: 18px; font-size: 1.3rem; }
.principle p { margin-top: 10px; color: rgba(255, 255, 255, 0.7); font-size: 0.97rem; }
@media (max-width: 900px) {
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .principle:nth-child(3) { padding-left: 0; border-left: 0; }
  .principle:nth-child(n+3) { border-top: 1px solid var(--line-dark); }
}
@media (max-width: 560px) {
  .principles { grid-template-columns: minmax(0, 1fr); }
  .principle, .principle + .principle { padding-left: 0; border-left: 0; }
  .principle + .principle { border-top: 1px solid var(--line-dark); }
}

/* Directions list */
.directions { display: grid; gap: 0; border-top: 1px solid var(--line); }
.direction { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.direction .n { font-family: var(--font-mono); font-size: 0.8rem; color: var(--sand-deep); }
.direction h3 { font-size: 1.2rem; font-stretch: 104%; }
.direction p { color: var(--muted); font-size: 0.95rem; }
.direction svg { width: 22px; height: 22px; color: var(--steel); }

/* Clients strip */
.clients { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.client { background: var(--white); padding: 24px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.client .label { color: var(--muted); }
.client strong { font-family: var(--font-display); font-stretch: 104%; font-size: 1.05rem; line-height: 1.3; color: var(--navy-deep); }
@media (max-width: 900px) { .clients { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .clients { grid-template-columns: minmax(0, 1fr); } }

/* Timeline */
.timeline { position: relative; display: grid; gap: 0; }
.timeline::before { content: ""; position: absolute; left: 124px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.t-item { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 32px; padding-bottom: 36px; position: relative; }
.t-item::before { content: ""; position: absolute; left: 119px; top: 8px; width: 11px; height: 11px; background: var(--white); border: 2px solid var(--sand); }
.t-item .year { font-family: var(--font-mono); font-weight: 500; color: var(--navy); padding-top: 2px; }
.t-item h3 { font-size: 1.2rem; }
.t-item p { margin-top: 6px; color: var(--muted); max-width: 62ch; }
@media (max-width: 560px) {
  .timeline::before { left: 5px; }
  .t-item { grid-template-columns: minmax(0, 1fr); gap: 6px; padding-left: 30px; }
  .t-item::before { left: 0; }
}

/* CTA band */
.cta-band { position: relative; overflow: hidden; background: var(--navy); color: var(--white); }
.cta-band .wrap { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; padding-block: clamp(48px, 6vw, 72px); }
.cta-band h2 { color: var(--white); font-size: var(--step-3); max-width: 24ch; }
.cta-band p { margin-top: 12px; color: rgba(255, 255, 255, 0.72); max-width: 52ch; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.contact-grid > * { min-width: 0; }
.contact-list { display: grid; border-top: 1px solid var(--line); }
.contact-item { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 18px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.contact-item .ico { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--navy); color: var(--sand); }
.contact-item .ico svg { width: 22px; height: 22px; }
.contact-item p { font-size: 1.05rem; color: var(--ink); overflow-wrap: anywhere; }
.contact-item a { text-decoration: none; }
.contact-item a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.copy { margin-top: 6px; padding: 0; border: 0; background: none; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sand-deep); cursor: pointer; }
.copy:hover { color: var(--navy); }

.form { background: var(--paper); border: 1px solid var(--line); padding: clamp(24px, 4vw, 44px); }
.form h2 { font-size: var(--step-2); }
.form > p { margin-top: 8px; color: var(--muted); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 28px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--white);
  font: inherit;
  color: var(--ink);
  border-radius: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(20, 39, 95, 0.12); }
.field .err { display: none; font-size: 0.82rem; color: #a3322a; }
.field.invalid input, .field.invalid textarea { border-color: #a3322a; }
.field.invalid .err { display: block; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; }
.form-note { font-size: 0.88rem; color: var(--muted); max-width: 40ch; }
.form-status { margin-top: 18px; padding: 14px 16px; border-left: 3px solid var(--sand); background: var(--white); font-size: 0.95rem; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .fields { grid-template-columns: minmax(0, 1fr); } }

/* Footer */
.site-footer { background: var(--navy-deep); color: rgba(255, 255, 255, 0.72); }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 48px; padding-block: 64px 48px; }
.footer-top > * { min-width: 0; }
.footer-brand img { height: 72px; width: auto; }
.footer-brand p { margin-top: 20px; max-width: 42ch; font-size: 0.95rem; }
.site-footer h4 { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sand); }
.site-footer ul { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; font-size: 0.95rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--white); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 22px; border-top: 1px solid var(--line-dark); font-size: 0.85rem; color: rgba(255, 255, 255, 0.5); }
@media (max-width: 860px) { .footer-top { grid-template-columns: minmax(0, 1fr); gap: 32px; } }

/* Gentle entrance from a visible resting state */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .rise-2 { animation-delay: 0.12s; }
  .rise-3 { animation-delay: 0.24s; }
  @keyframes rise { from { transform: translateY(18px); } to { transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Drawing-sheet panel for projects without a photo */
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  aspect-ratio: 3 / 2;
  padding: 22px 24px;
  background-color: var(--navy);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--white);
}
.plan::after {
  content: "";
  position: absolute;
  top: 22px; right: 24px;
  width: 64px; height: 64px;
  border-top: 2px solid var(--sand);
  border-right: 2px solid var(--sand);
}
.plan b { font-family: var(--font-display); font-stretch: 120%; font-size: clamp(3rem, 2rem + 3vw, 4.5rem); font-weight: 800; line-height: 0.95; color: var(--sand); }
.plan span { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.75); }

.project-cta { justify-content: center; gap: 16px; padding: 32px 28px; background: var(--navy); border-color: var(--navy); color: var(--white); }
.project-cta h3 { color: var(--white); font-size: 1.45rem; }
.project-cta p { color: rgba(255, 255, 255, 0.72); }
.project-cta .label { color: var(--sand); }
.project-cta .btn { align-self: flex-start; }
.project-cta:hover { transform: none; }

.nav a.btn { color: var(--white); }
.nav a.btn[aria-current="page"] { background: var(--navy-deep); }
