/* ZenithStays reference hotel website (fictional brand demo, SL-11). Mobile-first, 320px and up. */

:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --text: #16211f;
  --text-muted: #52605c;
  --primary: #0f4c45;
  --primary-contrast: #ffffff;
  --accent: #a9752f;
  --border: #e4ddd0;
  --overlay-scrim: rgba(10, 20, 18, 0.62);
  --card-shadow: 0 10px 30px rgba(15, 35, 30, 0.12);
  --focus-ring: #2a7f73;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0b1716;
  --surface: #112220;
  --surface-raised: #15291f;
  --text: #eef3f1;
  --text-muted: #aebab6;
  --primary: #5fd3c4;
  --primary-contrast: #06201c;
  --accent: #e3b35f;
  --border: #1f3a37;
  --overlay-scrim: rgba(0, 0, 0, 0.78);
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  --focus-ring: #7fe3d6;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg: #0b1716;
    --surface: #112220;
    --surface-raised: #15291f;
    --text: #eef3f1;
    --text-muted: #aebab6;
    --primary: #5fd3c4;
    --primary-contrast: #06201c;
    --accent: #e3b35f;
    --border: #1f3a37;
    --overlay-scrim: rgba(0, 0, 0, 0.78);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
    --focus-ring: #7fe3d6;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif; line-height: 1.2; margin: 0 0 0.5em; }
p { margin: 0 0 1em; color: var(--text-muted); }
a { color: var(--primary); }
img { max-width: 100%; display: block; }
button { font: inherit; }

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

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

.skip-link {
  position: absolute;
  left: 1rem; top: -3rem;
  background: var(--surface);
  color: var(--text);
  padding: 0.5rem 1rem;
  border-radius: 0 0 8px 8px;
  z-index: 1200;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0; }

/* ---------- Site content: blurred behind the gate until peeked or (eventually) past it ---------- */
#site-content.blurred {
  filter: blur(10px) saturate(0.85);
  transition: filter 0.5s ease;
  user-select: none;
}
#site-content.unblurred {
  filter: none;
  transition: filter 0.5s ease;
}
@media (prefers-reduced-motion: reduce) {
  #site-content.blurred, #site-content.unblurred { transition: none; }
}

/* ---------- Header ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky; top: 0; z-index: 10;
}
.brand { font-family: Georgia, serif; font-size: 1.4rem; font-weight: 700; color: var(--primary); text-decoration: none; letter-spacing: 0.02em; }
.brand small { display: block; font-family: inherit; font-size: 0.6rem; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.site-nav { display: none; gap: 1.5rem; }
.site-nav a { color: var(--text); text-decoration: none; font-size: 0.95rem; }
.site-nav a:hover { color: var(--primary); }
@media (min-width: 720px) { .site-nav { display: flex; } }

.theme-toggle {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 999px;
  width: 2.25rem; height: 2.25rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; height: min(70vh, 520px); min-height: 320px; }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,20,18,0.15) 0%, rgba(10,20,18,0.75) 100%);
}
.hero-copy {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.5rem; color: #fff; z-index: 1;
}
.hero-copy h1 { font-size: clamp(1.75rem, 6vw, 3rem); color: #fff; margin-bottom: 0.25rem; }
.hero-copy p { color: rgba(255,255,255,0.88); max-width: 38em; }

/* ---------- Sections ---------- */
.section { padding: 2.5rem 1.25rem; max-width: 1180px; margin: 0 auto; }
.section h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
.section-intro { max-width: 44em; }

.grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; box-shadow: var(--card-shadow);
}
.card-body { padding: 1rem 1.1rem 1.25rem; }
.card h3 { font-size: 1.15rem; margin-bottom: 0.15rem; }
.tag {
  display: inline-block; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--primary-contrast); background: var(--primary); border-radius: 999px; padding: 0.2rem 0.6rem;
  margin-bottom: 0.5rem;
}
.muted { color: var(--text-muted); font-size: 0.9rem; }

/* AI content badge, overlaid on every photo in the site (SL-11 requirement). */
.ai-photo { position: relative; margin: 0; }
.ai-photo img { width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; }
.ai-badge {
  position: absolute; right: 0.5rem; bottom: 0.5rem;
  background: rgba(10, 20, 18, 0.72); color: #fff;
  font-size: 0.62rem; letter-spacing: 0.03em;
  padding: 0.2rem 0.5rem; border-radius: 999px;
  pointer-events: none;
}

.room-card .ai-photo img { aspect-ratio: 4/3; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.25rem 3rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.site-footer .disclaimer { font-weight: 600; color: var(--text); margin-top: 0.5rem; }

/* ---------- Gate overlay ---------- */
#gate-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--overlay-scrim);
  display: flex; align-items: center; justify-content: center;
  padding: 1.25rem;
}
#gate-overlay[hidden] { display: none; }

.gate-card {
  background: var(--surface-raised); color: var(--text);
  border-radius: 18px; box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  max-width: 420px; width: 100%;
  padding: 1.75rem 1.5rem;
  text-align: center;
}
.gate-card h2 { font-size: 1.4rem; margin-bottom: 0.4rem; }
.gate-card p { margin-bottom: 1.25rem; }

.gate-panel[hidden] { display: none; }

.gate-actions { display: flex; flex-direction: column; gap: 0.65rem; margin-bottom: 1rem; }
.btn {
  border-radius: 10px; padding: 0.7rem 1.1rem; font-size: 0.95rem; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; text-decoration: none; display: inline-block;
}
.btn-primary { background: var(--primary); color: var(--primary-contrast); }
.btn-secondary { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-text { background: none; border: none; color: var(--text-muted); font-size: 0.85rem; text-decoration: underline; cursor: pointer; padding: 0.35rem; }

.gate-form { text-align: left; display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1rem; }
.gate-form label { font-size: 0.82rem; font-weight: 600; }
.gate-form input, .gate-form textarea {
  width: 100%; padding: 0.55rem 0.65rem; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit;
}
.gate-note { font-size: 0.8rem; background: rgba(169,117,47,0.12); border: 1px solid var(--border); border-radius: 10px; padding: 0.6rem 0.75rem; margin-bottom: 1rem; text-align: left; }

.peek-pill {
  position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%);
  background: var(--surface-raised); color: var(--text); border: 1px solid var(--border);
  border-radius: 999px; padding: 0.5rem 1rem; box-shadow: var(--card-shadow);
  font-size: 0.85rem; z-index: 1001;
}
.peek-pill[hidden] { display: none; }

.not-found { max-width: 32em; margin: 4rem auto; text-align: center; padding: 0 1.25rem; }
