/* ============================================
   CASARBOL — Shared Stylesheet
   Delta del Tigre, Buenos Aires
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Jost:wght@300;400;500;600&display=swap');

/* --- CSS Variables --- */
:root {
  --cream:       oklch(97% 0.012 85);
  --cream-mid:   oklch(94% 0.014 80);
  --warm-white:  oklch(99% 0.005 90);
  --brown-light: oklch(88% 0.030 65);
  --brown:       oklch(55% 0.060 55);
  --brown-deep:  oklch(35% 0.050 50);
  --green:       oklch(38% 0.085 148);
  --green-mid:   oklch(52% 0.095 148);
  --green-light: oklch(72% 0.080 148);
  --text:        oklch(22% 0.020 60);
  --text-mid:    oklch(45% 0.020 60);
  --text-light:  oklch(60% 0.018 60);
  --border:      oklch(85% 0.015 75);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Jost', 'Helvetica Neue', sans-serif;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  24px;
  --radius-xl:  40px;

  --shadow-sm:  0 2px 12px oklch(22% 0.020 60 / 0.08);
  --shadow-md:  0 8px 32px oklch(22% 0.020 60 / 0.12);
  --shadow-lg:  0 20px 60px oklch(22% 0.020 60 / 0.18);

  --max-w: 1280px;
  --gutter: clamp(24px, 5vw, 80px);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font-family: var(--font-body); border: none; background: none; }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 500; }
h2 { font-size: clamp(1.8rem, 3.5vw, 3rem); font-weight: 500; }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); font-weight: 500; }
h4 { font-size: 1.1rem; font-weight: 600; letter-spacing: 0.01em; }

p { font-size: clamp(0.95rem, 1.2vw, 1.05rem); color: var(--text-mid); line-height: 1.75; }

/* --- Layout Utilities --- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section-pad { padding: clamp(64px, 8vw, 120px) 0; }

/* --- Label / Eyebrow --- */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green-mid);
  margin-bottom: 16px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 14px 32px;
  border-radius: 100px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--green);
  color: var(--warm-white);
  box-shadow: 0 4px 20px oklch(38% 0.085 148 / 0.30);
}
.btn-primary:hover {
  background: var(--green-mid);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px oklch(38% 0.085 148 / 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--green);
  border: 1.5px solid var(--green);
}
.btn-outline:hover {
  background: var(--green);
  color: var(--warm-white);
  transform: translateY(-2px);
}

.btn-ghost {
  background: oklch(99% 0.005 90 / 0.15);
  color: var(--warm-white);
  border: 1.5px solid oklch(99% 0.005 90 / 0.4);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  background: oklch(99% 0.005 90 / 0.25);
  transform: translateY(-2px);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 var(--gutter);
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.4s ease;
}

.nav.scrolled {
  background: oklch(97% 0.012 85 / 0.95);
  backdrop-filter: blur(12px);
  height: 64px;
  box-shadow: var(--shadow-sm);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--warm-white);
  transition: color 0.4s ease;
}
.nav.scrolled .nav-logo { color: var(--text); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: oklch(99% 0.005 90 / 0.85);
  transition: color 0.3s ease;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--green-light);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }

.nav.scrolled .nav-links a { color: var(--text-mid); }
.nav-links a:hover { color: var(--green-mid); }

.nav-cta {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 22px;
  border-radius: 100px;
  background: var(--green);
  color: var(--warm-white) !important;
  transition: all 0.3s ease;
}
.nav-cta:hover {
  background: var(--green-mid);
  transform: translateY(-1px);
}
.nav-cta::after { display: none !important; }

/* Mobile nav toggle */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}
.nav-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--warm-white);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.nav.scrolled .nav-burger span { background: var(--text); }

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(60px, 8vw, 100px);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Photo placeholder for hero */
.photo-placeholder {
  width: 100%;
  height: 100%;
  background: var(--brown-deep);
  position: relative;
  overflow: hidden;
}

.photo-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 12px,
    oklch(100% 0 0 / 0.04) 12px,
    oklch(100% 0 0 / 0.04) 13px
  );
}

.photo-placeholder .photo-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: oklch(100% 0 0 / 0.35);
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  padding: 24px;
}

.photo-placeholder .photo-label svg {
  width: 32px;
  height: 32px;
  opacity: 0.5;
}

/* Varied placeholder colors per house */
.ph-tigre    { background: oklch(30% 0.040 120); }
.ph-ceibos   { background: oklch(32% 0.035 90); }
.ph-estudio  { background: oklch(28% 0.030 70); }
.ph-sala     { background: oklch(34% 0.028 100); }
.ph-hero     { background: oklch(25% 0.038 130); }
.ph-hero-ret { background: oklch(26% 0.042 145); }
.ph-hero-emp { background: oklch(26% 0.025 65); }
.ph-hero-jor { background: oklch(24% 0.032 110); }
.ph-hero-esp { background: oklch(27% 0.038 125); }
.ph-hero-con { background: oklch(28% 0.040 100); }
.ph-gallery-1 { background: oklch(30% 0.050 140); }
.ph-gallery-2 { background: oklch(28% 0.042 120); }
.ph-gallery-3 { background: oklch(32% 0.038 160); }
.ph-gallery-4 { background: oklch(26% 0.048 130); }
.ph-gallery-5 { background: oklch(34% 0.035 150); }
.ph-gallery-6 { background: oklch(29% 0.044 110); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    oklch(15% 0.030 120 / 0.80) 0%,
    oklch(15% 0.030 120 / 0.30) 50%,
    oklch(15% 0.030 120 / 0.10) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-content h1 { color: var(--warm-white); }

.hero-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  color: oklch(99% 0.005 90 / 0.75);
  margin: 16px 0 36px;
  max-width: 500px;
}

/* --- Section Dividers / Decorative --- */
.leaf-divider {
  text-align: center;
  padding: 16px 0;
  color: var(--green-light);
  font-size: 1.2rem;
  letter-spacing: 12px;
}

/* --- Cards --- */
.card {
  background: var(--warm-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.card-img {
  aspect-ratio: 4/3;
  overflow: hidden;
  flex-shrink: 0;
}

.card-body {
  padding: 28px 28px 32px;
}

/* --- Grid systems --- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* --- Pill tag --- */
.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 100px;
  background: oklch(72% 0.080 148 / 0.15);
  color: var(--green);
}

/* --- Capacity badge --- */
.capacity {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-light);
}

/* --- Amenity list --- */
.amenity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.amenity-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-mid);
}

.amenity-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-light);
  flex-shrink: 0;
}

/* --- Quote / Highlight --- */
.highlight-block {
  background: var(--green);
  color: var(--warm-white);
  border-radius: var(--radius-lg);
  padding: clamp(40px, 5vw, 64px);
}
.highlight-block h2,
.highlight-block h3,
.highlight-block p { color: var(--warm-white); }
.highlight-block p { opacity: 0.85; }
.highlight-block .eyebrow { color: var(--green-light); }

/* --- Values section --- */
.value-card {
  padding: 32px;
  background: var(--cream-mid);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.value-card h3 { margin-bottom: 12px; font-size: 1.25rem; }
.value-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 20px;
  color: var(--green);
}
.value-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* --- Scroll reveal animation --- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* --- Footer --- */
.footer {
  background: var(--brown-deep);
  color: oklch(99% 0.005 90 / 0.80);
  padding: clamp(48px, 6vw, 80px) 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid oklch(99% 0.005 90 / 0.10);
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--warm-white);
  margin-bottom: 16px;
}

.footer p { color: oklch(99% 0.005 90 / 0.60); font-size: 0.88rem; }

.footer-nav h4 {
  color: oklch(99% 0.005 90 / 0.50);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-nav ul { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a {
  font-size: 0.88rem;
  color: oklch(99% 0.005 90 / 0.65);
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--green-light); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  font-size: 0.78rem;
  color: oklch(99% 0.005 90 / 0.35);
}

/* --- Form styles --- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
  text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--warm-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  transition: border-color 0.3s ease;
  outline: none;
  width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--green-mid);
}

.form-group textarea { resize: vertical; min-height: 120px; }

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--text-mid);
  cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
  cursor: pointer;
}

/* --- Mobile Menu Overlay --- */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--brown-deep);
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}
.mobile-menu a {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  color: var(--warm-white);
  opacity: 0.85;
  transition: opacity 0.2s, color 0.2s;
}
.mobile-menu a:hover { opacity: 1; color: var(--green-light); }

/* --- Responsive --- */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }

  /* --- Mobile global: collapse multi-column layouts to single column,
        force images to fill row, scale type down. This is intentionally
        aggressive so each page reads as a vertical scroll on phones. --- */

  .grid-3,
  .grid-2,
  .grid-4 { grid-template-columns: 1fr !important; gap: 20px; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

  /* Override ANY inline grid-template-columns — catches ad-hoc two-column
     "image + text" sections that bypass the shared .espacio-layout class */
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:repeat(2"],
  [style*="grid-template-columns: repeat(2"],
  [style*="grid-template-columns:repeat(3"],
  [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns:repeat(4"],
  [style*="grid-template-columns: repeat(4"] { grid-template-columns: 1fr !important; }

  /* Override any inline grid-template-columns on shared layout grids */
  [class*="grid"][style*="grid-template-columns"],
  .espacios-preview,
  .segment-cards,
  .combo-grid,
  .grupo-cards,
  .use-cases-grid,
  .cap-row,
  .usos-grid,
  .jornada-features,
  .amenity-grid,
  .amenity-grid-2,
  .valores-grid,
  .gallery-grid { grid-template-columns: 1fr !important; }

  /* Reset any "featured/spanning" cells that stretch across desktop columns */
  .espacio-card.featured { grid-column: auto !important; grid-template-columns: 1fr !important; }
  .espacio-card.featured .espacio-card-img { min-height: 220px !important; aspect-ratio: 16/10 !important; }
  .gallery-grid .g-item { grid-column: auto !important; }
  .gallery-grid { grid-auto-rows: 240px; }

  /* Two-up "image + text" layouts go vertical, image first */
  .espacio-layout,
  .hero-emp-content { grid-template-columns: 1fr !important; direction: ltr !important; gap: 24px !important; }
  .espacio-layout > *,
  .hero-emp-content > * { direction: ltr !important; }
  .espacio-layout .espacio-img,
  .espacio-card.featured .espacio-card-img { order: -1; }

  /* Make all card images visually present on phone */
  .espacio-card-img,
  .espacio-img,
  .seg-card { aspect-ratio: 16/10; }
  .seg-card { aspect-ratio: 4/3; }

  /* Cards with inner flex (number + body) stack vertically */
  .use-case { flex-direction: column; gap: 12px; padding: 24px; }
  .use-case-num { font-size: 2.6rem; min-width: 0; }

  /* Hero adjustments */
  .hero { min-height: 88svh; padding-bottom: 56px; }
  .hero h1 { font-size: clamp(2rem, 8vw, 2.8rem); line-height: 1.15; }
  .hero-tagline { font-size: 1rem; margin: 12px 0 24px; }
  .hero-content .btn { padding: 12px 22px; font-size: 0.85rem; }

  /* Catering strip — stack vertically, button full-width */
  .catering-strip { flex-direction: column; align-items: flex-start; text-align: left; padding: 28px; gap: 18px; }
  .catering-strip .btn { width: 100%; justify-content: center; }

  /* Stats: 2x2 on phone instead of trying to fit 4 across */
  .stats-row { flex-wrap: wrap; }
  .stat-item { flex: 1 1 50%; min-width: 50%; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .stat-item:nth-child(2n) { border-right: none; }
  .stat-item:nth-last-child(-n+2) { border-bottom: none; }

  /* Highlight block / CTA: reduce padding so it fits on narrow viewports */
  .highlight-block { padding: 32px 24px; }

  /* Headings: tame the largest sizes */
  h1 { font-size: clamp(2rem, 7vw, 2.6rem); }
  h2 { font-size: clamp(1.6rem, 5.5vw, 2.1rem); }
  h3 { font-size: 1.3rem; }

  /* Section padding: tighter on phone */
  .section-pad { padding: 48px 0; }

  /* Buttons: in groups of CTAs, full-width on phone */
  .hero-content > div { flex-direction: column; align-items: stretch; }
  .hero-content > div .btn { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  :root { --gutter: 20px; }
  .espacio-card-body { padding: 18px 20px 22px; }
  .seg-card .seg-content { padding: 20px; }
  .value-card { padding: 24px; }
  .grupo-card { padding: 24px; }
}
