/* =====================================================================
   pages.css — Home / Portfolio / Contact

   A second visual world from style.css on purpose: the build section is
   a blueprint sheet (navy ground, cream line, committed to dark). These
   pages are the drafting sheet turned over — white ground, the same
   navy and gold carried across as ink rather than light. Same tokens,
   same type stack, inverted contract.
   ===================================================================== */

:root {
  --navy-deep: #061527;
  --navy:      #0B1F3B;
  --paper:     #FFFFFF;
  --paper-dim: #F6F5F2;   /* off-white for banding — chosen, not grey */
  --ink:       #0B1F3B;   /* body text = navy, not black */
  --ink-soft:  rgba(11, 31, 59, 0.62);
  --ink-faint: rgba(11, 31, 59, 0.38);
  --line:      rgba(11, 31, 59, 0.12);
  --gold:      #B8925A;

  --mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  overflow-x: hidden;
}

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

a { color: inherit; }

/* =====================================================================
   HEADER
   ===================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: block;
  width: 8.6rem;
  line-height: 0;
  text-decoration: none;
}

/* Logo, drawn in its natural colours on white: no masking needed here,
   unlike the panels on the dark build section. */
.brand-mark,
.brand-word {
  display: block;
  width: 100%;
  background-repeat: no-repeat;
  background-size: 100% auto;
  background-image: url("../Meridian-logo.png");
}

.brand-mark  { aspect-ratio: 1024 / 262; background-position: 0 0; }
.brand-word  { aspect-ratio: 1024 / 280; background-position: 0 100%; margin-top: 2px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 3vw, 2.6rem);
}

.site-nav a {
  position: relative;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  padding-bottom: 0.3rem;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transition: right 0.25s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { right: 0; }

/* Small-screen nav: labels shrink and wrap rather than hiding behind a
   menu button — three items fit without one. */
@media (max-width: 640px) {
  .site-header { flex-wrap: wrap; gap: 0.9rem 1.2rem; }
  .brand { width: 7rem; }
  .site-nav { gap: 1.1rem 1.4rem; flex-wrap: wrap; }
}

/* =====================================================================
   SHARED TYPE / LAYOUT PRIMITIVES
   ===================================================================== */

.wrap {
  max-width: 76rem;
  margin: 0 auto;
  padding-left: clamp(1.25rem, 4vw, 3rem);
  padding-right: clamp(1.25rem, 4vw, 3rem);
}

.eyebrow {
  margin: 0 0 1rem;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}

.h1 {
  margin: 0 0 1.1rem;
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--navy);
  text-wrap: balance;
}

.h2 {
  margin: 0 0 1.1rem;
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--navy);
  text-wrap: balance;
}

.lede {
  margin: 0;
  max-width: 46ch;
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.65;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.section {
  padding: clamp(3.5rem, 7vw, 6.5rem) 0;
}

.section--dim { background: var(--paper-dim); }

/* =====================================================================
   IMAGE PLACEHOLDER
   A consistent drop-zone: a hairline frame, a plus mark, and a caption
   giving the exact spot. Swap the element for a real <img> and the
   frame + caption fall away with it — nothing else to unpick.
   ===================================================================== */

.img-slot {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-dim);
  border: 1px solid var(--line);
  color: var(--ink-faint);
}

.img-slot::before,
.img-slot::after {
  content: "";
  position: absolute;
  background: var(--line);
}
.img-slot::before { width: 22px; height: 1px; }
.img-slot::after   { width: 1px; height: 22px; }

/* Filled: a real photo has replaced the placeholder mark. The frame
   and border stay — they read as a mount, not just an empty drop-zone. */
.img-slot--filled::before,
.img-slot--filled::after { display: none; }

/* Source photos are near-square renders with the tower centred in
   frame and a low horizon. A plain centre crop keeps the whole tower
   in view at any slot ratio — cropping from a corner instead truncates
   the tower body, which is the actual subject. */
.img-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.img-slot-label {
  position: absolute;
  left: 0.9rem;
  bottom: 0.8rem;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* =====================================================================
   FOOTER
   ===================================================================== */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--navy-deep);
  color: rgba(242, 237, 228, 0.7);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(2.5rem, 5vw, 3.5rem);
}

.footer-brand { width: 9rem; line-height: 0; margin-bottom: 1.2rem; }
.footer-brand .brand-mark  { background-image: url("../Meridian-logo.png"); background-position: 0 0; aspect-ratio: 1024/262; width: 100%; background-size: 100% auto; background-repeat: no-repeat; }
.footer-brand .brand-word  {
  aspect-ratio: 1024 / 280;
  width: 100%;
  margin-top: 2px;
  background: none;
  background-color: #F2EDE4;
  -webkit-mask-image: url("../Meridian-logo.png");
  mask-image: url("../Meridian-logo.png");
  -webkit-mask-size: 100% auto;
  mask-size: 100% auto;
  -webkit-mask-position: 0 100%;
  mask-position: 0 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.footer-tag {
  margin: 0;
  max-width: 26ch;
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(242, 237, 228, 0.5);
}

.footer-heading {
  margin: 0 0 1rem;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-col a,
.footer-col span {
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(242, 237, 228, 0.72);
  text-decoration: none;
}

.footer-col a:hover { color: #F2EDE4; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.4rem 0;
  border-top: 1px solid rgba(242, 237, 228, 0.12);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(242, 237, 228, 0.4);
}

@media (max-width: 760px) {
  .footer-top { grid-template-columns: 1fr 1fr; row-gap: 2.2rem; }
}

@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; }
}

/* Keyboard focus, visible against a white ground this time. */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
