/* Riad Boujou — single page styles
   Palette: navy #121b21, gold #ffeb69, white, warm neutrals */

:root {
  --navy: #121b21;
  --navy-soft: #1c2830;
  --gold: #ffeb69;
  --gold-deep: #e6c94f;
  --ink: #2b2b2b;
  --muted: #6b6b6b;
  --paper: #fdfcf9;
  --serif: "Vollkorn", Georgia, "Times New Roman", serif;
  --sans: "Cabin", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@font-face {
  font-family: "Vollkorn";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/vollkorn-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}

@font-face {
  font-family: "Cabin";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/cabin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}

@font-face {
  font-family: "Dancing Script";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/dancing-script-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
}

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

/* ---------- Typography ---------- */

h1, h2 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); color: #fff; }

h2 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  text-align: center;
  margin-bottom: 2.5rem;
}

h1 em, h2 em {
  font-style: italic;
  color: var(--gold-deep);
}

/* Handwritten accent, like the old hero highlight */
h1 .script {
  font-family: "Dancing Script", cursive;
  font-style: normal;
  color: var(--gold);
}

.section--dark h2 { color: #fff; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 2.2rem;
  border: 2px solid #fff;
  border-radius: 3px;
  color: #fff;
  background: transparent;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn:hover { background: rgba(255, 255, 255, 0.2); }

.btn--gold {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--navy);
  font-weight: 600;
}

.btn--gold:hover { background: var(--gold-deep); border-color: var(--gold-deep); }

.btn--outline { border-color: var(--navy); color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: #fff; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  text-align: center;
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(18, 27, 33, 0.45);
}

.hero__content {
  position: relative;
  padding: 2rem;
  max-width: 46rem;
}

.hero__logo {
  width: 84px;
  height: 84px;
  margin: 0 auto 1.5rem;
  /* logo is gold-on-transparent: no white chip (it killed the contrast);
     dark halo keeps it legible even over bright video frames */
  filter: drop-shadow(0 2px 10px rgba(10, 14, 17, 0.55));
}

.hero__tagline {
  margin: 1.25rem 0 2.25rem;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: rgba(255, 255, 255, 0.92);
}

@media (max-width: 40rem) {
  .hero__br { display: none; }
}

/* ---------- Sections ---------- */

.section { padding: 5rem 1.5rem; }

.section--dark {
  background: var(--navy);
  color: #e8e6e0;
}

.section__inner {
  max-width: 68rem;
  margin: 0 auto;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

.split--reverse .split__media { order: 2; }

@media (max-width: 50rem) {
  .split { grid-template-columns: 1fr; gap: 2rem; }
  .split--reverse .split__media { order: 0; }
}

.split__media img {
  border-radius: 6px;
  box-shadow: 0 18px 40px rgba(18, 27, 33, 0.18);
}

.split__body p { margin-bottom: 1.5rem; }

/* ---------- Counters & perks ---------- */

.counters {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2.5rem;
  margin: 0.5rem 0 1.75rem;
}

.counter { text-align: center; }

.counter__value {
  display: block;
  font-family: var(--serif);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--gold-deep);
}

.section--dark .counter__value { color: var(--gold); }

.counter__label {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.section--dark .counter__label { color: rgba(255, 255, 255, 0.65); }

.perks {
  list-style: none;
  display: grid;
  gap: 0.4rem;
}

.perks li::before {
  content: "✦";
  color: var(--gold-deep);
  margin-right: 0.6rem;
}

/* ---------- Gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.6rem;
}

.gallery__item {
  display: block;
  overflow: hidden;
  border-radius: 4px;
}

.gallery__item img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

/* ---------- CTA ---------- */

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

.cta__text { margin-bottom: 2rem; color: rgba(255, 255, 255, 0.85); }

/* ---------- Booking form ---------- */

.booking-form {
  display: grid;
  gap: 1.1rem;
  text-align: left;
}

.booking-form__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.9rem;
  text-align: center;
  margin-bottom: 0.25rem;
}

.booking-form__title em { color: var(--gold-deep); }

.booking-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

@media (max-width: 30rem) {
  .booking-form__row { grid-template-columns: 1fr; }
}

.booking-form__field {
  display: grid;
  gap: 0.35rem;
}

.booking-form__field label {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.booking-form__field label output {
  font-size: 1rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gold-deep);
  font-weight: 600;
}

.booking-form__field input,
.booking-form__field textarea {
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(18, 27, 33, 0.25);
  border-radius: 3px;
  padding: 0.65rem 0.8rem;
}

.booking-form__field input:focus,
.booking-form__field textarea:focus {
  outline: 2px solid var(--gold-deep);
  outline-offset: 1px;
}

.booking-form__field ::placeholder { color: #b9b5ac; }

/* guests slider */
.booking-form__field input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  height: 6px;
  border: none;
  border-radius: 3px;
  background: linear-gradient(to right, var(--gold-deep) 0%, var(--gold-deep) var(--fill, 20%), rgba(18, 27, 33, 0.15) var(--fill, 20%));
  padding: 0;
  margin: 0.4rem 0 0;
  cursor: pointer;
}

.booking-form__field input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--navy);
  border: 3px solid var(--gold);
  cursor: grab;
}

.booking-form__field input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--navy);
  border: 3px solid var(--gold);
  cursor: grab;
}

.booking-form__scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--muted);
  padding: 0 0.35rem;
}

/* date inputs: keep native picker icon visible on dark-on-light */
.booking-form__field input[type="date"] {
  min-height: 2.9em;
}

/* honeypot: visually hidden but present for bots */
.booking-form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.booking-form__submit {
  justify-self: center;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
}

.booking-form__submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.booking-form__status {
  min-height: 1.5em;
  text-align: center;
  font-size: 0.95rem;
}

.booking-form__status--success { color: #2e7d32; }
.booking-form__status--error { color: #c62828; }
.booking-form__status--pending { color: var(--muted); }

/* ---------- Booking dialog ---------- */

.booking-dialog {
  /* Bulletproof centering: don't rely on UA dialog centering (the global
     * reset kills margin:auto, and some engines ignore inset on dialogs).
     Fixed + translate works everywhere. */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 34rem);
  max-width: calc(100vw - 2rem);
  max-height: min(90vh, 44rem);
  border: none;
  border-radius: 8px;
  padding: 2.2rem 2rem 1.6rem;
  background: var(--paper);
  box-shadow: 0 30px 80px rgba(10, 14, 17, 0.45);
  overflow-y: auto;
  /* never scroll horizontally: the form must shrink to fit */
  overflow-x: hidden;
}

/* form fields must be allowed to shrink below their intrinsic width */
.booking-dialog .booking-form,
.booking-dialog .booking-form__row,
.booking-dialog .booking-form__field {
  min-width: 0;
}

.booking-dialog .booking-form__field input,
.booking-dialog .booking-form__field textarea {
  width: 100%;
  min-width: 0;
}

.booking-dialog::backdrop {
  background: rgba(10, 14, 17, 0.65);
  backdrop-filter: blur(3px);
}

.booking-dialog[open] {
  animation: booking-in 0.25s ease;
}

@keyframes booking-in {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 14px)) scale(0.98); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.booking-dialog__close {
  position: absolute;
  top: 0.7rem;
  right: 0.9rem;
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

.booking-dialog__close:hover { color: var(--navy); }

@media (prefers-reduced-motion: reduce) {
  .booking-dialog[open] { animation: none; }
}

/* ---------- Footer ---------- */

.footer {
  background: var(--navy-soft);
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 14, 17, 0.94);
}

.lightbox[hidden] { display: none; }

.lightbox__figure {
  max-width: min(92vw, 80rem);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lightbox__img {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  margin: 0 auto;
  border-radius: 4px;
}

.lightbox__caption {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
}

.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 3rem;
  cursor: pointer;
  padding: 1rem;
}

.lightbox__nav:hover, .lightbox__close:hover { color: var(--gold); }

.lightbox__nav--prev { left: 0.5rem; }
.lightbox__nav--next { right: 0.5rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gallery__item img { transition: none; }
  .hero__video { display: none; }
  .hero { background: url("../assets/img/hero-poster.jpg") center / cover; }
}