/* =========================================================
   Domus Augusta — Stylesheet
   Font self-hosted (no external network requests at load time)
   ========================================================= */

@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("../assets/fonts/playfair-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("../assets/fonts/playfair-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("../assets/fonts/playfair-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-primary: #907300;
  --color-primary-dark: #6c5700;
  --color-primary-light: #c7a94e;
  --color-primary-tint: #f3ecd6;
  --color-bg: #fbf9f4;
  --color-bg-alt: #f3ede1;
  --color-text: #2b2620;
  --color-text-soft: #6b6255;
  --color-white: #ffffff;
  --color-border: rgba(144, 115, 0, 0.18);

  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container-w: 1140px;
  --container-narrow: 760px;
  --radius: 10px;
  --shadow-soft: 0 10px 30px -12px rgba(43, 38, 32, 0.18);
  --transition: 0.25s ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--color-primary); text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
  color: var(--color-text);
}

.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}
.container.narrow { max-width: var(--container-narrow); }

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  background: var(--color-white);
  padding: 10px 16px;
  border-radius: var(--radius);
  z-index: 999;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
  text-align: center;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-outline {
  background: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary); color: var(--color-white); }
.btn-outline-invert {
  background: transparent;
  border-color: rgba(255,255,255,0.7);
  color: var(--color-white);
}
.btn-outline-invert:hover { background: rgba(255,255,255,0.15); }
.btn-sm { padding: 10px 20px; font-size: 0.85rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  background: rgba(251, 249, 244, 0.96);
  backdrop-filter: saturate(180%) blur(10px);
  box-shadow: 0 2px 20px -10px rgba(0,0,0,0.12);
  transition: box-shadow var(--transition), padding var(--transition);
  padding: 14px 0;
}
.site-header.scrolled {
  box-shadow: 0 2px 20px -10px rgba(0,0,0,0.15);
  padding: 10px 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand-logo {
  height: 40px;
  width: auto;
  max-width: none;
  object-fit: contain;
  transition: height var(--transition);
}
.site-header.scrolled .brand-logo { height: 34px; }
.brand-logo-mobile { display: none; }

@media (max-width: 900px) {
  .brand-logo-desktop { display: none; }
  .brand-logo-mobile { display: block; height: 36px; }
  .site-header.scrolled .brand-logo-mobile { height: 32px; }
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0; padding: 0;
}
.main-nav a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 4px 0;
}
.main-nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--color-primary);
  transition: width var(--transition);
}
.main-nav a:not(.nav-cta):hover::after { width: 100%; }
.main-nav a.nav-cta {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 10px 20px;
  border-radius: 999px;
}
.main-nav a.nav-cta:hover { background: var(--color-primary-dark); }

.header-actions { display: flex; align-items: center; gap: 14px; }

/* Language switcher */
.lang-switch { position: relative; }
.lang-current {
  display: flex; align-items: center; gap: 6px;
  background: transparent;
  border: 1.5px solid var(--color-border);
  color: var(--color-text);
  border-radius: 999px;
  padding: 8px 14px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}
.icon-globe { width: 16px; height: 16px; fill: currentColor; }
.lang-options {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  list-style: none;
  margin: 0; padding: 6px;
  min-width: 140px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}
.lang-switch.open .lang-options {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.lang-options li {
  padding: 9px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}
.lang-options li:hover { background: var(--color-primary-tint); }
.lang-options li[aria-selected="true"] { color: var(--color-primary); font-weight: 600; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px; height: 34px;
  background: none; border: none; cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--color-white);
}
.hero-media { position: absolute; inset: 0; }
.hero-media picture {
  position: absolute; inset: 0;
  display: block;
  width: 100%; height: 100%;
}
.hero-photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(30,24,10,0.55) 0%, rgba(30,24,10,0.35) 45%, rgba(20,16,7,0.75) 100%);
}
.hero-content { position: relative; z-index: 2; padding-top: 90px; }
.hero-badge {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-primary-light);
  margin: 0 0 18px;
}
.hero-title {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  color: var(--color-white);
  margin-bottom: 18px;
}
.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  max-width: 560px;
  color: rgba(255,255,255,0.92);
  margin-bottom: 36px;
  font-weight: 400;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-actions.center { justify-content: center; }

.scroll-cue {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.5);
  display: flex; align-items: center; justify-content: center;
  animation: bounce 2.4s infinite;
  z-index: 2;
}
.scroll-cue svg { width: 18px; height: 18px; fill: var(--color-white); }
@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--color-bg-alt); }
.eyebrow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 10px;
}
.eyebrow-invert { color: var(--color-primary-light); }
.section-title {
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  margin-bottom: 28px;
}
.section-title.invert { color: var(--color-white); }

.prose p { margin: 0 0 18px; color: var(--color-text); font-size: 1.02rem; }
.prose p:last-child { margin-bottom: 0; }
.prose-p { font-size: 1.05rem; color: var(--color-text); }
.prose-p.invert { color: rgba(255,255,255,0.88); }
.prose .note-box {
  background: var(--color-primary-tint);
  border-left: 3px solid var(--color-primary);
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 0.95rem;
  color: var(--color-primary-dark);
  margin: 22px 0;
}

/* reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ---------- Amenities ---------- */
.amenities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
  margin-top: 8px;
}
.amenity-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.amenity-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.amenity-icon {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--color-primary-tint);
  margin-bottom: 16px;
}
.amenity-icon svg { width: 22px; height: 22px; fill: var(--color-primary); }
.amenity-card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.amenity-card p { margin: 0; font-size: 0.92rem; color: var(--color-text-soft); }
.amenities-outro {
  margin-top: 40px;
  text-align: center;
  color: var(--color-text-soft);
  font-size: 0.98rem;
  max-width: 700px;
  margin-left: auto; margin-right: auto;
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.gallery-item {
  position: relative;
  aspect-ratio: 4/3;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg-alt);
  cursor: zoom-in;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 16px 16px 12px;
  background: linear-gradient(0deg, rgba(20,16,7,0.72), rgba(20,16,7,0));
  color: var(--color-white);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}
@media (max-width: 720px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

.gallery-item:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 72px 48px;
  background: rgba(20, 16, 7, 0.88);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.lightbox[hidden] { display: none; }
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}
.lightbox-figure {
  margin: 0;
  max-width: min(1100px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.lightbox-figure img {
  display: block;
  max-width: 100%;
  max-height: min(78vh, 820px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.55);
  background: #1a160c;
}
.lightbox-figure figcaption {
  color: rgba(255,255,255,0.92);
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
}
.lightbox-close,
.lightbox-nav {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-radius: 50%;
  transition: background var(--transition), transform var(--transition);
}
.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255,255,255,0.22);
}
.lightbox-close {
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
}
.lightbox-close svg,
.lightbox-nav svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-counter {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  margin: 0;
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  font-weight: 500;
}
body.lightbox-open { overflow: hidden; }

@media (max-width: 720px) {
  .lightbox { padding: 64px 16px 40px; }
  .lightbox-nav {
    width: 40px;
    height: 40px;
  }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-figure img { max-height: 68vh; }
}

/* ---------- Map ---------- */
.map-box { margin-top: 8px; border-radius: var(--radius); overflow: hidden; }
.map-placeholder {
  min-height: 340px;
  background: linear-gradient(145deg, var(--color-primary-tint), #eadfba 130%);
  border: 1.5px dashed var(--color-primary-light);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 30px; text-align: center;
}
.map-placeholder p { max-width: 380px; margin: 0; color: var(--color-primary-dark); font-size: 0.92rem; }
.map-placeholder .ph-icon { width: 34px; height: 34px; fill: var(--color-primary); opacity: 0.75; }
.map-embed { width: 100%; height: 380px; border: 0; display: block; }

/* ---------- Book section ---------- */
.book-section {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  color: var(--color-white);
  text-align: center;
}

/* ---------- Footer ---------- */
.site-footer { background: #221c0f; color: rgba(255,255,255,0.8); padding: 48px 0 32px; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.footer-logo { height: 58px; width: auto; opacity: 0.95; }
.footer-rights { font-size: 0.88rem; margin: 0; }
.footer-links { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: rgba(255,255,255,0.85); }
.footer-links a:hover { color: var(--color-primary-light); }
.link-btn {
  background: none; border: none; color: rgba(255,255,255,0.85);
  font-size: 0.85rem; cursor: pointer; padding: 0; font-family: var(--font-sans);
  text-decoration: underline;
}
.link-btn:hover { color: var(--color-primary-light); }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 900;
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -10px 30px -14px rgba(0,0,0,0.2);
  padding: 18px 0;
  transform: translateY(0);
}
.cookie-inner {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cookie-inner p { margin: 0; font-size: 0.9rem; max-width: 640px; }
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--color-primary);
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 400;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top svg { width: 20px; height: 20px; fill: var(--color-white); }

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

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }

  body.nav-open .main-nav {
    display: block;
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(320px, 84vw);
    background: var(--color-white);
    box-shadow: -12px 0 30px -10px rgba(0,0,0,0.2);
    padding: 100px 32px 40px;
    z-index: 400;
  }
  body.nav-open .main-nav ul { flex-direction: column; align-items: flex-start; gap: 22px; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 640px) {
  .section { padding: 72px 0; }
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; }
  .cookie-inner { flex-direction: column; align-items: flex-start; }
}
