/* Moshé — brand system per Moshe_Brand_Guidelines.pdf
   Palette:  Burnt Umber #7C433B / Smoked Walnut #4A3532 / Parchment #F5E9E2 / Midnight Ink #0B0014
   Type:     Instrument Serif (documented web fallback for Priori Serif OT)
             DM Sans        (documented web fallback for Geist)
   Ratio:    60-30-10 — Parchment carries the page, Burnt Umber the anchors, Midnight Ink the accents. */

:root {
  --umber:     #7C433B;
  --walnut:    #4A3532;
  --parchment: #F5E9E2;
  --ink:       #0B0014;

  --umber-deep: #63352E;
  --rule:       rgba(11, 0, 20, 0.14);
  --rule-light: rgba(245, 233, 226, 0.22);

  --serif: "Instrument Serif", "Priori Serif OT", Georgia, "Times New Roman", serif;
  --sans:  "DM Sans", Geist, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Generous negative space is a brand rule, not a preference. */
  --gap:   clamp(5rem, 11vw, 10.5rem);
  --bleed: clamp(1.5rem, 6vw, 6.5rem);
  --measure: 34rem;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------------------------------------------------------------- typography */

h1, h2, h3 { margin: 0; font-weight: 400; }

h1 {
  font-family: var(--serif);
  font-size: clamp(2.9rem, 8.5vw, 6.5rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
}

/* The guidelines call for Instrument Serif Italic on single evocative words. */
h1 em, h2 em, .display em { font-style: italic; font-variation-settings: "slnt" -10; }

h2 {
  font-family: var(--sans);
  font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.1rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

h3 {
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.display {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 1.3rem + 3.6vw, 4rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  opacity: 0.62;
  margin: 0 0 1.5rem;
}

.lede { font-size: clamp(1.1rem, 1rem + 0.45vw, 1.3rem); line-height: 1.55; }

p { margin: 0 0 1.15rem; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

/* ------------------------------------------------------------------ wordmark */

/* Type stand-in for the calligraphic primary mark. Drop the real wordmark in as
   assets/moshe-wordmark.svg and swap .wordmark for an <img> — the guidelines
   forbid substituting typefaces for the mark, so this is temporary. */
/* The calligraphic primary mark, keyed out of the guidelines PDF. Two colourways:
   ink for Parchment grounds, parchment for umber and ink grounds. */
.wordmark {
  display: inline-block;
  text-decoration: none;
  line-height: 0;
  /* Clear space rule: a strict breathing room around the mark at all times. */
  padding: 0.35em 0.5em;
  margin: -0.35em -0.5em;
}
.wordmark img {
  /* Never below the 150px minimum the guidelines set for the primary mark. */
  width: clamp(150px, 13vw, 178px);
  height: auto;
}
.footer .wordmark img { width: 168px; }

/* --------------------------------------------------------------------- shell */

.wrap { padding-inline: var(--bleed); max-width: 82rem; margin-inline: auto; }

section { padding-block: var(--gap); }

.band-umber    { background: var(--umber);   color: var(--parchment); }
.band-walnut   { background: var(--walnut);  color: var(--parchment); }
.band-ink      { background: var(--ink);     color: var(--parchment); }
.band-umber .eyebrow, .band-walnut .eyebrow, .band-ink .eyebrow { opacity: 0.72; }

/* Paper grain. The brand lives on tactile surfaces, so flat digital fills read wrong. */
.grain { position: relative; isolation: isolate; }
.grain::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.055;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
.grain > * { position: relative; z-index: 2; }

/* --------------------------------------------------------------------- header */

.masthead {
  position: sticky; top: 0; z-index: 50;
  background: var(--parchment);
  border-bottom: 1px solid var(--rule);
}
.masthead__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem;
  padding-block: 1.15rem;
}
.nav { display: flex; gap: clamp(1.25rem, 3vw, 2.5rem); align-items: center; }
.nav a {
  font-size: 0.86rem; font-weight: 500; letter-spacing: 0.02em;
  text-decoration: none; opacity: 0.72;
  transition: opacity 0.2s ease;
}
.nav a:hover { opacity: 1; }
.nav__cta {
  opacity: 1 !important;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.nav__cta:hover { background: var(--umber); color: var(--parchment); border-color: var(--umber); }
@media (max-width: 46rem) { .nav__desk { display: none; } }

/* ----------------------------------------------------------------------- hero */

.hero {
  position: relative;
  min-height: min(86vh, 54rem);
  display: grid;
  align-items: end;
  padding-block: clamp(5rem, 14vw, 9rem) clamp(3rem, 7vw, 5rem);
  color: var(--parchment);
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: "";
  position: absolute; inset: 0;
  /* Burnt Umber carries the hero. Density at the base keeps the wordmark legible. */
  /* Two translucent layers: an umber wash for brand cast, a dark foot for legibility.
     A solid colour layer here would cover the photograph completely. */
  background:
    linear-gradient(to top, rgba(11,0,20,0.66) 0%, rgba(11,0,20,0.18) 48%, rgba(11,0,20,0.04) 100%),
    linear-gradient(0deg, rgba(124,67,59,0.28), rgba(124,67,59,0.28));
}
.hero__inner { position: relative; z-index: 2; }
.hero h1 { margin-bottom: 1.6rem; max-width: 16ch;
           text-shadow: 0 2px 26px rgba(11,0,20,0.5); }
.hero .lede { max-width: 40ch; opacity: 0.96;
              text-shadow: 0 1px 16px rgba(11,0,20,0.6); }

/* ---------------------------------------------------------------------- rules */

.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }
.band-umber .rule, .band-walnut .rule, .band-ink .rule { border-top-color: var(--rule-light); }

/* --------------------------------------------------------------------- layout */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
}
@media (min-width: 60rem) {
  .split { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: start; }
  .split--sticky > :first-child { position: sticky; top: 7rem; }
}

.pillars { display: grid; gap: 0; margin-top: 1rem; }
.pillar { padding-block: 1.9rem; border-top: 1px solid var(--rule); }
.pillar:last-child { border-bottom: 1px solid var(--rule); }
.band-umber .pillar, .band-walnut .pillar { border-color: var(--rule-light); }
.pillar h3 { margin-bottom: 0.45rem; }
.pillar p { opacity: 0.82; margin: 0; }
.pillar__num {
  font-family: var(--serif);
  font-size: 0.95rem;
  opacity: 0.5;
  display: block;
  margin-bottom: 0.7rem;
}

/* ------------------------------------------------------------------ portfolio */

.homes { display: grid; gap: clamp(2.5rem, 5vw, 4rem); margin-top: clamp(2.5rem, 5vw, 4rem); }
@media (min-width: 54rem) { .homes { grid-template-columns: repeat(3, 1fr); } }

.home__frame {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--walnut);
  margin-bottom: 1.4rem;
}
.home__frame img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.1s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.home:hover .home__frame img { transform: scale(1.035); }
.home h3 { margin-bottom: 0.4rem; }
.home__meta {
  font-size: 0.84rem;
  letter-spacing: 0.02em;
  opacity: 0.62;
  margin: 0;
}
.home__endorse {
  font-size: 0.7rem; letter-spacing: 0.19em; text-transform: uppercase;
  opacity: 0.5; margin: 0.9rem 0 0;
}

/* -------------------------------------------------------------------- markets */

.markets { display: grid; gap: 0; margin-top: 1rem; }
.market {
  display: grid; gap: 0.35rem 2rem;
  padding-block: 1.75rem;
  border-top: 1px solid var(--rule-light);
}
.market:last-child { border-bottom: 1px solid var(--rule-light); }
@media (min-width: 48rem) {
  .market { grid-template-columns: 14rem minmax(0, 1fr); align-items: baseline; }
}
.market__name { font-family: var(--serif); font-size: 1.45rem; line-height: 1.2; }
.market p { opacity: 0.8; margin: 0; }

/* --------------------------------------------------------------------- figure */

.figure { margin: 0; }
.figure img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.figure figcaption {
  font-size: 0.78rem; letter-spacing: 0.02em; opacity: 0.6;
  margin-top: 0.9rem;
}

/* --------------------------------------------------------------------- ribbon */

.ribbon { display: grid; gap: 1px; background: var(--rule-light); margin-top: clamp(2.5rem, 5vw, 4rem); }
@media (min-width: 44rem) { .ribbon { grid-template-columns: repeat(4, 1fr); } }
.ribbon img { aspect-ratio: 1; object-fit: cover; width: 100%; }

/* -------------------------------------------------------------------- buttons */

.btn {
  display: inline-block;
  font-size: 0.9rem; font-weight: 500; letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.95rem 1.9rem;
  border-radius: 999px;
  border: 1px solid currentColor;
  transition: background 0.22s ease, color 0.22s ease;
}
.btn--solid { background: var(--parchment); color: var(--ink); border-color: var(--parchment); }
.btn--solid:hover { background: transparent; color: var(--parchment); }
.btn--ghost:hover { background: var(--ink); color: var(--parchment); border-color: var(--ink); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.2rem; }

/* --------------------------------------------------------------------- footer */

.footer { padding-block: clamp(3.5rem, 7vw, 5.5rem) 2.5rem; }
.footer__grid { display: grid; gap: 2.5rem; }
@media (min-width: 52rem) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer a { text-decoration: none; opacity: 0.75; }
.footer a:hover { opacity: 1; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; font-size: 0.9rem; }
.footer__fine {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule-light);
  display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between;
  font-size: 0.76rem; letter-spacing: 0.02em; opacity: 0.58;
}

/* ------------------------------------------------------------------ A-frame */

.aframe { display: block; width: clamp(3.2rem, 5vw, 4.4rem); height: auto; opacity: 0.9; margin-bottom: clamp(1.6rem, 3vw, 2.4rem); }
.aframe path { fill: none; stroke: currentColor; stroke-width: 5.5; stroke-linecap: round; stroke-linejoin: round; }

/* The Moshé pattern: interconnected A-frames, kept to the parent palette. */
.pattern-field { position: relative; overflow: hidden; }
.pattern-field::before {
  content: "";
  position: absolute; inset: -10%;
  z-index: 0;
  opacity: 0.09;
  /* Interlocking gothic arches. The tile is deliberately large and the stroke thin:
     at a small tile size the lattice reads as a sawtooth and fights the type. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='110' viewBox='0 0 160 110'%3E%3Cg fill='none' stroke='%23F5E9E2' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M-80 110 C -56 62, -24 30, 0 0 C 24 30, 56 62, 80 110'/%3E%3Cpath d='M80 110 C 104 62, 136 30, 160 0 C 184 30, 216 62, 240 110'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 268px 184px;
}
.pattern-field > * { position: relative; z-index: 2; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .home__frame img { transition: none; }
}
