/* 
 * The Oakhurst Space - Luxury Property Rental CSS
 * Premium aesthetic relying on Vanilla CSS, Grid/Flexbox, and Micro-animations.
 */

/* =========================================
   Variables & Reset
   ========================================= */
:root {
  /* Color Palette */
  --color-primary: #1a1a1a; /* Elegant Dark Charcoal */
  --color-primary-light: #333333;
  --color-accent: #391561; /* Deep Purple */
  --color-accent-hover: #b497d6;

  --color-bg-light: #f9f8f6; /* Off-white, slightly warm */
  --color-bg-white: #ffffff;
  --color-bg-dark: #1a1a1a;

  --color-text-main: #333333;
  --color-text-light: #666666;
  --color-text-muted: #999999;
  --color-text-white: #ffffff;

  /* Typography */
  --font-heading: "Playfair Display", serif;
  --font-body: "Inter", sans-serif;

  /* Layout */
  --max-width: 1400px;
  --container-padding: 5%;
  --section-padding: 100px;

  /* Shapes & Shadows */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.2);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-slow: 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

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

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

body {
  font-family: var(--font-body);
  color: var(--color-text-main);
  background-color: var(--color-bg-white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =========================================
   Typography
   ========================================= */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--color-primary);
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-style: normal;
}
h2 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
}
h3 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}
h4 {
  font-size: 1.25rem;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

p {
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
  color: var(--color-text-light);
  font-weight: 300;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

/* =========================================
   Utility Classes
   ========================================= */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.section-padding {
  padding: var(--section-padding) 0;
}

.bg-light {
  background-color: var(--color-bg-light);
}
.text-center {
  text-align: center;
}
.text-white {
  color: var(--color-text-white);
}
.max-w-800 {
  max-width: 800px;
  margin-inline: auto;
}
.mt-8 {
  margin-top: 2rem;
}
.mt-4 {
  margin-top: 1rem;
}
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-bg-white);
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-outline:hover {
  background-color: var(--color-primary);
  color: var(--color-bg-white);
}

.btn-block {
  width: 100%;
}
.btn-large {
  padding: 18px 40px;
  font-size: 1.1rem;
}
.btn-dark {
  background-color: #1a1a1a;
  color: #fff;
  border-radius: 0;
  text-transform: none;
  font-weight: 400;
  letter-spacing: normal;
}
.btn-dark:hover {
  background-color: #333;
}

/* =========================================
   Header & Navigation
   ========================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 20px 0;
  transition: all var(--transition-normal);
}

/* Scrolled state applied via JS */
.site-header.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  padding: 15px 0;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  height: 40px;
  width: auto;
  transition: all var(--transition-normal);
  /* Attempt to make the dark logo visible on hero, then normal on scroll */
  filter: brightness(0) invert(1);
}

.site-header.scrolled .site-logo {
  filter: brightness(1) invert(0);
}

.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-white);
  position: relative;
  padding-bottom: 5px;
}

.site-header.scrolled .nav-link {
  color: var(--color-text-main);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-accent);
  transition: width var(--transition-normal);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-cta {
  margin-left: 2rem;
}

.site-header:not(.scrolled) .nav-cta {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.site-header:not(.scrolled) .nav-cta:hover {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 101;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-text-white);
  transition: all 0.3s ease;
}

.site-header.scrolled .menu-toggle span {
  background-color: var(--color-text-main);
}

/* =========================================
   Hero Section
   ========================================= */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px; /* Offset for header */
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("hero-main.jpg");
  background-size: cover;
  background-position: center;
  z-index: -1;
}

/* Dark gradient overlay for text readability */
.hero-background::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.3) 40%,
    rgba(0, 0, 0, 0.5) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  color: var(--color-text-white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.hero-stars {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 0.5rem;
}

.hero-stars svg {
  width: 20px;
  height: 20px;
  color: var(--color-text-white);
}

.hero-title {
  color: var(--color-text-white);
  margin-bottom: 4rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Horizontal Booking Bar */
.booking-bar {
  width: 100%;
  max-width: 1100px;
  background: rgba(255, 255, 255, 0.2);
  padding: 24px;
  margin: 0 auto;
}

.booking-form-horizontal {
  display: flex;
  gap: 16px;
  width: 100%;
}

.form-group-horiz {
  flex: 1;
  position: relative;
}

.icon-input {
  display: flex;
  align-items: center;
  position: relative;
  background: var(--color-bg-white);
  height: 56px;
}

.icon-input svg {
  position: absolute;
  left: 16px;
  color: var(--color-text-main);
  opacity: 0.7;
  pointer-events: none;
}

.icon-input input,
.icon-input select {
  width: 100%;
  height: 100%;
  padding: 0 16px 0 48px;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text-main);
  outline: none;
  cursor: pointer;
  appearance: none;
}

/* Fix for date placeholder color */
input[type="text"]::placeholder {
  color: var(--color-text-main);
}

.icon-input select {
  /* custom dropdown arrow */
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
}

.form-submit-btn {
  height: 56px;
  min-width: 180px;
}

/* Success Message Styling */
.form-success-message {
  text-align: center;
  color: var(--color-text-white);
  animation: fadeIn 0.5s ease forwards;
}

.form-success-message h4 {
  color: var(--color-text-white);
  margin: 1.5rem 0 0.5rem;
  font-size: 1.5rem;
}

.form-success-message p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
}

/* Animated Checkmark */
.checkmark {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: block;
  stroke-width: 2;
  stroke: var(--color-accent);
  stroke-miterlimit: 10;
  margin: 0 auto;
  box-shadow: inset 0px 0px 0px var(--color-accent);
  animation:
    fill 0.4s ease-in-out 0.4s forwards,
    scale 0.3s ease-in-out 0.9s both;
}

.checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2;
  stroke-miterlimit: 10;
  stroke: var(--color-accent);
  fill: none;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
  100% {
    stroke-dashoffset: 0;
  }
}
@keyframes scale {
  0%,
  100% {
    transform: none;
  }
  50% {
    transform: scale3d(1.1, 1.1, 1);
  }
}
@keyframes fill {
  100% {
    box-shadow: inset 0px 0px 0px 30px transparent;
  }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.mouse {
  width: 26px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  display: flex;
  justify-content: center;
}

.wheel {
  width: 4px;
  height: 8px;
  background-color: var(--color-text-white);
  border-radius: 2px;
  margin-top: 8px;
  animation: scroll 2s infinite;
}

@keyframes scroll {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(15px);
    opacity: 0;
  }
}

/* =========================================
   Section Formatting
   ========================================= */
.section-subtitle {
  display: block;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.section-title {
  margin-bottom: 2rem;
}

.separator-line {
  width: 60px;
  height: 2px;
  background-color: var(--color-accent);
  margin: 2rem auto;
}

/* =========================================
   Gallery Grid
   ========================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 350px;
  gap: 1.5rem;
  margin-top: 4rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

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

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 50%);
  display: flex;
  align-items: flex-end;
  padding: 2rem;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

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

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay h3 {
  color: var(--color-text-white);
  margin: 0;
  transform: translateY(20px);
  transition: transform var(--transition-normal);
}

.gallery-item:hover .gallery-overlay h3 {
  transform: translateY(0);
}

/* =========================================
   Highlight Section (Split Layout)
   ========================================= */
.highlight-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 80vh;
}

.highlight-image {
  position: relative;
}

.highlight-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.highlight-content {
  padding: 10% 12%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.1rem;
  color: var(--color-primary);
}

.feature-list svg {
  color: var(--color-accent);
}

/* =========================================
   Footer
   ========================================= */
.site-footer {
  background-color: var(--color-accent);
  color: var(--color-text-white);
  padding-top: 5rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
  height: 40px;
  margin-bottom: 1.5rem;
  filter: brightness(0) invert(1);
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  max-width: 300px;
}

.footer-links-group h4 {
  color: var(--color-text-white);
  margin-bottom: 1.5rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-links a,
.footer-links li {
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem var(--container-padding);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-legal {
  display: flex;
  gap: 2rem;
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.5);
}

.footer-legal a:hover {
  color: var(--color-text-white);
}

/* =========================================
   Animations
   ========================================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-in-up {
  animation: fadeInUp 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  opacity: 0;
}

.delay-1 {
  animation-delay: 0.3s;
}
.delay-2 {
  animation-delay: 0.6s;
}

/* Scroll trigger classes (added via JS) */
.js-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 1s ease-out,
    transform 1s ease-out;
}

.js-scroll.scrolled {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   Full Booking Form
   ========================================= */
.full-booking-form {
  background: var(--color-bg-white);
  padding: clamp(2rem, 5vw, 4rem);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.full-booking-form .form-row {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.full-booking-form .form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.full-booking-form label {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.full-booking-form input[type="text"],
.full-booking-form input[type="email"],
.full-booking-form input[type="tel"],
.full-booking-form input[type="date"],
.full-booking-form select,
.full-booking-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #e0e0e0;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text-main);
  background-color: var(--color-bg-white);
  transition: border-color var(--transition-fast);
  outline: none;
}

.full-booking-form textarea {
  resize: vertical;
}

.full-booking-form input:focus,
.full-booking-form select:focus,
.full-booking-form textarea:focus {
  border-color: var(--color-accent);
}

.checkbox-group {
  flex-direction: row !important;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 1.5rem;
}

.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--color-accent);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
}

.checkbox-group label {
  margin-bottom: 0;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  color: var(--color-text-main);
  cursor: pointer;
  line-height: 1.4;
}

/* =========================================
   Responsive Design
   ========================================= */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero-subtitle {
    margin: 0 auto;
  }

  .glass-panel {
    max-width: 600px;
    margin: 0 auto;
  }

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

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

  .highlight-section {
    grid-template-columns: 1fr;
  }

  .highlight-image {
    height: 50vh;
  }
}

@media (max-width: 768px) {
  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: right var(--transition-normal);
    z-index: 100;
  }

  .main-nav.active {
    right: 0;
  }

  .nav-list {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .nav-link {
    font-size: 1.5rem;
    color: var(--color-text-white) !important;
  }

  .nav-cta {
    display: none; /* Hide button in mobile header, maybe style differently inside menu */
  }

  .menu-toggle {
    display: flex;
  }

  /* Hamburger animation */
  .menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
    background-color: var(--color-text-white);
  }
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
    background-color: var(--color-text-white);
  }

  .site-header {
    padding: 15px 0;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-brand p {
    margin: 0 auto;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
  }
  .booking-form-horizontal {
    flex-direction: column;
  }

  .booking-bar {
    padding: 16px;
  }

  .full-booking-form {
    padding: 2rem 1.5rem;
  }

  .full-booking-form .form-row {
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .glass-panel {
    padding: 1.5rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 250px;
  }

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

  .highlight-content {
    padding: 15% 5%;
  }
}
