/* ============================================================
   MADDALI REALTY & VYKUNT DEVELOPERS
   Light editorial palette: paper, mist blue-grey, deep teal
   ============================================================ */

:root {
  --paper: #f4f4f3;      /* page base */
  --mist: #ffffff;       /* raised surfaces on paper */
  --sky: #b4e0e6;        /* light blue: hovers, tints, rules */
  --mint: #9ad8b4;       /* light green: solid-button hover on dark */
  --teal: #003a46;       /* deep petrol: headings, primary buttons, dark blocks */
  --teal-deep: #003a46;  /* footer, menu overlay */
  --grey-band: #d9d8d6;  /* light grey band, per Cain */
  --teal-dark: #002b34;  /* pressed/hover shade of petrol */
  --accent: #0094aa;     /* bright teal: interactive hovers, focus */
  --text: #434143;       /* body text on light */
  --muted: #787d81;      /* secondary text on light */
  --faint: #a2a7aa;      /* tertiary text on light */
  --line: #d9d8d6;       /* hairlines on light */
  --bone: #f4f4f3;       /* text on dark blocks */
  --bone-dim: rgba(244, 244, 243, 0.68);
  --bone-faint: rgba(244, 244, 243, 0.4);
  --hairline-dark: rgba(244, 244, 243, 0.16);
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  /* z-scale: 1 content overlays, 4 menu overlay, 5 sticky header */
}

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

::selection { background: var(--teal); color: var(--bone); }

/* ---------- type ---------- */

h1, h2, h3, .serif {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: var(--teal);
}

.display-xl {
  font-size: clamp(4rem, 14vw, 13rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 0.95;
}

.display-lg { font-size: clamp(2.4rem, 5.5vw, 4.6rem); }
.display-md { font-size: clamp(1.9rem, 3.6vw, 3rem); }

.lede {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.5rem, 2.6vw, 2.3rem);
  line-height: 1.3;
  color: var(--teal);
}

.small-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.body-dim { color: var(--muted); max-width: 62ch; }

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

.wrap { max-width: 1400px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 56px); }

section { padding: clamp(72px, 11vw, 160px) 0; }

.hairline-top { border-top: 1px solid var(--line); }

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

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 3.5vw, 48px);
  height: 76px;
  color: var(--teal);
  transition: background 0.45s var(--ease), color 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.site-header.scrolled {
  background: rgba(251, 251, 250, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
}

/* over a dark hero (before scroll) the chrome is light */
body.has-hero .site-header:not(.scrolled) { color: var(--bone); }

.brand { display: flex; align-items: baseline; min-width: 0; }

.brand .word {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(0.95rem, 1.5vw, 1.2rem);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: inherit;
}

.header-right { display: flex; align-items: center; gap: clamp(16px, 2.5vw, 32px); }

.portal-link {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: inherit;
  opacity: 0.75;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: opacity 0.3s, border-color 0.3s;
}
.portal-link:hover { opacity: 1; border-color: currentColor; }

.menu-btn {
  background: none;
  border: 0;
  cursor: pointer;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  gap: 0;
}
.menu-btn span {
  display: block;
  width: 26px; height: 1.5px;
  background: currentColor;
  margin: 3.5px 0;
  transition: transform 0.4s var(--ease), opacity 0.3s;
}
body.menu-open .site-header { color: var(--bone); }
body.menu-open .site-header.scrolled { background: transparent; backdrop-filter: none; box-shadow: none; }
body.menu-open .menu-btn span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
body.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
body.menu-open .menu-btn span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

/* ---------- overlay menu (dark block) ---------- */

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 4;
  background: var(--teal-deep);
  display: flex;
  align-items: flex-start;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.5s var(--ease), visibility 0s 0.5s;
  overflow-y: auto;
}
body.menu-open .menu-overlay {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.5s var(--ease);
}
body.menu-open { overflow: hidden; }

.menu-inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 110px clamp(20px, 4vw, 56px) 60px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
}

.menu-nav .menu-link {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: 1.22;
  color: var(--bone);
  opacity: 0;
  transform: translateY(26px);
  transition: color 0.3s;
}
.menu-nav .menu-link:hover { color: var(--sky); }

.menu-parent {
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  padding: 0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}
.menu-parent .caret {
  flex: none;
  width: 12px; height: 12px;
  border-right: 1.5px solid var(--bone-dim);
  border-bottom: 1.5px solid var(--bone-dim);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.35s var(--ease);
}
.menu-group.open .menu-parent .caret { transform: rotate(225deg) translateY(-3px); }

.menu-sub {
  margin-left: 6px;
  border-left: 1px solid var(--hairline-dark);
  padding-left: 22px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease), margin 0.5s var(--ease);
}
.menu-group.open .menu-sub { max-height: 280px; margin-top: 6px; margin-bottom: 14px; }
@media (hover: hover) {
  .menu-group:hover .menu-sub { max-height: 280px; margin-top: 6px; margin-bottom: 14px; }
  .menu-group:hover .menu-parent .caret { transform: rotate(225deg) translateY(-3px); }
}
.menu-sub a {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  line-height: 1.6;
  color: var(--bone-dim);
  opacity: 0;
  transform: translateY(26px);
  transition: color 0.3s;
}
.menu-sub a:hover { color: var(--sky); }

body.menu-open .menu-nav .menu-link,
body.menu-open .menu-sub a {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease), color 0.3s;
  transition-delay: calc(var(--i) * 55ms);
}

.menu-aside {
  display: grid;
  gap: 28px;
  opacity: 0;
  transition: opacity 0.6s var(--ease) 0.35s;
  color: var(--bone);
}
body.menu-open .menu-aside { opacity: 1; }
.menu-aside .small-label { margin-bottom: 6px; color: var(--bone-faint); }
.menu-aside a:hover { color: var(--sky); }

/* ---------- hero (dark block over media) ---------- */

.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: var(--bone);
}

.hero video,
.hero .hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero .scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,45,55,0.4) 0%, rgba(0,45,55,0.16) 45%, rgba(0,45,55,0.84) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-bottom: clamp(48px, 7vw, 96px);
}

.hero-content h1, .hero-content .hero-title { color: var(--bone); }
.hero-content .small-label { color: var(--bone-dim); }

.hero-title {
  font-family: var(--serif);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.02;
  font-size: clamp(2.5rem, 7.2vw, 7rem);
}

.hero-word {
  display: block;
  overflow: hidden;
}
.hero-word span {
  display: block;
  transform: translateY(110%);
  animation: riseUp 1.1s var(--ease) 0.25s forwards;
}
.hero-word.delay span { animation-delay: 0.45s; }

.hero-tag {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 26px;
  opacity: 0;
  animation: fadeIn 0.9s var(--ease) 1s forwards;
}
.hero-tag .rule { width: 72px; height: 1px; background: var(--sky); flex: none; }
.hero-tag p {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.9vw, 1.6rem);
  font-weight: 500;
  letter-spacing: 0.06em;
}

@keyframes riseUp { to { transform: translateY(0); } }
@keyframes fadeIn { to { opacity: 1; } }

.hero.short { min-height: 64dvh; }

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

.btn {
  display: inline-block;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 17px 38px;
  border: 1px solid var(--teal);
  color: var(--teal);
  background: none;
  cursor: pointer;
  font-family: var(--sans);
  white-space: nowrap;
  transition: background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.15s;
}
.btn:hover { background: var(--teal); color: var(--paper); }
.btn:active { transform: scale(0.98); }

.btn.solid { background: var(--teal); color: var(--paper); }
.btn.solid:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: var(--paper); }

/* buttons inside dark blocks */
footer .btn, .hero .btn {
  border-color: var(--bone);
  color: var(--bone);
}
footer .btn:hover, .hero .btn:hover {
  background: var(--bone);
  color: var(--teal);
}

/* ---------- scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0ms);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.stat .num {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(3rem, 6.4vw, 5.4rem);
  line-height: 1;
  color: var(--teal);
}
.stat p { margin-top: 12px; color: var(--muted); font-size: 0.9rem; }

/* ---------- project cards ---------- */

.card {
  position: relative;
  display: block;
}
.card .frame {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--mist);
}
.card .frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 1.1s var(--ease);
}
.card:hover .frame img { transform: scale(1.09); }

.card .meta { padding-top: 18px; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.card .meta h3 { font-size: 1.45rem; font-weight: 600; transition: color 0.3s; }
a.card:hover .meta h3 { color: var(--accent); }
.card .meta .yr { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); flex: none; }
.card .addr { margin-top: 4px; font-size: 0.85rem; color: var(--muted); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 44px); row-gap: clamp(48px, 5vw, 72px); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(24px, 3vw, 44px); row-gap: clamp(48px, 5vw, 72px); }

/* home selected-work grid: uniform two-up */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(24px, 3vw, 44px);
  row-gap: clamp(48px, 5vw, 72px);
}
.work-grid .card .frame { aspect-ratio: 16 / 10; }

/* ---------- values ---------- */

.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.values .cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(28px, 3.4vw, 52px);
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  background: var(--paper);
  transition: background 0.5s var(--ease);
}
.values .cell:hover { background: var(--mist); }
.values .cell h3 { font-size: clamp(1.5rem, 2.2vw, 2rem); }
.values .cell p { color: var(--muted); font-size: 0.9rem; max-width: 34ch; }

/* ---------- leadership ---------- */

.person { display: grid; gap: 20px; }
.person .frame { overflow: hidden; aspect-ratio: 4 / 5; background: var(--mist); }
.person .frame img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(18%); transition: filter 0.6s, transform 1.1s var(--ease); transform: scale(1.02); }
.person:hover .frame img { filter: grayscale(0%); transform: scale(1.06); }
.person h3 { font-size: 2rem; }
.person .role { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; margin-top: 4px; }
.person .contact-lines { margin-top: 12px; display: grid; gap: 4px; font-size: 0.92rem; color: var(--muted); }
.person .contact-lines a:hover { color: var(--accent); }

/* ---------- ledger (land holdings) ---------- */

.parcel .frame { aspect-ratio: 16 / 11; }

/* ---------- detail pages ---------- */

.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.spec-grid .spec {
  background: var(--mist);
  padding: 28px 26px;
}
.spec-grid .spec .v { font-family: var(--serif); font-weight: 600; font-size: 1.9rem; line-height: 1.1; color: var(--teal); }
.spec-grid .spec .k { margin-top: 8px; font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s;
}
.back-link:hover { color: var(--accent); }

/* ---------- investor pillars ---------- */

.pillars { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.pillars .cell { background: var(--paper); padding: clamp(32px, 4vw, 60px); min-height: 240px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; transition: background 0.5s var(--ease); }
.pillars .cell:hover { background: var(--mist); }
.pillars h3 { font-size: clamp(1.6rem, 2.4vw, 2.2rem); }
.pillars p { color: var(--muted); max-width: 40ch; }

/* ---------- forms ---------- */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: grid; gap: 8px; }
.field label { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  padding: 10px 2px 14px;
  transition: border-color 0.3s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.85rem; color: var(--faint); }

/* ---------- blog ---------- */

.post-list { display: grid; }
.post {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: clamp(20px, 3vw, 48px);
  align-items: baseline;
  padding: clamp(28px, 3.4vw, 44px) 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.4s var(--ease);
}
.post:first-child { border-top: 1px solid var(--line); }
.post:hover { padding-left: 14px; }
.post .date { font-size: 0.78rem; color: var(--faint); letter-spacing: 0.08em; }
.post h3 { font-size: clamp(1.5rem, 2.6vw, 2.2rem); transition: color 0.3s; }
.post:hover h3 { color: var(--accent); }
.post .arrow { font-size: 1.3rem; color: var(--faint); }

/* ---------- CTA band (dark block) ---------- */

.cta-band {
  background: var(--grey-band);
  color: var(--text);
}
.cta-band h2 { color: var(--teal); }
.cta-band .body-dim { color: var(--text); }
.cta-band .inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
}

/* ---------- footer (dark block) ---------- */

footer {
  padding: clamp(56px, 7vw, 96px) 0 40px;
  background: var(--teal-deep);
  color: var(--bone);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 44px;
}
.foot-grid .word {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 2rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.15;
  color: var(--bone);
}
.foot-grid h4 { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--bone-faint); margin-bottom: 16px; font-weight: 500; }
.foot-grid ul { list-style: none; display: grid; gap: 9px; font-size: 0.92rem; color: var(--bone-dim); }
.foot-grid ul a:hover { color: var(--sky); }
.foot-bottom {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline-dark);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--bone-faint);
}
.foot-bottom a:hover { color: var(--sky); }

/* ---------- page header (light) ---------- */

.page-head { padding: 190px 0 clamp(56px, 8vw, 110px); }
.page-head h1 { font-size: clamp(3rem, 8vw, 6.8rem); text-transform: uppercase; letter-spacing: 0.03em; line-height: 1; }
.page-head .body-dim { margin-top: 28px; }

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .menu-inner { grid-template-columns: 1fr; padding-top: 100px; }
  .work-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .values { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr; gap: 32px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .values { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .post { grid-template-columns: 1fr; gap: 8px; }
  .portal-link { display: none; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .hero-word span { animation: none; transform: none; }
  .hero-tag { animation: none; opacity: 1; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card .frame img, .person .frame img { transition: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
