/* =========================================================
   AZITA J — site styles
   Layout: centered editorial column on ivory paper; sections
   alternate between ivory and a warmer stone tone; gold is
   reserved for the logo, rules and the single accent per view.
   Brand tokens live here. Change a value once, it updates everywhere.
   ========================================================= */

:root {
  /* Color */
  --ivory:      #FBF9F5;  /* page background, clean warm white */
  --stone:      #F3EEE6;  /* alternate section background */
  --ink:        #26271F;  /* body text, near-black with an olive cast */
  --olive:      #464A33;  /* headings, deepened logo green */
  --sage:       #6E7255;  /* secondary text: subtitles, motto */
  --gold:       #B48C4E;  /* accent: rules, borders, highlights */
  --gold-deep:  #84612C;  /* gold used as text (passes contrast) */
  --hairline:   #E2D9CA;  /* thin borders and dividers */
  --muted:      #67655A;  /* captions, labels */
  --night:      #23251D;  /* footer */

  /* Type */
  --font-display: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --font-caps:    "Cinzel", "Trajan Pro", "Cormorant Garamond", Georgia, serif;
  --font-body:    "EB Garamond", Garamond, "Hoefler Text", Georgia, serif;

  /* Scale */
  --step--1: 0.82rem;                         /* labels */
  --step-0:  clamp(1.125rem, 1rem + 0.35vw, 1.25rem);  /* body: 18 to 20px */
  --step-1:  clamp(1.4rem, 1.2rem + 0.6vw, 1.7rem);    /* lead */
  --step-2:  clamp(1.65rem, 1.3rem + 1.1vw, 2.25rem);  /* section titles */
  --step-3:  clamp(2.2rem, 1.8rem + 1.4vw, 2.9rem);

  /* Space */
  --space-xs: 0.5rem;
  --space-s:  1rem;
  --space-m:  1.75rem;
  --space-l:  3rem;
  --space-xl: clamp(4rem, 9vw, 7.5rem);

  --measure: 38rem;      /* ~65 characters at body size */
  --page-max: 76rem;

  color-scheme: light;   /* the brand is a single ivory look by design */
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.72;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--gold-deep); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--olive); }

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

p { margin: 0; }

.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-left: max(16px, 4vw, env(safe-area-inset-left, 0px));
  padding-right: max(16px, 4vw, env(safe-area-inset-right, 0px));
}
.wrap.narrow { max-width: calc(var(--measure) + 8vw + 2rem); }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--ivory); padding: 0.5rem 1rem; z-index: 100;
}
.skip-link:focus { left: max(16px, env(safe-area-inset-left, 0px)); }

/* ---------- Shared type pieces ---------- */
.eyebrow-title {
  margin: 0;
  font-family: var(--font-caps);
  font-weight: 500;
  font-size: var(--step-2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--olive);
  line-height: 1.25;
  text-wrap: balance;
}

.short-rule {
  display: block;
  width: 3rem;
  height: 1px;
  background: var(--gold);
  margin-block: 1.1rem var(--space-m);
}

.subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: var(--step-1);
  color: var(--sage);
  margin-top: calc(var(--space-s) * -0.5);
  margin-bottom: var(--space-m);
}

.lead {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--ink);
}

.closing-line {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--olive);
}

.kicker {
  font-family: var(--font-caps);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: var(--space-xs);
}

.arrow { display: inline-block; transition: transform 0.25s ease; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.85rem 1.6rem;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-caps);
  font-weight: 500;
  font-size: 0.88rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}
.btn:hover { background: var(--olive); border-color: var(--olive); color: var(--ivory); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-solid { background: var(--olive); border-color: var(--olive); color: var(--ivory); }
.btn-solid:hover { background: var(--night); border-color: var(--night); }

/* ---------- Header ---------- */
.site-header { padding-block: 1.4rem; }
.header-inner { display: flex; align-items: center; gap: 1.5rem; }

.nav { display: flex; gap: clamp(1rem, 3vw, 2.75rem); }
.nav a {
  font-family: var(--font-caps);
  font-weight: 500;
  font-size: 0.86rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding-block: 0.35rem;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}
.nav a:hover, .nav a.is-current { border-bottom-color: var(--gold); color: var(--ink); }

.header-rule { flex: 1; height: 1px; background: var(--hairline); min-width: 2rem; }

.header-motto {
  font-family: var(--font-caps);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sage);
  white-space: nowrap;
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2rem, 6vw, 4.5rem) clamp(2.5rem, 6vw, 4rem); text-align: center; }
.hero-logo { margin: 0 auto; max-width: 62rem; }
.hero-logo img { width: 100%; }
.hero-intro {
  max-width: 40rem;
  margin: clamp(1.25rem, 3vw, 2rem) auto 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.3rem, 1.1rem + 0.9vw, 1.7rem);
  line-height: 1.55;
  color: var(--ink);
  text-wrap: balance;
}

/* ---------- Tiles ---------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: var(--ivory);
}
.tile {
  position: relative;
  display: block;
  overflow: hidden;
  text-decoration: none;
  color: var(--ivory);
  aspect-ratio: 3 / 2;
  max-width: 100%;
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s ease; }
.tile::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(30, 28, 20, 0.78) 0%, rgba(30, 28, 20, 0.35) 35%, rgba(30, 28, 20, 0) 62%);
}
.tile-label {
  position: absolute;
  left: clamp(1rem, 3vw, 2.25rem);
  right: clamp(1rem, 3vw, 2.25rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(248, 245, 239, 0.6);
  font-family: var(--font-caps);
  font-weight: 500;
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #FBF9F5; /* always on a photo */
  text-shadow: 0 1px 12px rgba(20, 18, 12, 0.45);
}
.tile:hover img { transform: scale(1.04); }
.tile:hover .arrow { transform: translateX(6px); }

/* ---------- Sections ---------- */
.section { padding-block: var(--space-xl); }
.section p + p { margin-top: 1.1em; }
.section .lead + p { margin-top: 1.4em; }
.section .closing-line { margin-top: 1.6em; }

/* Visionary: centered column with the large faint J from the mockup */
.visionary { position: relative; overflow: hidden; text-align: center; }
.visionary .short-rule { margin-inline: auto; }
.visionary::before {
  content: "";
  position: absolute;
  right: -4rem; top: 50%;
  width: min(34rem, 60vw); aspect-ratio: 1;
  transform: translateY(-50%);
  background: url("../assets/logo/monogram-j.png") center / contain no-repeat;
  opacity: 0.09;
  pointer-events: none;
}
.visionary .wrap { position: relative; }

/* About */
.about { background: var(--stone); }
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: start;
}
.portrait { margin: 0; position: relative; }
.portrait img { width: 100%; box-shadow: 0 1px 0 var(--hairline); }
.portrait::before {
  /* offset frame echoing the mockup's framed portrait */
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 1px solid var(--gold);
  opacity: 0.55;
  z-index: -1;
}
.portrait { z-index: 0; }
.about-text { min-width: 0; max-width: var(--measure); }
.signature {
  margin-top: var(--space-m) !important;
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--step-3);
  color: var(--gold-deep);
  line-height: 1;
}

/* The Approach */
.approach-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: start;
}
.approach-head { position: sticky; top: 2rem; }
.approach-text { min-width: 0; max-width: var(--measure); }
.pull-quote {
  margin: var(--space-l) 0 0;
  padding: var(--space-m) 0 0;
  border-top: 1px solid var(--hairline);
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  line-height: 1.35;
  color: var(--ink);
  text-wrap: balance;
}
.pull-quote em { color: var(--gold-deep); }

/* Effortless Living */
.living { background: var(--stone); }
.living-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); }
.living-image { margin: 0; aspect-ratio: 2 / 1; overflow: hidden; max-width: 100%; }
.living-image img { width: 100%; height: 100%; object-fit: cover; }
.living-text { min-width: 0; max-width: var(--measure); margin-inline: auto; }

/* Residences */
.residences { background: var(--ivory); padding-block: var(--space-xl); text-align: center; }
.residences-text .short-rule { margin-inline: auto; }
.residences-text p { max-width: var(--measure); margin-inline: auto; }
.residences-text p + p { margin-top: 1em; }

.gallery {
  list-style: none;
  margin: var(--space-l) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.75rem, 2vw, 1.5rem);
}
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; max-width: 100%; }
.gallery figcaption {
  margin-top: 0.85rem;
  font-family: var(--font-caps);
  font-weight: 500;
  font-size: var(--step--1);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--olive);
}
.gallery-note {
  margin-top: var(--space-m);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--muted);
}
.residences-cta { margin-top: var(--space-l); }

/* Contact */
.contact { border-top: 1px solid var(--hairline); }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 6vw, 5.5rem);
}
.contact-intro { min-width: 0; }
.contact-list { margin: var(--space-l) 0 0; display: grid; gap: var(--space-m); }
.contact-list div { display: grid; gap: 0.15rem; }
.contact-list dt {
  font-family: var(--font-caps);
  font-size: var(--step--1);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-list dd { margin: 0; font-size: var(--step-1); font-family: var(--font-display); }
.contact-list a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--hairline); }
.contact-list a:hover { border-bottom-color: var(--gold); }

.inquiry {
  min-width: 0;
  display: grid;
  gap: var(--space-m);
  padding: clamp(1.5rem, 4vw, 2.75rem);
  background: var(--stone);
  border: 1px solid var(--hairline);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-m); }
.field { display: grid; gap: 0.4rem; min-width: 0; }
.field label {
  font-family: var(--font-caps);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--olive);
}
.optional { text-transform: none; letter-spacing: 0; font-family: var(--font-body); color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit;
  font-size: 1.125rem;
  color: var(--ink);
  background: var(--ivory);
  border: 1px solid var(--hairline);
  border-radius: 0;
  padding: 0.7rem 0.85rem;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold);
}
.field input[aria-invalid="true"] { border-color: #9C4A3A; }
.inquiry .btn { justify-self: start; }
.form-status { font-style: italic; color: var(--olive); min-height: 1.5em; }
.form-status.is-error { color: #9C4A3A; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Footer */
.site-footer { background: var(--night); color: var(--stone); padding-block: var(--space-l); }
.footer-inner { display: grid; justify-items: center; gap: var(--space-m); text-align: center; }
.footer-mark { width: 3.5rem; }
.footer-contact {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 2.5rem;
  font-size: 1.05rem;
}
.footer-contact a { color: var(--stone); text-decoration: none; }
.footer-contact a:hover { color: #D9BE8C; }
.footer-legal {
  font-family: var(--font-caps); font-size: 0.7rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: #A9A68F;
}

/* ---------- Header monogram (inner pages) ---------- */
.header-mark { flex: none; display: block; width: 2.4rem; }
.header-mark img { width: 100%; }

/* ---------- Home: one screen, no long scroll ---------- */
.page-home {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
.page-home .site-header { padding-block: 1.1rem 0; }
.home { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.page-home .hero { padding-block: clamp(0.5rem, 2.5vh, 2rem) clamp(0.75rem, 2.5vh, 1.75rem); }

/* Top row: framed portrait box + A Visionary Approach, with the faint J behind */
.home-intro { position: relative; overflow: hidden; padding-bottom: clamp(0.75rem, 2.5vh, 1.75rem); }
.home-intro::before {
  content: "";
  position: absolute; right: -3rem; top: -2rem; bottom: -2rem;
  width: min(26rem, 40vw);
  background: url("../assets/logo/monogram-j.png") center / contain no-repeat;
  opacity: 0.1; pointer-events: none;
}
.home-intro-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.home-portrait {
  display: block;
  height: clamp(12rem, 33svh, 25rem);
  padding: 7px;
  border: 1px solid var(--hairline);
  background: var(--ivory);
  overflow: hidden;
}
.home-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; transition: transform 0.8s ease; }
.home-portrait:hover img { transform: scale(1.03); }
.home-visionary { max-width: 32rem; }
.home-visionary .short-rule { margin-block: 0.8rem 1rem; }
.home-visionary p { font-size: clamp(1rem, 0.85rem + 0.7vh, 1.15rem); line-height: 1.6; margin-bottom: clamp(0.9rem, 2.2vh, 1.5rem); }
.page-home .home-visionary .eyebrow-title { font-size: clamp(1.15rem, 0.9rem + 1vh, 1.5rem); }
/* logo scales with the window height so tiles always fit below it */
.page-home .hero-logo { max-width: min(56rem, calc(16.5svh * 3.18)); }
.page-home .hero-intro {
  max-width: 48rem;
  margin-top: clamp(0.5rem, 2vh, 1.25rem);
  font-size: clamp(1.1rem, 0.9rem + 1.1vh, 1.5rem);
}

.page-home .tiles {
  flex: 1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: 11rem;
}
.page-home .tile { aspect-ratio: auto; min-height: 0; }
/* image fills the tile without pushing its height */
.page-home .tile img { position: absolute; inset: 0; }
.tile-portrait img { object-position: center 25%; }
.page-home .tile-label { font-size: clamp(0.9rem, 1.25vw, 1.15rem); }

.home-contact { border-top: 1px solid var(--hairline); padding-block: 1rem; }
.home-contact-inner {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 0.5rem clamp(1rem, 3vw, 2.5rem);
  font-family: var(--font-display); font-size: 1.15rem;
}
.home-contact a { color: var(--ink); text-decoration: none; border-bottom: 1px solid transparent; }
.home-contact a:hover { border-bottom-color: var(--gold); }
.home-contact .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }
.home-contact-cta {
  font-family: var(--font-caps); font-size: 0.82rem; letter-spacing: 0.2em; text-transform: uppercase;
}
.home-contact-cta:hover .arrow { transform: translateX(4px); }

/* ---------- Inner pages ---------- */
.page-inner .site-header { border-bottom: 1px solid var(--hairline); }
.page-next { border-top: 1px solid var(--hairline); padding-block: var(--space-l); text-align: center; }
.page-next-link { display: inline-grid; justify-items: center; text-decoration: none; color: var(--olive); }
.page-next-title {
  font-family: var(--font-caps); font-weight: 500; font-size: var(--step-2);
  letter-spacing: 0.12em; text-transform: uppercase;
}
.page-next-link:hover .arrow { transform: translateX(6px); }
.page-next-link:hover { color: var(--gold-deep); }
/* section stacked directly after a section with the same background */
.living + .page-next, .about + .page-next { border-top: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .header-rule, .header-motto { display: none; }
  .header-inner { justify-content: center; }
}

@media (max-width: 960px) {
  .page-home .tile { aspect-ratio: 4 / 3; }
  .about-grid, .approach-grid, .living-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .approach-head { position: static; }
  .portrait { max-width: 30rem; }
  .about-text, .approach-text, .living-text { max-width: none; }
}

@media (max-width: 720px) {
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .tile { aspect-ratio: 16 / 9; }
  .page-home .tiles { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .page-home .tile { aspect-ratio: 16 / 9; }
  .home-intro-grid { grid-template-columns: minmax(0, 1fr); }
  .home-portrait { height: auto; aspect-ratio: 4 / 3; }
  .home-intro::before { display: none; }
  .page-home .hero-intro { font-size: 1.1rem; }
  .home-contact .dot:last-of-type { display: none; }
  .home-contact-cta { flex-basis: 100%; text-align: center; }
  .page-home .tile-label { font-size: 0.8rem; letter-spacing: 0.1em; }
  .header-mark { display: none; }
  .gallery { grid-template-columns: minmax(0, 1fr); gap: var(--space-m); }
  .nav { flex-wrap: wrap; justify-content: center; gap: 0.25rem 1.25rem; }
  .living-image { aspect-ratio: 16 / 9; }
  .btn { font-size: 0.75rem; letter-spacing: 0.14em; gap: 0.75rem; padding-inline: 1.2rem; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .portrait::before { inset: 10px -10px -10px 10px; }
  .visionary { text-align: left; }
  .visionary .short-rule { margin-inline: 0; }
}

/* Short laptop screens: tighten the home page so it still fits one screen */
@media (min-width: 721px) and (max-height: 800px) {
  .page-home .site-header { padding-block: 0.7rem 0; }
  .page-home .hero-logo { max-width: calc(14svh * 3.18); }
  .page-home .hero-intro { font-size: 1.05rem; line-height: 1.45; margin-top: 0.4rem; }
  .home-portrait { height: 14.5rem; }
  .home-visionary .short-rule { margin-block: 0.5rem 0.6rem; }
  .home-visionary p { font-size: 0.98rem; line-height: 1.5; margin-bottom: 0.7rem; }
  .home-visionary .btn { padding-block: 0.6rem; }
  .page-home .tiles { min-height: 9rem; }
  .home-contact { padding-block: 0.6rem; }
}
