/* ============================================================
   Villa Torre delle Stelle — toro.moretti.li
   Mediterranean luxury palette · light, airy, editorial
   ============================================================ */

:root {
  --sand:    #f6f1e7;
  --sand-2:  #efe7d6;
  --ink:     #1f2a2e;
  --ink-soft:#46555a;
  --sea:     #1c6b80;
  --sea-deep:#0f4756;
  --gold:    #c9a14a;
  --white:   #ffffff;
  --line:    rgba(31,42,46,.12);
  --shadow:  0 18px 50px rgba(15,71,86,.14);
  --r:       14px;
  --maxw:    1160px;
  --serif:   "Cormorant Garamond", Georgia, serif;
  --sans:    "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--sand);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.9rem); }

p { margin: 0 0 1rem; }

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

a { color: inherit; text-decoration: none; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .72rem;
  font-weight: 600;
  color: var(--sea);
  margin: 0 0 1rem;
}

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: .85rem 1.7rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: .95rem;
  letter-spacing: .02em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--sea); color: var(--white); }
.btn-primary:hover { background: var(--sea-deep); box-shadow: var(--shadow); }
.btn-light { background: var(--white); color: var(--ink); }
.btn-light:hover { box-shadow: var(--shadow); }

/* ── Header ──────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .9rem clamp(1rem, 4vw, 2.4rem);
  background: rgba(246,241,231,.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .55rem; font-family: var(--serif); font-size: 1.25rem; font-weight: 600; }
.brand-mark { color: var(--gold); }
.brand-name { white-space: nowrap; }
.main-nav { display: flex; gap: 1.6rem; margin-inline-start: auto; font-size: .95rem; }
.main-nav a { color: var(--ink-soft); position: relative; }
.main-nav a:hover { color: var(--ink); }
.main-nav a::after { content:""; position:absolute; left:0; bottom:-4px; width:0; height:1.5px; background:var(--gold); transition:width .25s; }
.main-nav a:hover::after { width:100%; }
.header-actions { display: flex; align-items: center; gap: 1rem; }

/* ── Language switcher ───────────────────────────────── */
.lang-switch { position: relative; }
.lang-current {
  display: flex; align-items: center; gap: .4rem;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 999px; padding: .45rem .8rem; cursor: pointer;
  font: inherit; font-size: .85rem; font-weight: 500;
}
.lang-menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + .5rem);
  list-style: none; margin: 0; padding: .4rem;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow);
  min-width: 170px; display: none;
}
.lang-menu.open { display: block; }
.lang-menu button {
  width: 100%; text-align: start; background: none; border: 0;
  padding: .55rem .7rem; border-radius: 8px; cursor: pointer;
  font: inherit; font-size: .9rem;
}
.lang-menu button:hover { background: var(--sand-2); }

/* ── Hero ────────────────────────────────────────────── */
.hero {
  position: relative; height: min(92vh, 760px);
  display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: hidden; color: var(--white);
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,71,86,.35) 0%, rgba(15,71,86,.55) 100%); }
.hero-content { position: relative; z-index: 2; max-width: 760px; padding: 0 1.4rem; }
.hero-content .eyebrow { color: rgba(255,255,255,.85); }
.hero-content h1 { color: var(--white); text-shadow: 0 2px 24px rgba(0,0,0,.25); }
.hero-sub { font-size: clamp(1.05rem, 2vw, 1.35rem); margin: 1.2rem auto 2rem; max-width: 560px; color: rgba(255,255,255,.92); font-weight: 300; }
.hero-scroll { position: absolute; bottom: 1.4rem; left: 50%; transform: translateX(-50%); z-index: 2; font-size: 1.4rem; opacity: .8; animation: bob 2s infinite; }
@keyframes bob { 0%,100%{transform:translate(-50%,0)} 50%{transform:translate(-50%,8px)} }

/* ── Sections ────────────────────────────────────────── */
.section { padding: clamp(3.5rem, 8vw, 7rem) clamp(1rem, 5vw, 2rem); max-width: var(--maxw); margin: 0 auto; }
.section-head { max-width: 620px; margin-bottom: 2.6rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-lead { color: var(--ink-soft); font-size: 1.08rem; }

.about-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.about-text p { color: var(--ink-soft); font-size: 1.06rem; }
.about-figure { margin: 0; }
.about-figure img { border-radius: var(--r); box-shadow: var(--shadow); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.about-figure figcaption { margin-top: .8rem; font-size: .85rem; color: var(--ink-soft); text-align: center; font-style: italic; }

/* ── Amenities ───────────────────────────────────────── */
.amenities { background: var(--sand-2); max-width: none; }
.amenities > * { max-width: var(--maxw); margin-inline: auto; }
.amenity-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
}
.amenity-grid li {
  background: var(--white); border-radius: var(--r); padding: 1.6rem 1.2rem;
  display: flex; flex-direction: column; gap: .6rem; align-items: center; text-align: center;
  font-size: .98rem; color: var(--ink-soft); box-shadow: 0 6px 20px rgba(15,71,86,.06);
}
.amenity-icon { font-size: 1.7rem; }

/* ── Gallery ─────────────────────────────────────────── */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gallery-grid figure { margin: 0; overflow: hidden; border-radius: var(--r); aspect-ratio: 4/3; cursor: pointer; box-shadow: 0 6px 20px rgba(15,71,86,.08); }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-grid figure:hover img { transform: scale(1.06); }
.gallery-empty { text-align: center; color: var(--ink-soft); font-style: italic; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(15,30,34,.92); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox-img { max-width: 90vw; max-height: 86vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 52px; height: 52px; border-radius: 50%; font-size: 1.8rem; cursor: pointer; transition: background .2s; }
.lightbox button:hover { background: rgba(255,255,255,.28); }
.lightbox-close { top: 1.4rem; inset-inline-end: 1.4rem; }
.lightbox-prev { inset-inline-start: 1.4rem; }
.lightbox-next { inset-inline-end: 1.4rem; }

/* ── Contact ─────────────────────────────────────────── */
.contact-form { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.contact-form input, .contact-form textarea {
  font: inherit; padding: .9rem 1.1rem; border: 1px solid var(--line);
  border-radius: 10px; background: var(--white); color: var(--ink); resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--sea); box-shadow: 0 0 0 3px rgba(28,107,128,.15); }
.contact-form .btn { align-self: flex-start; }
.form-note { font-size: .9rem; margin: 0; }
.form-note.ok  { color: var(--sea-deep); }
.form-note.err { color: #b3261e; }

/* ── Footer ──────────────────────────────────────────── */
.site-footer { background: var(--sea-deep); color: rgba(255,255,255,.85); text-align: center; padding: 3rem 1.4rem; }
.footer-inner .brand-mark { font-size: 1.4rem; }
.footer-tagline { font-family: var(--serif); font-size: 1.3rem; color: #fff; margin: .6rem 0; }
.footer-rights { font-size: .82rem; opacity: .7; }

/* ── RTL support (Arabic) ────────────────────────────── */
html[dir="rtl"] body { font-family: "Inter", "Segoe UI", Tahoma, sans-serif; }
html[dir="rtl"] .main-nav a::after { left: auto; right: 0; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 900px) {
  .main-nav { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .amenity-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .header-book { display: none; }
}
@media (max-width: 520px) {
  .brand-name { display: none; }
  .amenity-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
}
