:root {
    --ink: #111317;
    --muted: #666b73;
    --line: #e3e5e8;
    --paper: #ffffff;
    --soft: #f5f6f6;
    --accent: #15d8cb;
    --accent-dark: #079f98;
    --danger: #b42318;
    --success: #067647;
    --shadow: 0 18px 50px rgba(17, 19, 23, .12);
    --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.55; }
a { color: inherit; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; }

.site-header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px clamp(18px, 5vw, 72px); background: #050505; color: #fff; position: relative; z-index: 20; }
.logo img, .footer-logo { display: block; width: 185px; height: auto; }
.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav a { color: #fff; text-decoration: none; font-weight: 600; }
.main-nav a:hover { color: var(--accent); }
.nav-cta { background: var(--accent); color: #041313 !important; padding: 10px 18px; border-radius: 999px; }
.menu-toggle { display: none; color: #fff; border: 1px solid rgba(255,255,255,.35); background: transparent; padding: 8px 12px; border-radius: 8px; }

.hero { min-height: 670px; background: linear-gradient(90deg, rgba(5,5,5,.76), rgba(5,5,5,.2)), url('/assets/images/hero.jpg') center/cover; color: #fff; padding: clamp(70px, 10vw, 130px) clamp(18px, 8vw, 120px) 52px; display: flex; flex-direction: column; justify-content: space-between; gap: 70px; }
.hero-copy { max-width: 680px; }
.kicker { margin: 0 0 12px; color: var(--accent); letter-spacing: .18em; text-transform: uppercase; font-weight: 700; font-size: .82rem; }
h1, h2, h3 { line-height: 1.12; margin-top: 0; }
h1 { margin-bottom: 20px; font-size: clamp(2.6rem, 7vw, 5.8rem); letter-spacing: -.045em; }
h2 { font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -.035em; }
.hero-copy > p:last-child { max-width: 58ch; font-size: 1.08rem; color: rgba(255,255,255,.9); }

.booking-search { width: min(1120px, 100%); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; gap: 12px; padding: 18px; background: #fff; color: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); }
.field { display: grid; gap: 6px; }
.field span { color: var(--muted); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; color: var(--ink); }
.field textarea { min-height: 110px; resize: vertical; }
.btn { min-height: 48px; border: 0; border-radius: 10px; padding: 11px 20px; background: var(--ink); color: #fff; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.btn:hover { background: #2a2d32; }
.btn-accent { background: var(--accent); color: #041313; }
.btn-accent:hover { background: #4ce3da; }
.btn-outline { color: var(--ink); background: transparent; border: 1px solid var(--line); }
.btn-danger { background: var(--danger); }
.btn-small { min-height: 38px; padding: 7px 12px; font-size: .9rem; }

.amenities { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.amenity { padding: 25px 20px; display: flex; align-items: center; justify-content: center; gap: 10px; text-align: center; border-right: 1px solid var(--line); font-weight: 650; }
.amenity:last-child { border-right: 0; }
.amenity-mark { width: 9px; height: 9px; background: var(--accent); transform: rotate(45deg); }

.section { padding: clamp(62px, 9vw, 110px) clamp(18px, 7vw, 100px); }
.section-soft { background: var(--soft); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 36px; }
.section-heading h2, .section-heading p { margin-bottom: 0; }
.section-heading p { max-width: 50ch; color: var(--muted); }

.apartment-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px 20px; }
.apartment-card { min-width: 0; }
.apartment-card[hidden] { display: none; }
.apartment-image { display: block; position: relative; aspect-ratio: 3/2; overflow: hidden; border-radius: 14px; background: var(--soft); }
.apartment-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.apartment-card:hover .apartment-image img { transform: scale(1.035); }
.apartment-info { display: flex; justify-content: space-between; align-items: start; gap: 16px; padding-top: 14px; }
.apartment-info h3 { margin-bottom: 5px; font-size: 1.28rem; }
.apartment-info p { margin: 0; color: var(--muted); }
.price { white-space: nowrap; font-weight: 800; }
.card-actions { display: flex; gap: 9px; margin-top: 14px; }

.availability-message { width: 100%; margin-top: 15px; color: var(--muted); }
.availability-message.success { color: var(--success); }
.availability-message.error, .error-box { color: var(--danger); }
.empty-state { padding: 34px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }

.location-grid, .detail-grid, .booking-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(30px, 6vw, 80px); align-items: start; }
.location-card, .summary-card, .payment-card { padding: 26px; background: var(--soft); border-radius: var(--radius); }
.map-frame { width: 100%; min-height: 420px; border: 0; border-radius: var(--radius); }

.page-hero { padding: 68px clamp(18px, 7vw, 100px); background: var(--soft); }
.page-hero p { max-width: 65ch; color: var(--muted); }
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; }
.gallery button { border: 0; padding: 0; background: transparent; cursor: pointer; border-radius: 12px; overflow: hidden; min-height: 180px; }
.gallery button:first-child { grid-row: span 2; min-height: 370px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rate-table { width: 100%; border-collapse: collapse; }
.rate-table th, .rate-table td { padding: 12px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.rate-table td:last-child, .rate-table th:last-child { text-align: right; }
.feature-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.feature-list li { background: var(--soft); border-radius: 999px; padding: 7px 12px; }
.legal-copy { max-width: 820px; margin: 0 auto; }
.legal-copy h2 { margin-top: 34px; }
.legal-copy p { color: var(--muted); line-height: 1.75; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.summary-row { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.summary-row.total { font-size: 1.18rem; font-weight: 800; }
.notice { padding: 14px 16px; border-radius: 10px; background: #eefaf8; color: #075e59; margin-bottom: 18px; }
.error-box { padding: 14px 16px; border-radius: 10px; background: #fff1f0; margin-bottom: 18px; }

.site-footer { padding: 52px clamp(18px, 7vw, 100px); display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 36px; background: #050505; color: #d7d7d7; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer p { margin: 10px 0 0; }
.footer-logo { margin-bottom: 14px; }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 60; max-width: 360px; padding: 12px 16px; border-radius: 10px; background: var(--ink); color: #fff; box-shadow: var(--shadow); opacity: 0; transform: translateY(20px); pointer-events: none; transition: .25s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(0,0,0,.92); }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 88vh; max-width: 92vw; object-fit: contain; }
.lightbox-close { position: absolute; top: 18px; right: 18px; border: 0; border-radius: 999px; width: 44px; height: 44px; background: #fff; color: #000; cursor: pointer; }

@media (max-width: 900px) {
    .apartment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .booking-search { grid-template-columns: 1fr 1fr; }
    .booking-search .btn { grid-column: 1 / -1; }
    .location-grid, .detail-grid, .booking-grid { grid-template-columns: 1fr; }
    .gallery { grid-template-columns: 1fr 1fr; }
    .gallery button:first-child { grid-column: 1 / -1; grid-row: auto; }
}

@media (max-width: 700px) {
    .menu-toggle { display: inline-flex; }
    .main-nav { position: absolute; top: 100%; left: 0; right: 0; display: none; align-items: stretch; flex-direction: column; gap: 0; background: #050505; padding: 8px 18px 20px; }
    .main-nav.open { display: flex; }
    .main-nav a { padding: 12px 0; }
    .nav-cta { text-align: center; margin-top: 6px; }
    .hero { min-height: 620px; }
    .amenities { grid-template-columns: 1fr 1fr; }
    .amenity:nth-child(2) { border-right: 0; }
    .amenity:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .section-heading { flex-direction: column; align-items: start; }
    .site-footer { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .site-header { min-height: 68px; }
    .logo img { width: 150px; }
    .booking-search, .apartment-grid, .form-grid { grid-template-columns: 1fr; }
    .booking-search .btn, .form-grid .full { grid-column: 1; }
    .amenities { grid-template-columns: 1fr; }
    .amenity { border-right: 0; border-bottom: 1px solid var(--line); }
    .gallery { grid-template-columns: 1fr; }
    .gallery button:first-child { grid-column: auto; min-height: 250px; }
}
