/* ==========================================================================
   L’Hortet — Delta del Ebro — estilos
   ========================================================================== */

:root{
  --bg: #faf7f1;
  --bg-alt: #f1ede2;
  --text: #2a2820;
  --text-muted: #6a6455;
  --text-dim: #8a836f;
  --accent: #5f7a45;
  --accent-strong: #4c6337;
  --terracotta: #b5502e;
  --line: rgba(42,40,32,0.12);
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --container: 1180px;
  --ease: cubic-bezier(.22,.8,.32,1);
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img{ max-width:100%; height:auto; display:block; }
a{ color: inherit; text-decoration: none; }
ul{ list-style:none; margin:0; padding:0; }
h1,h2,h3{ font-family: var(--serif); font-weight:600; line-height:1.15; margin:0; }
p{ margin:0; }
em{ color: var(--accent); font-style: normal; }

.container{ max-width: var(--container); margin:0 auto; padding: 0 32px; }

.skip-link{
  position:absolute; left:-999px; top:0; background:var(--accent); color:#fff;
  padding:12px 20px; z-index:999; font-weight:600;
}
.skip-link:focus{ left:16px; top:16px; }

/* ---------- Reveal defensive CSS ---------- */
.reveal{ opacity:0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible{ opacity:1; transform:none; }
.js-ready .reveal{ opacity:0; transform: translateY(24px); }
.js-ready .reveal.is-visible{ opacity:1; transform:none; }

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding: 15px 30px; border-radius: 3px; font-weight:600; font-size: .95rem;
  letter-spacing: .01em; border:1px solid transparent; cursor:pointer;
  transition: transform .35s var(--ease), background .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
}
.btn-primary{ background: var(--accent); color:#fff; }
.btn-primary:hover{ background: var(--accent-strong); transform: translateY(-2px); }
.btn-ghost{ border-color: rgba(255,255,255,0.55); color: #fff; }
.btn-ghost:hover{ border-color: #fff; background: rgba(255,255,255,0.12); transform: translateY(-2px); }
.btn-outline{ border-color: var(--line); color: var(--text); width:100%; }
.btn-outline:hover{ border-color: var(--accent); color: var(--accent); }
.btn-small{ padding: 10px 20px; font-size: .85rem; }
.btn-full{ width:100%; }

/* ---------- Header ---------- */
.site-header{
  position: fixed; top:0; left:0; right:0; z-index: 200;
  background: transparent;
  transition: background .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header::before{
  content:''; position:absolute; top:0; left:0; right:0; height:180px;
  background: linear-gradient(180deg, rgba(8,12,6,.62) 0%, rgba(8,12,6,.32) 45%, rgba(8,12,6,0) 100%);
  z-index:-1; pointer-events:none; opacity:1; transition: opacity .4s var(--ease);
}
.site-header.scrolled{
  background: rgba(250,247,241,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header.scrolled::before{ opacity:0; }
.site-header.scrolled .main-nav a{ color: var(--text-muted); }
.site-header.scrolled .logo{ color: var(--text); }
.header-inner{
  max-width: var(--container); margin:0 auto; padding: 20px 32px;
  display:flex; align-items:center; justify-content:space-between; gap: 24px;
}
.logo{ font-family: var(--serif); font-size: 1.25rem; letter-spacing: .01em; white-space:nowrap; color:#fff; transition: color .3s; }
.logo-accent{ color: var(--accent); }
.site-header.scrolled .logo-accent{ color: var(--accent-strong); }
.site-footer .logo{ color: var(--text); }
.site-footer .logo-accent{ color: var(--accent-strong); }
.main-nav{ display:flex; gap: 26px; flex:1; justify-content:center; }
.main-nav a{ font-size:.92rem; color: rgba(255,255,255,0.85); position:relative; padding: 4px 0; transition: color .3s; }
.main-nav a:hover{ color: var(--accent); }
.header-cta{ white-space:nowrap; }

.lang-switch{ display:flex; align-items:center; gap:6px; font-size:.82rem; color: rgba(255,255,255,0.7); }
.lang-switch a{ color: rgba(255,255,255,0.7); transition: color .3s; }
.lang-switch a:hover, .lang-switch a.active{ color:#fff; font-weight:700; }
.site-header.scrolled .lang-switch, .site-header.scrolled .lang-switch a{ color: var(--text-dim); }
.site-header.scrolled .lang-switch a:hover, .site-header.scrolled .lang-switch a.active{ color: var(--text); }
.lang-switch span{ opacity:.5; }
.lang-switch-mobile{ color: var(--text-dim); }
.lang-switch-mobile a{ color: var(--text-dim); }
.lang-switch-mobile a:hover, .lang-switch-mobile a.active{ color: var(--text); }

.nav-toggle{
  display:none; flex-direction:column; justify-content:center; gap:5px;
  width:40px; height:40px; background:none; border:none; cursor:pointer; padding:0;
}
.nav-toggle span{ width:22px; height:1.5px; background: #fff; transition: transform .3s var(--ease), opacity .3s var(--ease); margin:0 auto; }
.site-header.scrolled .nav-toggle span{ background: var(--text); }
.nav-toggle.open span:nth-child(1){ transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2){ opacity:0; }
.nav-toggle.open span:nth-child(3){ transform: translateY(-6.5px) rotate(-45deg); }

.mobile-nav{
  position: fixed; inset:0; z-index:210; background: var(--bg);
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap: 28px;
  transform: translateY(-100%); visibility:hidden;
  transition: transform .45s var(--ease), visibility 0s linear .45s;
}
.mobile-nav.open{ transform: translateY(0); visibility:visible; transition: transform .45s var(--ease), visibility 0s linear 0s; }
.mobile-nav nav{ display:flex; flex-direction:column; align-items:center; gap:22px; }
.mobile-nav a{ font-family: var(--serif); font-size: 1.6rem; color: var(--text); }

/* ---------- Hero ---------- */
.hero{
  position:relative; min-height: 100vh; display:flex; flex-direction:column;
  align-items:center; justify-content:center; text-align:center; overflow:hidden;
  padding: 140px 24px 80px;
}
.hero-bg{ position:absolute; inset:0; z-index:0; background:#111; }
.hero-bg video, .hero-bg img{
  width:100%; height:100%; object-fit:cover; position:absolute; inset:0;
}
.hero-bg video{ z-index:1; }
.hero-bg img{ z-index:0; }
.hero-scrim{
  position:absolute; inset:0; z-index:2;
  background: linear-gradient(180deg, rgba(15,20,10,.6) 0%, rgba(15,20,10,.66) 55%, rgba(15,20,10,.82) 100%);
}
.hero-content{ position:relative; z-index:3; max-width: 840px; }
.eyebrow{
  text-transform: uppercase; letter-spacing: .16em; font-size: .82rem; font-weight:700;
  color: var(--accent-strong); margin-bottom: 18px; display:inline-flex; align-items:center; gap:10px;
}
.eyebrow::before{
  content:''; display:inline-block; width:22px; height:2px; background: currentColor; flex:none;
}
.hero .eyebrow, .cta-section .eyebrow{ color: #c9dba8; }
.hero-title{ font-size: clamp(2.4rem, 6vw, 4.4rem); margin-bottom: 26px; color:#fff; }
.hero-title .line{ display:block; overflow:hidden; }
.hero-title .split{ display:inline-block; }
.hero-title .hero-brand{ color: #fff; }
.hero-sub{
  font-size: clamp(1rem, 1.6vw, 1.2rem); color: rgba(255,255,255,0.88); max-width: 640px;
  margin: 0 auto 36px; line-height:1.65;
}
.hero-actions{ display:flex; gap:16px; justify-content:center; flex-wrap:wrap; margin-bottom: 40px; }
.hero-tags{ display:flex; gap: 14px; justify-content:center; flex-wrap:wrap; }
.hero-tags span{
  font-size: .78rem; letter-spacing:.05em; text-transform:uppercase; color: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.35); padding: 8px 16px; border-radius: 3px;
}

.scroll-cue{
  position:absolute; bottom: 34px; left:50%; transform: translateX(-50%); z-index:3;
  width: 1px; height: 46px; background: rgba(255,255,255,0.3); overflow:hidden;
}
.scroll-cue span{
  position:absolute; top:-46px; left:0; width:100%; height:100%; background: var(--accent);
  animation: scrollcue 2.2s ease-in-out infinite;
}
@keyframes scrollcue{ 0%{ top:-46px; } 60%{ top:100%; } 100%{ top:100%; } }

/* ---------- Marquee ---------- */
.marquee{
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  overflow:hidden; padding: 18px 0; background: var(--bg-alt);
}
.marquee-track{ display:flex; gap: 0; white-space:nowrap; width:max-content; animation: marquee 30s linear infinite; }
.marquee-group{ display:flex; gap: 24px; padding-right: 24px; }
.marquee-track span{ font-family: var(--serif); font-size: 1.3rem; color: var(--text-muted); letter-spacing:.04em; }
.marquee-group span:nth-child(4n-1){ color: var(--accent-strong); }
@keyframes marquee{ from{ transform: translateX(0); } to{ transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section{ padding: 110px 0; position:relative; }
.section-alt{ background: var(--bg-alt); }
.section-head{ max-width: 680px; margin-bottom: 20px; }
.section-head.center{ margin-left:auto; margin-right:auto; text-align:center; }
.section-head h2{ font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin: 10px 0 18px; }
.section-lead{ color: var(--text-muted); font-size: 1.02rem; margin-top: 14px; }

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

.masia-media{ border-radius: 4px; overflow:hidden; aspect-ratio: 4/3.2; }
.masia-media img{ width:100%; height:100%; object-fit:cover; }
.check-list{ margin-top: 26px; display:flex; flex-direction:column; gap: 18px; }
.check-list li{ padding-left: 30px; position:relative; color: var(--text-muted); }
.check-list li strong{ color: var(--text); }
.check-list li::before{ content:'\2014'; position:absolute; left:0; top:0; color: var(--accent); font-weight:700; }

/* ---------- Video showcase ---------- */
.video-showcase{ background: var(--bg-alt); padding: 72px 0; }
.video-grid{ gap: 48px; align-items: center; }
.video-grid .section-head{ margin-bottom: 0; max-width: 520px; }
.video-frame{
  width: 100%; max-width: 340px; margin: 0 0 0 auto; border-radius: 12px; overflow:hidden;
  box-shadow: 0 30px 60px -20px rgba(42,40,32,.35); border: 1px solid var(--line);
  background: #000;
}
.video-frame video{ width:100%; aspect-ratio: 9/16; display:block; background:#000; }

/* ---------- Gallery ---------- */
.gallery-cat{
  font-family: var(--serif); font-size: 1.15rem; color: var(--text);
  margin: 56px 0 0; padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.gallery-cat:first-of-type{ margin-top: 24px; }

.photo-carousel{
  position:relative; margin-top: 22px; border-radius: 4px; overflow:hidden;
  aspect-ratio: 16/9; background: var(--bg-alt);
}
.photo-carousel-track{ display:flex; height:100%; transition: transform .45s var(--ease); }
.photo-carousel-slide{ flex: 0 0 100%; height:100%; }
.photo-carousel-slide img{ width:100%; height:100%; object-fit:cover; display:block; }

.photo-carousel-arrow{
  position:absolute; top:50%; transform: translateY(-50%); z-index:2;
  width:44px; height:44px; border-radius:50%; border:none; cursor:pointer;
  background: rgba(255,255,255,0.85); color: var(--text);
  display:flex; align-items:center; justify-content:center;
  transition: background .25s, transform .25s;
}
.photo-carousel-arrow:hover{ background:#fff; transform: translateY(-50%) scale(1.06); }
.photo-carousel-arrow svg{ width:20px; height:20px; }
.photo-carousel-prev{ left:14px; }
.photo-carousel-next{ right:14px; }

/* ---------- Amenities ---------- */
.amenities-group{ margin-top: 46px; }
.amenities-group:first-of-type{ margin-top: 50px; }
.amenities-group-title{
  font-family: var(--serif); font-size: 1.1rem; font-weight:600; color: var(--accent-strong);
  margin: 0 0 20px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.amenities-grid{
  display:grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
}
.amenity{
  display:flex; align-items:center; gap:16px;
  padding: 16px 20px; border: 1px solid var(--line); border-radius: 8px;
  font-weight:500; font-size:.95rem; background: var(--bg);
  transition: border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
}
.amenity:hover{
  border-color: var(--accent); transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(42,40,32,0.09); background:#fff;
}
.amenity-icon{
  flex: none; width:42px; height:42px; border-radius:50%;
  background: var(--bg-alt); color: var(--accent-strong);
  display:flex; align-items:center; justify-content:center;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.amenity:hover .amenity-icon{ background: var(--accent); color:#fff; }
.amenity-icon svg{ width:21px; height:21px; }

/* ---------- Testimonials ---------- */
.testimonial-grid{ display:grid; grid-template-columns: repeat(2,1fr); gap: 26px; margin-top: 50px; }
.testimonial-card{
  background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 30px; margin:0;
}
.testimonial-card p{ font-family: var(--serif); font-size: 1.05rem; line-height:1.55; color: var(--text); margin-bottom: 18px; }
.testimonial-card footer{ color: var(--accent); font-weight:600; font-size:.9rem; }

.address-line{ margin-top: 18px; font-size: 1rem; color: var(--text); }
.address-line strong{ color: var(--accent-strong); }

/* ---------- Map ---------- */
.map-embed{ position:relative; border-radius: 4px; overflow:hidden; aspect-ratio: 4/3.2; border: 1px solid var(--line); }
.map-open-link{
  position:absolute; right:14px; bottom:14px; z-index:2;
  background: #fff; color: var(--text); font-size:.82rem; font-weight:600;
  padding: 10px 16px; border-radius: 30px; box-shadow: 0 6px 18px rgba(0,0,0,.25);
  transition: background .3s, color .3s;
}
.map-open-link:hover{ background: var(--accent); color:#fff; }

/* ---------- CTA / Contact ---------- */
.cta-section{ position:relative; }
.cta-bg{ position:absolute; inset:0; z-index:0; overflow:hidden; }
.cta-bg img{ width:100%; height:100%; object-fit:cover; }
.cta-section .container{ position:relative; z-index:1; }
.cta-section .eyebrow{ color: #c9dba8; }
.cta-section h2{ color:#fff; }
.cta-section .section-lead{ color: rgba(255,255,255,0.85); }
.contact-direct{ display:flex; flex-direction:column; gap: 14px; margin-top: 34px; }
.contact-direct a{
  font-family: var(--serif); font-size: 1.3rem; color: #fff; border-bottom: 1px solid rgba(255,255,255,0.3);
  padding-bottom: 10px; width: fit-content; transition: color .3s, border-color .3s;
}
.contact-direct a:hover{ color: var(--accent); border-color: var(--accent); }

.contact-form{
  background: rgba(250,247,241,.96); border: 1px solid var(--line);
  border-radius: 5px; padding: 36px; display:flex; flex-direction:column; gap: 18px;
}
.form-fields{ display:flex; flex-direction:column; gap: 18px; }
.form-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-row{ display:flex; flex-direction:column; gap: 8px; }
.form-row label{ font-size: .82rem; color: var(--text-muted); }
.form-row input:not(.iti__tel-input), .form-row textarea{
  background: #fff; border: 1px solid var(--line); border-radius: 3px;
  padding: 12px 14px; color: var(--text); font-family: var(--sans); font-size: .95rem;
  transition: border-color .3s;
}
.form-row input:not(.iti__tel-input):focus, .form-row textarea:focus{ outline:none; border-color: var(--accent); }
.form-row textarea{ resize: vertical; }
.form-note{ font-size: .78rem; color: var(--text-dim); text-align:center; }

/* intl-tel-input — tema L’Hortet */
.contact-form .iti{
  --iti-border-color: var(--line);
  --iti-hover-color: rgba(95,122,69,.08);
  --iti-dropdown-bg: #fff;
  --iti-arrow-color: var(--text-muted);
  --iti-dialcode-color: var(--text-muted);
  display:block; width:100%;
}
.contact-form .iti__country-container{ z-index: 2; }
.contact-form .iti__tel-input{
  width:100%;
  background:#fff; border:1px solid var(--line); border-radius:3px;
  color:var(--text); font-family:var(--sans); font-size:.95rem;
  padding: 12px 14px;
  transition:border-color .3s;
}
.contact-form .iti__tel-input:focus{ outline:none; border-color:var(--accent); }
.contact-form .iti__selected-country{
  display:flex; align-items:center; gap:0;
  background:transparent; border:0; border-radius:0;
  padding: 0 10px 0 2px;
}
.contact-form .iti__selected-country-primary{
  padding: 0 8px 0 6px;
  border-right: 1px solid var(--line);
}
.contact-form .iti .iti__selected-dial-code{
  margin-left: 8px;
  padding-right: 2px;
  color: var(--text-muted);
  font-size: .95rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.contact-form .iti__selected-country:hover,
.contact-form .iti__selected-country:focus{ background:transparent; }
.contact-form .iti__selected-country-primary:hover,
.contact-form .iti--allow-dropdown .iti__country-container:not(:has(+ input[disabled])):not(:has(+ input[readonly])) .iti__selected-country-primary:hover{
  background: var(--bg-alt);
}
.contact-form .iti__dropdown-content{
  border:1px solid var(--line); border-radius:4px;
  box-shadow:0 16px 40px -12px rgba(42,40,32,.25);
}
.contact-form .iti__search-input{
  padding:10px 12px; border-bottom:1px solid var(--line);
  font-family:var(--sans); font-size:.9rem;
}

/* ---------- Footer ---------- */
.site-footer{ border-top: 1px solid var(--line); padding: 60px 0 40px; text-align:center; background: var(--bg-alt); }
.footer-inner{ display:flex; flex-direction:column; align-items:center; gap: 14px; }
.footer-tagline{ color: var(--text-muted); font-size: .92rem; max-width: 400px; }
.footer-contact{ display:flex; gap: 22px; font-size: .88rem; color: var(--text-muted); margin: 10px 0; }
.footer-contact a:hover{ color: var(--accent); }
.footer-copy{ color: var(--text-muted); font-size: .78rem; margin-top: 20px; max-width: 560px; }
.footer-links{ display:flex; flex-wrap:wrap; gap: 8px 18px; justify-content:center; font-size:.9rem; }
.footer-links a{ color: var(--text-muted); }
.footer-links a:hover{ color: var(--accent-strong); }
.legal-page{ padding: 140px 0 80px; }
.legal-page h1{ margin-bottom: 24px; }
.legal-page h2{ margin: 32px 0 12px; font-size: 1.3rem; }
.legal-page p, .legal-page li{ color: var(--text-muted); margin-bottom: 14px; max-width: 720px; }
.legal-page ul{ padding-left: 20px; list-style: disc; }

/* ---------- Responsive ---------- */
@media (max-width: 980px){
  .main-nav, .header-cta{ display:none; }
  .nav-toggle{ display:flex; }
  .grid-2{ grid-template-columns: 1fr; }
  .photo-carousel{ aspect-ratio: 4/3; }
  .testimonial-grid{ grid-template-columns: 1fr; }
  .section{ padding: 80px 0; }
  .video-showcase{ padding: 64px 0; }
  .video-frame{ max-width: 320px; margin: 0 auto; }
  .form-grid{ grid-template-columns: 1fr; }
}
@media (max-width: 560px){
  .header-inner{ padding: 16px 20px; }
  .hero{ padding-top: 120px; }
  .hero-title{ font-size: clamp(2rem, 9vw, 2.6rem); }
  .contact-form{ padding: 26px 22px; }
  .photo-carousel{ aspect-ratio: 1/1; }
  .photo-carousel-arrow{ width:38px; height:38px; }
  .photo-carousel-arrow svg{ width:16px; height:16px; }
  .photo-carousel-prev{ left:8px; }
  .photo-carousel-next{ right:8px; }
  .amenities-grid{ grid-template-columns: 1fr; }
  .amenity{ padding: 14px 16px; gap:12px; }
  .amenity-icon{ width:38px; height:38px; }
  .amenity-icon svg{ width:19px; height:19px; }
}

@media (prefers-reduced-motion: reduce){
  .marquee-track{ animation-duration: 60s; }
  .scroll-cue span{ animation: none; }
  html{ scroll-behavior:auto; }
}
