/* =========================
   Casa Alta – Global Styles
   ========================= */

/* Reset & base */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, picture, svg, video { max-width: 100%; display: block; }

/* Palette & tokens */
:root{
  --terracotta:#c66a3a;   /* primary accent */
  --cream:#faf3e7;        /* page background */
  --deep-teal:#2e6f6c;    /* headings & brand */
  --sand:#e8d7c5;         /* subtle UI / section bg */
  --ink:#1f2937;          /* body text */
  --gold:#d4a373;         /* highlights */

  --radius: 14px;
  --shadow-sm: 0 8px 24px rgba(0,0,0,.04);
  --shadow-md: 0 10px 32px rgba(0,0,0,.10);
}

/* Typography */
h1, h2, h3, h4 { color: var(--deep-teal); margin: 0 0 14px; }
h2 { font-family: "Playfair Display", serif; font-size: clamp(1.6rem, 3.2vw, 2rem); }
h3 { font-size: 1.15rem; }
.lead { color:#4b5563; max-width: 780px; }

/* Containers & spacing */
.container{ max-width:1100px; margin:0 auto; padding:0 20px; }
section{ padding:64px 0; }

/* Links */
a { color: inherit; }
a:hover { color: var(--terracotta); }

/* =================
   Header & Nav
   ================= */
header{
  position: sticky; top: 0; z-index: 40;
  background: rgba(250,243,231,.9);
  backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid rgba(0,0,0,.05);
}
.nav{ display:flex; align-items:center; justify-content:space-between; padding:14px 0; }
.brand{ font-family:"Playfair Display",serif; font-weight:700; font-size:1.25rem; color:var(--deep-teal); letter-spacing:.3px; }

/* Desktop nav */
header nav { display:flex; gap:18px; }
header nav a{ color:var(--ink); text-decoration:none; font-weight:600; padding:.25rem .5rem; border-radius:10px; }
header nav a:hover{ color:var(--terracotta); }

/* Mobile trigger */
.menu-toggle{
  display:none;
  font-size:1.6rem;
  background:none;
  border:none;
  color:var(--deep-teal);
  cursor:pointer;
  line-height:1;
}

/* Mobile nav behaviour */
@media (max-width: 768px){
  .menu-toggle{ display:block; }
  header nav{
    position: absolute;
    top: 64px; right: 20px;
    background: var(--cream);
    border: 1px solid rgba(0,0,0,.06);
    box-shadow: var(--shadow-md);
    border-radius: 12px;
    padding: 10px;
    flex-direction: column;
    gap: 6px;
    display: none;
    min-width: 180px;
  }
  header nav.open{ display:flex; }
}

/* =================
   Hero
   ================= */
.hero{
  position:relative; height:72vh; min-height:480px;
  display:grid; place-items:center; overflow:clip; background:#000;
}
.hero::before{
  content:""; position:absolute; inset:0;
  background:url('/images/hero.jpeg') center/cover no-repeat;
  filter:saturate(1.05) contrast(1.05);
}
.hero::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(198,106,58,.45) 80%);
}
.hero-inner{ position:relative; z-index:1; text-align:center; color:#fff; padding:0 20px; }
.eyebrow{
  display:inline-block; padding:6px 10px; font-size:.8rem; letter-spacing:1px; text-transform:uppercase;
  background:rgba(0,0,0,.35); border:1px solid rgba(255,255,255,.35); border-radius:999px;
}
.hero h1{
  font-family:"Playfair Display",serif; font-weight:700;
  font-size:clamp(2rem,5vw,3.25rem); margin:14px 0 10px;
}
.hero p{ max-width:720px; margin:0 auto 18px; font-size:clamp(1rem,1.6vw,1.125rem); opacity:.95; }
.cta{
  display:inline-flex; align-items:center; gap:10px;
  padding:12px 18px; background:var(--terracotta); color:#fff;
  border-radius:999px; text-decoration:none; font-weight:700;
  box-shadow:0 6px 18px rgba(198,106,58,.35);
  transition: transform .2s ease, box-shadow .3s ease;
}
.cta:hover{ transform:translateY(-1px); box-shadow:0 10px 24px rgba(198,106,58,.45); }

/* =================
   Grid, Cards, Gallery
   ================= */
.grid{ display:grid; gap:24px; }
@media (min-width:768px){ .grid-2{ grid-template-columns:1fr 1fr; } }
@media (min-width:992px){ .grid-3{ grid-template-columns:repeat(3,1fr); } }

.card{
  background:#fff; border:1px solid rgba(0,0,0,.06);
  border-radius:16px; overflow:hidden; box-shadow: var(--shadow-sm);
}
.card img{ width:100%; height:220px; object-fit:cover; display:block; }
.card .pad{ padding:18px; }

/* Simple gallery (legacy) */
.gallery{
  display:grid; gap:10px; grid-template-columns:repeat(2,1fr);
}
@media (min-width:900px){ .gallery{ grid-template-columns:repeat(4,1fr); } }
.gallery img{ width:100%; height:220px; object-fit:cover; border-radius:12px; }

/* Modern Gallery (masonry-like grid) */
.mg-grid{
  --gap:10px;
  display:grid; gap:var(--gap); grid-template-columns:repeat(2,1fr);
  margin-top:14px;
}
@media (min-width:700px){ .mg-grid{ grid-template-columns:repeat(3,1fr); } }
@media (min-width:1024px){ .mg-grid{ grid-template-columns:repeat(4,1fr); } }

.mg-item{
  position:relative; padding:0; border:none; background:transparent; cursor:pointer;
  border-radius:12px; overflow:hidden; box-shadow:0 6px 18px rgba(0,0,0,.06);
  transition:transform .15s ease, box-shadow .15s ease;
}
.mg-item:hover{ transform:translateY(-2px); box-shadow:0 10px 24px rgba(0,0,0,.10); }
.mg-item img{ display:block; width:100%; height:220px; object-fit:cover; }

/* Lightbox */
.mg-lightbox{
  position:fixed; inset:0; background:rgba(0,0,0,.85);
  display:grid; place-items:center; padding:24px; z-index:1000;
}
.mg-lightbox[hidden]{ display:none; }
.mg-lightbox img{
  max-width:min(1200px,92vw); max-height:86vh;
  border-radius:8px; box-shadow:0 10px 40px rgba(0,0,0,.4);
}
.mg-close{
  position:fixed; top:14px; right:18px; font-size:44px; line-height:1; color:#fff;
  background:transparent; border:none; cursor:pointer;
}
.mg-nav{
  position:fixed; top:50%; transform:translateY(-50%);
  font-size:46px; line-height:1; color:#fff; background:rgba(0,0,0,.25);
  border:none; width:48px; height:66px; cursor:pointer; border-radius:10px;
}
.mg-prev{ left:12px; } .mg-next{ right:12px; }
.mg-nav:hover{ background:rgba(0,0,0,.4); }

/* Map */
.map-embed{
  width:100%; height:360px; border:0; border-radius:14px; box-shadow: var(--shadow-sm);
}

/* Weather + Time */
.weather-time{ display:grid; gap:16px; margin-top:12px; }
@media (min-width:700px){ .weather-time{ grid-template-columns:1fr 1fr; } }
.big{ font-size:2rem; font-weight:700; }

/* Footer */
footer{ background:#fff; border-top:1px solid rgba(0,0,0,.06); }
.footer-inner{ display:grid; gap:16px; padding:28px 0; }
.small{ color:#6b7280; font-size:.95rem; }

/* Animations */
.reveal{ opacity:0; transform:translateY(8px); animation:fadeUp .6s ease forwards; }
.reveal-1{ animation-delay:.1s } .reveal-2{ animation-delay:.2s } .reveal-3{ animation-delay:.3s }
@keyframes fadeUp{ to{ opacity:1; transform:translateY(0) } }

/* =================
   Rates & Terms
   ================= */
.price-grid, .terms-grid { display:grid; gap:20px; margin-top:20px; }
@media (min-width:700px){ .price-grid, .terms-grid { grid-template-columns: repeat(3, 1fr); } }
.price-grid article, .terms-grid article{
  background: var(--cream);
  border: 1px solid var(--terracotta);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  transition: transform 0.2s ease;
}
.price-grid article:hover, .terms-grid article:hover{ transform: translateY(-4px); }
.price-grid h4, .terms-grid h4{ color: var(--deep-teal); margin-bottom: 8px; }

/* Elegant dl list (your current T&Cs) */
.terms-list{ margin:12px 0 0; padding:0; }
.terms-list dt{
  font-family:"Playfair Display", serif;
  color:var(--deep-teal);
  font-weight:700;
  font-size:1.1rem;
  margin-top:22px;
}
.terms-list dd{ margin:6px 0 0 0; color:var(--ink); line-height:1.7; }
.terms-rule{
  height:1px; border:0;
  background:linear-gradient(90deg, transparent 0, rgba(198,106,58,.4) 12%, rgba(198,106,58,.4) 88%, transparent 100%);
  margin:18px 0; opacity:.6;
}

/* =================
   Utilities & polish
   ================= */
.text-center { text-align: center; }
.text-muted { color:#666; }
.max-700 { max-width:700px; margin-inline:auto; }
.btn-flat { border:none; background:none; padding:0; }
.shadow { box-shadow: var(--shadow-sm); }
.rounded { border-radius: 12px; }

.divider{
  border:0; height:1px;
  background: linear-gradient(90deg, transparent, rgba(198,106,58,.4), transparent);
  margin: 40px auto; width: 60%;
}

/* Focus states for accessibility */
:focus-visible{
  outline: 3px solid color-mix(in srgb, var(--deep-teal) 75%, white);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
