/* SJ Developments North West Ltd — sjdevelopmentsnw.co.uk
   Art direction: the company's real Didone wordmark drives an editorial,
   architectural system. Near-black ink on warm paper, amber as a single
   disciplined accent. Photography does the selling. */

/* Fonts are loaded via <link> in the document head: Bodoni Moda (Google) for
   display, Satoshi (Fontshare) for body. */

:root {
  /* ── colour ─────────────────────────────────────────────── */
  --ink: #0d0d0d;
  --ink-soft: #1a1a18;
  --paper: #f7f5f0;
  --paper-2: #fffefb;
  --paper-3: #efece4;
  --hair: #d9d5ca;
  --hair-dark: #2e2e2b;
  --grey: #6b6961;
  --grey-light: #a8a49a;
  --amber: #f5c400;
  --amber-ink: #8a6f00;

  /* ── type ───────────────────────────────────────────────── */
  --display: 'Bodoni Moda', 'Didot', 'Times New Roman', serif;
  --body: 'Satoshi', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  --text-xs: clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);
  --text-sm: clamp(0.875rem, 0.85rem + 0.15vw, 0.9375rem);
  --text-base: clamp(1rem, 0.97rem + 0.18vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.4vw, 1.3125rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.4vw, 2.125rem);
  --text-2xl: clamp(2rem, 1.4rem + 2.8vw, 3.25rem);
  --text-hero: clamp(2.5rem, 1.2rem + 5.2vw, 4.9rem);

  /* ── space ──────────────────────────────────────────────── */
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --section: clamp(4rem, 9vw, 8.5rem);
  --max: 1280px;
  --measure: 62ch;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  font-family: var(--body);
  font-size: var(--text-base);
  line-height: 1.62;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; }

::selection { background: var(--amber); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: 0.75rem 1.25rem; z-index: 200; font-size: var(--text-sm);
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* ── layout primitives ────────────────────────────────────── */
.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: 860px; }
.section { padding-block: var(--section); }
.measure { max-width: var(--measure); }

/* ── type utilities ───────────────────────────────────────── */
h1, h2, h3 { font-weight: 400; line-height: 1.08; letter-spacing: -0.015em; }

.eyebrow {
  font-family: var(--body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}
.eyebrow::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--hair);
  max-width: 5rem;
}
.eyebrow--amber { color: var(--amber-ink); }
.eyebrow--dark { color: var(--grey-light); }
.eyebrow--dark::after { background: var(--hair-dark); }

h2.title, .title {
  font-family: var(--display);
  font-size: var(--text-2xl);
  font-weight: 400;
}
h3.sub, .sub {
  font-family: var(--body);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.28;
}
.lede {
  font-size: var(--text-lg);
  line-height: 1.55;
  color: var(--ink-soft);
}
p + p { margin-top: 1.1em; }
.muted { color: var(--grey); }

/* the emphasis device: an italic Bodoni pivot clause, used identically
   on every major heading. Nothing else gets to be italic. */
.pivot { font-style: italic; }

/* ── buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--body);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.95rem 1.6rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.35s var(--ease), color 0.35s var(--ease), transform 0.35s var(--ease);
}
.btn:hover { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--light { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.btn--light:hover { background: var(--amber); border-color: var(--amber); }
.btn--outline-light { background: transparent; border-color: rgba(247,245,240,0.4); color: var(--paper); }
.btn--outline-light:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.btn .arw { transition: transform 0.35s var(--ease); }
.btn:hover .arw { transform: translateX(4px); }

.textlink {
  font-weight: 700;
  font-size: var(--text-sm);
  text-decoration: none;
  border-bottom: 1px solid var(--amber);
  padding-bottom: 2px;
  transition: border-color 0.3s var(--ease);
}
.textlink:hover { border-color: var(--ink); }

/* ── header ───────────────────────────────────────────────── */
.header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(247,245,240,0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.header.is-scrolled { border-bottom-color: var(--hair); }
.header__inner {
  max-width: var(--max);
  margin-inline: auto;
  padding: 0.9rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand { display: flex; align-items: center; gap: 0.9rem; text-decoration: none; color: var(--ink); }
.brand img { height: 30px; width: auto; }
.brand__txt {
  font-family: var(--body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.3;
}
.brand__txt span { display: block; font-weight: 400; letter-spacing: 0.06em; color: var(--grey); }

.nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2.1rem); }
.nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  position: relative;
  padding-block: 0.35rem;
}
.nav a::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1.5px; background: var(--amber);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav .btn { padding: 0.7rem 1.25rem; }

.burger { display: none; background: none; border: 0; padding: 0.5rem; cursor: pointer; }
.burger span { display: block; width: 22px; height: 1.5px; background: var(--ink); }
.burger span + span { margin-top: 5px; }

@media (max-width: 860px) {
  .burger { display: block; }
  .nav {
    position: fixed; inset: 0 0 auto; top: 0;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 5.5rem var(--gutter) 2.5rem;
    transform: translateY(-101%);
    transition: transform 0.5s var(--ease);
    box-shadow: 0 20px 50px rgba(13,13,13,0.1);
    z-index: 55;
  }
  .nav.is-open { transform: translateY(0); }
  .nav a { font-size: var(--text-lg); padding-block: 0.85rem; width: 100%; border-bottom: 1px solid var(--hair); }
  .nav a::after { display: none; }
  .nav .btn { margin-top: 1.5rem; width: 100%; justify-content: center; border-bottom: 0; }
  .header__inner { position: relative; }
  .brand, .burger { position: relative; z-index: 60; }
  .burger span { transition: transform 0.4s var(--ease), opacity 0.25s var(--ease); }
  .burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
}

/* ── hero ─────────────────────────────────────────────────── */
.hero { background: var(--paper); overflow: clip; }
.hero__grid {
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(2.25rem, 4.5vw, 4rem) var(--gutter) 0;
  display: grid;
  gap: clamp(1.75rem, 3.5vw, 2.75rem);
}
.hero__head { max-width: none; }
.hero h1 {
  font-family: var(--display);
  font-size: var(--text-hero);
  line-height: 1.04;
  letter-spacing: -0.028em;
  max-width: 12.5em;   /* em, not ch — ch resolves against the parent's body font */
  text-wrap: balance;
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.75rem;
  margin: 0; padding: 0;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey);
}
.hero__meta li { list-style: none; display: flex; align-items: center; gap: 0.5rem; }
.hero__meta li::before {
  content: ''; width: 5px; height: 5px; background: var(--amber); flex: none;
}
.hero__body { display: grid; gap: 1.75rem; align-content: start; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.85rem; }

.hero__figure {
  position: relative;
  margin-top: clamp(2.25rem, 4vw, 3.25rem);
}
.hero__figure img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center 72%;
}
.hero__figure--contained {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.hero__figure--contained img { aspect-ratio: 16 / 9; }
.hero__figure--contained + .hero__cap,
.hero__figure--contained .hero__cap { padding-inline: 0; }

.hero__cap {
  max-width: var(--max);
  margin: 0.9rem auto 0;
  padding-inline: var(--gutter);
  font-size: var(--text-xs);
  color: var(--grey);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 0.8fr 1.2fr; align-items: start; }
  .hero__head { grid-column: 1 / -1; }
  .hero__meta { grid-column: 1; display: grid; gap: 0.7rem; align-content: start; }
  .hero__meta::before { content: ''; display: block; width: 2.5rem; height: 3px; background: var(--amber); margin-bottom: 0.4rem; }
  .hero__body { grid-column: 2; }
}
@media (max-width: 899px) { .hero__meta { padding: 0; } }

/* ── amber rule ───────────────────────────────────────────── */
.rule { height: 3px; background: var(--amber); border: 0; }
.hair { height: 1px; background: var(--hair); border: 0; }

/* ── marquee (credentials strip) ──────────────────────────── */
.strip {
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  padding-block: 0.95rem;
  border-block: 1px solid var(--hair-dark);
}
.strip__track {
  display: flex;
  gap: 3.5rem;
  width: max-content;
  animation: slide 34s linear infinite;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.strip__track span { display: flex; align-items: center; gap: 3.5rem; white-space: nowrap; }
.strip__track span::after { content: ''; width: 5px; height: 5px; background: var(--amber); }
.strip:hover .strip__track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .strip__track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
}

/* ── two-column editorial ─────────────────────────────────── */
.split { display: grid; gap: clamp(2rem, 5vw, 4.5rem); }
@media (min-width: 900px) {
  .split { grid-template-columns: 0.85fr 1.15fr; align-items: start; }
  .split--even { grid-template-columns: 1fr 1fr; }
  .split--flip > :first-child { order: 2; }
}
.split__aside { position: sticky; top: 6rem; }

/* ── services ─────────────────────────────────────────────── */
.services { border-top: 1px solid var(--hair); }
.services__item {
  display: grid;
  gap: 0.5rem 2rem;
  padding-block: clamp(1.5rem, 3vw, 2.25rem);
  border-bottom: 1px solid var(--hair);
  transition: background 0.4s var(--ease);
}
.services__item:hover { background: var(--paper-2); }
.services__n {
  font-family: var(--display);
  font-size: var(--text-sm);
  color: var(--amber-ink);
  font-variant-numeric: tabular-nums;
}
.services__item p { color: var(--grey); font-size: var(--text-sm); }
@media (min-width: 720px) {
  .services__item { grid-template-columns: 3.5rem 1fr 1.5fr; align-items: baseline; }
}

/* ── project cards ────────────────────────────────────────── */
.projects { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
@media (min-width: 760px) { .projects { grid-template-columns: repeat(2, 1fr); } }
.card { text-decoration: none; display: block; }
.card__media { overflow: hidden; background: var(--paper-3); }
.card__media img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform 1.1s var(--ease), filter 0.6s var(--ease);
}
.card:hover .card__media img { transform: scale(1.035); }
.card__meta {
  display: flex; justify-content: space-between; gap: 1rem;
  margin-top: 1rem; font-size: var(--text-xs);
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--grey);
  font-weight: 700;
}
.card h3 { font-family: var(--display); font-size: var(--text-xl); margin-top: 0.5rem; }
.card p { font-size: var(--text-sm); color: var(--grey); margin-top: 0.6rem; max-width: 42ch; }
.card--tall .card__media img { aspect-ratio: 3 / 4; }
.card-stack { display: grid; gap: 1.75rem; align-content: start; }
.card--wide { grid-column: 1 / -1; }
.card--wide .card__media img { aspect-ratio: 16 / 9; object-position: center 60%; }

/* ── gallery ──────────────────────────────────────────────── */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(0.5rem, 1.4vw, 1rem);
}
@media (min-width: 760px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gal { margin: 0; overflow: hidden; background: var(--paper-3); position: relative; }
.gal img {
  width: 100%; height: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block;
  transition: transform 1.1s var(--ease);
}
.gal:hover img, .gal:focus-within img { transform: scale(1.04); }
.gal--wide { grid-column: span 2; }
.gal--wide img { aspect-ratio: 8 / 5; }
.gal figcaption {
  position: absolute; inset: auto 0 0 0;
  padding: 1.4rem 0.9rem 0.7rem;
  font-size: var(--text-xs); line-height: 1.35; color: #fff;
  background: linear-gradient(to top, rgba(13,13,13,0.86), rgba(13,13,13,0));
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.gal:hover figcaption, .gal:focus-within figcaption { opacity: 1; transform: none; }
@media (hover: none) {
  .gal figcaption { opacity: 1; transform: none; }
}

/* ── process ──────────────────────────────────────────────── */
.steps { display: grid; gap: 0; counter-reset: s; }
.step {
  display: grid; gap: 0.4rem 2rem;
  padding-block: clamp(1.5rem, 3vw, 2rem);
  border-top: 1px solid var(--hair-dark);
}
.step:last-child { border-bottom: 1px solid var(--hair-dark); }
.step__n {
  font-family: var(--display);
  font-size: var(--text-xl);
  color: var(--amber);
  line-height: 1;
}
.step h3 { font-family: var(--body); font-weight: 700; font-size: var(--text-lg); }
.step p { color: var(--grey-light); font-size: var(--text-sm); max-width: 52ch; }
@media (min-width: 760px) { .step { grid-template-columns: 4rem 15rem 1fr; align-items: baseline; } }

/* ── dark section ─────────────────────────────────────────── */
.dark { background: var(--ink); color: var(--paper); }
.dark .title { color: var(--paper); }
.dark .lede { color: rgba(247,245,240,0.78); }
.dark .muted { color: var(--grey-light); }
.dark .hair { background: var(--hair-dark); }

/* ── facts ────────────────────────────────────────────────── */
.facts { display: grid; gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
@media (min-width: 620px) { .facts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.fact { background: var(--paper); padding: clamp(1.25rem, 2.5vw, 1.9rem); }
.fact dt {
  font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--grey); margin-bottom: 0.55rem;
}
.fact dd {
  font-family: var(--display); font-size: var(--text-lg); line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

/* ── enquiry ──────────────────────────────────────────────── */
.enquiry { display: grid; gap: clamp(2rem, 5vw, 4rem); }
@media (min-width: 900px) { .enquiry { grid-template-columns: 1fr 1.05fr; } }
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.4rem; }
.field label {
  font-size: var(--text-xs); font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--grey);
}
.field input, .field select, .field textarea {
  font: inherit; font-size: var(--text-sm);
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--hair);
  background: var(--paper-2);
  color: var(--ink);
  border-radius: 0;
  width: 100%;
}
.field textarea { min-height: 7rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 0; border-color: var(--ink); box-shadow: inset 0 -2px 0 var(--amber);
}
.form__note { font-size: var(--text-xs); color: var(--grey); }

.contact-list { display: grid; gap: 1.25rem; }
.contact-list dt {
  font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--grey); margin-bottom: 0.3rem;
}
.contact-list dd { font-size: var(--text-base); }
.contact-list a { text-decoration: none; border-bottom: 1px solid var(--amber); }

/* ── footer ───────────────────────────────────────────────── */
.footer { background: var(--ink); color: var(--paper); padding-block: clamp(3rem, 6vw, 5rem) 0; }
.footer__grid { display: grid; gap: clamp(2rem, 4vw, 3.5rem); }
@media (min-width: 820px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer img { height: 94px; width: auto; }
.footer h2 {
  font-family: var(--body); font-size: var(--text-xs); font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--grey-light);
  margin-bottom: 1.1rem;
}
.footer ul { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.footer a { text-decoration: none; font-size: var(--text-sm); color: rgba(247,245,240,0.82); }
.footer a:hover { color: var(--amber); }
.footer__legal {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--hair-dark);
  padding-block: 1.5rem;
  display: flex; flex-wrap: wrap; gap: 0.5rem 2rem;
  font-size: var(--text-xs); color: var(--grey-light);
}
.footer__bar { background: var(--amber); color: var(--ink); }
.footer__bar div {
  max-width: var(--max); margin-inline: auto; padding: 0.85rem var(--gutter);
  font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; text-align: center;
}

/* ── reveal on scroll ─────────────────────────────────────── */
.rv { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; } }

/* ── faq ──────────────────────────────────────────────────── */
.faq { max-width: 78ch; border-top: 1px solid var(--hair); }
.fq { border-bottom: 1px solid var(--hair); }
.fq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem;
  padding: 1.35rem 0;
  font-family: var(--display); font-size: var(--text-lg); line-height: 1.25;
}
.fq summary::-webkit-details-marker { display: none; }
.fq summary::after {
  content: "+"; flex: none; font-family: var(--body); font-weight: 500;
  font-size: var(--text-lg); line-height: 1; color: var(--amber);
  transition: transform 0.3s var(--ease);
}
.fq[open] summary::after { transform: rotate(45deg); }
.fq summary:hover { color: var(--amber-ink, var(--ink)); }
.fq summary:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.fq > div { padding: 0 0 1.5rem; max-width: 68ch; }
.fq p { font-size: var(--text-sm); color: var(--grey); }

/* ── Header tap-to-call ─────────────────────────────────────── */
.hdr-tel {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--body); font-size: var(--text-sm); font-weight: 700;
  letter-spacing: 0.01em; text-decoration: none; color: var(--ink);
  white-space: nowrap;
  transition: color 0.3s var(--ease);
}
.hdr-tel svg { width: 15px; height: 15px; flex: none; color: var(--amber-ink); }
.hdr-tel:hover { color: var(--amber-ink); }
@media (max-width: 860px) {
  .hdr-tel { position: relative; z-index: 60; margin-left: auto; margin-right: 0.6rem; }
}
@media (max-width: 620px) {
  /* the monogram carries the identity here; the number earns the space */
  .brand__txt { display: none; }
  .hdr-tel { font-size: 0.9rem; gap: 0.42rem; }
  .hdr-tel svg { width: 15px; height: 15px; }
}
@media (max-width: 330px) {
  .hdr-tel span { display: none; }
  .hdr-tel svg { width: 19px; height: 19px; }
}
.cta-row {
  margin-top: 2rem;
  display: flex; flex-wrap: wrap; gap: 0.85rem;
  justify-content: center; align-items: stretch;
}
@media (max-width: 560px) { .cta-row .btn { width: 100%; justify-content: center; } }
