/* RS MEP Design — Belgravia house style. Layout: centred 1200px column, single ivory theme. */
:root {
  --ivory: #FBF9F4;
  --stone: #EEE8DC;
  --navy: #1C2640;
  --ink: #1F2433;
  --muted: #625B4C;
  --rule: #C9BFA8;
  --brass: #A8874F;
  --on-navy: #F3EFE6;
  --on-navy-muted: #CFC6B2;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --logo: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--ivory); color: var(--ink); font-family: var(--serif); font-size: 17px; line-height: 1.6; }
a { color: var(--navy); }
a:hover { color: #3A4A75; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 24px; }
.eyebrow { margin: 0; font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
h1, h2, h3 { font-weight: 400; color: var(--navy); text-wrap: balance; margin: 0; }
.section { padding-block: 88px; }
.section h2 { font-size: clamp(30px, 4vw, 42px); line-height: 1.15; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); background: var(--ivory); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-block: 20px; }
.logo { display: inline-flex; flex-direction: column; text-decoration: none; color: var(--navy); }
.logo-word { font-family: var(--logo); font-weight: 600; font-size: 30px; letter-spacing: 0.05em; line-height: 1; }
.logo-sub { display: flex; align-items: center; gap: 8px; margin-top: 5px; font-family: var(--sans); font-weight: 500; font-size: 9px; letter-spacing: 0.42em; }
.logo-sub::before, .logo-sub::after { content: ""; flex: 1; height: 1px; background: var(--brass); }
.logo-sub span { padding-left: 0.42em; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; }
.nav a { text-decoration: none; padding-block: 8px; }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.nav .cta { background: var(--navy); color: var(--on-navy); padding: 12px 18px; }
.nav .cta:hover { background: #2B3A5E; color: var(--on-navy); }

/* Buttons */
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn { display: inline-block; text-decoration: none; padding: 15px 24px; font-size: 15px; letter-spacing: 0.05em; border: 1px solid var(--navy); }
.btn-solid { background: var(--navy); color: var(--on-navy); }
.btn-solid:hover { background: #2B3A5E; color: var(--on-navy); }

/* Hero */
.hero .wrap { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 48px 72px; align-items: end; padding-block: 88px 64px; }
.hero h1 { margin-top: 20px; font-size: clamp(38px, 5.4vw, 72px); line-height: 1.05; letter-spacing: -0.01em; }
.hero .lede { margin: 26px 0 0; font-size: clamp(18px, 1.6vw, 20px); max-width: 38em; }
.where { border-left: 1px solid var(--rule); padding-left: 28px; }
.where p { margin: 10px 0 0; font-size: 19px; line-height: 1.7; }
.where .also { font-style: italic; color: var(--muted); margin-top: 4px; }
.where p.eyebrow { margin: 0; font-size: 13px; line-height: 1.6; }

/* Credentials */
.creds { background: var(--stone); }
.creds .wrap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; padding-block: 36px; }
.cred-fig { font-size: 30px; color: var(--navy); line-height: 1.2; }
.cred-txt { margin-top: 6px; font-size: 15px; color: var(--muted); }

/* Selected projects list */
.head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 24px; border-bottom: 1px solid var(--rule); padding-bottom: 18px; }
.head-row a { font-size: 14px; letter-spacing: 0.16em; text-transform: uppercase; }
.sel { list-style: none; margin: 0; padding: 0; }
.sel a { display: grid; grid-template-columns: 56px minmax(0, 1fr) 220px; gap: 8px 32px; padding-block: 28px; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.sel a:hover h3 { text-decoration: underline; text-underline-offset: 5px; }
.sel .num { font-size: 22px; font-style: italic; color: var(--brass); }
.sel h3 { font-size: clamp(22px, 2.4vw, 28px); }
.sel p { margin: 8px 0 0; }
.sel .tags { font-family: var(--sans); font-size: 12.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); line-height: 1.9; }

/* Services */
.svc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px 72px; }
.svc-intro p { margin: 20px 0 0; }
.svc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.svc-item { border-top: 1px solid var(--rule); padding-block: 22px 26px; }
.svc-item h3 { font-size: 20px; }
.svc-item p { margin: 8px 0 0; font-size: 16px; }

/* About */
.about { background: var(--navy); color: var(--on-navy); }
.about .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px 80px; }
.about h2 { color: var(--on-navy); }
.about .eyebrow, .about .quals { color: var(--on-navy-muted); }
.about .quals { margin: 10px 0 0; font-size: 16px; }
.about .rule { margin-top: 28px; width: 72px; height: 1px; background: var(--brass); }
.about blockquote { margin: 0; font-size: clamp(20px, 2.2vw, 24px); line-height: 1.55; font-style: italic; }
.about .bio { margin: 26px 0 0; color: #E4DED2; line-height: 1.75; }

/* Firms */
.firms { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 32px; color: var(--navy); }
.firms li { padding-block: 11px; border-top: 1px solid var(--rule); font-size: 17px; }
.firms-head { font-size: 13px; font-weight: 400; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }

/* Contact */
.contact { background: var(--stone); }
.contact .wrap { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 28px 72px; align-items: end; }
.contact p { margin: 16px 0 0; max-width: 36em; font-size: 18px; }
.contact-lines { display: flex; flex-direction: column; gap: 8px; font-size: 20px; }
.contact-lines a { text-decoration: none; overflow-wrap: anywhere; }
.contact-lines a:hover { text-decoration: underline; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 32px; padding-block: 28px 40px; font-size: 13px; color: var(--muted); }

/* Projects page */
.page-head { padding-block: 72px 32px; }
.page-head h1 { margin-top: 16px; font-size: clamp(34px, 4.6vw, 60px); line-height: 1.08; max-width: 18em; }
.page-head .lede { margin: 22px 0 0; max-width: 40em; font-size: 18px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.filters button { min-height: 44px; padding: 10px 18px; font: 15px var(--serif); letter-spacing: 0.03em; color: var(--navy); background: transparent; border: 1px solid var(--navy); cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--navy); color: var(--on-navy); }
.count { margin: 20px 0 0; font-size: 15px; color: var(--muted); }
.cards { list-style: none; margin: 0; padding: 0 0 88px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; }
.card { border-top: 1px solid var(--rule); padding-block: 24px 32px; display: flex; flex-direction: column; gap: 8px; }
.card .meta { display: flex; justify-content: space-between; gap: 12px; font-family: var(--sans); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.card h2 { font-size: 24px; line-height: 1.2; margin-top: 4px; }
.card p { margin: 0; font-size: 16px; line-height: 1.65; }
.card .more { margin-top: 6px; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; }

/* Project page */
.crumb { font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.crumb a { color: var(--muted); }
.project-hero { padding-block: 64px 56px; }
.project-hero h1 { margin-top: 18px; font-size: clamp(40px, 6vw, 80px); line-height: 1.02; }
.project-hero .lede { margin: 24px 0 0; max-width: 34em; font-size: clamp(20px, 2.2vw, 26px); line-height: 1.5; font-style: italic; }
.facts { background: var(--stone); }
.facts .wrap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 40px; padding-block: 36px; }
.facts dt { font-family: var(--sans); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 8px 0 0; font-size: 18px; line-height: 1.5; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 28px 80px; }
.two-col p { margin: 0 0 18px; font-size: 18px; line-height: 1.75; }
.moves { list-style: none; margin: 8px 0 0; padding: 0; counter-reset: m; }
.moves li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 6px 32px; padding-block: 28px; border-top: 1px solid var(--rule); counter-increment: m; }
.moves li:last-child { border-bottom: 1px solid var(--rule); }
.moves li::before { content: "0" counter(m); font-size: 40px; font-style: italic; color: var(--brass); line-height: 1; }
.moves h3 { font-size: 24px; }
.moves p { margin: 8px 0 0; }
.schematic { display: grid; grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr) 48px minmax(0, 2fr); gap: 16px; align-items: stretch; margin-top: 32px; }
.node { border: 1px solid var(--navy); padding: 22px; }
.node.dark { background: var(--navy); color: var(--on-navy); }
.node small { display: block; font-family: var(--sans); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.node.dark small { color: var(--on-navy-muted); }
.node strong { display: block; margin-top: 8px; font-weight: 400; font-size: 21px; }
.arrow { display: flex; flex-direction: column; justify-content: center; align-items: center; color: var(--brass); font-size: 24px; line-height: 1.2; }
.outs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.outs div { background: var(--stone); padding: 16px 18px; font-size: 18px; color: var(--navy); }
.outs div.alt { background: transparent; border: 1px solid var(--brass); }
.next { border-top: 1px solid var(--rule); }
.next .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 16px; padding-block: 36px; }
.next .label { display: block; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.next .big { display: block; margin-top: 6px; font-size: 24px; }

/* Tablet */
@media (max-width: 980px) {
  .hero .wrap, .svc, .about .wrap, .contact .wrap, .two-col { grid-template-columns: minmax(0, 1fr); }
  .creds .wrap, .facts .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .firms, .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sel a { grid-template-columns: 48px minmax(0, 1fr); }
  .sel .tags { grid-column: 2; }
  .schematic { grid-template-columns: minmax(0, 1fr); }
  .arrow { flex-direction: row; gap: 12px; transform: rotate(90deg); height: 32px; }
}
/* Phone */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding-inline: 18px; }
  .section { padding-block: 64px; }
  .site-header .wrap { padding-block: 16px; }
  .nav { width: 100%; justify-content: space-between; gap: 6px 14px; font-size: 12px; letter-spacing: 0.12em; }
  .nav .cta { padding: 10px 14px; }
  .hero .wrap { padding-block: 56px 48px; }
  .where { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 22px; }
  .creds .wrap { gap: 22px; }
  .cred-fig { font-size: 24px; }
  .svc-grid, .firms, .cards, .outs { grid-template-columns: minmax(0, 1fr); }
  .firms { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
  .firms li { font-size: 15px; }
  .facts .wrap { grid-template-columns: minmax(0, 1fr); }
  .moves li { grid-template-columns: 44px minmax(0, 1fr); gap: 4px 16px; }
  .moves li::before { font-size: 30px; }
  .btn { flex: 1 1 auto; text-align: center; }
}