/* =====================================================
   Miloma's Apartments Two — rebuilt stylesheet
   Palette drawn from the apartment itself:
   warm cream, espresso, brushed gold.
   ===================================================== */

:root {
  --ink: #221d17;
  --espresso: #2e2721;
  --espresso-light: #3d352d;
  --gold: #b98a44;
  --gold-dark: #97682c;
  --gold-soft: #e9d9bd;
  --cream: #faf7f1;
  --sand: #f1eadd;
  --text: #3a342c;
  --text-muted: #7c7468;
  --line: rgba(34, 29, 23, 0.1);
  --whatsapp: #25d366;
  --whatsapp-dark: #1ea952;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 12px 36px rgba(34, 29, 23, 0.1);
  --shadow-lg: 0 24px 60px rgba(34, 29, 23, 0.18);
  --max-width: 1180px;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); letter-spacing: -0.01em; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow { max-width: 780px; }

.eyebrow {
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
  font-size: 0.78rem;
  margin: 0 0 14px;
}
.eyebrow-light { color: var(--gold-soft); }

.lead { font-size: 1.06rem; }

/* ---------- Reveal-on-scroll (only hidden when JS is running) ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
html.js .reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-family: var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-size: 0.94rem;
  line-height: 1.2;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-lg { padding: 16px 30px; font-size: 1rem; }

.btn-primary { background: var(--gold); color: #fff; box-shadow: 0 6px 18px rgba(185, 138, 68, 0.35); }
.btn-primary:hover { background: var(--gold-dark); }

.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--espresso-light); }

.btn-glass {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(6px);
}
.btn-glass:hover { background: #fff; color: var(--ink); }

.btn-outline-dark {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn-outline-dark:hover { background: var(--ink); color: #fff; }

.btn-whatsapp { background: var(--whatsapp); color: #fff; box-shadow: 0 6px 18px rgba(37, 211, 102, 0.3); }
.btn-whatsapp:hover { background: var(--whatsapp-dark); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.site-header.scrolled {
  background: rgba(34, 29, 23, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.25);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 24px;
}
.logo {
  color: #fff;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  line-height: 1.1;
  text-decoration: none;
}
.logo span {
  display: block;
  color: var(--gold);
  font-size: 0.72rem;
  font-family: var(--font-sans);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  margin-top: 3px;
}
.main-nav { display: flex; gap: 26px; }
.main-nav a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s ease;
}
.main-nav a:hover { color: var(--gold); }
.header-whatsapp { white-space: nowrap; padding: 10px 20px; font-size: 0.88rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none; border: none; cursor: pointer;
}
.nav-toggle span {
  display: block; height: 2px;
  background: #fff; border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.hero-media {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  animation: hero-zoom 14s ease-out forwards;
}
@keyframes hero-zoom { to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .hero-media { animation: none; transform: none; }
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(200deg, rgba(20, 17, 14, 0.25) 0%, rgba(20, 17, 14, 0.55) 55%, rgba(20, 17, 14, 0.82) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  max-width: 760px;
  margin: auto auto 0 0;
  padding: 160px 24px 70px;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  margin-bottom: 20px;
}
.hero h1 em {
  font-style: italic;
  color: var(--gold-soft);
}
.hero-sub {
  font-size: 1.12rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 560px;
  margin: 0 0 34px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-stats {
  position: relative;
  z-index: 2;
  background: rgba(20, 17, 14, 0.55);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.hero-stats-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 22px 24px;
  text-align: center;
}
.stat strong {
  display: block;
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 1.5rem;
  line-height: 1.2;
}
.stat span { font-size: 0.84rem; color: rgba(255, 255, 255, 0.75); }

/* ---------- Sections ---------- */
.section { padding: 100px 0; }
.section-alt { background: var(--sand); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-sub { color: var(--text-muted); margin: 0; }

/* ---------- Split layout ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.split-reverse .split-text { order: 2; }
.split-reverse .split-media { order: 1; }
.split-text h2 { margin-bottom: 18px; }
.split-text .btn { margin-top: 26px; }

.photo-stack { position: relative; margin: 0; padding: 0 0 56px 0; }
.photo-stack img {
  width: 100%;
  aspect-ratio: 4 / 3.4;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.photo-stack .photo-stack-small {
  position: absolute;
  right: -14px;
  bottom: 0;
  width: 46%;
  aspect-ratio: 1 / 1;
  border: 6px solid var(--cream);
  box-shadow: var(--shadow-lg);
}
.section-alt .photo-stack .photo-stack-small { border-color: var(--sand); }

/* ---------- Check list ---------- */
.check-list {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
}
.check-list li {
  padding: 11px 0 11px 34px;
  position: relative;
  border-bottom: 1px solid var(--line);
}
.check-list li:last-child { border-bottom: none; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 16px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--gold-soft);
}
.check-list li::after {
  content: "✓";
  position: absolute;
  left: 4px; top: 11px;
  color: var(--gold-dark);
  font-weight: 700;
  font-size: 0.75rem;
}

/* ---------- Room cards ---------- */
.room-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.room-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.room-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.room-card-media { position: relative; overflow: hidden; }
.room-card-media img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.room-card:hover .room-card-media img { transform: scale(1.05); }
.badge {
  position: absolute;
  top: 14px; left: 14px;
  background: rgba(34, 29, 23, 0.78);
  color: var(--gold-soft);
  backdrop-filter: blur(4px);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 13px;
  border-radius: 999px;
}
.room-card-body {
  padding: 26px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.room-card-body h3 { font-size: 1.25rem; }
.room-price {
  font-family: var(--font-serif);
  color: var(--gold-dark);
  font-size: 1.5rem;
  line-height: 1.1;
  margin: 0 0 14px !important;
}
.room-price small {
  font-family: var(--font-sans);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  margin-left: 4px;
}
.room-card-body > p { color: var(--text-muted); font-size: 0.95rem; margin: 0 0 16px; }
.mini-list {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  flex: 1;
}
.mini-list li {
  font-size: 0.88rem;
  padding: 5px 0 5px 22px;
  position: relative;
}
.mini-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--gold-dark);
  font-weight: 700;
}
.room-card .btn { align-self: flex-start; }

/* ---------- Amenities ---------- */
.amenity-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}
.amenity {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.amenity:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.amenity-icon {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--sand);
  color: var(--gold-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.amenity h3 { font-size: 1.08rem; margin-bottom: 6px; }
.amenity p { font-size: 0.9rem; color: var(--text-muted); margin: 0; }

/* ---------- Gallery ---------- */
.gallery-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
}
.filter-btn {
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--text);
  border-radius: 999px;
  padding: 9px 20px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.filter-btn:hover { border-color: var(--gold); color: var(--gold-dark); }
.filter-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.gallery-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: zoom-in;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.3s ease;
}
.gallery-grid img:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow);
}
.gallery-grid img.hidden { display: none; }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 22px;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 30px 18px 0;
  font-weight: 600;
  color: var(--ink);
  position: relative;
  font-size: 0.98rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--gold-dark);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item p {
  margin: 0;
  padding: 0 0 20px;
  color: var(--text-muted);
  font-size: 0.94rem;
}

/* ---------- Contact ---------- */
.contact-section {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(185, 138, 68, 0.22), transparent 55%),
    var(--espresso);
  text-align: center;
}
.contact-section h2 { color: #fff; }
.contact-inner { max-width: 700px; }
.contact-sub { color: rgba(255, 255, 255, 0.72); margin: 0 0 34px; }
.contact-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  padding: 44px 0;
  font-size: 0.88rem;
}
.logo-footer { display: inline-block; margin-bottom: 14px; }
.footer-inner p { margin: 4px 0; }
.footer-inner p a { color: rgba(255, 255, 255, 0.8); text-decoration: none; }
.footer-inner p a:hover { color: var(--gold); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 13, 11, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
}
.lightbox.active { display: flex; }
.lightbox-figure { margin: 0; text-align: center; max-width: 90vw; }
.lightbox-figure img {
  max-width: 100%;
  max-height: 82vh;
  width: auto; height: auto;
  margin: 0 auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.lightbox-figure figcaption {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.88rem;
  margin-top: 14px;
}
.lightbox-close {
  position: absolute;
  top: 20px; right: 24px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 42px; height: 42px;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.25); }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 48px; height: 48px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.25); }
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }

/* ---------- Email chooser ---------- */
.email-dialog {
  border: none;
  border-radius: 16px;
  padding: 30px 26px 26px;
  width: calc(100% - 32px);
  max-width: 380px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
}
.email-dialog::backdrop { background: rgba(34, 29, 23, 0.6); }
.email-dialog h3 { font-size: 1.5rem; margin: 0 0 4px; }
.email-dialog-address { margin: 0 0 22px; color: var(--gold-dark); font-weight: 600; word-break: break-all; }
.email-dialog-close {
  position: absolute;
  top: 10px; right: 14px;
  background: none;
  border: none;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}
.email-dialog-close:hover { color: var(--ink); }
.email-options { display: grid; gap: 10px; }
.email-option {
  display: block;
  width: 100%;
  padding: 13px 18px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.email-option:hover { border-color: var(--gold); background: var(--sand); }

/* ---------- Chatbot ---------- */
/* Sits above the 64px "Powered by Netlify" badge Netlify pins to the bottom-right corner */
.chatbot { position: fixed; bottom: 84px; right: 22px; z-index: 900; }
.chatbot-toggle {
  width: 62px; height: 62px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(34, 29, 23, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
}
.chatbot-toggle:hover { background: var(--gold-dark); transform: translateY(-2px); }
.chatbot-toggle .icon-close { display: none; }
.chatbot.open .chatbot-toggle .icon-chat { display: none; }
.chatbot.open .chatbot-toggle .icon-close { display: block; }

.chatbot-panel {
  position: absolute;
  bottom: 76px; right: 0;
  width: 350px;
  max-width: calc(100vw - 40px);
  height: 480px;
  max-height: 70vh;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.chatbot.open .chatbot-panel { display: flex; }

.chatbot-header {
  background: var(--espresso);
  color: #fff;
  padding: 15px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chatbot-header strong { display: block; font-size: 0.95rem; font-family: var(--font-serif); font-weight: 500; }
.chatbot-header span { display: block; font-size: 0.74rem; color: var(--gold-soft); }
.chatbot-whatsapp-link { color: var(--whatsapp); display: flex; }

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--cream);
}
.msg {
  max-width: 84%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.45;
}
.msg-bot {
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  align-self: flex-start;
  border-bottom-left-radius: 3px;
}
.msg-user {
  background: var(--gold);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 3px;
}

.chatbot-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 10px;
  background: var(--cream);
}
.chip {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 0.79rem;
  font-family: var(--font-sans);
  cursor: pointer;
  color: var(--ink);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.chip:hover { border-color: var(--gold); color: var(--gold-dark); }
.chip-whatsapp { border-color: var(--whatsapp); color: var(--whatsapp-dark); font-weight: 700; }

.chatbot-input { display: flex; border-top: 1px solid var(--line); background: #fff; }
.chatbot-input input {
  flex: 1;
  border: none;
  padding: 15px;
  font-size: 0.9rem;
  outline: none;
  font-family: var(--font-sans);
  background: transparent;
}
.chatbot-input button {
  background: var(--espresso);
  color: #fff;
  border: none;
  width: 52px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.chatbot-input button:hover { background: var(--gold); }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .amenity-grid { grid-template-columns: repeat(2, 1fr); }
  .room-cards { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
  .section { padding: 72px 0; }
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .header-whatsapp { display: none; }
  .site-header { background: rgba(34, 29, 23, 0.92); backdrop-filter: blur(10px); }

  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(34, 29, 23, 0.98);
    padding: 18px 24px 24px;
    gap: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  }

  .split { grid-template-columns: 1fr; }
  .split-reverse .split-text { order: 1; }
  .split-reverse .split-media { order: 2; }
  .photo-stack .photo-stack-small { right: 0; }

  .hero-stats-inner { grid-template-columns: repeat(2, 1fr); }
  .hero-content { padding-top: 130px; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); }

  /* Keep footer text clear of the floating chat button and Netlify badge */
  .site-footer { padding-bottom: 170px; }
}

@media (max-width: 480px) {
  .amenity-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .lightbox-nav { width: 40px; height: 40px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .chatbot-panel { right: -8px; }
}
