/* ============================================================
   DYNASTORIA — Quiet Luxury Real Estate Advisory
   Palette · Typography · Layout · Motion
   ============================================================ */

:root {
  /* --- Warm neutral palette --- */
  --cream:        #FBF8F2;
  --ivory:        #F4EDE1;
  --sand:         #EBE2D2;
  --beige:        #DDD1BC;

  /* --- Accent: deep olive (switch to bordeaux via --accent) --- */
  --accent:       #4E5A3A;   /* olive green   */
  --accent-deep:  #3B452B;
  --bordeaux:     #5A2A2A;   /* alternative accent, unused by default */

  /* --- Brass / gold for fine details --- */
  --brass:        #B08D57;
  --brass-soft:   #C7A876;

  /* --- Warm dark-brown text (never pure black) --- */
  --text:         #3A332B;
  --text-soft:    #6E6558;
  --text-faint:   #9A9184;

  --hairline:     rgba(58, 51, 43, 0.16);
  --hairline-lt:  rgba(58, 51, 43, 0.10);

  /* --- Type --- */
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans:  'Jost', 'Helvetica Neue', Arial, sans-serif;

  /* --- Rhythm --- */
  --maxw: 1200px;
  --section-y: clamp(5rem, 12vw, 10rem);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.85;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1.5rem, 5vw, 4rem); }
.container.narrow { max-width: 760px; }
.center { text-align: center; }
.section { padding: var(--section-y) 0; }

/* ---------- Typographic elements ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: 0.01em; }

.kicker,
.eyebrow {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 1.4rem;
}

.section-title {
  font-size: clamp(2.1rem, 5.5vw, 3.6rem);
  font-weight: 300;
  line-height: 1.14;
  color: var(--text);
}

.rule {
  width: 54px;
  height: 1px;
  background: var(--brass);
  margin: 1.8rem auto 2.2rem;
  opacity: 0.8;
}

.lede {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  line-height: 1.62;
  color: var(--text-soft);
  max-width: 42ch;
  margin: 0 auto;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .5s ease, box-shadow .5s ease, padding .4s ease;
  padding: 1.4rem 0;
}
.site-header.scrolled {
  background: rgba(251, 248, 242, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--hairline-lt);
  padding: 0.85rem 0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }

.brand { display: flex; flex-direction: column; line-height: 1; }
.brand-mark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: 0.28em;
  color: var(--text);
}
.brand-sub {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 0.5rem;
}

/* Hero header (before scroll) — light text over image */
.site-header:not(.scrolled) .brand-mark,
.site-header:not(.scrolled) .nav a,
.site-header:not(.scrolled) .lang-switch button,
.site-header:not(.scrolled) .lang-sep { color: var(--cream); }
.site-header:not(.scrolled) .brand-sub { color: rgba(251, 248, 242, 0.7); }
.site-header:not(.scrolled) .menu-toggle span { background: var(--cream); }

.nav { display: flex; gap: 2.2rem; }
.nav a {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
  position: relative;
  padding: 0.2rem 0;
  transition: color .3s ease;
}
.nav a::after {
  content: ''; position: absolute; left: 0; bottom: -2px;
  width: 0; height: 1px; background: var(--brass); transition: width .35s ease;
}
.nav a:hover { color: var(--brass); }
.nav a:hover::after { width: 100%; }

.lang-switch { display: flex; align-items: center; gap: 0.55rem; }
.lang-switch button {
  background: none; border: none; cursor: pointer;
  font-family: var(--sans); font-weight: 400;
  font-size: 0.74rem; letter-spacing: 0.14em;
  color: var(--text-faint); padding: 0.2rem 0.1rem;
  transition: color .3s ease;
}
.lang-switch button:hover { color: var(--brass); }
.lang-switch button.active { color: var(--brass); border-bottom: 1px solid var(--brass); }
.lang-sep { color: var(--hairline); font-size: 0.7rem; }

/* Mobile menu toggle */
.menu-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px 2px;
}
.menu-toggle span {
  display: block; width: 26px; height: 1px; background: var(--text);
  transition: transform .35s ease, opacity .3s ease;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(3px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { transform: translateY(-3px) rotate(-45deg); }

.mobile-nav {
  display: none;
  flex-direction: column;
  background: rgba(251, 248, 242, 0.98);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--hairline-lt);
  max-height: 0; overflow: hidden;
  transition: max-height .5s ease;
}
.mobile-nav a {
  padding: 1.05rem clamp(1.5rem, 5vw, 4rem);
  font-size: 0.85rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text); border-bottom: 1px solid var(--hairline-lt);
}
.mobile-nav.open { max-height: 380px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  overflow: hidden;
  background: var(--accent-deep);
}
.hero-media {
  position: absolute; inset: 0;
  background:
    linear-gradient(160deg, rgba(59,69,43,0.35), rgba(58,51,43,0.15)),
    var(--accent-deep)
    url('https://images.unsplash.com/photo-1613977257363-707ba9348227?auto=format&fit=crop&w=2000&q=80')
    center / cover no-repeat;
  transform: scale(1.05);
  animation: heroZoom 18s ease-out forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(40,36,28,0.45) 0%, rgba(40,36,28,0.15) 35%, rgba(40,36,28,0.55) 100%);
}
.hero-content { position: relative; z-index: 2; max-width: 900px; }
.hero .kicker { color: var(--brass-soft); }
.hero-title {
  color: var(--cream);
  font-size: clamp(2.7rem, 8vw, 5.6rem);
  font-weight: 300;
  line-height: 1.06;
  letter-spacing: 0.005em;
  margin-bottom: 1.6rem;
  max-width: 15ch;
}
.hero-sub {
  color: rgba(251, 248, 242, 0.85);
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.6vw, 1.55rem);
  font-weight: 300;
  line-height: 1.6;
  max-width: 44ch;
  margin: 0 0 2.6rem;
}

.btn-line {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.76rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream);
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--brass-soft);
  transition: color .35s ease, border-color .35s ease, letter-spacing .35s ease;
}
.btn-line:hover { color: var(--brass-soft); letter-spacing: 0.26em; }

.scroll-hint {
  position: absolute; bottom: 2.2rem; left: 50%; transform: translateX(-50%);
  width: 1px; height: 54px; background: rgba(251,248,242,0.35); z-index: 2; overflow: hidden;
}
.scroll-hint span {
  position: absolute; top: -54px; left: 0; width: 1px; height: 54px;
  background: var(--brass-soft); animation: scrollLine 2.4s ease-in-out infinite;
}
@keyframes scrollLine { 0% { top: -54px; } 60%,100% { top: 54px; } }

/* ---------- Philosophy ---------- */
.philosophy { background: var(--cream); }

/* ---------- Services ---------- */
.services { background: var(--ivory); }
.grid { display: grid; gap: 0; margin-top: 3.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.service {
  padding: 3rem clamp(1.5rem, 4vw, 3.4rem);
  border-top: 1px solid var(--hairline-lt);
  border-left: 1px solid var(--hairline-lt);
  position: relative;
}
.grid-2 .service:nth-child(2n) { border-right: 1px solid var(--hairline-lt); }
.grid-2 .service:nth-last-child(-n+2) { border-bottom: 1px solid var(--hairline-lt); }

.service-no {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--brass);
  letter-spacing: 0.1em;
}
.service h3 {
  font-size: clamp(1.5rem, 3vw, 1.95rem);
  font-weight: 400;
  margin: 0.9rem 0 1rem;
  color: var(--text);
}
.service p { color: var(--text-soft); font-size: 1rem; margin: 0; max-width: 38ch; }

/* ---------- Feature band ---------- */
.feature-band {
  position: relative; overflow: hidden;
  padding: clamp(6rem, 16vw, 11rem) 0;
  background: var(--accent-deep);
}
.feature-media {
  position: absolute; inset: 0;
  background:
    var(--accent-deep)
    url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?auto=format&fit=crop&w=2000&q=80')
    center / cover no-repeat;
  opacity: 0.85;
}
.feature-veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(40,36,28,0.55), rgba(59,69,43,0.5));
}
.feature-content { position: relative; z-index: 2; }
.quote {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.7rem, 4.5vw, 3rem);
  line-height: 1.35;
  color: var(--cream);
  max-width: 22ch;
  margin: 0 auto;
}

/* ---------- Approach ---------- */
.approach { background: var(--cream); }
.steps {
  list-style: none; margin: 3.5rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.step {
  padding: 0 clamp(1rem, 2.5vw, 2rem);
  border-left: 1px solid var(--hairline-lt);
}
.step:first-child { border-left: none; }
.step-no {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 300;
  color: var(--brass-soft);
  display: block;
  margin-bottom: 1rem;
}
.step h3 { font-size: 1.5rem; font-weight: 400; margin-bottom: 0.7rem; }
.step p { color: var(--text-soft); font-size: 0.96rem; margin: 0; }

/* ---------- Regions ---------- */
.regions { background: var(--ivory); }
.region-list {
  list-style: none; margin: 3.5rem 0 0; padding: 0;
  border-top: 1px solid var(--hairline-lt);
}
.region-list li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: 1.6rem 0.4rem;
  border-bottom: 1px solid var(--hairline-lt);
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  font-weight: 300;
  color: var(--text);
  transition: padding-left .4s ease, color .4s ease;
}
.region-list li:hover { padding-left: 1.2rem; color: var(--accent); }
.region-list li span {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 300;
}

/* ---------- About ---------- */
.about { background: var(--cream); }

/* ---------- Contact ---------- */
.contact { background: var(--sand); }
.contact-details {
  margin-top: 3.5rem;
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: clamp(2rem, 6vw, 5rem);
}
.contact-item { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }
.contact-label {
  font-family: var(--sans);
  font-size: 0.66rem; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--brass);
}
.contact-value {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  color: var(--text);
  transition: color .3s ease;
}
a.contact-value:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--accent-deep);
  color: var(--cream);
  padding: 3.5rem 0;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
}
.site-footer .brand-mark { color: var(--cream); }
.site-footer .brand-sub { color: rgba(251,248,242,0.55); }
.footer-legal { text-align: right; }
.footer-legal p {
  margin: 0.2rem 0;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: rgba(251, 248, 242, 0.6);
  line-height: 1.7;
}

/* ---------- Reveal motion ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1.1s cubic-bezier(.2,.7,.2,1), transform 1.1s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   RESPONSIVE  (mobile-first target: 90% of traffic)
   ============================================================ */
@media (max-width: 900px) {
  .nav { display: none; }
  .menu-toggle { display: flex; }
  .mobile-nav { display: flex; }
  .lang-switch { margin-left: auto; margin-right: 1.2rem; }

  .steps { grid-template-columns: 1fr 1fr; gap: 2.5rem 0; }
  .step { border-left: none; padding: 0 1rem; }
  .step:nth-child(odd) { border-right: 1px solid var(--hairline-lt); }
}

@media (max-width: 640px) {
  body { font-size: 16px; line-height: 1.8; }
  .header-inner { gap: 0.6rem; }
  .brand-sub { display: none; }
  .brand-mark { font-size: 1.08rem; letter-spacing: 0.13em; }
  .lang-switch { margin-right: 0.5rem; gap: 0.3rem; }
  .lang-switch button { font-size: 0.66rem; letter-spacing: 0.06em; }
  .lang-sep { font-size: 0.58rem; }
  .container { padding: 0 1.35rem; }

  .grid-2 { grid-template-columns: 1fr; }
  .service { border-left: none !important; border-right: none !important; }
  .grid-2 .service { border-bottom: none; }
  .grid-2 .service:last-child { border-bottom: 1px solid var(--hairline-lt); }

  .steps { grid-template-columns: 1fr; gap: 2.8rem; }
  .step, .step:nth-child(odd) { border: none; padding: 0; }
  .step { padding-top: 2.2rem; border-top: 1px solid var(--hairline-lt); }
  .step:first-child { border-top: none; padding-top: 0; }

  .region-list li { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
  .region-list li:hover { padding-left: 0.6rem; }

  .footer-inner { flex-direction: column; text-align: center; gap: 1.6rem; }
  .footer-brand { display: flex; flex-direction: column; align-items: center; }
  .footer-legal { text-align: center; }
  .scroll-hint { display: none; }
}
