/* ============================================
   Rosa dei Venti - Vacation Home in Tuscany
   ============================================ */

:root {
  --navy: #1a2744;
  --navy-light: #2a3f6a;
  --blue: #3d6b99;
  --blue-light: #6b9fd4;
  --sand: #f5f0e8;
  --sand-dark: #e8dfd2;
  --cream: #faf8f4;
  --white: #ffffff;
  --text: #2c2c2c;
  --text-light: #6b6b6b;
  --gold: #c4a265;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
}

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

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

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

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

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: all 0.4s ease;
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 12px 0;
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

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

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--white);
  letter-spacing: 0.02em;
  transition: color 0.3s;
}

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

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

.nav-links a {
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.3s;
}

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

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

.nav-cta {
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  padding: 8px 20px !important;
  border-radius: 2px;
}

.nav.scrolled .nav-cta {
  border-color: var(--navy) !important;
  color: var(--navy) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 1.5px;
  background: var(--white);
  transition: all 0.3s;
}

.nav.scrolled .nav-toggle span { background: var(--navy); }

/* ---- Hero ---- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  animation: heroZoom 20s ease-in-out infinite alternate;
}

@keyframes heroZoom {
  from { transform: scale(1.05); }
  to { transform: scale(1.12); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(26, 39, 68, 0.4) 0%,
    rgba(26, 39, 68, 0.2) 40%,
    rgba(26, 39, 68, 0.5) 100%
  );
}

.hero-content {
  position: relative;
  text-align: center;
  color: var(--white);
  padding: 0 24px;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeUp 1s ease 0.3s forwards;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeUp 1s ease 0.5s forwards;
}

.hero-desc {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 300;
  font-style: italic;
  opacity: 0;
  animation: fadeUp 1s ease 0.7s forwards;
  margin-bottom: 36px;
}

.hero-btn {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 14px 40px;
  transition: all 0.3s;
  opacity: 0;
  animation: fadeUp 1s ease 0.9s forwards;
}

.hero-btn:hover {
  background: var(--white);
  color: var(--navy);
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero-scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.7), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.4; transform: scaleY(0.6); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Sections ---- */
.section {
  padding: 100px 0;
}

.section-tag {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.section-tag.center { text-align: center; }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--navy);
  margin-bottom: 24px;
}

.section-title.center { text-align: center; }

/* ---- About ---- */
.about { background: var(--white); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-image {
  position: relative;
  overflow: hidden;
}

.about-image img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.about-image::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 20px;
  right: -20px;
  bottom: -20px;
  border: 1px solid var(--gold);
  z-index: -1;
}

.about-text p {
  color: var(--text-light);
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.about-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 36px;
  padding-top: 36px;
  border-top: 1px solid var(--sand-dark);
}

.feature { text-align: center; }

.feature-number {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 300;
  color: var(--navy);
  line-height: 1;
}

.feature-label {
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

/* ---- Gallery ---- */
.gallery { background: var(--sand); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
}

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

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

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

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 20px 16px;
  background: linear-gradient(to top, rgba(26, 39, 68, 0.7), transparent);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

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

/* ---- Rooms ---- */
.rooms { background: var(--white); }

.rooms-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.room-card {
  background: var(--cream);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.room-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(26, 39, 68, 0.08);
}

.room-image {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.room-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s;
}

.room-card:hover .room-image img {
  transform: scale(1.04);
}

.room-info {
  padding: 24px;
}

.room-info h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 8px;
}

.room-info p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* ---- Amenities ---- */
.amenities {
  margin-top: 72px;
  padding-top: 72px;
  border-top: 1px solid var(--sand-dark);
}

.amenities-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--navy);
  text-align: center;
  margin-bottom: 36px;
}

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

.amenity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding: 24px 16px;
  background: var(--sand);
  transition: background 0.3s;
}

.amenity:hover { background: var(--sand-dark); }

.amenity svg {
  width: 28px;
  height: 28px;
  color: var(--blue);
}

.amenity span {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* ---- Location ---- */
.location { background: var(--sand); }

.location-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.location-text p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 32px;
}

.location-highlights {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.highlight {
  padding-left: 16px;
  border-left: 2px solid var(--gold);
}

.highlight strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 2px;
}

.highlight span {
  font-size: 0.88rem;
  color: var(--text-light);
}

.location-map {
  height: 450px;
  background: var(--sand-dark);
  overflow: hidden;
}

.location-map iframe {
  width: 100%;
  height: 100%;
}

/* ---- Contact ---- */
.contact {
  background: var(--navy);
  color: var(--white);
  text-align: center;
}

.contact .section-tag { color: var(--gold); }
.contact .section-title { color: var(--white); }

.contact-desc {
  max-width: 540px;
  margin: 0 auto 36px;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
}

.contact-alt {
  margin-top: 32px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
}

.contact-alt a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-alt a:hover { color: #d4b275; }

.btn {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 14px 36px;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
}

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

.btn-primary:hover {
  background: #d4b275;
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

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

/* ---- Footer ---- */
.footer {
  background: #131e33;
  color: rgba(255, 255, 255, 0.5);
  padding: 48px 0 24px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: start;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 8px;
}

.footer-address {
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  transition: color 0.3s;
}

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

.footer-bottom {
  padding-top: 24px;
  text-align: center;
  font-size: 0.75rem;
}

/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  transition: transform 0.3s;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: color 0.3s;
  font-family: var(--font-body);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { color: var(--white); }

.lightbox-close {
  top: 24px;
  right: 28px;
  font-size: 2.5rem;
  line-height: 1;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  padding: 16px;
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

/* ---- Language Switcher ---- */
.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.lang-switcher {
  display: flex;
  gap: 4px;
}

.lang-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  cursor: pointer;
  transition: all 0.3s;
  border-radius: 2px;
}

.lang-btn:hover {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.6);
}

.lang-btn.active {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.6);
}

.nav.scrolled .lang-btn {
  color: var(--text-light);
  border-color: var(--sand-dark);
}

.nav.scrolled .lang-btn:hover {
  color: var(--navy);
  border-color: var(--navy);
}

.nav.scrolled .lang-btn.active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

/* ---- Contact Form ---- */
.contact-form {
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group--full {
  margin-bottom: 24px;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 300;
  padding: 12px 16px;
  border-radius: 2px;
  transition: border-color 0.3s, background 0.3s;
  width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.form-group select option {
  background: var(--navy);
  color: var(--white);
}

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

.form-submit {
  width: 100%;
  margin-top: 8px;
  font-family: var(--font-body);
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-feedback {
  max-width: 640px;
  margin: 16px auto 0;
  padding: 0;
  font-size: 0.9rem;
  text-align: center;
  min-height: 24px;
}

.form-feedback--success {
  color: #7dd3a8;
}

.form-feedback--error {
  color: #f0a0a0;
}

/* ---- Reveal animations ---- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ---- Responsive ---- */

/* Tablet */
@media (max-width: 900px) {
  .about-grid,
  .location-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-image::after { display: none; }

  .about-image img { height: 350px; }

  .rooms-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .location-map { height: 350px; }
}

/* Mobile */
@media (max-width: 680px) {
  /* Nav: hamburger menu */
  .nav-inner {
    padding: 0 16px;
  }

  .nav-logo {
    font-size: 1.25rem;
  }

  .nav-right {
    gap: 12px;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    height: 100dvh;
    background: var(--white);
    flex-direction: column;
    padding: 80px 32px 32px;
    gap: 24px;
    transition: right 0.3s ease;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
    z-index: 200;
  }

  .nav-links.open { right: 0; }

  .nav-links a {
    color: var(--text) !important;
    font-size: 0.95rem;
  }

  .nav-toggle {
    display: flex;
    z-index: 201;
  }

  .nav-toggle.open span {
    background: var(--navy) !important;
  }

  .nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
  }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
  }

  /* Mobile overlay when menu is open */
  .nav-links.open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 280px;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
  }

  /* Hero adjustments */
  .hero {
    min-height: 100vh;
    min-height: 100dvh;
  }

  .hero-content {
    padding: 0 20px;
  }

  .hero-subtitle {
    font-size: 0.72rem;
    letter-spacing: 0.2em;
  }

  .hero-btn {
    padding: 12px 32px;
    font-size: 0.75rem;
  }

  .hero-scroll { display: none; }

  /* Sections */
  .section { padding: 60px 0; }

  .container { padding: 0 16px; }

  /* About */
  .about-image img { height: 260px; }

  .about-text p { font-size: 0.9rem; }

  .about-features {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .feature-number { font-size: 1.8rem; }

  /* Gallery: single column, always show captions */
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

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

  .gallery-item {
    aspect-ratio: 16/10;
  }

  .gallery-caption {
    transform: translateY(0);
    padding: 24px 16px 12px;
  }

  /* Rooms */
  .rooms-grid {
    gap: 16px;
  }

  .room-info {
    padding: 16px;
  }

  .room-info h3 { font-size: 1.15rem; }
  .room-info p { font-size: 0.85rem; }

  /* Amenities */
  .amenities {
    margin-top: 48px;
    padding-top: 48px;
  }

  .amenities-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .amenity {
    padding: 16px 12px;
  }

  .amenity span { font-size: 0.8rem; }

  /* Location */
  .location-map {
    height: 280px;
  }

  .highlight span { font-size: 0.82rem; }

  /* Contact */
  .contact-desc {
    font-size: 0.9rem;
    padding: 0 8px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 12px;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px; /* Prevents iOS zoom on focus */
    padding: 14px 16px;
  }

  .btn {
    padding: 14px 28px;
    font-size: 0.78rem;
  }

  /* Footer */
  .footer { padding: 36px 0 20px; }

  .footer-inner {
    flex-direction: column;
    gap: 24px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 16px;
  }

  /* Lightbox: swipe-friendly, no arrows */
  .lightbox-prev,
  .lightbox-next { display: none; }

  .lightbox-close {
    top: 16px;
    right: 16px;
    font-size: 2rem;
  }

  .lightbox-img {
    max-width: 95vw;
    max-height: 80vh;
  }

  /* Language switcher */
  .lang-switcher {
    order: -1;
  }

  .lang-btn {
    padding: 5px 9px;
    font-size: 0.68rem;
  }
}

/* Small phones */
@media (max-width: 380px) {
  .container { padding: 0 12px; }

  .hero-title {
    font-size: 2.4rem;
  }

  .about-features {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .amenities-grid {
    grid-template-columns: 1fr;
  }

  .nav-logo { font-size: 1.1rem; }

  .lang-btn {
    padding: 4px 6px;
    font-size: 0.62rem;
  }
}
