/* ============================================
   TVCC — Timeless Vacations Cape Charles
   Design Tokens & Component Styles
   ============================================ */

:root {
  /* Type Scale */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transition */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;

  /* Fonts */
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Satoshi', 'Inter', sans-serif;
}

/* ============================================
   Color Palette — Coastal Cape Charles
   Deep ocean navy from logo + warm sand neutrals
   ============================================ */

:root, [data-theme="light"] {
  --color-bg:             #faf9f6;
  --color-surface:        #ffffff;
  --color-surface-2:      #f5f3ef;
  --color-surface-offset: #efeee9;
  --color-divider:        #e0ddd6;
  --color-border:         #d4d0c8;

  --color-text:           #1a1a1a;
  --color-text-muted:     #5c6066;
  --color-text-faint:     #9ca3af;
  --color-text-inverse:   #faf9f6;

  /* Primary — Deep ocean navy from logo */
  --color-primary:        #1b4d6e;
  --color-primary-hover:  #143d58;
  --color-primary-active: #0e2d42;
  --color-primary-light:  #e8f0f6;

  /* Accent — Sandy warm */
  --color-accent:         #c4956a;
  --color-accent-hover:   #b07f55;
  --color-accent-light:   #faf0e6;

  /* Success / Rating */
  --color-success:        #2d7a3a;
  --color-star:           #d4a017;

  --shadow-sm: 0 1px 2px rgba(27,77,110,0.06);
  --shadow-md: 0 4px 12px rgba(27,77,110,0.08);
  --shadow-lg: 0 12px 32px rgba(27,77,110,0.12);
}

[data-theme="dark"] {
  --color-bg:             #0f1419;
  --color-surface:        #1a2029;
  --color-surface-2:      #212833;
  --color-surface-offset: #171d25;
  --color-divider:        #2a3140;
  --color-border:         #3a4250;

  --color-text:           #e0e4ea;
  --color-text-muted:     #8a92a1;
  --color-text-faint:     #5a6070;
  --color-text-inverse:   #0f1419;

  --color-primary:        #5a9ec4;
  --color-primary-hover:  #7bb4d4;
  --color-primary-active: #3d86b0;
  --color-primary-light:  #1e2d3a;

  --color-accent:         #d4a87a;
  --color-accent-hover:   #e0b88d;
  --color-accent-light:   #2a2219;

  --color-success:        #4aaa58;
  --color-star:           #e8b830;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:             #0f1419;
    --color-surface:        #1a2029;
    --color-surface-2:      #212833;
    --color-surface-offset: #171d25;
    --color-divider:        #2a3140;
    --color-border:         #3a4250;
    --color-text:           #e0e4ea;
    --color-text-muted:     #8a92a1;
    --color-text-faint:     #5a6070;
    --color-text-inverse:   #0f1419;
    --color-primary:        #5a9ec4;
    --color-primary-hover:  #7bb4d4;
    --color-primary-active: #3d86b0;
    --color-primary-light:  #1e2d3a;
    --color-accent:         #d4a87a;
    --color-accent-hover:   #e0b88d;
    --color-accent-light:   #2a2219;
    --color-success:        #4aaa58;
    --color-star:           #e8b830;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.4);
  }
}

/* ============================================
   Global Layout
   ============================================ */

.container {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.container--narrow {
  max-width: var(--content-default);
}

/* ============================================
   Header / Nav
   ============================================ */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-divider);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-3);
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
}

.header__logo img {
  height: 44px;
  width: auto;
}

.header__logo-text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
  color: var(--color-primary);
}

.header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.header__nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.header__nav a:hover {
  color: var(--color-primary);
}

.header__nav a.active {
  color: var(--color-primary);
}

.theme-toggle {
  padding: var(--space-2);
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
}

.theme-toggle:hover {
  background: var(--color-surface-2);
  color: var(--color-text);
}

/* Mobile nav */
.mobile-menu-btn {
  display: none;
  padding: var(--space-2);
  color: var(--color-text);
}

@media (max-width: 768px) {
  .mobile-menu-btn { display: flex; }
  .header__nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-divider);
    padding: var(--space-4);
    gap: var(--space-4);
  }
  .header__nav.open { display: flex; }
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
  position: relative;
  min-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-primary);
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.35;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, 
    rgba(15,20,25,0.2) 0%, 
    rgba(15,20,25,0.5) 50%, 
    rgba(15,20,25,0.8) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-8) var(--space-4);
  max-width: 800px;
}

.hero__logo {
  width: 120px;
  height: auto;
  margin: 0 auto var(--space-6);
  filter: brightness(0) invert(1);
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  color: #ffffff;
  margin-bottom: var(--space-4);
  font-weight: 400;
  font-style: italic;
}

.hero__subtitle {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.85);
  margin-bottom: var(--space-8);
  font-weight: 300;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-accent);
  color: #ffffff;
  padding: var(--space-3) var(--space-8);
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero__cta:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* ============================================
   Section Layouts
   ============================================ */

.section {
  padding-block: clamp(var(--space-12), 6vw, var(--space-24));
}

.section--alt {
  background: var(--color-surface-2);
}

.section__header {
  text-align: center;
  margin-bottom: clamp(var(--space-8), 4vw, var(--space-16));
}

.section__label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-2);
}

.section__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--color-text);
  font-weight: 400;
  font-style: italic;
}

.section__desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 60ch;
  margin-inline: auto;
  margin-top: var(--space-4);
}

/* ============================================
   Property Cards (Homepage Grid)
   ============================================ */

.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: var(--space-6);
}

.property-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}

.property-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.property-card__image {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.property-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.property-card:hover .property-card__image img {
  transform: scale(1.05);
}

.property-card__badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  background: var(--color-primary);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

.property-card__rating {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 4px;
}

.property-card__body {
  padding: var(--space-5);
}

.property-card__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin-bottom: var(--space-1);
  font-weight: 400;
  font-style: italic;
}

.property-card__location {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.property-card__meta {
  display: flex;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.property-card__meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.property-card__highlights {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.property-card__highlight {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 2px var(--space-2);
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: var(--radius-full);
}

/* ============================================
   About / Cape Charles Section
   ============================================ */

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

@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; }
}

.about-grid__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
}

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

.about-grid__content h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-style: italic;
  margin-bottom: var(--space-4);
}

.about-grid__content p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  line-height: 1.7;
}

/* ============================================
   Features Row
   ============================================ */

.features-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-6);
  text-align: center;
}

.feature-item {
  padding: var(--space-6);
}

.feature-item__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-4);
  color: var(--color-primary);
}

.feature-item__title {
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
}

.feature-item__desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  max-width: 28ch;
  margin-inline: auto;
}

/* ============================================
   Property Detail Page
   ============================================ */

.detail-hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--color-primary);
}

.detail-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.5;
}

.detail-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 60%);
}

.detail-hero__content {
  position: relative;
  z-index: 2;
  padding: var(--space-8) var(--space-4);
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
}

.detail-hero__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: #fff;
  font-style: italic;
  margin-bottom: var(--space-2);
}

.detail-hero__subtitle {
  font-size: var(--text-base);
  color: rgba(255,255,255,0.8);
  margin-bottom: var(--space-3);
}

.detail-hero__meta {
  display: flex;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.9);
  flex-wrap: wrap;
}

.detail-hero__meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Photo Gallery */
.gallery {
  padding-block: var(--space-8);
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.gallery__grid .gallery__item:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery__item {
  aspect-ratio: 4/3;
  overflow: hidden;
  cursor: pointer;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery__item:hover img {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .gallery__grid {
    grid-template-columns: 1fr 1fr;
  }
  .gallery__grid .gallery__item:first-child {
    grid-column: span 2;
    grid-row: span 1;
  }
}

/* Detail Content Layout */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: var(--space-8);
  align-items: start;
}

@media (max-width: 900px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }
}

/* Description */
.detail-section {
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--color-divider);
  margin-bottom: var(--space-8);
}

.detail-section:last-child {
  border-bottom: none;
}

.detail-section h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-style: italic;
  margin-bottom: var(--space-4);
}

.detail-section p {
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-3);
}

/* Amenities Grid */
.amenities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-3);
}

.amenity-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.amenity-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-primary);
}

/* Booking Sidebar */
.booking-card {
  position: sticky;
  top: calc(70px + var(--space-4));
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-divider);
}

.booking-card__rating {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
}

.booking-card__rating .stars {
  color: var(--color-star);
}

.booking-card__info {
  margin-bottom: var(--space-6);
}

.booking-card__info-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-3) 0;
  font-size: var(--text-sm);
  border-bottom: 1px solid var(--color-divider);
}

.booking-card__info-row:last-child {
  border-bottom: none;
}

.booking-card__info-label {
  color: var(--color-text-muted);
}

.booking-card__info-value {
  font-weight: 600;
}

.booking-card__cta {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--color-primary);
  color: #ffffff;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.booking-card__cta:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.booking-card__note {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-align: center;
  margin-top: var(--space-3);
}

/* House Rules */
.rules-list {
  list-style: none;
  padding: 0;
}

.rules-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-divider);
}

.rules-list li:last-child {
  border-bottom: none;
}

.rules-list li svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--color-primary);
  margin-top: 2px;
}

/* ============================================
   Footer
   ============================================ */

.footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.85);
  padding-block: var(--space-12);
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-8);
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

@media (max-width: 768px) {
  .footer__inner { grid-template-columns: 1fr; }
}

.footer__brand img {
  height: 60px;
  width: auto;
  filter: brightness(0) invert(1);
  margin-bottom: var(--space-4);
}

.footer__brand p {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.6);
  max-width: 36ch;
  line-height: 1.6;
}

.footer__col h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-4);
  color: rgba(255,255,255,0.5);
}

.footer__col a {
  display: block;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: var(--text-sm);
  padding-block: var(--space-1);
}

.footer__col a:hover {
  color: #ffffff;
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  text-align: center;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.footer__bottom p {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.4);
  max-width: none;
}

/* ============================================
   Lightbox
   ============================================ */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.92);
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.lightbox__close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  color: #fff;
  font-size: 2rem;
  padding: var(--space-2);
  z-index: 101;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 2rem;
  padding: var(--space-4);
  z-index: 101;
}

.lightbox__nav--prev { left: var(--space-4); }
.lightbox__nav--next { right: var(--space-4); }

/* ============================================
   Scroll Animations
   ============================================ */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Back to top link
   ============================================ */

.back-to-top {
  text-align: center;
  padding-block: var(--space-6);
}

.back-to-top a {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  text-decoration: none;
}

.back-to-top a:hover {
  color: var(--color-primary);
}
