/* ===================================================================
   Ocean Sun Theme — Homepage Styles
   =================================================================== */

/* ── Hero section — full viewport ── */

.os-hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: flex-end;
  background-color: var(--os-primary);
  padding-bottom: var(--os-space-16);
  overflow: hidden;
}

/* Hero — Background image (real <img> for SEO + alt text) */
.os-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  z-index: 0;
}

.os-hero--compact {
  min-height: 50vh;
}

.os-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    var(--os-hero-overlay, rgba(28, 46, 63, 0.85)) 0%,
    rgba(28, 46, 63, 0.3) 50%,
    transparent 100%
  );
  z-index: 1;
}

.os-hero__content {
  position: relative;
  z-index: 2;
}

.os-hero__title {
  font-family: var(--os-font-display);
  font-size: var(--os-text-5xl);
  font-weight: var(--os-font-display-bold);
  color: var(--os-text-white);
  line-height: var(--os-leading-tight);
  margin-bottom: var(--os-space-4);
  max-width: 720px;
}

.os-hero__subtitle {
  font-size: var(--os-text-xl);
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--os-space-8);
  max-width: 560px;
}

/* Hero — Video background */
.os-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Hero — Badge (frosted-glass) */
.os-hero__badge {
  display: inline-block;
  font-family: var(--os-font-body);
  font-size: var(--os-text-xs);
  font-weight: var(--os-font-body-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--os-text-white);
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 20px;
  border-radius: var(--os-radius-full);
  margin-bottom: var(--os-space-4);
}

/* Hero — Dual buttons */
.os-hero__actions {
  display: flex;
  gap: var(--os-space-4);
  flex-wrap: wrap;
}

/* Ghost button on dark backgrounds */
.os-btn--ghost-light {
  background: transparent;
  color: var(--os-text-white);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.os-btn--ghost-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.7);
  color: var(--os-text-white);
}

/* Hero — Scroll indicator */
.os-hero__scroll {
  position: absolute;
  bottom: var(--os-space-6);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.6);
  z-index: 2;
  transition: color var(--os-transition-normal);
  animation: os-scroll-bounce 2s ease-in-out infinite;
}

.os-hero__scroll:hover {
  color: var(--os-text-white);
}

@keyframes os-scroll-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(8px); }
}

/* ── Trust Stats Bar ── */

.os-trust-stats {
  background-color: var(--os-primary);
  padding: var(--os-space-8) 0;
}

.os-trust-stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--os-space-6);
  text-align: center;
}

.os-trust-stats__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--os-space-1);
}

.os-trust-stats__value {
  font-family: var(--os-font-display);
  font-size: var(--os-text-2xl);
  font-weight: var(--os-font-display-bold);
  color: var(--os-secondary);
}

.os-trust-stats__label {
  font-size: var(--os-text-sm);
  color: rgba(255, 255, 255, 0.7);
}

/* ── Four Pillars ── */

.os-pillar-card .os-card__image {
  aspect-ratio: 3 / 2;
}

.os-pillar-card .os-card__image--placeholder {
  background: var(--os-bg-warm);
  width: 100%;
}

.os-pillar-card__link {
  display: inline-block;
  font-size: var(--os-text-sm);
  font-weight: var(--os-font-body-semibold);
  color: var(--os-cta);
  margin-top: auto;
}

.os-pillar-card:hover .os-pillar-card__link {
  color: var(--os-cta-hover);
}

/* ── Resort Story ── */

.os-story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--os-space-12);
  align-items: center;
}

.os-story__img {
  width: 100%;
  border-radius: var(--os-radius-lg);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.os-story__img--placeholder {
  background: var(--os-bg-warm);
}

.os-story__content .os-section-label {
  display: block;
  margin-bottom: var(--os-space-3);
  text-align: left;
}

.os-story__content h2 {
  margin-bottom: var(--os-space-6);
}

.os-story__text {
  color: var(--os-text-body);
  line-height: var(--os-leading-relaxed);
  margin-bottom: var(--os-space-6);
}

.os-story__text p + p {
  margin-top: var(--os-space-4);
}

/* ── Testimonials Carousel ── */

.os-testimonials {
  position: relative;
  overflow: hidden;
}

.os-testimonials__track {
  display: flex;
  gap: var(--os-space-6);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: var(--os-space-4);
}

.os-testimonials__track::-webkit-scrollbar {
  display: none;
}

.os-testimonial {
  flex: 0 0 calc(33.333% - var(--os-space-4));
  scroll-snap-align: start;
  background: var(--os-bg-white);
  border: 1px solid var(--os-border);
  border-radius: var(--os-radius-lg);
  padding: var(--os-space-8);
  display: flex;
  flex-direction: column;
  gap: var(--os-space-4);
}

.os-testimonial__stars {
  display: flex;
  gap: 2px;
}

.os-testimonial__quote {
  font-size: var(--os-text-lg);
  line-height: var(--os-leading-relaxed);
  color: var(--os-text);
  font-style: italic;
  flex-grow: 1;
}

.os-testimonial__author {
  display: flex;
  flex-direction: column;
  gap: var(--os-space-1);
  font-style: normal;
}

.os-testimonial__name {
  font-weight: var(--os-font-body-semibold);
  color: var(--os-text);
  font-style: normal;
}

.os-testimonial__origin,
.os-testimonial__source {
  font-size: var(--os-text-sm);
  color: var(--os-text-muted);
}

/* Dots */
.os-testimonials__dots {
  display: flex;
  justify-content: center;
  gap: var(--os-space-2);
  margin-top: var(--os-space-6);
}

.os-testimonials__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--os-border);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--os-transition-fast);
}

.os-testimonials__dot.is-active {
  background: var(--os-cta);
}

/* ===================================================================
   Homepage-Specific Hover Effects
   =================================================================== */

/* Pillar cards — slight perspective tilt + image zoom on hover */
.os-pillar-card {
  transform-style: preserve-3d;
  perspective: 800px;
}

.os-pillar-card:hover {
  transform: translateY(-6px) rotateX(2deg);
}

.os-pillar-card .os-card__image {
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.os-pillar-card:hover .os-card__image {
  transform: scale(1.04);
}

/* CTA link arrow animation */
.os-pillar-card__link {
  transition: color 0.25s ease, transform 0.25s ease;
}

.os-pillar-card:hover .os-pillar-card__link {
  transform: translateX(4px);
}

/* Testimonial cards — glassmorphism on hover */
.os-testimonial {
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.4s cubic-bezier(0.23, 1, 0.32, 1),
              background 0.3s ease,
              border-color 0.3s ease;
}

.os-testimonial:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--os-shadow-hover, 0 12px 32px -8px rgba(28, 46, 63, 0.12));
  border-color: rgba(201, 169, 110, 0.3);
}

/* ===================================================================
   Homepage-Specific Animations
   =================================================================== */

/* Trust stats counter — number grows from below */
.os-trust-stats__value {
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.os-trust-stats.os-reveal:not(.is-visible) .os-trust-stats__value {
  opacity: 0;
  transform: translateY(10px);
}

/* Story image — slide from left */
.os-story .os-story__img {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.os-story.os-reveal.is-visible .os-story__img {
  opacity: 1;
  transform: translateX(0);
}

/* Story content — slide from right */
.os-story .os-story__content {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  transition-delay: 0.15s;
}

.os-story.os-reveal.is-visible .os-story__content {
  opacity: 1;
  transform: translateX(0);
}

/* Reduced motion — homepage-specific overrides */
@media (prefers-reduced-motion: reduce) {
  .os-story .os-story__img,
  .os-story .os-story__content {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .os-testimonial,
  .os-pillar-card .os-card__image {
    transition: none;
  }

  .os-pillar-card:hover,
  .os-testimonial:hover {
    transform: none;
  }
}

/* ── Responsive ── */

@media (max-width: 1024px) {
  .os-testimonial {
    flex: 0 0 calc(50% - var(--os-space-3));
  }
}

@media (max-width: 768px) {
  .os-hero {
    min-height: 60vh;
    padding-bottom: var(--os-space-10);
  }

  .os-hero--compact {
    min-height: 40vh;
  }

  .os-hero__title {
    font-size: var(--os-text-3xl);
  }

  .os-hero__subtitle {
    font-size: var(--os-text-lg);
  }

  .os-hero__video { display: none; }
  .os-hero__badge { font-size: 10px; padding: 5px 12px; }

  .os-trust-stats__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--os-space-6) var(--os-space-4);
  }

  .os-trust-stats__value {
    font-size: var(--os-text-xl);
  }

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

  .os-story {
    grid-template-columns: 1fr;
    gap: var(--os-space-8);
  }
}

@media (max-width: 640px) {
  .os-testimonial {
    flex: 0 0 100%;
  }
}

@media (max-width: 480px) {
  .os-pillars-grid.os-grid--4 {
    grid-template-columns: 1fr;
  }
}
