/* =========================================================================
   Croods Villa — stylesheet
   ========================================================================= */
@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f3eee8;
  --bg-2: #ebe4dc;
  --surface: #fbf8f4;
  --ink: #1f1b17;
  --ink-2: #4a423b;
  --muted: #7a7068;
  --line: rgba(31, 27, 23, .1);
  --accent: #3d7262;
  --brand: #2f6553;
  --glass: rgba(255, 252, 248, .58);
  --glass-strong: rgba(255, 252, 248, .74);
  --glass-line: rgba(255, 255, 255, .72);
  --glass-blur: blur(22px) saturate(1.5);
  --dark-btn: #1d1a17;
  --dark-btn-ink: #fff;
  --shadow-sm: 0 4px 18px rgba(60, 38, 20, .08);
  --shadow: 0 18px 50px rgba(60, 38, 20, .14);
  --wash-1: rgba(246, 236, 225, .86);
  --wash-2: rgba(246, 236, 225, .48);
  --r-xl: 36px;
  --r-lg: 28px;
  --r-md: 20px;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --container: 1280px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #13110f;
  --bg-2: #1b1815;
  --surface: #1e1a17;
  --ink: #f4eee7;
  --ink-2: #d5cbc1;
  --muted: #a39789;
  --line: rgba(255, 255, 255, .1);
  --accent: #8fc0a6;
  --brand: #a8ceb8;
  --glass: rgba(28, 24, 21, .52);
  --glass-strong: rgba(28, 24, 21, .68);
  --glass-line: rgba(255, 255, 255, .14);
  --dark-btn: #f4eee7;
  --dark-btn-ink: #1d1a17;
  --shadow-sm: 0 4px 18px rgba(0, 0, 0, .3);
  --shadow: 0 18px 50px rgba(0, 0, 0, .4);
  --wash-1: rgba(14, 12, 10, .72);
  --wash-2: rgba(14, 12, 10, .3);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background .5s var(--ease), color .5s var(--ease);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
figure { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 10px; }

.ico {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: var(--dark-btn); color: var(--dark-btn-ink);
  padding: 10px 16px; border-radius: 999px; transition: top .2s;
}
.skip:focus { top: 16px; }

.container { width: min(var(--container), 100% - 56px); margin-inline: auto; }

/* ---------- glass ---------- */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-line);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .35);
}

/* ---------- shared bits ---------- */
.eyebrow {
  font-size: 12px; letter-spacing: .32em; text-transform: uppercase;
  color: var(--muted); font-weight: 500;
}
.eyebrow.light { color: rgba(255, 255, 255, .6); }
.h2 {
  font-size: clamp(36px, 4.6vw, 64px); font-weight: 300;
  line-height: 1.04; letter-spacing: -.035em; margin-top: 18px;
}
.h2.sm { font-size: clamp(30px, 3.2vw, 46px); }
.lead { color: var(--ink-2); font-size: 18px; max-width: 440px; margin-top: 22px; }

.btn-dark, .btn-ghost, .btn-light {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 26px; border-radius: 999px; font-weight: 500; font-size: 15px;
  transition: transform .35s var(--ease), background .3s, box-shadow .3s;
}
.btn-dark { background: var(--dark-btn); color: var(--dark-btn-ink); box-shadow: var(--shadow-sm); }
.btn-dark:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-dark.sm { height: 42px; padding: 0 18px; font-size: 14px; }
.btn-dark.wide { width: 100%; height: 56px; margin-top: 6px; }
.btn-ghost { border: 1px solid var(--line); background: transparent; }
.btn-ghost:hover { background: var(--glass-strong); }
.btn-light { background: #fff; color: #1d1a17; }
.btn-light:hover { transform: translateY(-2px); }
.btn-dark .ico, .btn-light .ico { transition: transform .35s var(--ease); }
.btn-dark:hover .ico, .btn-light:hover .ico { transform: translate(2px, -2px); }

.round-dark {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--dark-btn); color: var(--dark-btn-ink); flex: none;
  transition: transform .4s var(--ease);
}
.round-dark.lg { width: 50px; height: 50px; }
.round-dark:hover { transform: rotate(45deg); }

.circle-btn {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--glass-strong);
  transition: background .3s, transform .3s var(--ease), color .3s;
}
.circle-btn:hover { background: var(--dark-btn); color: var(--dark-btn-ink); transform: scale(1.05); }

/* theme-aware logo pairs */
.on-dark { display: none !important; }
[data-theme="dark"] .on-dark { display: block !important; }
[data-theme="dark"] .on-light { display: none !important; }

/* intro loader */
.loader {
  position: fixed; inset: 0; z-index: 200; display: grid; place-content: center; justify-items: center; gap: 28px;
  background: var(--bg); transition: opacity .8s var(--ease), visibility .8s;
  animation: loaderOut .6s 4s forwards; /* safety net if JS is off */
}
.loader img { width: min(220px, 52vw); height: auto; animation: logoIn 1.1s var(--ease) both; }
.loader-bar { width: 120px; height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 40%; background: var(--accent); border-radius: 2px; animation: load 1.1s ease-in-out infinite; }
.loader.is-done { opacity: 0; visibility: hidden; }
.is-loading .hero-copy > *, .is-loading .discover, .is-loading .villa-card { animation-play-state: paused; }
@keyframes logoIn { from { opacity: 0; transform: translateY(14px) scale(.96); filter: blur(6px); } }
@keyframes load { from { transform: translateX(-110%); } to { transform: translateX(260%); } }
@keyframes loaderOut { to { opacity: 0; visibility: hidden; } }

/* reveal on scroll */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* =========================================================================
   FLOATING TOP NAV
   ========================================================================= */
.topnav {
  position: fixed; z-index: 50; top: 14px; left: 50%;
  transform: translate(-50%, -140%);
  display: flex; align-items: center; gap: 28px; width: max-content; white-space: nowrap;
  padding: 7px 7px 7px 10px; border-radius: 999px;
  background: var(--glass-strong);
  transition: transform .6s var(--ease);
}
.topnav.is-shown { transform: translate(-50%, 0); }
.brand { display: flex; align-items: center; padding: 0 12px 0 8px; }
.brand img { height: 30px; width: auto; }
.topnav-links { display: flex; gap: 4px; }
.topnav-links a { padding: 8px 14px; border-radius: 999px; font-size: 14px; color: var(--ink-2); transition: background .25s, color .25s; }
.topnav-links a:hover, .topnav-links a.is-active { background: var(--glass-strong); color: var(--ink); box-shadow: var(--shadow-sm); }

/* =========================================================================
   HERO
   ========================================================================= */
.hero { padding: 14px; height: 100vh; height: 100svh; min-height: 700px; }
.hero-frame {
  position: relative; height: 100%; border-radius: var(--r-xl); overflow: hidden; isolation: isolate;
  background: #d9c4ae;
  box-shadow: 0 30px 80px rgba(60, 38, 20, .18), inset 0 0 0 1px rgba(255, 255, 255, .5);
}
.hero-frame::after { /* inner glass rim like the reference frame */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 6;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45), inset 0 0 40px rgba(255, 255, 255, .12);
}
.hero-slides { position: absolute; inset: -2%; z-index: -2; will-change: transform; transition: transform 1.2s var(--ease); }
.slide {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: var(--pos, 50% 50%);
  opacity: 0; transform: scale(1.08);
  transition: opacity 1.6s ease, transform 9s linear;
}
.slide.is-active { opacity: 1; transform: scale(1); }
.hero-wash {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, var(--wash-1) 0%, var(--wash-2) 32%, transparent 58%),
    linear-gradient(180deg, var(--wash-2) 0%, transparent 26%),
    linear-gradient(0deg, rgba(20, 12, 6, .22) 0%, transparent 30%);
  transition: background .6s;
}

/* top bar */
.hero-top {
  position: absolute; z-index: 5; top: 22px; left: 26px; right: 26px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.pill {
  height: 52px; display: inline-flex; align-items: center; gap: 12px;
  padding: 0 26px; border-radius: 999px; font-size: 15px; font-weight: 500;
  background: var(--glass-strong);
  transition: transform .35s var(--ease), background .3s;
}
.pill:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .9); }
.brand-pill { padding: 0 22px 0 18px; }
.brand-pill img { height: 34px; width: auto; }
[data-theme="dark"] .pill:hover { background: rgba(40, 34, 30, .85); }

.searchbar {
  display: flex; align-items: center; gap: 6px; height: 60px; padding: 6px 6px 6px 10px;
  border-radius: 999px; background: var(--glass-strong);
}
.sb-field {
  position: relative; display: flex; flex-direction: column; justify-content: center;
  padding: 0 18px; height: 100%; min-width: 150px; border-radius: 999px; cursor: pointer;
  transition: background .25s;
}
.sb-field:hover { background: rgba(255, 255, 255, .45); }
[data-theme="dark"] .sb-field:hover { background: rgba(255, 255, 255, .06); }
.sb-label { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); line-height: 1.2; }
.sb-label .ico { width: 13px; height: 13px; }
.sb-value { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 15px; font-weight: 500; line-height: 1.35; }
.sb-value .chev { width: 15px; height: 15px; opacity: .7; }
.sb-field input, .sb-field select {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;
  border: 0; font: inherit; color-scheme: inherit;
}
.sb-div { width: 1px; height: 26px; background: var(--line); flex: none; }
.sb-go {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--dark-btn); color: var(--dark-btn-ink); transition: transform .35s var(--ease);
}
.sb-go:hover { transform: scale(1.06); }

/* side rail */
.rail {
  position: absolute; z-index: 5; left: 22px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 8px; border-radius: 999px; background: var(--glass);
}
.rail-btn, .rail-avatar {
  position: relative; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink-2);
  transition: background .3s, color .3s, transform .3s var(--ease);
}
.rail-btn:hover { background: rgba(255, 255, 255, .55); color: var(--ink); }
[data-theme="dark"] .rail-btn:hover { background: rgba(255, 255, 255, .08); }
.rail-btn.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.rail-avatar { margin: 6px 0; padding: 2px; background: rgba(255, 255, 255, .7); }
.rail-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.rail-avatar:hover { transform: scale(1.08); }
[data-tip]::after {
  content: attr(data-tip); position: absolute; left: calc(100% + 14px); top: 50%;
  transform: translate(-6px, -50%); white-space: nowrap; pointer-events: none;
  padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 500;
  background: var(--dark-btn); color: var(--dark-btn-ink); opacity: 0;
  transition: opacity .25s, transform .25s var(--ease);
}
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; transform: translate(0, -50%); }
.i-sun { display: none; }
[data-theme="dark"] .i-sun { display: block; }
[data-theme="dark"] .i-moon { display: none; }

/* headline */
.hero-copy { position: absolute; z-index: 4; left: 118px; top: max(120px, 17%); max-width: 600px; }
.hero-copy h1 {
  margin-top: 20px; font-size: clamp(50px, 6.1vw, 92px); font-weight: 300;
  line-height: .98; letter-spacing: -.045em;
}
.hero-sub { margin-top: 24px; max-width: 360px; font-size: 18px; line-height: 1.5; color: var(--ink-2); }
.hero-copy > * { animation: rise 1.2s var(--ease) both; }
.hero-copy > :nth-child(2) { animation-delay: .12s; }
.hero-copy > :nth-child(3) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }

/* discover card */
.discover {
  position: absolute; z-index: 5; left: 102px; bottom: 22px;
  display: grid; grid-template-columns: 1fr 132px; gap: 14px;
  width: 340px; padding: 14px; border-radius: var(--r-lg); background: var(--glass-strong);
  animation: rise 1.2s .35s var(--ease) both;
}
.discover-text { display: flex; flex-direction: column; padding: 6px 0 2px 6px; }
.micro { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.dot { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--muted); }
.discover h3 { margin-top: 12px; font-size: 22px; font-weight: 500; line-height: 1.15; letter-spacing: -.02em; }
.discover p:not(.micro) { margin-top: 8px; font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.explore { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; font-size: 14px; font-weight: 500; }
.explore:hover .round-dark { transform: rotate(45deg); }
.discover-img { border-radius: 18px; overflow: hidden; height: 176px; }
.discover-img img { width: 100%; height: 100%; object-fit: cover; transition: opacity .5s, transform .8s var(--ease); }
.discover-img img.swap { opacity: 0; transform: scale(1.06); }
.discover.fade h3, .discover.fade p:not(.micro) { opacity: 0; }
.discover h3, .discover p { transition: opacity .4s; }

.hero-progress { position: absolute; z-index: 5; left: 50%; bottom: 30px; transform: translateX(-50%); display: flex; gap: 6px; }
.hero-progress button { position: relative; width: 34px; height: 18px; display: grid; align-items: center; }
.hero-progress button::before { content: ""; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .45); }
.hero-progress button i { position: absolute; left: 0; top: 50%; height: 3px; margin-top: -1.5px; width: 0; border-radius: 3px; background: #fff; }
.hero-progress button.is-done i { width: 100%; }
.hero-progress button.is-active i { animation: fill var(--dur, 7s) linear forwards; }
.hero-progress.paused button.is-active i { animation-play-state: paused; }
@keyframes fill { to { width: 100%; } }

/* villa card */
.villa-card {
  position: absolute; z-index: 5; right: 22px; bottom: 22px; width: 350px;
  padding: 22px; border-radius: var(--r-lg); background: var(--glass-strong);
  animation: rise 1.2s .45s var(--ease) both;
}
.hf-micro { margin-bottom: 12px; color: var(--accent); font-weight: 500; }
.hf-micro .dot { border-color: var(--accent); }
.villa-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.villa-card h2 { font-size: 23px; font-weight: 500; letter-spacing: -.02em; line-height: 1.2; }
.loc { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.loc .ico { width: 14px; height: 14px; }
.icon-sq {
  width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .4); transition: background .3s, transform .3s;
}
[data-theme="dark"] .icon-sq { background: rgba(255, 255, 255, .06); }
.icon-sq:hover { transform: scale(1.06); }
.icon-sq.is-saved { background: var(--dark-btn); color: var(--dark-btn-ink); }
.icon-sq .ico { width: 16px; height: 16px; }
.villa-desc { margin-top: 16px; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.specs { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.specs li { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: 13px; color: var(--ink-2); }
.specs .ico { width: 22px; height: 22px; stroke-width: 1.4; }
.price-row { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; align-items: flex-end; justify-content: space-between; }
.price-label { display: block; font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.price { display: block; font-size: 30px; font-weight: 500; letter-spacing: -.03em; line-height: 1.1; }
.price small { font-size: 14px; font-weight: 400; color: var(--muted); letter-spacing: 0; margin-left: 4px; }

/* =========================================================================
   SECTIONS
   ========================================================================= */
.section { padding: clamp(80px, 11vw, 150px) 0 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-bottom: 48px; flex-wrap: wrap; }
.head-side { max-width: 380px; color: var(--ink-2); display: flex; flex-direction: column; gap: 22px; }
.arrows { display: flex; gap: 10px; }

/* ABOUT */
.about-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.statement {
  margin-top: 26px; font-size: clamp(26px, 2.7vw, 40px); font-weight: 300;
  line-height: 1.32; letter-spacing: -.025em; color: var(--ink);
}
.chip-img {
  display: inline-block; width: 1.9em; height: .95em; border-radius: 999px;
  background-size: cover; background-position: center; vertical-align: -.08em;
  box-shadow: var(--shadow-sm); margin: 0 .05em;
  transition: width .5s var(--ease);
}
.statement:hover .chip-img { width: 2.4em; }
.features { margin-top: 44px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.feature {
  display: flex; gap: 14px; align-items: flex-start; padding: 18px;
  border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line);
  transition: transform .4s var(--ease), box-shadow .4s;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.f-ico, .t-ico, .c-ico {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none;
  background: var(--bg-2); color: var(--accent);
}
.feature h4 { font-size: 16px; font-weight: 500; }
.feature p { font-size: 14px; color: var(--muted); margin-top: 2px; }

.about-media { position: relative; padding: 0 0 60px 40px; }
.media-main { border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 4/5; box-shadow: var(--shadow); }
.media-main img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.about-media:hover .media-main img { transform: scale(1.04); }
.media-float {
  position: absolute; left: 0; bottom: 0; width: 42%; aspect-ratio: 3/4; border-radius: var(--r-lg);
  overflow: hidden; border: 6px solid var(--bg); box-shadow: var(--shadow);
}
.media-float img { width: 100%; height: 100%; object-fit: cover; }
.media-badge {
  position: absolute; right: 18px; top: 18px; display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; background: var(--glass-strong);
}
.media-badge .ico { color: var(--accent); }

.stats {
  list-style: none; margin: clamp(56px, 7vw, 90px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stats li { padding: 30px 24px; display: flex; flex-direction: column; gap: 6px; }
.stats li + li { border-left: 1px solid var(--line); }
.stats strong { font-size: clamp(40px, 4.6vw, 64px); font-weight: 300; letter-spacing: -.04em; line-height: 1; }
.stats strong small { font-size: .32em; letter-spacing: .04em; margin-left: 6px; color: var(--muted); font-weight: 400; }
.stats span { font-size: 14px; color: var(--muted); letter-spacing: .02em; }

/* SPACES */
.track-wrap { overflow: hidden; }
.track {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 0 max(28px, calc((100vw - var(--container)) / 2)) 10px;
  scroll-padding-inline: max(28px, calc((100vw - var(--container)) / 2));
  cursor: grab;
}
.track::-webkit-scrollbar { display: none; }
.track.dragging { cursor: grabbing; scroll-snap-type: none; }
.track.dragging * { pointer-events: none; }
.space-card {
  position: relative; flex: 0 0 clamp(270px, 28vw, 380px); aspect-ratio: 3/4;
  border-radius: var(--r-lg); overflow: hidden; scroll-snap-align: start; isolation: isolate;
  box-shadow: var(--shadow-sm);
}
.space-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; transition: transform 1.2s var(--ease); -webkit-user-drag: none; user-select: none; }
.space-card:hover img { transform: scale(1.06); }
.space-cap {
  position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 18px 20px;
  border-radius: var(--r-md); background: var(--glass-strong);
}
.space-cap .num { font-size: 12px; color: var(--muted); letter-spacing: .1em; }
.space-cap h3 { font-size: 20px; font-weight: 500; letter-spacing: -.02em; margin-top: 2px; }
.space-cap p { font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.track-progress { height: 2px; background: var(--line); border-radius: 2px; margin-top: 30px; overflow: hidden; }
.track-progress span { display: block; height: 100%; width: 20%; background: var(--ink); border-radius: 2px; transition: width .2s linear; }

/* AMENITIES */
.amen-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(40px, 6vw, 90px); align-items: start; }
.amen-side { position: sticky; top: 110px; }
.amen-img { margin-top: 34px; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16/11; box-shadow: var(--shadow-sm); }
.amen-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.times { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 440px; }
.times li { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; padding: 16px 18px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.times .ico { grid-row: span 2; color: var(--accent); width: 22px; height: 22px; }
.times span { font-size: 12.5px; color: var(--muted); }
.times strong { font-size: 18px; font-weight: 500; letter-spacing: -.01em; }
.amen-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tile {
  position: relative; padding: 24px 22px 26px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line);
  transition: transform .4s var(--ease), box-shadow .4s, background .4s;
}
.tile:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.tag {
  position: absolute; top: 18px; right: 16px; padding: 5px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 500; letter-spacing: .02em; color: var(--muted); background: var(--bg-2);
}
.tag.inc { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.tag.add { color: #a5612f; background: rgba(214, 140, 72, .14); }
[data-theme="dark"] .tag.add { color: #e7a874; }
.tile h4 { margin-top: 22px; font-size: 17px; font-weight: 500; letter-spacing: -.01em; }
.tile p { margin-top: 6px; font-size: 14px; color: var(--muted); }
.amen-tiles .tile:nth-child(3n+2) { transition-delay: .06s; }
.amen-tiles .tile:nth-child(3n) { transition-delay: .12s; }

/* DAY PANELS */
.panels { display: flex; gap: 14px; height: clamp(440px, 56vh, 580px); }
.panel {
  position: relative; flex: 1; min-width: 0; border-radius: var(--r-lg); overflow: hidden;
  text-align: left; isolation: isolate; transition: flex 1s var(--ease);
}
.panel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.4s var(--ease); }
.panel::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(15, 10, 6, .72) 0%, rgba(15, 10, 6, .1) 55%, rgba(15, 10, 6, .15) 100%); }
.panel.is-open { flex: 2.8; }
.panel.is-open img { transform: scale(1.04); }
.panel-in { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px; color: #fff; display: flex; flex-direction: column; gap: 8px; }
.panel-time {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500;
  padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, .18);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, .25);
}
.panel-time .ico { width: 15px; height: 15px; }
.panel-title { font-size: clamp(22px, 2.2vw, 32px); font-weight: 400; letter-spacing: -.025em; line-height: 1.1; white-space: nowrap; }
.panel-text { max-width: 380px; font-size: 15px; color: rgba(255, 255, 255, .85); opacity: 0; transform: translateY(10px); transition: opacity .5s, transform .6s var(--ease); }
.panel.is-open .panel-text { opacity: 1; transform: none; transition-delay: .35s; }
.panel:not(.is-open) .panel-title { font-size: 20px; white-space: normal; }

/* GALLERY */
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.filter { padding: 10px 18px; border-radius: 999px; font-size: 14px; color: var(--ink-2); transition: background .3s, color .3s; }
.filter:hover { color: var(--ink); }
.filter.is-active { background: var(--dark-btn); color: var(--dark-btn-ink); }
.masonry {
  --cols: 4; --gap: 16px;
  display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: var(--gap);
  grid-auto-flow: dense;
  grid-auto-rows: calc((min(var(--container), 100vw - 56px) - (var(--cols) - 1) * var(--gap)) / var(--cols) * 1.28);
}
.g-item {
  position: relative; display: block; border-radius: var(--r-md); overflow: hidden;
  cursor: zoom-in; animation: fade .5s ease;
}
.g-item.feature-lg { grid-column: span 2; grid-row: span 2; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.g-item::after {
  content: ""; position: absolute; inset: 0; background: rgba(20, 12, 6, .18); opacity: 0; transition: opacity .4s;
}
.g-zoom {
  position: absolute; right: 12px; bottom: 12px; z-index: 1; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--glass-strong); color: var(--ink);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  opacity: 0; transform: translateY(6px) scale(.9); transition: opacity .35s, transform .45s var(--ease);
}
.g-item:hover img { transform: scale(1.05); }
.g-item:hover::after { opacity: 1; }
.g-item:hover .g-zoom, .g-item:focus-visible .g-zoom { opacity: 1; transform: none; }
.g-item.is-hidden { display: none; }

/* LIGHTBOX */
.lightbox {
  position: fixed; inset: 0; z-index: 90; display: grid; grid-template-columns: 80px 1fr 80px; align-items: center;
  background: rgba(12, 9, 7, .9); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  animation: fade .35s ease;
}
.lightbox[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.lb-fig { display: flex; flex-direction: column; align-items: center; gap: 14px; height: 100%; justify-content: center; padding: 30px 0; min-width: 0; }
.lb-fig img { max-height: calc(100vh - 130px); max-width: 100%; border-radius: 18px; object-fit: contain; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); animation: zoomIn .5s var(--ease); }
@keyframes zoomIn { from { opacity: 0; transform: scale(.96); } }
.lb-fig figcaption { display: flex; gap: 16px; color: rgba(255, 255, 255, .8); font-size: 14px; }
#lbCount { color: rgba(255, 255, 255, .5); }
.lb-btn {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; justify-self: center; color: #fff;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); transition: background .3s;
}
.lb-btn:hover { background: rgba(255, 255, 255, .25); }
.lb-close { position: absolute; top: 20px; right: 20px; }

/* LOCATION */
.loc-frame { position: relative; border-radius: var(--r-xl); overflow: hidden; min-height: 620px; display: flex; align-items: center; padding: 28px; isolation: isolate; }
.loc-frame > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; z-index: -1; }
.loc-card { max-width: 480px; padding: 40px; border-radius: var(--r-lg); background: var(--glass-strong); }
.loc-card .h2 { margin-top: 14px; }
.loc-card > p:not(.eyebrow) { margin-top: 18px; color: var(--ink-2); }
.pin { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; font-size: 15px; font-weight: 500; }
.pin .ico { color: var(--accent); margin-top: 2px; }
.pin small { font-weight: 400; color: var(--muted); font-size: 13px; }
.loc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.loc-chips { position: absolute; right: 28px; bottom: 28px; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.loc-chips span { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; background: var(--glass-strong); }
.loc-chips .ico { color: var(--accent); }

/* BOOK */
.book-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.contact-list { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 12px; }
.contact-list li { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); transition: transform .35s var(--ease); }
.contact-list li:hover { transform: translateX(6px); }
.contact-list small { display: block; font-size: 12px; color: var(--muted); }
.contact-list a, .contact-list .strong { font-weight: 500; }
.book-card { position: relative; border-radius: var(--r-xl); overflow: hidden; padding: clamp(18px, 4vw, 48px); isolation: isolate; min-height: 640px; display: grid; align-items: center; }
.book-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; z-index: -1; }
.book-form, .book-done { padding: clamp(22px, 3vw, 36px); border-radius: var(--r-lg); background: var(--glass-strong); }
.book-form h3, .book-done h3 { font-size: 26px; font-weight: 400; letter-spacing: -.02em; margin-bottom: 18px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field > span { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  padding: 13px 16px; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .6); outline: none; transition: border-color .25s, box-shadow .25s, background .25s;
  min-height: 50px;
}
[data-theme="dark"] .field input, [data-theme="dark"] .field textarea { background: rgba(0, 0, 0, .25); }
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.field input.invalid { border-color: #c4553b; }
.stepper { display: flex; align-items: center; justify-content: space-between; height: 50px; padding: 5px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .6); }
[data-theme="dark"] .stepper { background: rgba(0, 0, 0, .25); }
.stepper button { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .2s; }
.stepper button:active { transform: scale(.92); }
.stepper output { font-size: 17px; font-weight: 500; }
.form-error { color: #c4553b; font-size: 14px; min-height: 0; }
.form-error:not(:empty) { margin-bottom: 10px; }
.book-done { text-align: left; }
.done-ico { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--dark-btn); color: var(--dark-btn-ink); margin-bottom: 18px; }
.book-done > p { color: var(--ink-2); }
.book-done pre { white-space: pre-wrap; font: inherit; font-size: 14px; margin: 18px 0; padding: 16px; border-radius: 14px; background: rgba(255, 255, 255, .5); border: 1px solid var(--line); color: var(--ink-2); }
[data-theme="dark"] .book-done pre { background: rgba(0, 0, 0, .25); }
.done-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.text-btn { margin-top: 16px; font-size: 14px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }

/* FOOTER */
.footer { padding: clamp(80px, 11vw, 150px) 14px 14px; }
.footer-in {
  border-radius: var(--r-xl); background: #1a1613; color: #f1ebe4; padding: clamp(36px, 6vw, 80px) clamp(24px, 5vw, 72px) 28px; overflow: hidden;
}
[data-theme="dark"] .footer-in { background: #0c0a09; border: 1px solid var(--line); }
.foot-top { display: flex; justify-content: space-between; gap: 50px; flex-wrap: wrap; }
.foot-logo { width: 150px; height: auto; margin-bottom: 34px; }
.foot-cta { margin: 18px 0 30px; font-size: clamp(34px, 4.4vw, 60px); font-weight: 300; line-height: 1.05; letter-spacing: -.035em; }
.foot-cols { display: flex; gap: clamp(40px, 7vw, 110px); }
.foot-cols h4 { font-size: 13px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 255, 255, .5); margin-bottom: 16px; }
.foot-cols a, .foot-cols span { display: block; color: rgba(255, 255, 255, .85); padding: 4px 0; font-size: 15px; transition: color .25s; }
.foot-cols a:hover { color: #fff; }
.wordmark {
  margin: clamp(56px, 8vw, 100px) 0 clamp(36px, 5vw, 60px); width: 100%; aspect-ratio: 1600 / 391;
  background: url("../img/pool-sunset.webp") 85% 12% / 170% auto, linear-gradient(180deg, #f6e5d2, #c88a5c);
  -webkit-mask: url("../img/croods-word.webp") center / contain no-repeat;
  mask: url("../img/croods-word.webp") center / contain no-repeat;
}
.hf-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  padding: 26px 30px; margin-bottom: 26px; border-radius: 24px;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .09);
}
.hf-copy { max-width: 460px; }
.hf-copy p:not(.eyebrow) { margin-top: 10px; font-size: 15px; color: rgba(255, 255, 255, .7); }
.hf-copy a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .3); text-underline-offset: 3px; }
.hf-office { font-style: normal; margin-top: 18px; display: grid; gap: 8px; font-size: 14px; color: rgba(255, 255, 255, .7); }
.hf-office span { display: flex; gap: 10px; align-items: flex-start; }
.hf-office .ico { width: 16px; height: 16px; margin-top: 3px; color: #8fc0a6; }
.hf-office a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.hf-office a:hover { color: #fff; }
.hf-logo { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; transition: transform .4s var(--ease); }
.hf-logo img { width: clamp(220px, 26vw, 320px); height: auto; }
.hf-logo span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; letter-spacing: .04em; color: rgba(255, 255, 255, .55); transition: color .3s; }
.hf-logo span .ico { width: 14px; height: 14px; }
.hf-logo:hover { transform: translateY(-2px); }
.hf-logo:hover span { color: #fff; }
.foot-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 14px; color: rgba(255, 255, 255, .55); }
.to-top { display: inline-flex; align-items: center; gap: 6px; color: rgba(255, 255, 255, .85); }
.to-top .ico { transform: rotate(-45deg); }

/* DOCK (mobile) */
.dock {
  position: fixed; z-index: 60; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: none; gap: 2px; padding: 6px; border-radius: 999px; background: var(--glass-strong);
  transform: translate(-50%, 160%); transition: transform .5s var(--ease);
}
.dock.is-shown { transform: translate(-50%, 0); }
.dock a, .dock button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 13px; border-radius: 999px; font-size: 11px; color: var(--ink-2); transition: background .3s, color .3s; }
.dock .ico { width: 19px; height: 19px; }
.dock .is-active { background: var(--dark-btn); color: var(--dark-btn-ink); }

/* TOAST */
.toast {
  position: fixed; z-index: 95; left: 50%; bottom: 28px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
  padding: 12px 22px; border-radius: 999px; background: var(--dark-btn); color: var(--dark-btn-ink); font-size: 14px; font-weight: 500;
  transition: opacity .3s, transform .4s var(--ease); box-shadow: var(--shadow);
}
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 1280px) {
  .sb-field { min-width: 128px; padding: 0 14px; }
}
@media (max-width: 1140px) {
  .searchbar .sb-field:nth-of-type(2), .searchbar .sb-div:nth-of-type(2) { display: none; }
  .discover { width: 300px; grid-template-columns: 1fr 112px; }
  .amen-tiles { grid-template-columns: repeat(2, 1fr); }
  .topnav-links a { padding: 8px 10px; }
  .masonry { --cols: 3; }
}
@media (max-width: 1000px) {
  .discover, .hero-progress { display: none; }
  .about-grid, .amen-grid, .book-grid { grid-template-columns: 1fr; }
  .amen-side { position: static; }
  .about-media { max-width: 560px; }
  .topnav-links { display: none; }
}
@media (max-width: 860px) {
  .hero { padding: 10px; min-height: 640px; }
  .hero-frame { border-radius: 28px; }
  .rail, .searchbar { display: none; }
  .hero-top { top: 14px; left: 14px; right: 14px; }
  .pill { height: 46px; padding: 0 18px; font-size: 14px; }
  .hero-copy { left: 22px; right: 22px; top: 92px; }
  .hero-copy h1 { font-size: clamp(44px, 12vw, 64px); }
  .hero-sub { font-size: 16px; max-width: 320px; }
  .hero-wash {
    background:
      linear-gradient(180deg, var(--wash-1) 0%, var(--wash-2) 38%, transparent 60%),
      linear-gradient(0deg, rgba(20, 12, 6, .3) 0%, transparent 35%);
  }
  .villa-card { left: 12px; right: 12px; bottom: 12px; width: auto; padding: 18px; }
  .villa-desc { display: none; }
  .specs { margin-top: 14px; }
  .price-row { margin-top: 14px; padding-top: 14px; }
  .price { font-size: 26px; }
  .topnav { display: none; }
  .dock { display: flex; }
  .footer { padding-bottom: 90px; }
  .panels { flex-direction: column; height: auto; }
  .panel { flex: none; height: 110px; transition: height .8s var(--ease); }
  .panel.is-open { flex: none; height: 380px; }
  .panel:not(.is-open) .panel-time { display: none; }
  .panel-in { padding: 20px; }
  .loc-frame { min-height: 0; flex-direction: column; align-items: stretch; padding: 14px; }
  .loc-frame > img { position: relative; height: 260px; border-radius: 22px; order: -1; margin-bottom: 14px; }
  .loc-frame { background: var(--surface); border: 1px solid var(--line); }
  .loc-card { padding: 26px; max-width: none; background: transparent; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .loc-chips { position: absolute; right: 24px; top: 24px; bottom: auto; }
  .loc-chips span { padding: 8px 14px; font-size: 13px; }
  .loc-chips span:nth-child(n+2) { display: none; }
  .book-card { min-height: 0; padding: 12px; }
  .lightbox { grid-template-columns: 1fr; }
  .lb-prev, .lb-next { position: absolute; bottom: 24px; }
  .lb-prev { left: calc(50% - 64px); }
  .lb-next { right: calc(50% - 64px); }
  .lb-fig img { max-height: calc(100vh - 200px); }
  .lb-fig { padding: 0 12px 90px; }
}
@media (max-width: 560px) {
  .container { width: calc(100% - 36px); }
  .features { grid-template-columns: 1fr; }
  .amen-tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile { padding: 18px 16px; }
  .tile h4 { font-size: 15px; margin-top: 16px; }
  .tile p { font-size: 13px; }
  .row { grid-template-columns: 1fr; gap: 0; }
  .masonry { --cols: 2; --gap: 10px; grid-auto-rows: calc((100vw - 36px - 10px) / 2 * 1.28); }
  .g-item { border-radius: 14px; }
  .filters { width: 100%; justify-content: space-between; }
  .filter { padding: 9px 12px; font-size: 13px; }
  .foot-cols { flex-direction: column; gap: 30px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats li:nth-child(3) { border-left: 0; }
  .stats li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stats li { padding: 22px 16px; }
  .tag { position: static; display: inline-block; margin-bottom: 14px; }
  .tile .t-ico { display: none; }
  .tile h4 { margin-top: 0; }
  .hf-strip { padding: 22px; }
  .amen-img { display: none; }
  .hf-logo { align-items: flex-start; }
  .brand-pill img { height: 28px; }
  .about-media { padding-left: 24px; padding-bottom: 50px; }
  .hero-top .pill:first-child span { display: inline; }
}
@media (max-height: 760px) and (min-width: 861px) {
  .hero-copy { top: 104px; }
  .hero-copy h1 { font-size: clamp(46px, 5.2vw, 72px); }
  .discover-img { height: 150px; }
  .villa-desc { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
