/* 50 Peninsula de San Juan — Luxury Editorial Microsite */

:root {
  --color-bone: #F5F0E8;
  --color-sand: #D9CDBF;
  --color-clay: #B85C45;
  --color-clay-light: #C96F57;
  --color-ocean: #2E6B6B;
  --color-ink: #1A1816;
  --color-ink-soft: #3D3834;
  --color-ink-muted: #6B6560;
  --color-white: #FFFFFF;
  --color-glass: rgba(245, 240, 232, 0.88);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --space-2xl: 8rem;
  --space-3xl: 12rem;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

@media (min-width: 1600px) {
  html {
    font-size: 18px;
  }
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-ink);
  background-color: var(--color-bone);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-md) var(--space-lg);
  transition: background-color 0.6s var(--ease-out-quart), backdrop-filter 0.6s var(--ease-out-quart);
}

.nav.is-scrolled {
  background-color: var(--color-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(26, 24, 22, 0.06);
}

.nav-inner {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--color-white);
  transition: color 0.6s var(--ease-out-quart);
  line-height: 1.2;
}

@media (max-width: 768px) {
  .nav-logo {
    font-size: 1rem;
    max-width: 140px;
  }
}

.nav.is-scrolled .nav-logo {
  color: var(--color-ink);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-links a {
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-white);
  opacity: 0.9;
  transition: opacity 0.3s ease, color 0.6s var(--ease-out-quart);
}

.nav.is-scrolled .nav-links a {
  color: var(--color-ink);
}

.nav-links a:hover {
  opacity: 1;
}

.nav-links a.nav-cta {
  padding: 0.625rem 1.25rem;
  border: 1px solid currentColor;
  border-radius: 0;
  opacity: 1;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-links a.nav-cta:hover {
  background-color: var(--color-white);
  color: var(--color-ink);
}

.nav.is-scrolled .nav-links a.nav-cta:hover {
  background-color: var(--color-ink);
  color: var(--color-bone);
}

/* Hero */
.hero {
  position: relative;
  height: 100vh;
  min-height: 700px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

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

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(26, 24, 22, 0.72) 0%,
    rgba(26, 24, 22, 0.28) 45%,
    rgba(26, 24, 22, 0.05) 100%
  );
}

@media (max-width: 768px) {
  .hero-overlay {
    background: linear-gradient(
      to top,
      rgba(26, 24, 22, 0.78) 0%,
      rgba(26, 24, 22, 0.45) 50%,
      rgba(26, 24, 22, 0.2) 100%
    );
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
  padding-bottom: calc(var(--space-2xl) + 2rem);
  color: var(--color-white);
}

.hero-label {
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
  opacity: 0.85;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 8.5rem);
  font-weight: 300;
  line-height: 0.92;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
}

.hero-subtitle {
  max-width: 640px;
  font-size: 1.125rem;
  font-weight: 300;
  line-height: 1.7;
  opacity: 0.92;
  margin-bottom: var(--space-md);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.hero-price {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.hero-scroll {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: var(--color-white);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.7;
}

.hero-scroll-line {
  width: 1px;
  height: 48px;
  background-color: currentColor;
  opacity: 0.6;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.4s var(--ease-out-quart), color 0.4s var(--ease-out-quart), border-color 0.4s var(--ease-out-quart), transform 0.4s var(--ease-out-quart);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background-color: var(--color-clay);
  color: var(--color-white);
  border-color: var(--color-clay);
}

.btn-primary:hover {
  background-color: var(--color-clay-light);
  border-color: var(--color-clay-light);
}

.btn-large {
  padding: 1.25rem 3rem;
  font-size: 0.8125rem;
}

/* Sections */
.section {
  position: relative;
  padding: var(--space-3xl) var(--space-lg);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

.container-narrow {
  max-width: 840px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: var(--space-xl);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--color-ink);
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  font-size: 1.125rem;
  font-weight: 300;
  color: var(--color-ink-muted);
  max-width: 600px;
}

/* Editorial intro */
.section-editorial {
  background-color: var(--color-bone);
  text-align: center;
}

.lead {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 300;
  line-height: 1.45;
  color: var(--color-ink);
  margin-bottom: var(--space-lg);
}

.section-editorial p:not(.lead) {
  font-size: 1.0625rem;
  color: var(--color-ink-soft);
}

/* Spec grid */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-md) 0;
  border-top: 1px solid var(--color-sand);
}

.spec-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  color: var(--color-ink);
}

.spec-label {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-ink-muted);
}

/* Fullbleed sections */
.section-fullbleed {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: flex-end;
  padding: 0;
  overflow: hidden;
}

.fullbleed-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.fullbleed-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fullbleed-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(26, 24, 22, 0.78) 0%,
    rgba(26, 24, 22, 0.3) 50%,
    rgba(26, 24, 22, 0.1) 100%
  );
}

.fullbleed-content {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
  color: var(--color-white);
  width: 100%;
}

.fullbleed-label {
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
  opacity: 0.85;
}

.fullbleed-title {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 7vw, 6rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
}

.fullbleed-text {
  max-width: 620px;
  font-size: 1.0625rem;
  line-height: 1.8;
  opacity: 0.92;
}

/* Gallery */
.section-gallery {
  background-color: var(--color-bone);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-sm);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  grid-column: span 4;
}

.gallery-item-large {
  grid-column: span 8;
  grid-row: span 2;
}

.gallery-item-wide {
  grid-column: span 8;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  transition: transform 1.2s var(--ease-out-expo);
}

.gallery-item-large img {
  aspect-ratio: auto;
  min-height: 100%;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-md);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-white);
  background: linear-gradient(to top, rgba(26, 24, 22, 0.6), transparent);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s var(--ease-out-expo);
}

.gallery-item:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}

/* Pool section */
.section-pool {
  background-color: var(--color-white);
  padding: var(--space-3xl) 0;
}

.pool-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 80vh;
}

.pool-media {
  position: relative;
  min-height: 60vh;
}

.pool-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.pool-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-2xl) var(--space-xl);
  background-color: var(--color-white);
}

.pool-content .section-title {
  margin-bottom: var(--space-md);
}

.pool-content p {
  font-size: 1.0625rem;
  color: var(--color-ink-soft);
  margin-bottom: var(--space-md);
}

.feature-list {
  list-style: none;
  margin-top: var(--space-md);
}

.feature-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: var(--space-sm);
  font-size: 1rem;
  color: var(--color-ink-soft);
}

.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-clay);
}

/* Resilience */
.section-resilience {
  background-color: var(--color-bone);
}

.resilience-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: var(--space-xl);
  align-items: center;
}

.resilience-content .fullbleed-label {
  color: var(--color-clay);
}

.resilience-content .section-title {
  margin-bottom: var(--space-md);
}

.resilience-content p {
  font-size: 1.0625rem;
  color: var(--color-ink-soft);
  margin-bottom: var(--space-lg);
}

.resilience-media {
  position: relative;
  overflow: hidden;
}

.resilience-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.resilience-specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

/* Contact */
.section-contact {
  background-color: var(--color-white);
}

.contact-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.contact-form {
  max-width: 720px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-group-full {
  grid-column: 1 / -1;
  margin-bottom: var(--space-md);
}

.form-group label {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-ink-muted);
}

.label-note {
  font-weight: 300;
  text-transform: none;
  letter-spacing: 0;
  color: var(--color-ink-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 1rem 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 300;
  color: var(--color-ink);
  background-color: transparent;
  border: none;
  border-bottom: 1px solid var(--color-sand);
  border-radius: 0;
  outline: none;
  transition: border-color 0.3s ease;
}

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

.form-group select {
  cursor: pointer;
  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 fill='%233D3834' d='M1 1.5l5 5 5-5' stroke='%233D3834' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
}

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

.contact-form .btn {
  width: 100%;
  margin-top: var(--space-md);
}

.form-status {
  margin-top: var(--space-md);
  font-size: 0.9375rem;
  text-align: center;
  min-height: 1.5rem;
}

/* Honeypot field: hidden from people, visible to bots (checked in lead.php) */
.form-hp {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status.success {
  color: var(--color-ocean);
}

.form-status.error {
  color: var(--color-clay);
}

.form-disclaimer {
  margin-top: var(--space-md);
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--color-ink-muted);
  text-align: center;
}

/* Footer */
.footer {
  padding: var(--space-lg);
  background-color: var(--color-ink);
  color: var(--color-sand);
  text-align: center;
}

.footer p {
  font-size: 0.8125rem;
  margin-bottom: var(--space-xs);
}

.footer-disclaimer {
  opacity: 0.7;
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease-out-expo), transform 0.9s var(--ease-out-expo);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
  .nav-links a:not(.nav-cta) {
    display: none;
  }

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

  .gallery-item,
  .gallery-item-large,
  .gallery-item-wide {
    grid-column: span 6;
  }

  .pool-layout,
  .resilience-layout {
    grid-template-columns: 1fr;
  }

  .pool-content {
    padding: var(--space-xl) var(--space-lg);
  }

  .resilience-media {
    order: -1;
  }
}

@media (max-width: 768px) {
  .nav {
    padding: var(--space-sm) var(--space-md);
  }

  .section {
    padding: var(--space-2xl) var(--space-md);
  }

  .hero-content {
    padding: var(--space-lg) var(--space-md);
    padding-bottom: calc(var(--space-xl) + 2rem);
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .spec-grid,
  .resilience-specs {
    grid-template-columns: 1fr;
  }

  .gallery-item,
  .gallery-item-large,
  .gallery-item-wide {
    grid-column: span 12;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .fullbleed-content {
    padding: var(--space-xl) var(--space-md);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
