/* The Clarinet - landing page. Palette: forest #1C2421, gold #C5A059. Tailwind (CDN) handles layout; this file holds the reusable brand classes. */
:root {
    --forest: #1C2421;
    --forest-800: #232E29;
    --forest-700: #2A3832;
    --gold: #C5A059;
    --gold-light: #D9BC7F;
    --cream: #EDE8DC;
    --muted: #9AA59F;
    --line: rgba(197, 160, 89, .22);
}

html { scroll-padding-top: 88px; max-width: 100%; overflow-x: hidden; }
html.lb-open, html.lb-open body { overflow: hidden; }
body { background: var(--forest); max-width: 100%; overflow-x: hidden; }
::selection { background: var(--gold); color: var(--forest); }

/* ---- header ---- */
.glass-header {
    background: rgba(28, 36, 33, .72);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid var(--line);
    transition: background .3s, box-shadow .3s;
}
.glass-header.is-scrolled { background: rgba(28, 36, 33, .92); box-shadow: 0 8px 30px rgba(0, 0, 0, .35); }
.nav-link { position: relative; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--cream); transition: color .2s; }
.nav-link::after { content: ""; position: absolute; left: 0; bottom: -6px; height: 1px; width: 0; background: var(--gold); transition: width .25s; }
.nav-link:hover, .nav-link.is-active { color: var(--gold); }
.nav-link:hover::after, .nav-link.is-active::after { width: 100%; }
.drawer { transform: translateX(100%); transition: transform .3s ease; }
.drawer.is-open { transform: translateX(0); }

/* ---- type & buttons ---- */
.font-display { letter-spacing: .06em; }
.gold-text { color: var(--gold); }
.gold-gradient-text { background: linear-gradient(90deg, var(--gold-light), var(--gold) 55%, #A58343); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { font-size: .72rem; letter-spacing: .32em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.section-title { font-family: 'Cinzel', serif; letter-spacing: .06em; font-weight: 500; }
.gold-rule { width: 64px; height: 2px; background: linear-gradient(90deg, var(--gold), transparent); }

.btn-gold, .btn-outline, .btn-whatsapp {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
    padding: .85rem 1.6rem; border-radius: 2px; font-weight: 600; font-size: .78rem;
    letter-spacing: .16em; text-transform: uppercase; cursor: pointer; transition: all .25s; border: 1px solid transparent;
}
.btn-gold { background: var(--gold); color: var(--forest); }
.btn-gold:hover { background: var(--gold-light); transform: translateY(-1px); box-shadow: 0 8px 22px rgba(197, 160, 89, .28); }
.btn-outline { border-color: var(--gold); color: var(--gold); background: transparent; }
.btn-outline:hover { background: var(--gold); color: var(--forest); }
.btn-whatsapp { background: #25D366; color: #0b2e1a; }
.btn-whatsapp:hover { background: #3ee07c; transform: translateY(-1px); }
.btn-sm { padding: .5rem 1rem; font-size: .68rem; }
button:disabled { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---- surfaces ---- */
.panel { background: linear-gradient(180deg, var(--forest-800), #1f2824); border: 1px solid var(--line); border-radius: 4px; }
.metric { background: rgba(28, 36, 33, .6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 4px; padding: 1rem 1.15rem; }
.metric-value { font-family: 'Cinzel', serif; font-size: 1.45rem; color: var(--gold); line-height: 1.1; }
.metric-label { font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-top: .35rem; }
.duty-card { background: linear-gradient(135deg, rgba(197, 160, 89, .22), rgba(197, 160, 89, .06)); border: 1px solid var(--gold); border-radius: 4px; }

/* ---- inventory ---- */
.pill { padding: .45rem 1rem; border-radius: 999px; border: 1px solid var(--line); color: var(--cream); font-size: .78rem; font-weight: 500; cursor: pointer; transition: all .2s; background: transparent; }
.pill:hover { border-color: var(--gold); color: var(--gold); }
.pill.is-active { background: var(--gold); border-color: var(--gold); color: var(--forest); }
.pill .count { opacity: .7; margin-left: .35rem; font-size: .7rem; }

.field { width: 100%; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 2px; color: var(--cream); padding: .72rem .9rem; font-size: .9rem; transition: border-color .2s, background .2s; }
.field::placeholder { color: #6f7b75; }
.field:focus { outline: none; border-color: var(--gold); background: rgba(255, 255, 255, .07); }
.field.is-invalid { border-color: #e0786b; }
select.field { appearance: none; 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 d='M1 1l5 5 5-5' fill='none' stroke='%23C5A059' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; padding-right: 2.2rem; }
select.field option { background: var(--forest-800); color: var(--cream); }
.field-label { display: block; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: .4rem; }
.field-error { color: #f0a094; font-size: .75rem; margin-top: .3rem; min-height: 1rem; }

.view-btn { width: 2.6rem; height: 2.6rem; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); border: 1px solid var(--line); background: transparent; cursor: pointer; transition: all .2s; }
.view-btn:first-child { border-radius: 2px 0 0 2px; }
.view-btn:last-child { border-radius: 0 2px 2px 0; border-left: 0; }
.view-btn.is-active { background: var(--gold); color: var(--forest); border-color: var(--gold); }

.inv-table { width: 100%; border-collapse: collapse; }
.inv-table th { text-align: left; font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 600; padding: .9rem 1rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.inv-table td { padding: .95rem 1rem; border-bottom: 1px solid rgba(255, 255, 255, .06); font-size: .9rem; vertical-align: middle; }
.inv-table tbody tr { transition: background .15s; }
.inv-table tbody tr:hover { background: rgba(197, 160, 89, .07); }

.unit-card { background: linear-gradient(180deg, var(--forest-800), #1f2824); border: 1px solid var(--line); border-radius: 4px; padding: 1.4rem; display: flex; flex-direction: column; transition: transform .25s, border-color .25s, box-shadow .25s; }
.unit-card:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 14px 34px rgba(0, 0, 0, .35); }
.badge { display: inline-block; padding: .2rem .65rem; border-radius: 999px; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; background: rgba(197, 160, 89, .16); color: var(--gold); border: 1px solid var(--line); }
.badge-live { background: rgba(62, 224, 124, .12); color: #6fe5a0; border-color: rgba(62, 224, 124, .3); }
.live-dot { width: .5rem; height: .5rem; border-radius: 50%; background: #3ee07c; display: inline-block; box-shadow: 0 0 0 0 rgba(62, 224, 124, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(62, 224, 124, 0); } 100% { box-shadow: 0 0 0 0 rgba(62, 224, 124, 0); } }

.skeleton { background: linear-gradient(90deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .10), rgba(255, 255, 255, .04)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 4px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---- calculator ---- */
input[type=range].range { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; background: rgba(255, 255, 255, .15); border-radius: 4px; outline: none; }
input[type=range].range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--gold); cursor: pointer; border: 2px solid var(--forest); }
input[type=range].range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--gold); cursor: pointer; border: 2px solid var(--forest); }
.calc-result { background: linear-gradient(135deg, rgba(197, 160, 89, .18), rgba(197, 160, 89, .04)); border: 1px solid var(--gold); border-radius: 4px; }

/* ---- feature + location cards ---- */
.feature-card { padding: 1.8rem; border: 1px solid var(--line); border-radius: 4px; background: rgba(255, 255, 255, .02); transition: all .3s; }
.feature-card:hover { border-color: var(--gold); background: rgba(197, 160, 89, .06); transform: translateY(-3px); }
.feature-icon { width: 3rem; height: 3rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold); font-size: 1.1rem; margin-bottom: 1.1rem; }
.landmark { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: 4px; background: rgba(255, 255, 255, .02); }
.landmark-dist { margin-left: auto; font-family: 'Cinzel', serif; color: var(--gold); white-space: nowrap; }

/* ---- hero ---- */
.hero-bg { background-image: linear-gradient(180deg, rgba(28, 36, 33, .55) 0%, rgba(28, 36, 33, .78) 55%, #1C2421 100%), url('../Images/Entrance.jpg'); background-size: cover; background-position: center; }

/* ---- toast ---- */
.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 140%); z-index: 100; max-width: min(92vw, 520px); padding: 1rem 1.3rem; border-radius: 4px; background: #101614; border: 1px solid var(--gold); color: var(--cream); box-shadow: 0 16px 40px rgba(0, 0, 0, .5); transition: transform .35s ease; font-size: .88rem; }
.toast.is-visible { transform: translate(-50%, 0); }

/* ---- enquiry confirmation card + recent enquiries ---- */
.confirm-card { border-color: var(--gold); text-align: center; }
.confirm-ref { display: inline-block; margin: 1rem 0 .4rem; padding: .7rem 1.6rem; border: 1px dashed var(--gold); border-radius: 4px; font-family: 'Cinzel', serif; font-size: 2rem; letter-spacing: .12em; color: var(--gold); user-select: all; }
.confirm-grid { display: grid; gap: 1rem; text-align: left; margin-top: 1.6rem; }
@media (min-width: 768px) { .confirm-grid { grid-template-columns: 1fr 1fr; } }
.confirm-box { background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 4px; padding: 1rem 1.2rem; font-size: .9rem; }
.confirm-box .k { font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: .4rem; }
.confirm-box a { color: var(--gold-light); text-decoration: underline; word-break: break-all; }
.confirm-note { margin-top: 1.4rem; font-size: .85rem; color: rgba(255, 255, 255, .65); }
.recent-bar { border: 1px solid var(--line); border-radius: 4px; background: rgba(255, 255, 255, .03); padding: .8rem 1rem; font-size: .85rem; }
.recent-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.recent-head .eyebrow { font-size: .66rem; }
.recent-x { background: none; border: 0; color: rgba(255, 255, 255, .55); cursor: pointer; font-size: 1rem; padding: .2rem .4rem; }
.recent-x:hover { color: var(--gold); }
.recent-list { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .4rem; }
.recent-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem; padding: .4rem 0; border-top: 1px solid rgba(255, 255, 255, .07); }
.recent-ref { font-family: 'Cinzel', serif; color: var(--gold); letter-spacing: .08em; user-select: all; }
.recent-meta { color: rgba(255, 255, 255, .65); }

.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---- gallery ---- */
.carousel { position: relative; }
.carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; gap: 1rem; -webkit-overflow-scrolling: touch; scrollbar-width: none; border-radius: 4px; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide { flex: 0 0 100%; scroll-snap-align: center; padding: 0; border: 1px solid rgba(197, 160, 89, .2); border-radius: 4px; background: #101614; overflow: hidden; cursor: zoom-in; aspect-ratio: 16 / 9; }
@media (min-width: 1024px) { .carousel-slide { flex-basis: 78%; } }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; }
.carousel-slide:hover { border-color: var(--gold); }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 2.9rem; height: 2.9rem; border-radius: 50%; border: 1px solid var(--gold); background: rgba(16, 22, 20, .82); color: var(--gold); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s, color .2s; }
.carousel-btn:hover { background: var(--gold); color: var(--forest); }
.carousel-btn:disabled { opacity: .35; cursor: default; background: rgba(16, 22, 20, .82); color: var(--gold); }
.carousel-prev { left: .75rem; }
.carousel-next { right: .75rem; }
.carousel-count { position: absolute; right: .9rem; bottom: .9rem; z-index: 2; padding: .25rem .75rem; border-radius: 999px; background: rgba(16, 22, 20, .85); border: 1px solid rgba(197, 160, 89, .5); color: var(--gold); font-size: .75rem; letter-spacing: .12em; pointer-events: none; }
.carousel-dots { display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.carousel-dot { width: .7rem; height: .7rem; padding: 0; border-radius: 50%; border: 1px solid var(--gold); background: transparent; cursor: pointer; }
.carousel-dot.is-active { background: var(--gold); }

/* ---- site development plan ---- */
.sdp-preview { position: relative; display: block; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: #101614; cursor: zoom-in; }
.sdp-preview img { width: 100%; height: auto; display: block; }
.sdp-hint { position: absolute; right: .8rem; bottom: .8rem; padding: .4rem .8rem; border-radius: 999px; background: rgba(16, 22, 20, .85); border: 1px solid var(--gold); color: var(--gold); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; }

/* ---- floor plan link on unit cards ---- */
.plan-link { background: none; border: 0; padding: .35rem 0; margin-top: .9rem; color: var(--gold); font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; text-align: left; }
.plan-link:hover { color: var(--gold-light); text-decoration: underline; }

/* ---- lightbox ---- */
.lightbox { position: fixed; top: 0; left: 0; right: 0; bottom: 0; width: 100%; max-width: 100vw; height: 100%; box-sizing: border-box; overflow: hidden; z-index: 90; display: flex; flex-direction: column; background: rgba(10, 14, 12, .96); }
.lightbox.hidden { display: none; }
.lightbox-bar { flex: 0 0 auto; position: sticky; top: 0; z-index: 2; box-sizing: border-box; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .5rem .75rem; border-bottom: 1px solid var(--line); background: rgba(10, 14, 12, .98); }
.lightbox-bar > :first-child { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lightbox-actions { flex: 0 0 auto; display: flex; align-items: center; gap: .5rem; }
.lightbox-close { flex: 0 0 auto; width: 44px; height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 520px) { .lightbox-bar .lb-label { display: none; } .lightbox-actions .btn-sm { padding-left: .75rem; padding-right: .75rem; min-height: 44px; min-width: 44px; justify-content: center; } }
.lightbox-stage { flex: 1 1 auto; min-height: 0; width: 100%; max-width: 100vw; box-sizing: border-box; overflow: auto; display: flex; padding: .75rem; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.lightbox-stage img { margin: auto; max-width: 100%; max-height: 75vh; object-fit: contain; cursor: zoom-in; }
.lightbox-stage.is-zoomed img { max-width: none; max-height: none; width: 220%; cursor: zoom-out; margin: 0; }
.lightbox-stage.is-missing { display: none; }
.lightbox-missing { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 2rem; text-align: center; color: rgba(255, 255, 255, .7); }
.lightbox-missing.hidden { display: none; }
.lightbox-missing i { font-size: 3rem; }
