/* SCALE Developments — shared styles, matched to investor deck */

:root {
  --cream: #F2ECE1;
  --cream-2: #EDE4D8;
  --ink: #2E2A24;
  --brown: #6E5A45;
  --brown-dark: #241C14;
  --tan: #B7AA95;
  --line: #C9BCA8;
  --muted: #8A7B66;
  --eyebrow: #A6906F;

  /* Side gutter — never smaller than 20px, never larger than 32px */
  --gutter: clamp(20px, 4vw, 32px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { overflow-x: hidden; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  border-top: 6px solid var(--tan);
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 { font-family: 'Lora', serif; font-weight: 500; line-height: 1.25; }

/* Gutters are set on the inline axis only, so section padding rules
   (which control vertical rhythm) can never wipe them out. */
.wrap {
  max-width: 1060px; margin: 0 auto;
  padding-left: var(--gutter); padding-right: var(--gutter);
}

/* Header — logo vertically centred with nav, set slightly below the top band */
header {
  padding-top: 26px; padding-bottom: 26px; position: relative;
  min-height: 120px; display: flex; align-items: center;
}
header::before {
  content: ""; position: absolute; top: 0; bottom: 0;
  left: calc(-50vw + 50%); width: 100vw; background: var(--brown-dark);
}
header > * { position: relative; }
.header-inner { width: 100%; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.logo { display: inline-flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--cream); }
.logo .scale {
  font-size: 27.6px; font-weight: 300; letter-spacing: 0.22em; line-height: 1;
  border-bottom: 1.5px solid var(--tan); padding-bottom: 8px;
}
.logo .devs {
  display: block; margin-top: 7px; font-size: 9.8px; font-weight: 400;
  letter-spacing: 0.18em; color: var(--tan); line-height: 1; white-space: nowrap;
}
nav a {
  font-size: 13.8px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--cream); text-decoration: none; margin-left: 28px;
}
nav a:hover { color: var(--tan); }
nav a.active { color: var(--tan); border-bottom: 1px solid var(--tan); padding-bottom: 3px; }

/* Hamburger — hidden on desktop */
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; padding: 10px; margin-right: -10px;
}
.nav-toggle span {
  display: block; height: 1.5px; background: var(--cream);
  margin: 5px 0; transition: transform 0.3s ease, opacity 0.2s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Type */
.eyebrow {
  font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--eyebrow); margin-bottom: 18px;
}
h1 { font-size: clamp(30px, 4.5vw, 46px); margin-bottom: 22px; }
h2 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 16px; }
h3 { font-size: 21px; margin-bottom: 10px; }
.lede { font-size: 17px; max-width: 640px; }
p + p { margin-top: 14px; }

section { padding-top: 44px; padding-bottom: 44px; }
.section-tight { padding-top: 30px; padding-bottom: 30px; }

/* Images */
figure img { width: 100%; display: block; }
figcaption {
  font-size: 12px; letter-spacing: 0.06em; color: var(--muted);
  margin-top: 10px;
}

/* Hero */
.hero { padding-top: 44px; padding-bottom: 20px; }
.hero-grid { display: grid; grid-template-columns: 5fr 6fr; gap: 48px; align-items: center; }
.hero-img img { width: 100%; display: block; }

/* Full-width sliding image box */
.fader {
  position: relative; width: 100%; height: min(68vh, 620px);
  overflow: hidden; background: var(--brown-dark); touch-action: pan-y;
}
.fader .slides {
  display: flex; height: 100%; width: 100%;
  transition: transform 1.1s cubic-bezier(0.65, 0, 0.35, 1);
}
.fader .slides img {
  flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; display: block;
  -webkit-user-drag: none; user-select: none;
}
.fader .fader-caption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 40px var(--gutter) 16px; color: var(--cream);
  background: linear-gradient(to top, rgba(36, 28, 20, 0.65), rgba(36, 28, 20, 0));
  font-size: 12px; letter-spacing: 0.08em;
}
.slider-dots {
  position: absolute; z-index: 3; right: 20px; bottom: 18px;
  display: flex; gap: 8px;
}
.slider-dots button {
  width: 8px; height: 8px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(242, 236, 225, 0.75); background: transparent;
  transition: background 0.3s ease;
}
.slider-dots button.on { background: var(--cream); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cards-4 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--cream-2); border: 1px solid var(--line); padding: 28px;
}
.card.dark { background: var(--brown); border-color: var(--brown); color: var(--cream); }
.card .stat { font-family: 'Lora', serif; font-size: 27.2px; margin-bottom: 8px; }
.card .label { font-size: 12px; letter-spacing: 0.06em; color: var(--muted); }
.card.dark .label { color: rgba(242, 236, 225, 0.75); }
.card h3 { margin-bottom: 8px; }
.card p { font-size: 14px; }

/* Two-column text blocks */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }

/* Projects */
.role-heading { border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 30px; }
.project { display: grid; grid-template-columns: 2fr 3fr; gap: 40px; margin-bottom: 48px; align-items: start; }
.project:last-child { margin-bottom: 0; }
.project .meta { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.project p { font-size: 15px; }

/* Team */
.team { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }
.member { display: flex; gap: 22px; align-items: flex-start; }
.member img {
  width: 104px; height: 104px; flex-shrink: 0; display: block;
  object-fit: cover; object-position: 50% 22%; filter: grayscale(100%);
}
.member .role { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--eyebrow); margin: 0 0 6px; }
.member h3 { margin-bottom: 8px; }
.member p { font-size: 14px; }

/* Footer */
footer { background: var(--brown-dark); color: var(--cream); margin-top: 40px; padding: 40px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 12px; }
.tagline { font-family: 'Lora', serif; font-style: italic; font-size: 17px; }
.footer-note { font-size: 11px; letter-spacing: 0.08em; color: rgba(242, 236, 225, 0.6); }

/* Buttons */
.btn {
  display: inline-block; margin-top: 24px; padding: 13px 30px;
  border: 1px solid var(--ink); color: var(--ink); text-decoration: none;
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
}
.btn:hover { background: var(--ink); color: var(--cream); }

/* Contact / enquiry form */
.contact-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 56px; align-items: start; }
.enquiry .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.enquiry .field { margin-bottom: 20px; }
.enquiry label {
  display: block; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--eyebrow); margin-bottom: 8px;
}
.enquiry input, .enquiry select, .enquiry textarea {
  width: 100%; display: block; font-family: 'Montserrat', sans-serif; font-size: 15px;
  color: var(--ink); background: var(--cream-2); border: 1px solid var(--line);
  border-radius: 0; padding: 12px 14px; -webkit-appearance: none; appearance: none;
}
.enquiry select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px;
}
.enquiry textarea { resize: vertical; min-height: 150px; line-height: 1.6; }
.enquiry input:focus, .enquiry select:focus, .enquiry textarea:focus { outline: none; border-color: var(--brown); background-color: #fff; }
.enquiry .invalid { border-color: #9B4A36; }
.enquiry .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.btn-submit { margin-top: 4px; background: transparent; cursor: pointer; font-family: 'Montserrat', sans-serif; }
.btn-submit:disabled { opacity: 0.6; cursor: default; }
.form-status { margin-top: 18px; font-size: 14px; min-height: 1em; }
.form-status.ok { color: var(--brown); }
.form-status.error { color: #9B4A36; }
.form-status a, .contact-aside a { color: inherit; }
.contact-aside { border-top: 1px solid var(--line); padding-top: 22px; }
.contact-aside .role { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--eyebrow); margin: 0 0 6px; }
.contact-aside p { font-size: 15px; }
.contact-aside p + .role { margin-top: 22px; }

/* ---------- Tablet and below ---------- */
@media (max-width: 800px) {
  .hero-grid, .cols, .project, .team { grid-template-columns: 1fr; }
  .cards, .cards-4 { grid-template-columns: 1fr; }
  .contact-grid, .enquiry .field-row { grid-template-columns: 1fr; gap: 0; }
  .contact-aside { margin-top: 36px; }

  /* Collapsed navigation */
  header { min-height: 96px; padding-top: 18px; padding-bottom: 18px; }
  /* the dropdown hangs off the header itself, so it clears the full bar */
  .header-inner { flex-wrap: nowrap; position: static; }
  .logo, .nav-toggle { position: relative; z-index: 2; }
  .nav-toggle { display: block; }
  nav {
    position: absolute; top: 100%; left: calc(-50vw + 50%); width: 100vw;
    background: var(--brown-dark); border-top: 1px solid rgba(183, 170, 149, 0.25);
    max-height: 0; overflow: hidden; z-index: 20;
    transition: max-height 0.35s ease;
  }
  nav.open { max-height: 320px; }
  nav a {
    display: block; margin: 0; padding: 16px var(--gutter); font-size: 13px;
    border-bottom: 1px solid rgba(183, 170, 149, 0.15);
  }
  nav a.active { border-bottom: 1px solid rgba(183, 170, 149, 0.15); padding-bottom: 16px; }

  /* Slider takes less of the screen and shows portrait crops better */
  .fader { height: 54vh; min-height: 300px; max-height: 440px; }
  .fader .fader-caption { padding: 32px 20px 14px; font-size: 11px; line-height: 1.5; }
  .slider-dots { right: 16px; bottom: 14px; }

  /* Vertical rhythm deliberately matches the desktop layout */
  .project { gap: 24px; margin-bottom: 48px; }
  .project figure img { max-height: 62vh; object-fit: cover; }
  .team { gap: 40px; }
}

/* ---------- Phones ---------- */
@media (max-width: 520px) {
  header { padding-top: 16px; padding-bottom: 16px; min-height: 86px; }
  .logo .scale { font-size: 23px; letter-spacing: 0.2em; padding-bottom: 6px; }
  .logo .devs { font-size: 8.6px; letter-spacing: 0.16em; }

  h1 { font-size: 28px; }
  .lede { font-size: 16px; }
  .card { padding: 22px; }
  .card .stat { font-size: 30px; }

  .fader { height: 46vh; min-height: 260px; }

  /* Portraits above the bio rather than beside it */
  .member { display: block; }
  .member img { width: 88px; height: 88px; margin-bottom: 12px; }

  .footer-inner { display: block; }
  .footer-note { display: block; margin-top: 8px; }
}
