/* ===============================================================
   THE COLLECTION — shared styles
   Theme tokens swap via [data-theme] on <html> (see theme.js)
=============================================================== */
:root {
  --gold:        #BE9852;   /* brand primary gold */
  --gold-soft:   #C6A15B;   /* lighter champagne   */
  --ease:        cubic-bezier(.22,.61,.36,1);
  --maxw:        1120px;
}

html[data-theme="dark"] {
  --bg-1:    #251019;            /* deepened plum     */
  --bg-2:    #161214;            /* near-black        */
  --ink:     #ece2d0;           /* warm off-white    */
  --ink-mut: #9c8f7d;           /* muted warm grey   */
  --accent:  #cba75f;           /* gold for text     */
  --hair:    rgba(198,161,91,.28);
  --glow:    rgba(190,152,82,.16);
  --emblem-shadow: drop-shadow(0 0 26px rgba(190,152,82,.22));
  --grain-op: .05;
  --toggle-track: rgba(255,255,255,.06);
}

html[data-theme="light"] {
  --bg-1:    #f7f3ea;            /* bone (primary)    */
  --bg-2:    #efe7d6;            /* warmer cream      */
  --ink:     #3a3128;           /* warm ink          */
  --ink-mut: #8a7b66;           /* muted             */
  --accent:  #a9813a;           /* deeper gold for contrast on bone */
  --hair:    rgba(120,93,40,.30);
  --glow:    rgba(190,152,82,.20);
  --emblem-shadow: none;
  --grain-op: .035;
  --toggle-track: rgba(58,49,40,.08);
}

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

html, body { height: 100%; }

body {
  font-family: 'Cormorant Garamond', Didot, Georgia, serif;
  color: var(--ink);
  background:
    radial-gradient(120% 90% at 50% -10%, var(--bg-1) 0%, var(--bg-2) 62%, var(--bg-2) 100%);
  background-attachment: fixed;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: color .6s var(--ease), background-color .6s var(--ease);
  overflow-x: hidden;
}

/* fine film grain to keep large flat areas from looking digital */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: var(--grain-op);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

a { color: inherit; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; border-radius: 2px; }

.label {
  font-family: 'Jost', 'Futura', sans-serif;
  text-transform: uppercase;
  letter-spacing: .42em;
  font-weight: 400;
}

/* ---------------------------------------------------------------
   FIXED CHROME — theme toggle (right) + back crumb (left)
--------------------------------------------------------------- */
.toggle {
  position: fixed;
  top: clamp(18px, 3vw, 34px);
  right: clamp(18px, 3vw, 38px);
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: .6em;
  padding: .55em .8em;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: var(--toggle-track);
  color: var(--ink-mut);
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: color .4s var(--ease), border-color .4s var(--ease);
}
.toggle:hover { color: var(--accent); border-color: var(--accent); }
.toggle .label { font-size: 10px; letter-spacing: .28em; }
.toggle svg { width: 15px; height: 15px; display: block; }
.toggle .ico-sun  { display: none; }
html[data-theme="light"] .toggle .ico-moon { display: none; }
html[data-theme="light"] .toggle .ico-sun  { display: block; }

.crumb {
  position: fixed;
  top: clamp(18px, 3vw, 34px);
  left: clamp(18px, 3vw, 38px);
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: .7em;
  padding: .55em .2em;
  font-family: 'Jost', 'Futura', sans-serif;
  text-transform: uppercase;
  letter-spacing: .28em;
  font-size: 10px;
  color: var(--ink-mut);
  text-decoration: none;
  transition: color .4s var(--ease);
}
.crumb:hover { color: var(--accent); }
.crumb svg { width: 16px; height: 16px; display: block; }

/* ---------------------------------------------------------------
   CENTRED CONTENT COLUMN
--------------------------------------------------------------- */
.wrap {
  position: relative;
  z-index: 2;
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(72px, 12vh, 150px) clamp(22px, 5vw, 56px) 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* soft gold aura behind the masthead in dark mode */
.wrap::before {
  content: "";
  position: absolute;
  top: 4%;
  left: 50%;
  width: min(760px, 90vw);
  height: 420px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, var(--glow), transparent 72%);
  pointer-events: none;
  z-index: -1;
}

/* ---- shared masthead type ---- */
.eyebrow {
  font-size: clamp(10px, 1.5vw, 12.5px);
  color: var(--accent);
  margin-bottom: clamp(26px, 5vh, 46px);
}
.eyebrow span { opacity: .5; padding: 0 .65em; }

.headline {
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: .005em;
  font-size: clamp(38px, 8.2vw, 92px);
  color: var(--ink);
}
.headline em { font-style: italic; color: var(--accent); }

.intro {
  margin: clamp(26px, 4.5vh, 40px) auto 0;
  max-width: 50ch;
  font-size: clamp(17px, 2.4vw, 22px);
  line-height: 1.66;
  color: var(--ink-mut);
  font-weight: 400;
}

/* ---- hairline rule with centred diamond ---- */
.rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1em;
  width: min(360px, 70vw);
  margin: clamp(46px, 8vh, 84px) auto clamp(40px, 6vh, 64px);
  color: var(--accent);
}
.rule::before, .rule::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(to var(--dir, right), transparent, var(--hair));
}
.rule::before { --dir: left; }
.rule i { width: 5px; height: 5px; transform: rotate(45deg); background: var(--accent); flex: none; opacity: .85; }

/* ===============================================================
   HOME — the trio
=============================================================== */
.collection-label {
  font-size: 11px;
  color: var(--ink-mut);
  margin-bottom: clamp(34px, 6vh, 56px);
}

.villas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  gap: clamp(20px, 4vw, 56px);
}

.villa {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(14px, 2vh, 22px) clamp(8px, 2vw, 28px);
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
}
/* hairline separators between villas (desktop) */
.villa + .villa::before {
  content: "";
  position: absolute;
  left: 0; top: 12%;
  width: 1px; height: 76%;
  background: linear-gradient(to bottom, transparent, var(--hair) 18%, var(--hair) 82%, transparent);
}

.villa .emblem {
  width: clamp(124px, 17vw, 178px);
  height: auto;
  aspect-ratio: 1;
  filter: var(--emblem-shadow);
  transition: transform .9s var(--ease), filter .6s var(--ease);
}
.villa:hover .emblem,
.villa:focus-visible .emblem { transform: translateY(-6px) scale(1.03); }

.villa .name {
  margin-top: clamp(18px, 2.6vh, 26px);
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: .14em;
  color: var(--accent);
  line-height: 1;
}
.villa .the {
  display: block;
  font-size: 11px;
  letter-spacing: .4em;
  color: var(--ink-mut);
  margin-bottom: .7em;
}
.villa .sub {
  margin-top: 1em;
  text-transform: uppercase;
  letter-spacing: .26em;
  font-size: clamp(9.5px, 1.15vw, 11px);
  color: var(--ink-mut);
}
.villa .enter {
  margin-top: 1.3em;
  font-family: 'Jost', sans-serif;
  text-transform: uppercase;
  letter-spacing: .34em;
  font-size: 9.5px;
  color: var(--accent);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.villa:hover .enter,
.villa:focus-visible .enter { opacity: .9; transform: none; }
@media (hover: none) { .villa .enter { opacity: .65; transform: none; } }

/* ===============================================================
   VILLA PAGE
=============================================================== */
.villa-page .emblem-lg {
  width: clamp(148px, 25vw, 216px);
  height: auto;
  aspect-ratio: 1;
  filter: var(--emblem-shadow);
}
.villa-page .name-xl {
  margin-top: clamp(20px, 3vh, 30px);
  font-weight: 400;
  line-height: 1;
  font-size: clamp(46px, 10vw, 104px);
  letter-spacing: .04em;
  color: var(--accent);
}
.villa-page .the-xl {
  display: block;
  font-size: clamp(11px, 1.6vw, 14px);
  letter-spacing: .5em;
  color: var(--ink-mut);
  margin-bottom: .5em;
}
.villa-page .vsub {
  margin-top: 1.1em;
  font-size: clamp(10px, 1.3vw, 12px);
  letter-spacing: .34em;
  color: var(--ink-mut);
}
.villa-page .tagline {
  margin-top: clamp(28px, 4.5vh, 44px);
  font-style: italic;
  font-size: clamp(20px, 3.1vw, 31px);
  line-height: 1.25;
  color: var(--ink);
}

/* features row */
.features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(13px, 2.6vw, 26px);
  margin: clamp(40px, 6vh, 64px) auto 0;
  font-family: 'Jost', sans-serif;
  text-transform: uppercase;
  letter-spacing: .26em;
  font-size: clamp(9.5px, 1.2vw, 11px);
  color: var(--ink-mut);
}
.features i {
  width: 4px; height: 4px;
  transform: rotate(45deg);
  background: var(--accent);
  opacity: .55;
  display: inline-block;
}

.pending {
  margin-top: clamp(40px, 6vh, 60px);
  font-style: italic;
  font-size: clamp(15px, 2vw, 18px);
  color: var(--ink-mut);
}

.btn {
  display: inline-block;
  margin-top: clamp(24px, 3.8vh, 36px);
  font-family: 'Jost', sans-serif;
  text-transform: uppercase;
  letter-spacing: .28em;
  font-size: 11px;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--hair);
  border-radius: 999px;
  padding: 1.05em 2.3em;
  transition: border-color .4s var(--ease), background-color .4s var(--ease);
}
.btn:hover { border-color: var(--accent); background-color: var(--toggle-track); }

/* villa-to-villa navigation */
.vnav {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin: clamp(64px, 11vh, 120px) auto 0;
  padding: clamp(26px, 4.5vh, 40px) clamp(22px, 5vw, 56px);
  border-top: 1px solid var(--hair);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.vnav a {
  text-decoration: none;
  color: var(--ink-mut);
  display: flex;
  flex-direction: column;
  gap: .45em;
  font-size: clamp(18px, 2.4vw, 25px);
  transition: color .4s var(--ease);
}
.vnav a:hover { color: var(--accent); }
.vnav .dir {
  font-family: 'Jost', sans-serif;
  text-transform: uppercase;
  letter-spacing: .3em;
  font-size: 9px;
  color: var(--ink-mut);
}
.vnav a.next { text-align: right; align-items: flex-end; }
.vnav .all {
  font-family: 'Jost', sans-serif;
  text-transform: uppercase;
  letter-spacing: .3em;
  font-size: 9.5px;
  flex-direction: row;
}

/* ---------------------------------------------------------------
   FOOTER
--------------------------------------------------------------- */
footer {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  text-align: center;
  padding: clamp(56px, 10vh, 110px) 22px clamp(34px, 6vh, 52px);
  color: var(--ink-mut);
}
footer .place { font-size: clamp(15px, 2vw, 18px); font-style: italic; }
footer .enquire {
  display: inline-block;
  margin-top: 1.4em;
  font-family: 'Jost', sans-serif;
  text-transform: uppercase;
  letter-spacing: .28em;
  font-size: 11px;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--hair);
  padding-bottom: .35em;
  transition: border-color .4s var(--ease);
}
footer .enquire:hover { border-color: var(--accent); }
footer .copy { margin-top: 2.6em; font-size: 10px; color: var(--ink-mut); opacity: .65; }

/* ---------------------------------------------------------------
   ENTRANCE ANIMATION
--------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); }
.in .reveal {
  opacity: 1; transform: none;
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
  transition-delay: var(--d, 0s);
}
/* keep interactive hover hints hidden until revealed, then governed by their own rules */
.in .villa .enter { opacity: 0; }
.in .villa:hover .enter,
.in .villa:focus-visible .enter { opacity: .9; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  body, .toggle, .crumb, .villa .emblem { transition: none !important; }
}

/* ---------------------------------------------------------------
   RESPONSIVE
--------------------------------------------------------------- */
@media (max-width: 720px) {
  .villas { grid-template-columns: 1fr; gap: clamp(46px, 9vw, 60px); }
  .villa + .villa::before { display: none; }
  .villa + .villa { padding-top: clamp(46px, 9vw, 60px); }
  .villa + .villa::after {
    content: ""; position: absolute; top: 0; left: 50%;
    width: 64px; height: 1px; transform: translateX(-50%);
    background: linear-gradient(to right, transparent, var(--hair), transparent);
  }
}

@media (max-width: 560px) {
  .vnav { padding-left: clamp(18px,5vw,30px); padding-right: clamp(18px,5vw,30px); }
  .vnav .all { display: none; }                 /* keep prev / next only on small screens */
  .crumb span { display: none; }                /* arrow only, avoid crowding the toggle */
}
