/* ==========================================================================
   Imperial Residencia — shared components (light theme)
   Palette follows the Imperial Residencia microsite: rose-taupe (#cba69c) and
   the rose-gold of the tree logo (#e7b199) over espresso (#2b1608), on cream (#fdf5eb).
   ========================================================================== */
:root {
  --brand-950: #120d0a;
  --brand-900: #1e1916;
  --brand: #2b1608;
  --brand-700: #43291b;
  --brand-500: #654b43;
  --brand-100: #f3e7d7;
  --gold: #d4a892;
  --gold-600: #a37f75;
  --gold-700: #85625a;
  --gold-100: #f8ebe2;
  --gold-grad: linear-gradient(135deg, #efcdbb 0%, #cf9f8a 50%, #9f7466 100%);

  --bg: #f6ece0;
  --bg-soft: #fdf5eb;
  --white: #ffffff;
  --heading: #2b1608;
  --text: #4a403a;
  --muted: #8a7d74;
  --line: rgba(43, 22, 8, .1);

  --field-bg: #fff;
  --field-border: rgba(43, 22, 8, .16);
  --field-text: #2b1608;
  --field-placeholder: #a0948b;

  --radius: 22px;
  --shadow-sm: 0 12px 30px -20px rgba(43, 22, 8, .35);
  --shadow-lg: 0 40px 80px -40px rgba(43, 22, 8, .5);
  --font-head: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
/* lining numerals: Cormorant's default old-style figures make prices and phone numbers look uneven */
body { font-family: var(--font-body); font-size: .95rem; font-variant-numeric: lining-nums; background: var(--bg); color: var(--text); overflow-x: clip; -webkit-font-smoothing: antialiased; }
body.is-loading { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--gold); color: var(--brand); }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); color: var(--heading); font-weight: 500; letter-spacing: -.005em; }
h1 em, h2 em, h3 em, h4 em, h5 em, .serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: 0; }

.img-wrap { position: relative; overflow: hidden; background: linear-gradient(135deg, #eadbcd, #cdb5a6); }
.img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.text-gold { color: var(--gold-600) !important; }
.gold-text { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gsap-busy { transition: none !important; }
.split-line { display: block; overflow: hidden; padding-bottom: .08em; }
.split-line > span { display: inline-block; }

/* ---------- Logo (tree mark + wordmark) ---------- */
.brand-logo { display: inline-flex; align-items: center; gap: .7rem; color: var(--brand); }
.brand-logo img { height: 44px; width: auto; flex-shrink: 0; }
.brand-logo__text { display: grid; line-height: 1; }
.brand-logo__text b { font-family: var(--font-head); font-weight: 600; font-size: 1.45rem; letter-spacing: .2em; text-transform: uppercase; padding-left: .02em; }
.brand-logo__text small { font-size: .56rem; font-weight: 600; letter-spacing: .62em; text-transform: uppercase; color: var(--gold-600); margin-top: .35rem; }
.brand-logo--light { color: #fff; }
.brand-logo--light .brand-logo__text small { color: var(--gold); }

/* ornament: hairline · tree · hairline */
.ornament { display: flex; align-items: center; justify-content: center; gap: .9rem; color: var(--gold-600); }
.ornament::before, .ornament::after { content: ''; height: 1px; width: 56px; background: linear-gradient(90deg, transparent, currentColor); }
.ornament::after { transform: scaleX(-1); }
.ornament img { height: 22px; width: auto; }

/* ---------- Scroll progress ---------- */
.scroll-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 2000; background: var(--gold-grad); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Preloader ---------- */
.preloader { position: fixed; inset: 0; z-index: 3000; background: var(--brand-900); display: grid; place-items: center; }
.preloader__inner { text-align: center; color: #fff; }
.preloader__inner img { height: 78px; width: auto; margin: 0 auto 1.3rem; }
.preloader__name { font-family: var(--font-head); font-size: 1.9rem; font-weight: 500; letter-spacing: .32em; text-transform: uppercase; padding-left: .32em; line-height: 1; }
.preloader__sub { letter-spacing: .5em; font-size: .64rem; color: var(--gold); margin-top: .7rem; padding-left: .5em; font-weight: 600; }
.preloader__bar { width: 200px; height: 1px; margin: 1.5rem auto 0; background: rgba(255,255,255,.14); overflow: hidden; }
.preloader__bar span { display: block; height: 100%; width: 100%; background: var(--gold-grad); transform-origin: 0 50%; animation: preload 1.6s var(--ease) forwards; }
@keyframes preload { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Buttons ---------- */
.btn-gold, .btn-brand, .btn-line, .btn-glass {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .9rem 1.6rem; border-radius: 100px; border: 0; cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: .86rem; letter-spacing: .05em; white-space: nowrap;
  overflow: hidden; isolation: isolate;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), background .3s, color .3s, border-color .3s;
}
/* no looping background animation here: animating background-position repaints every button on every frame and made scrolling stutter */
.btn-gold { background: var(--gold-grad); color: var(--brand); box-shadow: 0 14px 28px -12px rgba(159, 116, 102, .7); }
.btn-gold::after, .btn-brand::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.5) 50%, transparent 70%); transform: translateX(-120%); transition: transform .8s var(--ease); }
.btn-gold:hover::after, .btn-brand:hover::after { transform: translateX(120%); }
.btn-gold:hover { color: var(--brand); transform: translateY(-2px); box-shadow: 0 20px 36px -14px rgba(159, 116, 102, .85); }
.btn-brand { background: var(--brand); color: #fff; box-shadow: 0 14px 28px -14px rgba(43, 22, 8, .7); }
.btn-brand::after { background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.18) 50%, transparent 70%); }
.btn-brand:hover { background: var(--brand-700); color: #fff; transform: translateY(-2px); }
.btn-line { background: transparent; color: var(--brand); border: 1px solid rgba(43, 22, 8, .45); }
.btn-line:hover { background: var(--brand); border-color: var(--brand); color: #fff; transform: translateY(-2px); }
.btn-glass { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.32); backdrop-filter: blur(8px); }
.btn-glass:hover { background: #fff; color: var(--brand); transform: translateY(-2px); }
.btn-sm { padding: .62rem 1.1rem; font-size: .78rem; }
.btn-xs { padding: .45rem .95rem; font-size: .72rem; }
[class^="btn-"] i { transition: transform .4s var(--ease); }
[class^="btn-"]:hover i.bi-arrow-right { transform: translateX(4px); }

/* "ringing" call icon (animates the glyph, so circular icon backgrounds stay still). It loops only on the main
   call buttons; every looping animation on screen makes the browser rebuild layers each frame, which made
   scrolling stutter when ~25 icons looped at once. Other call icons ring on hover. */
.bi-telephone::before, .bi-telephone-fill::before, .bi-telephone-inbound::before { transform-origin: 50% 50%; }
.sidebar__call i::before, .mobile-bar .bi-telephone-fill::before, .enq-strip i::before, .ty-header .bi-telephone-fill::before,
a:hover > .bi-telephone::before, a:hover > .bi-telephone-fill::before, a:hover > .bi-telephone-inbound::before,
button:hover > .bi-telephone-inbound::before { animation: phoneRing 2.2s ease-in-out infinite; }
@keyframes phoneRing {
  0%, 40%, 100% { transform: rotate(0); }
  4% { transform: rotate(-18deg); }
  8% { transform: rotate(16deg); }
  12% { transform: rotate(-14deg); }
  16% { transform: rotate(12deg); }
  20% { transform: rotate(-8deg); }
  24% { transform: rotate(5deg); }
  28% { transform: rotate(0); }
}
/* looping "downloading" icon: arrow drops into a tray */
.dl-icon { position: relative; display: inline-block; width: 1.05em; height: 1.05em; overflow: hidden; vertical-align: -.16em; flex-shrink: 0; }
.dl-icon::after { content: ''; position: absolute; left: .1em; right: .1em; bottom: .08em; height: .34em; border: .11em solid currentColor; border-top: 0; border-radius: 0 0 .14em .14em; }
/* loops only on the hero and header brochure buttons; elsewhere the arrow drops on hover (see the phone icon note) */
.dl-icon > i.bi { position: absolute; left: 50%; top: -.06em; font-size: .82em; line-height: 1; -webkit-text-stroke: .045em currentColor; transform: translate(-50%, 0); }
.hero-panel__ctas .dl-icon > i.bi, .site-nav .dl-icon > i.bi, a:hover > .dl-icon > i.bi, button:hover > .dl-icon > i.bi { animation: dlArrow 1.8s cubic-bezier(.5, 0, .3, 1) infinite; }
@keyframes dlArrow {
  0% { transform: translate(-50%, -110%); opacity: 0; }
  12% { opacity: 1; }
  38%, 74% { transform: translate(-50%, 0); opacity: 1; }
  86% { transform: translate(-50%, 30%); opacity: 0; }
  100% { transform: translate(-50%, -110%); opacity: 0; }
}
/* pulse: a ring that grows and fades. It animates only transform + opacity, so it runs on the GPU
   instead of repainting a box-shadow every frame. */
.pulse { overflow: visible; }
.pulse::before { content: ''; position: absolute; inset: 0; z-index: -2; border-radius: inherit; border: 2px solid rgba(212, 168, 146, .75); pointer-events: none; animation: pulseRing 2.2s var(--ease) infinite; }
@keyframes pulseRing { 0% { transform: scale(1); opacity: 1; } 70%, 100% { transform: scale(1.22, 1.45); opacity: 0; } }
/* the hover shine would show outside a pulsing button (it can't clip), so it only appears on hover */
.pulse::after { opacity: 0; }
.pulse:hover::after { opacity: 1; }

/* ---------- Lead forms ---------- */
.lead-form { display: grid; gap: .75rem; }
.lf-field { position: relative; }
.lf-field > i, .lf-prefix { position: absolute; left: .95rem; top: 1.4rem; transform: translateY(-50%); color: var(--gold-600); font-size: .98rem; pointer-events: none; }
.lf-prefix { font-size: .84rem; font-weight: 600; padding-right: .55rem; border-right: 1px solid var(--field-border); line-height: 1.1; color: var(--brand); }
.lead-form input[type=text], .lead-form input[type=tel], .lead-form input[type=email], .lead-form select {
  width: 100%; height: 2.8rem; padding: 0 .95rem 0 2.65rem;
  background: var(--field-bg); border: 1px solid var(--field-border); border-radius: 12px;
  color: var(--field-text); font: 500 .9rem var(--font-body);
  transition: border-color .3s, box-shadow .3s; appearance: none; -webkit-appearance: none;
}
.lead-form select { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%232b1608' stroke-width='1.6' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .95rem center; }
.lead-form select:invalid { color: var(--field-placeholder); }
.lead-form input[type=tel] { padding-left: 3.9rem; }
.lead-form input::placeholder { color: var(--field-placeholder); }
.lead-form input:focus, .lead-form select:focus { outline: none; border-color: var(--gold-600); box-shadow: 0 0 0 4px rgba(212, 168, 146, .25); }
.lf-error { display: none; font-size: .74rem; color: #b42318; margin: .3rem 0 0 .3rem; }
.lf-field.is-invalid input, .lf-field.is-invalid select { border-color: #d9534f; }
.lf-field.is-invalid .lf-error { display: block; }
.lf-consent { display: flex; gap: .5rem; align-items: flex-start; font-size: .66rem; line-height: 1.5; color: var(--muted); cursor: pointer; }
.lf-consent input { accent-color: var(--brand); margin-top: .12rem; flex-shrink: 0; }
.lf-consent.is-invalid { color: #b42318; }
.lead-form button[type=submit].is-loading { pointer-events: none; opacity: .85; }
.lead-form button[type=submit].is-loading span::after { content: '…'; }
.lf-success { text-align: center; padding: 1.2rem .4rem; }
.lf-success__icon { width: 60px; height: 60px; margin: 0 auto .9rem; border-radius: 50%; display: grid; place-items: center; font-size: 1.7rem; background: var(--brand); color: #fff; }
.lf-success h4 { font-size: 1.4rem; font-weight: 600; margin-bottom: .35rem; }
.lf-success p { color: var(--muted); font-size: .88rem; margin-bottom: 1rem; }

/* ---------- Enquiry popup ---------- */
.modal-backdrop.show { opacity: .7; }
.modal-backdrop { background: var(--brand-950); }
.enq-modal .modal-dialog { max-width: 660px; }
.enq-modal .modal-content { background: #fff; border: 0; border-radius: 24px; overflow: hidden; box-shadow: 0 50px 100px -30px rgba(18, 13, 10, .7); }
.enq-modal .modal-dialog { transform: translateY(30px) scale(.97); transition: transform .5s var(--ease) !important; }
.enq-modal.show .modal-dialog { transform: none; }
.enq-head { position: relative; background: var(--brand); color: #fff; text-align: center; padding: 1.05rem 3.4rem; font-family: var(--font-head); font-size: 1.6rem; font-weight: 500; letter-spacing: .01em; line-height: 1.2; }
.enq-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--gold-grad); }
.enq-promise { background: var(--brand-900); color: #fff; height: 100%; padding: 1.8rem 1rem; display: flex; flex-direction: column; align-items: center; gap: 1.4rem; text-align: center; }
.enq-promise > img { height: 44px; width: auto; }
.enq-promise h6 { color: #fff; font-size: 1.3rem; margin: 0; }
.enq-promise h6 em { color: var(--gold); }
.enq-promise__item { display: grid; justify-items: center; gap: .45rem; font-size: .76rem; font-weight: 600; letter-spacing: .02em; line-height: 1.25; }
.enq-promise__item i { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.3rem; background: rgba(255,255,255,.06); border: 1px solid rgba(212, 168, 146, .4); color: var(--gold); }
.enq-body { padding: 1.9rem 1.8rem 1.6rem; }
.enq-body__title { text-align: center; font-size: 1.6rem; font-weight: 500; line-height: 1.15; margin-bottom: .3rem; }
.enq-body__title span { font-style: italic; color: var(--gold-700); }
.enq-body__sub { text-align: center; color: var(--muted); font-size: .82rem; margin-bottom: 1.2rem; }
.enq-strip { display: flex; align-items: center; justify-content: center; gap: .5rem; background: var(--brand-900); color: #fff; font-weight: 600; padding: .8rem; font-size: .92rem; letter-spacing: .04em; }
.enq-strip:hover { color: var(--gold); }
.enq-modal .btn-close-x { position: absolute; top: 12px; right: 12px; z-index: 5; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.12); border: 0; color: #fff; display: grid; place-items: center; transition: transform .4s var(--ease), background .3s; }
.enq-modal .btn-close-x:hover { transform: rotate(90deg); background: var(--gold); color: var(--brand); }

/* ---------- Floating & mobile ---------- */
.float-actions { position: fixed; right: calc(var(--sidebar-w, 0px) + 20px); bottom: 24px; z-index: 1040; display: flex; flex-direction: column; gap: 12px; }
.float-btn { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.35rem; box-shadow: 0 14px 30px -10px rgba(18, 13, 10, .5); transition: transform .4s var(--ease), opacity .4s, visibility .4s; }
.float-btn:hover { transform: translateY(-4px) scale(1.05); }
.float-btn--wa { background: #25d366; color: #fff; }
.float-btn--top { background: var(--brand); color: var(--gold); width: 44px; height: 44px; font-size: 1.05rem; margin: 0 auto; opacity: 0; visibility: hidden; }
.float-btn--top.is-visible { opacity: 1; visibility: visible; }

.mobile-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1045; display: none; grid-template-columns: 1fr 1fr 1fr 1.3fr; gap: .35rem; background: rgba(253, 245, 235, .97); backdrop-filter: blur(12px); border-top: 1px solid var(--line); box-shadow: 0 -12px 30px -20px rgba(18, 13, 10, .5); padding: .45rem .45rem calc(.45rem + env(safe-area-inset-bottom)); }
.mobile-bar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; font-size: .68rem; font-weight: 600; color: var(--brand); padding: .4rem .2rem; border-radius: 12px; }
.mobile-bar a i { font-size: 1.1rem; color: var(--gold-600); }
.mobile-bar a.mb-cta { background: var(--brand); color: #fff; flex-direction: row; gap: .35rem; font-size: .82rem; }
.mobile-bar a.mb-cta i { color: var(--gold); }

/* cursor (desktop only) */
.cursor-dot { position: fixed; left: 0; top: 0; z-index: 4000; width: 32px; height: 32px; margin: -16px 0 0 -16px; border-radius: 50%; border: 1px solid var(--gold-600); pointer-events: none; opacity: 0; transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease), background .3s, opacity .3s; }
.cursor-glow { display: none; }
body.has-cursor .cursor-dot { opacity: 1; }
.cursor-dot.is-hover { width: 60px; height: 60px; margin: -30px 0 0 -30px; background: rgba(212, 168, 146, .16); }
@media (hover: none), (pointer: coarse) { .cursor-dot { display: none; } }

@media (max-width: 1199.98px) {
  .mobile-bar { display: grid; }
  body { padding-bottom: 66px; }
  .float-actions { bottom: 84px; left: auto; right: 14px; }
  .float-btn { width: 48px; height: 48px; font-size: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .dl-icon > i.bi { animation: none !important; transform: translate(-50%, 0); opacity: 1; }
  .bi-telephone::before, .bi-telephone-fill::before, .bi-telephone-inbound::before { animation: none !important; }
}

/* very small phones: the "We Promise" column would squeeze the form, so the form takes the full width */
@media (max-width: 399.98px) {
  .enq-modal .row > .col-4 { display: none; }
  .enq-modal .row > .col-8 { flex: 0 0 100%; max-width: 100%; }
  .enq-body { padding: 1.5rem 1.2rem 1.3rem; }
  .enq-head { font-size: 1.35rem; }
}
