/* ---------------------------------------------------------------
   Villa @ the Dam — design system
   Editorial / warm-minimal. Reading the system out loud:
   • One background tone (warm cream), one ink, one sage accent
   • Display serif + clean sans + small mono for metadata
   • 12-column grid, generous gutters, lots of vertical air
--------------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=Manrope:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --cream:        #F2ECE0;
  --cream-soft:   #EAE3D4;
  --cream-deep:   #E2D9C7;
  --ink:          #1A1814;
  --ink-soft:     #3A352D;
  --ink-mute:     #6B6457;
  --stone:        #8A7E6A;
  --sage:         #5A6450;    /* single quiet accent */
  --sage-deep:    #3F4738;
  --line:         rgba(26, 24, 20, 0.14);
  --line-soft:    rgba(26, 24, 20, 0.07);

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans:  "Manrope", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --maxw: 1480px;
  --gutter: clamp(20px, 4vw, 56px);

  /* Type scale */
  --t-mono:     11px;
  --t-meta:     12px;
  --t-body:     16px;
  --t-lede:     20px;
  --t-h4:       24px;
  --t-h3:       clamp(28px, 3vw, 40px);
  --t-h2:       clamp(40px, 5vw, 72px);
  --t-h1:       clamp(56px, 8vw, 124px);
  --t-display:  clamp(72px, 11vw, 168px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--cream); color: var(--ink); }
body {
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: 0.005em;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--sage); color: var(--cream); }

/* ---------- Type primitives ---------- */
.serif      { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
.serif-it   { font-family: var(--serif); font-weight: 400; font-style: italic; letter-spacing: -0.005em; }
.mono       { font-family: var(--mono); font-size: var(--t-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); }
.meta       { font-family: var(--sans); font-size: var(--t-meta); letter-spacing: 0.18em; text-transform: uppercase; font-weight: 500; color: var(--ink-soft); }

.display    { font-family: var(--serif); font-weight: 400; font-size: var(--t-display); line-height: 0.92; letter-spacing: -0.02em; }
.h1         { font-family: var(--serif); font-weight: 400; font-size: var(--t-h1);     line-height: 0.98; letter-spacing: -0.015em; }
.h2         { font-family: var(--serif); font-weight: 400; font-size: var(--t-h2);     line-height: 1.02; letter-spacing: -0.01em; }
.h3         { font-family: var(--serif); font-weight: 400; font-size: var(--t-h3);     line-height: 1.1;  letter-spacing: -0.005em; }
.h4         { font-family: var(--serif); font-weight: 400; font-size: var(--t-h4);     line-height: 1.2; }
.lede       { font-size: var(--t-lede); line-height: 1.5; font-weight: 300; color: var(--ink-soft); letter-spacing: 0; }
.body       { font-size: var(--t-body); line-height: 1.65; color: var(--ink-soft); }
.body p + p { margin-top: 1em; }

/* ---------- Layout ---------- */
.shell { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.rule  { height: 1px; background: var(--line); width: 100%; }
.rule-soft { height: 1px; background: var(--line-soft); width: 100%; }

/* ---------- Header ---------- */
header.site {
  position: fixed; inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(242, 236, 224, 0.82);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-bottom: 1px solid var(--line-soft);
}
header.site .row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 68px;
  padding: 0 var(--gutter);
  max-width: var(--maxw);
  margin: 0 auto;
  gap: 24px;
}
header.site .brand {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
header.site .brand em { font-style: italic; font-weight: 300; }
header.site nav {
  display: flex;
  gap: clamp(18px, 2.4vw, 36px);
  justify-self: center;
}
header.site nav a {
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  position: relative;
  padding: 6px 0;
  transition: color 200ms ease;
}
header.site nav a:hover { color: var(--ink); }
header.site nav a.active { color: var(--ink); }
header.site nav a.active::after {
  content: ""; position: absolute; left: 50%; bottom: 0;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--sage); transform: translateX(-50%);
}
header.site .right {
  display: flex; align-items: center; gap: 18px; justify-self: end;
}
header.site .right .index {
  font-family: var(--mono);
  font-size: var(--t-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* CTA pill */
.cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px 11px 20px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.04em;
  background: var(--ink);
  color: var(--cream);
  transition: background 220ms ease, color 220ms ease, transform 220ms ease;
}
.cta:hover { background: transparent; color: var(--ink); }
.cta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sage); }
.cta.ghost { background: transparent; color: var(--ink); }
.cta.ghost:hover { background: var(--ink); color: var(--cream); }

.link-arrow {
  display: inline-flex; align-items: baseline; gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  transition: color 200ms ease, border-color 200ms ease, gap 200ms ease;
}
.link-arrow:hover { gap: 16px; color: var(--sage-deep); border-color: var(--sage); }
.link-arrow svg { width: 12px; }

/* ---------- Footer ---------- */
footer.site {
  margin-top: 160px;
  padding: 80px var(--gutter) 36px;
  background: var(--ink);
  color: var(--cream);
}
footer.site .top {
  max-width: var(--maxw); margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 56px;
  padding-bottom: 80px;
  border-bottom: 1px solid rgba(242, 236, 224, 0.16);
}
footer.site h5 {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(242, 236, 224, 0.5);
  margin-bottom: 22px;
}
footer.site .wordmark {
  font-family: var(--serif);
  font-size: clamp(40px, 6vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.015em;
}
footer.site .wordmark em { font-style: italic; font-weight: 300; color: rgba(242, 236, 224, 0.6); }
footer.site ul { list-style: none; display: grid; gap: 10px; }
footer.site ul a { color: rgba(242, 236, 224, 0.78); font-size: 14px; }
footer.site ul a:hover { color: var(--cream); }
footer.site .bottom {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 36px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(242, 236, 224, 0.5);
}

/* ---------- Image utilities ---------- */
.img-frame { position: relative; overflow: hidden; background: var(--cream-deep); }
.img-frame img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1400ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.img-frame:hover img { transform: scale(1.03); }
.img-cap {
  display: flex; justify-content: space-between; gap: 24px;
  margin-top: 14px;
  font-family: var(--mono); font-size: var(--t-mono);
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-mute);
}

/* Placeholder striped slot (when an image isn't available) */
.slot {
  background-color: var(--cream-deep);
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(26, 24, 20, 0.04) 0 10px,
    transparent 10px 22px
  );
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: var(--t-mono);
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-mute);
  text-align: center; padding: 24px;
}

/* ---------- Sections ---------- */
section { padding: clamp(80px, 11vw, 160px) 0; }
section.tight { padding: clamp(56px, 7vw, 96px) 0; }

/* Reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 900ms ease, transform 900ms cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Page intro (sub pages) ---------- */
.page-intro {
  padding: 200px var(--gutter) 80px;
  max-width: var(--maxw); margin: 0 auto;
}
.page-intro .crumbs { display: flex; gap: 14px; align-items: center; margin-bottom: 56px; }
.page-intro .crumbs span:empty { display: inline-block; width: 24px; height: 1px; background: var(--ink-mute); }
.page-intro h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(56px, 9vw, 144px);
  line-height: 0.94;
  letter-spacing: -0.02em;
  max-width: 14ch;
}
.page-intro h1 em { font-style: italic; font-weight: 300; color: var(--ink-mute); }
.page-intro .meta-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: clamp(56px, 8vw, 96px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.page-intro .meta-row .cell .k { display: block; margin-bottom: 6px; }
.page-intro .meta-row .cell .v { font-family: var(--serif); font-size: 22px; line-height: 1.2; }

@media (max-width: 860px) {
  header.site .row { grid-template-columns: 1fr auto; gap: 16px; height: 60px; }
  header.site nav { display: none; }
  header.site .right .index { display: none; }
  footer.site .top { grid-template-columns: 1fr 1fr; gap: 40px; }
  .page-intro .meta-row { grid-template-columns: 1fr 1fr; }
}
