/* Ella Moon Rock — styles
   Design language borrowed from a luxury-hotel reference (generous whitespace,
   full-bleed imagery, restrained serif/sans pairing, structured rectangular
   buttons) — palette, type pairing, and content are original to this brand. */

:root {
  /* Light palette — default, unconditional */
  --bg: #F7F4EC;
  --bg-alt: #EFEAE0;
  --surface: #FFFFFF;
  --text: #201D18;
  --text-muted: #5C564C;
  --border: #DDD5C6;
  --accent: #A9812F;
  --accent-strong: #8C6A24;
  --moss: #3F5A46;
  --on-dark: #F7F4EC;
  --overlay: rgba(20, 24, 20, 0.45);
  --shadow: 0 12px 32px rgba(32, 29, 24, 0.10);

  --font-serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-sans: "Jost", "Helvetica Neue", Arial, sans-serif;

  --radius-sm: 2px;
  --radius-md: 4px;
  --container: 1200px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14181A;
    --bg-alt: #1B211F;
    --surface: #1E2422;
    --text: #F1EEE5;
    --text-muted: #B7B0A2;
    --border: #333B37;
    --accent: #D4AF6A;
    --accent-strong: #E4C182;
    --moss: #7FA087;
    --on-dark: #14181A;
    --overlay: rgba(10, 12, 10, 0.55);
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  }
}

:root[data-theme="dark"] {
  --bg: #14181A;
  --bg-alt: #1B211F;
  --surface: #1E2422;
  --text: #F1EEE5;
  --text-muted: #B7B0A2;
  --border: #333B37;
  --accent: #D4AF6A;
  --accent-strong: #E4C182;
  --moss: #7FA087;
  --on-dark: #14181A;
  --overlay: rgba(10, 12, 10, 0.55);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html, body { overflow-x: hidden; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

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

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

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

h1 { font-size: clamp(2.4rem, 5vw + 1rem, 4.4rem); font-weight: 500; }
h2 { font-size: clamp(1.8rem, 3vw + 1rem, 2.8rem); }
h3 { font-size: clamp(1.3rem, 1.5vw + 1rem, 1.7rem); }

p { margin: 0 0 1em; color: var(--text-muted); }

a { color: inherit; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 0.9em;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 48px);
}

.section {
  padding: clamp(56px, 9vw, 120px) 0;
}

.section-alt { background: var(--bg-alt); }

.section-head {
  max-width: 640px;
  margin: 0 auto 3rem;
  text-align: center;
}

.section-head.left { margin-left: 0; text-align: left; }

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--surface);
  color: var(--text);
  padding: 12px 20px;
  z-index: 1000;
  border-radius: var(--radius-sm);
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.95em 2em;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  min-height: 44px;
  white-space: nowrap;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: #14181A; }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent-strong); }

.btn-ghost-on-image {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.6);
}
.btn-ghost-on-image:hover { background: rgba(255,255,255,0.12); border-color: #fff; }

.btn-block { width: 100%; }

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

.site-header.is-scrolled,
.site-header.is-open {
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 12px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  color: var(--home-text, var(--text));
  /* Shrinkable, not fixed — the header-actions icons (theme toggle, menu)
     are the higher-priority items and must never be pushed off-screen, so
     the brand label truncates first on very narrow viewports. */
  flex: 1 1 auto;
  min-width: 0;
}

.brand-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.site-header:not(.is-scrolled):not(.is-open) .brand,
.site-header:not(.is-scrolled):not(.is-open) .nav-link,
.site-header:not(.is-scrolled):not(.is-open) .icon-btn {
  color: #fff;
}

.brand-mark {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 32px);
}

.nav-link {
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  padding: 4px 2px;
  border-bottom: 1px solid transparent;
}
.nav-link:hover { border-color: currentColor; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

/* Below this, even the truncated brand label competes too tightly with the
   two icon buttons — drop the label and keep just the mark (icons are the
   functional priority: theme toggle, menu). */
@media (max-width: 400px) {
  .brand-label { display: none; }
  .brand { flex: 0 0 auto; }
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.site-header:not(.is-scrolled):not(.is-open) .icon-btn { border-color: rgba(255,255,255,0.5); }

.icon-btn svg { width: 18px; height: 18px; }

.nav-toggle {
  display: none;
}

.nav-toggle svg .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] svg .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] svg .icon-close { display: block; }

/* Mobile nav */
@media (max-width: 860px) {
  .main-nav {
    position: fixed;
    inset: 0;
    top: 0;
    background: var(--surface);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
    padding: 100px 24px 40px;
  }
  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .main-nav .nav-link { color: var(--text); font-size: 1.1rem; }
  .main-nav .nav-cta { margin-top: 12px; }
  .nav-toggle {
    display: inline-flex;
  }
  .header-actions > .btn-primary { display: none; }
}

/* Hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,18,15,0.25) 0%, rgba(15,18,15,0.15) 40%, rgba(12,14,12,0.75) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-bottom: clamp(48px, 8vw, 96px);
  max-width: 780px;
  min-width: 0;
  width: 100%;
}

/* h1's own `color: var(--text)` rule (theme-dependent, dark in light
   mode) is more specific than the inherited `.hero { color: #fff }`,
   so it needs an explicit override here too, same as the eyebrow/lead. */
.hero h1 { color: #fff; }

.hero .eyebrow { color: #E9DBB5; }

.hero p.lead {
  color: rgba(255,255,255,0.88);
  font-size: 1.15rem;
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 1.6rem;
}

.hero-scroll-cue {
  position: absolute;
  bottom: 22px;
  right: clamp(20px, 5vw, 48px);
  z-index: 1;
  color: rgba(255,255,255,0.75);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

@media (max-width: 700px), (max-height: 640px) {
  .hero-scroll-cue { display: none; }
}

/* Intro */
.intro-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.intro-figure { border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow); }

@media (max-width: 860px) {
  .intro-grid { grid-template-columns: 1fr; }
  .intro-figure { order: -1; }
}

.stat-row {
  display: flex;
  gap: clamp(24px, 5vw, 56px);
  margin-top: 2rem;
  flex-wrap: wrap;
}
.stat-row .stat-num {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  color: var(--accent-strong);
  display: block;
}
.stat-num-sub { font-size: 1.1rem; }
.stat-row .stat-label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Rooms */
.room-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(24px, 3vw, 40px);
}
@media (max-width: 760px) {
  .room-grid { grid-template-columns: 1fr; }
}

.room-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.room-card figure { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; }
.room-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.room-card:hover img { transform: scale(1.04); }

.room-body { padding: clamp(20px, 3vw, 32px); flex: 1; display: flex; flex-direction: column; }

.room-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: 0.6rem 0 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.room-meta span { display: inline-flex; align-items: center; gap: 6px; }
.room-meta svg { width: 16px; height: 16px; flex: 0 0 auto; }

.room-price {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--accent-strong);
  margin-top: auto;
  padding-top: 1rem;
}
.room-price small {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.room-actions { margin-top: 1.2rem; }

.note-inline {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
}
.note-spaced { margin-top: 1.2rem; }

/* Setting / experience list */
.setting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(20px, 3vw, 32px);
}
.setting-card {
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.setting-card svg { width: 30px; height: 30px; color: var(--accent); margin-bottom: 14px; }

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 14px;
}
.gallery-grid > a { grid-column: span 1; grid-row: span 1; border-radius: var(--radius-md); overflow: hidden; display: block; }
.gallery-grid > a:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.gallery-grid > a:nth-child(4) { grid-column: span 2; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery-grid a:hover img { transform: scale(1.05); }

@media (max-width: 760px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .gallery-grid > a:nth-child(1) { grid-column: span 2; grid-row: span 1; }
  .gallery-grid > a:nth-child(4) { grid-column: span 1; }
}

/* Rating */
.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.rating-badge .stars { color: var(--accent); letter-spacing: 2px; }
.rating-badge-spaced { margin-top: 1.4rem; }

/* Booking form */
.booking-wrap {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
@media (max-width: 860px) {
  .booking-wrap { grid-template-columns: 1fr; }
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--shadow);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 520px) {
  .form-row { grid-template-columns: 1fr; }
}

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  min-height: 44px;
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.form-status {
  margin-top: 14px;
  font-size: 0.88rem;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  display: none;
}
.form-status.is-visible { display: block; }
.form-status.is-success { background: rgba(63,90,70,0.12); color: var(--moss); border: 1px solid var(--moss); }
.form-status.is-error { background: rgba(176,60,40,0.1); color: #B03C28; border: 1px solid #B03C28; }
.form-status.is-info { background: rgba(169,129,47,0.1); color: var(--accent-strong); border: 1px solid var(--accent); }

.consent-note { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }

/* Map */
.map-frame {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16 / 10;
}
.map-frame iframe { width: 100%; height: 100%; border: 0; }

.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.contact-list svg { width: 18px; height: 18px; color: var(--accent); flex: 0 0 auto; margin-top: 2px; }

/* Footer */
.site-footer {
  background: #171C19;
  color: #E7E2D6;
  padding: clamp(48px, 7vw, 88px) 0 28px;
}
.site-footer a { color: inherit; text-decoration: none; }
.site-footer .nav-link { color: #E7E2D6; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: clamp(28px, 5vw, 56px);
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-grid h4 { color: #F1EEE5; font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; font-family: var(--font-sans); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 10px; color: #C7C0AF; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-serif); font-size: 1.3rem; margin-bottom: 12px; }
.footer-lead { color: #C7C0AF; }
.footer-bottom {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.8rem;
  color: #9A9385;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* Placeholder image treatment */
.ph-note {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  background: rgba(0,0,0,0.35);
  padding: 3px 8px;
  border-radius: 2px;
  pointer-events: none;
}
figure { position: relative; }

/* Utility */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
