/* ============================================================
   RGE Hotel — design system
   Earth-toned · elegant · squared edges · clean sans-serif
   ============================================================ */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
}

:root {
  /* Palette — earth tones: olive, terracotta, sand, espresso (nature & land) */
  --teal:        #6a7548;   /* olive — primary */
  --teal-deep:   #4d5733;   /* deep olive */
  --teal-soft:   #eef0e2;   /* pale olive wash */
  --coral:       #bf6e4a;   /* terracotta — warm accent */
  --coral-deep:  #a3552f;   /* burnt sienna */
  --sand:        #f2ebdd;   /* warm sand */
  --ink:         #2b2620;   /* espresso / bark */
  --slate:       #5e564a;   /* taupe */
  --muted:       #7c7464;   /* stone — darkened to meet 4.5:1 contrast on white */
  --line:        #e7e0d2;   /* warm hairline */
  --white:       #ffffff;
  --bg:          #faf6ef;   /* cream */

  --radius:    0;
  --radius-lg: 0;
  --shadow-sm: 0 1px 2px rgba(43,38,32,.05), 0 4px 14px -8px rgba(43,38,32,.18);
  --shadow:    0 10px 30px -16px rgba(43,38,32,.28);
  --shadow-lg: 0 30px 70px -30px rgba(43,38,32,.42);

  --container: 1180px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; }

h1,h2,h3,h4 { line-height: 1.12; letter-spacing: -0.02em; font-weight: 700; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.5rem); }
p { color: var(--slate); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(56px, 9vw, 110px) 0; }
.section--tight { padding: clamp(40px, 6vw, 72px) 0; }
.center { text-align: center; }
.muted { color: var(--muted); }

/* Eyebrow / section heads */
.eyebrow {
  display: inline-block; font-size: .74rem; font-weight: 600;
  letter-spacing: .3em; text-transform: uppercase; color: var(--teal-deep);
}
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; }
.section-head p { margin-top: 12px; font-size: 1.06rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 24px; border-radius: 0; font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; transition: all .18s ease; white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: linear-gradient(135deg, var(--coral), var(--coral-deep)); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.05); box-shadow: var(--shadow); }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: var(--teal-deep); transform: translateY(-2px); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.6); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.14); }
.btn-outline { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--teal); color: var(--teal-deep); }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 9px 16px; font-size: .85rem; }

/* ---------------------------------------------------------- HEADER */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(252,252,251,.85); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 88px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand img { height: 64px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: .94rem; font-weight: 500; color: var(--slate); transition: color .15s; }
.nav-links a:hover, .nav-links a.active { color: var(--teal-deep); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); }

@media (max-width: 900px) {
  .nav-links {
    position: fixed; inset: 88px 0 auto 0; flex-direction: column; align-items: stretch;
    background: #fff; padding: 16px 24px 24px; border-bottom: 1px solid var(--line);
    gap: 4px; transform: translateY(-130%); transition: transform .25s ease; box-shadow: var(--shadow);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: inline-flex; }
  .nav-cta .btn-text { display: none; }
}

/* ---------------------------------------------------------- HERO */
.hero { position: relative; min-height: 86vh; display: flex; align-items: flex-end; color: #fff; overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center;
  transform-origin: center; will-change: transform;
  animation: heroZoom 30s ease-in-out infinite alternate;
}
@keyframes heroZoom { from { transform: scale(1); } to { transform: scale(1.12); } }
/* Background video sits above the photo fallback; photo shows until/unless the video plays. */
.hero__video {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  /* Brightness/saturation are baked into the encoded file (CSS filters don't
     reliably apply to hardware-composited video frames). */
  /* Stay transparent until the footage can play, then fade in over the
     poster/background photo so there's no first-frame flicker. */
  opacity: 0; transition: opacity 1s ease-in-out;
}
.hero.is-video-ready .hero__video { opacity: 1; }
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(43,38,32,.18) 0%, rgba(43,38,32,.10) 45%, rgba(43,38,32,.74) 100%);
}
.hero__inner { padding-bottom: clamp(48px, 8vw, 96px); padding-top: 120px; max-width: 760px; }
.hero h1 { color: #fff; }
.hero p { color: rgba(255,255,255,.92); font-size: 1.15rem; margin-top: 16px; max-width: 540px; }
.hero .eyebrow { color: #e6dcc4; }
.hero__actions { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------------------------------------------------------- BOOKING BAR */
.book-bar {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 18px; display: grid;
  grid-template-columns: repeat(4, 1fr) auto; gap: 14px; align-items: end;
  margin-top: -44px; position: relative; z-index: 5;
}
/* The -44px lifts the bar over the homepage hero. Inside a content section
   (e.g. Accommodations, below the availability alert) that overlap is wrong. */
.section .book-bar { margin-top: 0; }
.book-bar .field { display: flex; flex-direction: column; gap: 6px; }
.book-bar label { font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.book-bar input, .book-bar select {
  border: 1px solid var(--line); border-radius: 0; padding: 12px 13px; font: inherit; font-size: .95rem;
  color: var(--ink); background: #fff; width: 100%;
}
.book-bar input:focus, .book-bar select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
@media (max-width: 860px) { .book-bar { grid-template-columns: 1fr 1fr; margin-top: 24px; } .book-bar .field--submit { grid-column: 1 / -1; } }

/* ---------------------------------------------------------- CARDS / GRID */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
/* Centre under-filled card grids so 1–2 leftover cards don't hug the left */
@media (min-width: 981px) {
  .grid-3:has(> :last-child:nth-child(1)) { grid-template-columns: minmax(0, 360px); justify-content: center; }
  .grid-3:has(> :last-child:nth-child(2)) { grid-template-columns: repeat(2, minmax(0, 360px)); justify-content: center; }
  .grid-4:has(> :last-child:nth-child(1)) { grid-template-columns: minmax(0, 264px); justify-content: center; }
  .grid-4:has(> :last-child:nth-child(2)) { grid-template-columns: repeat(2, minmax(0, 264px)); justify-content: center; }
  .grid-4:has(> :last-child:nth-child(3)) { grid-template-columns: repeat(3, minmax(0, 264px)); justify-content: center; }
}

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__media { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--teal-soft); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card__media img { transform: scale(1.05); }
.card__badge {
  position: absolute; top: 14px; left: 14px; background: rgba(255,255,255,.94); color: var(--teal-deep);
  font-size: .72rem; font-weight: 600; padding: 6px 12px; border-radius: 0; backdrop-filter: blur(6px);
}
.card__body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__body h3 a:hover { color: var(--teal-deep); }
.card__meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: .85rem; color: var(--muted); }
.card__meta span { display: inline-flex; align-items: center; gap: 5px; }
.card__meta svg { width: 15px; height: 15px; }
.card__foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; }
.price { font-weight: 700; color: var(--ink); font-size: 1.25rem; }
.price small { font-weight: 500; color: var(--muted); font-size: .8rem; }
.price del { color: var(--muted); font-weight: 500; font-size: .9rem; margin-right: 6px; }

/* Pills / ratings */
.rating { display: inline-flex; align-items: center; gap: 4px; color: var(--coral); font-weight: 600; }
.rating svg { width: 16px; height: 16px; fill: currentColor; }
.amenity-list { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.amenity-list li { display: flex; align-items: center; gap: 9px; color: var(--slate); font-size: .94rem; }
.amenity-list svg { width: 19px; height: 19px; color: var(--teal); flex: none; }

/* Feature row */
.feature { text-align: center; padding: 8px; }
.feature .ico { width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 0; background: var(--teal-soft); color: var(--teal-deep); display: grid; place-items: center; }
.feature .ico svg { width: 26px; height: 26px; }

/* ---------------------------------------------------------- SPLIT */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px,5vw,64px); align-items: center; }
.split img { border-radius: var(--radius-lg); box-shadow: var(--shadow); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

/* Section tones */
.tone-teal { background: var(--teal-soft); }
.tone-sand { background: var(--sand); }
.tone-ink { background: var(--ink); color: #fff; }
.tone-ink h2, .tone-ink h3 { color: #fff; }
.tone-ink p { color: rgba(255,255,255,.8); }

/* ---------------------------------------------------------- PAGE HEADER */
.page-hero { position: relative; color: #fff; padding: clamp(80px,12vw,150px) 0 clamp(40px,7vw,80px); overflow: hidden; }
.page-hero__bg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; }
.page-hero__bg { animation: heroZoom 32s ease-in-out infinite alternate; transform-origin: center; }
.page-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(43,38,32,.45), rgba(43,38,32,.74)); }
.page-hero h1 { color: #fff; }
.page-hero p { color: rgba(255,255,255,.9); margin-top: 12px; max-width: 620px; font-size: 1.1rem; }
.breadcrumb { font-size: .85rem; color: rgba(255,255,255,.8); margin-bottom: 14px; }
.breadcrumb a:hover { color: #fff; text-decoration: underline; }

/* ---------------------------------------------------------- DETAIL */
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; border-radius: var(--radius-lg); overflow: hidden; }
.gallery a:first-child { grid-row: 1 / 3; grid-column: 1; }
.gallery a { display: block; overflow: hidden; position: relative; background: var(--teal-soft); }
.gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1; transition: transform .4s; }
.gallery a:first-child img { aspect-ratio: auto; height: 100%; }
.gallery a:hover img { transform: scale(1.05); }
@media (max-width: 700px){ .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: auto; } .gallery a:first-child { grid-row: auto; grid-column: 1 / -1; } }

.detail-layout { display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: start; }
@media (max-width: 920px){ .detail-layout { grid-template-columns: 1fr; } }
.booking-card { position: sticky; top: 100px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow); }
.booking-card .price { font-size: 1.9rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: .78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.field input, .field select, .field textarea {
  border: 1px solid var(--line); border-radius: 0; padding: 12px 13px; font: inherit; font-size: .95rem; width: 100%; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }

.chip { display:inline-flex; align-items:center; gap:6px; background: var(--teal-soft); color: var(--teal-deep); padding: 6px 12px; border-radius: 0; font-size: .82rem; font-weight: 600; }

/* Reviews */
.review { background:#fff; border:1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.review__head { display:flex; justify-content:space-between; align-items:center; margin-bottom: 10px; }
.review__name { font-weight: 600; }
.review__country { font-size: .82rem; color: var(--muted); }

/* Alerts */
.alert { padding: 13px 16px; border-radius: 0; font-size: .92rem; margin-bottom: 18px; }
.alert-success { background: #e8f6ee; color: #14653b; border: 1px solid #bce3cb; }
.alert-error { background: #fdecec; color: #9b2226; border: 1px solid #f3c4c4; }
.alert-info { background: var(--teal-soft); color: var(--teal-deep); border: 1px solid #bfe3e4; }

/* ---------------------------------------------------------- FOOTER */
.site-footer { background: var(--ink); color: rgba(255,255,255,.78); padding: 64px 0 28px; }
.site-footer p { color: rgba(255,255,255,.78); }
.site-footer h2 { color: #fff; font-size: .95rem; letter-spacing: .04em; margin-bottom: 16px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 36px; }
@media (max-width: 820px){ .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 480px){ .footer-grid { grid-template-columns: 1fr; } }
.site-footer a:hover { color: #fff; }
.site-footer .brand { display: inline-flex; background: #fff; padding: 10px 16px; border-radius: 0; }
.site-footer .brand img { height: 56px; width: auto; }
.footer-links li { margin-bottom: 9px; font-size: .92rem; }
.footer-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px; font-size: .85rem; color: rgba(255,255,255,.55); }
.socials-row { display:flex; gap:10px; margin-top: 16px; }
.socials-row a { width:40px; height:40px; border-radius:0; display:grid; place-items:center; background: rgba(255,255,255,.08); color:#fff; transition: background .15s; }
.socials-row a:hover { background: var(--teal); }

/* Utilities */
.mt-0{margin-top:0}.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}.mt-4{margin-top:32px}
.flex{display:flex}.items-center{align-items:center}.gap-2{gap:16px}.wrap{flex-wrap:wrap}
/* Reveal-on-scroll only hides when JS is active, so no-JS users always see content */
.js .reveal{opacity:0;transform:translateY(18px);transition:opacity .6s ease,transform .6s ease}
.js .reveal.in{opacity:1;transform:none}
/* Subtle stagger so grid items cascade in as a row scrolls into view */
.js .grid > .reveal:nth-child(2){transition-delay:.08s}
.js .grid > .reveal:nth-child(3){transition-delay:.16s}
.js .grid > .reveal:nth-child(4){transition-delay:.24s}
.js .grid > .reveal:nth-child(5){transition-delay:.32s}

/* Page-load entrance: hero & page-hero content rise in, gently staggered */
@keyframes riseIn{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
.hero__inner > *,.page-hero .container > *{animation:riseIn .7s cubic-bezier(.22,.61,.36,1) both}
.hero__inner > *:nth-child(1),.page-hero .container > *:nth-child(1){animation-delay:.05s}
.hero__inner > *:nth-child(2),.page-hero .container > *:nth-child(2){animation-delay:.15s}
.hero__inner > *:nth-child(3),.page-hero .container > *:nth-child(3){animation-delay:.25s}
.hero__inner > *:nth-child(4),.page-hero .container > *:nth-child(4){animation-delay:.35s}

/* Alert box entrance */
@keyframes alertIn{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:none}}
.alert{animation:alertIn .45s ease both}

/* Scroll-to-top button */
.to-top{
  position:fixed; right:22px; bottom:22px; z-index:60;
  width:46px; height:46px; display:flex; align-items:center; justify-content:center;
  background:var(--teal-deep); color:#fff; border:0; border-radius:50%;
  box-shadow:0 8px 22px rgba(0,0,0,.22); cursor:pointer;
  opacity:0; transform:translateY(14px) scale(.9); pointer-events:none;
  transition:opacity .35s ease, transform .35s ease, background .2s ease;
}
.to-top:hover{ background:var(--teal); }
.to-top.show{ opacity:1; transform:none; pointer-events:auto; }
.to-top svg{ width:22px; height:22px; }
@media (max-width:600px){ .to-top{ right:14px; bottom:14px; } }
