/*
 * theme.css — Krishna Palace. Old-money x organic-earthy: cream stone, ink-
 * brown and a muted-gold thread. Opens light; a warm charcoal-brown dark set
 * follows for the rare visitor who switches.
 */

:root {
  --canvas: #faf6ef;
  --surface: #fdfbf8;
  --surface-2: #f2e9d7;
  --border: #e3d7c1;
  --border-strong: #c7ac81;
  --ink: #2b241d;
  --muted: #6b6560;
  --accent: #7a4b2e;
  --accent-hover: #633c24;
  --accent-ink: #fdfbf8;
  --accent-text: #7f642b;
  --accent-strong: #6b4a1f;
  --accent-soft: #f1e3bf;
  --accent-border: #d7bd85;
  --success: #3f6b3f;
  --success-ink: #ffffff;
  --success-soft: #e4ecdf;
  --success-strong: #2f522f;
  --warning: #8a5a12;
  --warning-ink: #ffffff;
  --warning-soft: #f4e8cf;
  --warning-strong: #6e4710;
  --danger: #9c3b2e;
  --danger-ink: #ffffff;
  --danger-soft: #f5e0da;
  --danger-strong: #7c2e23;
  --chart-1: #7a4b2e;
  --chart-2: #5c6b47;
  --chart-3: #b98a3e;
  --chart-4: #a65f3e;
  --chart-5: #2b241d;
  --chart-6: #5b7069;

  /* Own tokens: text and surfaces over a PHOTOGRAPH or a dark statement band —
     stable in both modes, because they answer to the photo, not the page. */
  --x-on-photo: #fdfbf8;
  --x-band-dark-from: #2a1f16;
  --x-band-dark-to: #1c140d;

  --font-display: "Cormorant Garamond", ui-serif, Georgia, serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --display-weight: 600;
  --display-tracking: -0.01em;
  --eyebrow-tracking: 0.08em;

  --radius-btn: 2px;
  --radius-card: 2px;
  --radius-input: 2px;
  --border-w: 1px;
  --border-strong-w: 1px;
  --shadow-card: 0 1px 0 var(--border);
  --shadow-raised: 0 20px 45px -20px rgba(20, 14, 8, 0.35);
  --shadow-btn: none;
  --card-pad: 1.75rem;
  --caps: uppercase;
  --caps-tracking: 0.08em;
  --btn-weight: 600;
  --measure: 62ch;
}

html[data-theme="dark"] {
  --canvas: #211a14;
  --surface: #2a2119;
  --surface-2: #362a1f;
  --border: #4a3a2a;
  --border-strong: #6d5940;
  --ink: #f3ece0;
  --muted: #b6a891;
  --accent: #c9924f;
  --accent-hover: #d9a763;
  --accent-ink: #241a10;
  --accent-text: #dcae62;
  --accent-strong: #ecc98a;
  --accent-soft: #3c2f1d;
  --accent-border: #6d5127;
  --success: #588f5b;
  --success-ink: #12220f;
  --success-soft: #223122;
  --success-strong: #93cf94;
  --warning: #c99446;
  --warning-ink: #241a10;
  --warning-soft: #3a2c15;
  --warning-strong: #e2b869;
  --danger: #c46a5c;
  --danger-ink: #241210;
  --danger-soft: #3b211c;
  --danger-strong: #e79484;
  --chart-1: #c9924f;
  --chart-2: #93a878;
  --chart-3: #dcae62;
  --chart-4: #c17a5a;
  --chart-5: #f3ece0;
  --chart-6: #7fa79c;

  --x-on-photo: #fdfbf8;
  --x-band-dark-from: #2a1f16;
  --x-band-dark-to: #1c140d;
}

/*
 * app.css — Krishna Palace's own surfaces: the header that turns solid on
 * scroll, the mobile drawer, the footer band, the booking widget, the hero
 * and the CTA bands, the amenities/gallery grids and the one entrance the
 * brief asks for (the hero, once). Everything else is primitives + utilities.
 */

/* ---------------------------------------------------------------------- */
/* Header                                                                   */
/* ---------------------------------------------------------------------- */

.navbar {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: var(--z-sticky);
  transition: background-color 280ms var(--ease), border-color 280ms var(--ease), box-shadow 280ms var(--ease);
}

.navbar-hero {
  --nav-ink: var(--x-on-photo);
  --nav-muted: color-mix(in srgb, var(--x-on-photo) 78%, transparent);
  background: linear-gradient(to bottom, color-mix(in srgb, var(--x-band-dark-to) 55%, transparent), transparent);
  border-bottom: 1px solid transparent;
}
html[data-scrolled] .navbar-hero {
  --nav-ink: var(--ink);
  --nav-muted: var(--muted);
  background: color-mix(in srgb, var(--canvas) 96%, transparent);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-raised);
}

.navbar-solid {
  --nav-ink: var(--ink);
  --nav-muted: var(--muted);
  background: color-mix(in srgb, var(--canvas) 97%, transparent);
  border-bottom: 1px solid var(--border);
}

.nav-word { color: var(--nav-ink); }
.nav-link { color: var(--nav-muted); transition: color 150ms var(--ease); }
.nav-link:hover { color: var(--nav-ink); text-decoration: none; }
.nav-toggle { color: var(--nav-ink) !important; }
.nav-toggle:hover { background: color-mix(in srgb, var(--nav-ink) 12%, transparent) !important; }

.drawer {
  display: none;
  flex-direction: column;
  gap: 0;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-raised);
}
.navopen:checked ~ .drawer { display: flex; }
.drawer .nav-item {
  padding: 0.9rem 1.5rem;
  color: var(--ink);
  font-size: 0.95rem;
  border-top: 1px solid var(--border);
}
.drawer .nav-item:hover { background: var(--surface-2); text-decoration: none; }

/* Reserve the fixed bar's measured height (--bar-h, set by the platform's
   own scroll enhancer) on pages that are not a full-bleed hero. */
.page-offset { padding-top: var(--bar-h, 4.75rem); }

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

.hero-photo {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  /* A stable dark fallback — not var(--ink), which is LIGHT in dark mode and
     would leave the light hero text unreadable against it before/without
     the image. */
  background: var(--x-band-dark-to);
}
.hero-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--x-band-dark-to) 88%, transparent) 0%,
    color-mix(in srgb, var(--x-band-dark-to) 45%, transparent) 42%,
    color-mix(in srgb, var(--x-band-dark-to) 5%, transparent) 68%
  );
}
.hero-content { position: relative; z-index: 1; color: var(--x-on-photo); }
.hero-sub { color: color-mix(in srgb, var(--x-on-photo) 85%, transparent); }

.hero-enter {
  opacity: 0;
  transform: translateY(22px);
  animation: hero-in 900ms var(--ease-out) 120ms both;
}
.hero-enter-delay { animation-delay: 320ms; }
.hero-enter-delay-2 { animation-delay: 480ms; }
@keyframes hero-in { to { opacity: 1; transform: none; } }
html.reduced-motion .hero-enter { opacity: 1; transform: none; animation: none; }

/* ---------------------------------------------------------------------- */
/* Booking widget                                                           */
/* ---------------------------------------------------------------------- */

.widget {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  border: 1px solid var(--border);
  padding: 1.5rem;
  box-shadow: var(--shadow-raised);
  backdrop-filter: blur(6px);
}
@media (min-width: 64rem) {
  .widget { grid-template-columns: repeat(4, 1fr) auto; align-items: end; }
}
.widget-field { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.widget-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.widget-submit { grid-column: 1 / -1; width: 100%; }
@media (min-width: 64rem) { .widget-submit { grid-column: auto; width: auto; } }

.widget-compact {
  background: color-mix(in srgb, var(--surface) 10%, transparent);
  border-color: color-mix(in srgb, var(--canvas) 30%, transparent);
  backdrop-filter: none;
}
.widget-compact .widget-label { color: color-mix(in srgb, var(--canvas) 65%, transparent); }

/* ---------------------------------------------------------------------- */
/* Bands                                                                    */
/* ---------------------------------------------------------------------- */

.band-cream { background: var(--surface-2); }
.band-dark {
  background: linear-gradient(160deg, var(--x-band-dark-from) 0%, var(--x-band-dark-to) 100%);
  color: var(--x-on-photo);
}

/* ---------------------------------------------------------------------- */
/* Room cards                                                               */
/* ---------------------------------------------------------------------- */

.room-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}
@media (min-width: 64rem) {
  .room-grid { grid-template-columns: 1fr 1fr 1.4fr; align-items: stretch; }
}

.room-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease);
}
.room-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-raised); }
.room-card-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.9rem; flex: 1; }

/* The search-results variant: a fixed square thumbnail beside the body from
   sm upward, stacked on top below it. The .media sizing itself lives in
   tailwind/components.css (it is that primitive's own class). */
@media (min-width: 40rem) {
  .room-card-result { flex-direction: row; }
}

/* The Family Suite card sits in a wider grid column than the other two
   (see .room-grid's 1fr 1fr 1.4fr above lg) so its photo reads larger, but
   it keeps the same photo-on-top layout as every other featured room card. */
.room-occupancy { display: flex; align-items: center; gap: 1.1rem; font-size: 0.85rem; color: var(--muted); }
.room-occupancy .icon { color: var(--accent-text); }

/* ---------------------------------------------------------------------- */
/* Amenities grid                                                           */
/* ---------------------------------------------------------------------- */

.amenity-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 40rem) { .amenity-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 72rem) { .amenity-grid { grid-template-columns: repeat(4, 1fr); } }
.amenity-caption { margin-top: 0.85rem; }

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

.gallery-mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 11rem;
  gap: 0.85rem;
}
@media (min-width: 48rem) { .gallery-mosaic { grid-auto-rows: 9.5rem; } }
.gallery-item { position: relative; overflow: hidden; cursor: pointer; grid-column: span 4; grid-row: span 2; }
@media (min-width: 48rem) {
  .gallery-item { grid-column: span 2; }
  .gallery-item.g-wide { grid-column: span 4; }
  .gallery-item.g-tall { grid-row: span 3; }
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 400ms var(--ease); }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, color-mix(in srgb, var(--x-band-dark-to) 45%, transparent), transparent 55%);
  opacity: 0;
  transition: opacity 200ms var(--ease);
}
.gallery-item:hover::after { opacity: 1; }

/* ---------------------------------------------------------------------- */
/* Reviews                                                                  */
/* ---------------------------------------------------------------------- */

.review-quote { font-family: var(--font-display); font-size: 1.4rem; line-height: 1.5; }

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

.footer-band { background: var(--x-band-dark-to); }
.footer-word { color: var(--x-on-photo); }
.footer-copyright { color: color-mix(in srgb, var(--x-on-photo) 55%, transparent); border-top: 1px solid color-mix(in srgb, var(--x-on-photo) 15%, transparent); }
.footer-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: color-mix(in srgb, var(--x-on-photo) 55%, transparent); }
.footer-link { color: color-mix(in srgb, var(--x-on-photo) 75%, transparent); font-size: 0.9rem; }
.footer-link:hover { color: var(--x-on-photo); text-decoration: none; }
.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid color-mix(in srgb, var(--x-on-photo) 25%, transparent);
  border-radius: 9999px;
  color: color-mix(in srgb, var(--x-on-photo) 85%, transparent);
  transition: border-color 150ms var(--ease), color 150ms var(--ease);
}
.footer-social:hover { border-color: var(--x-on-photo); color: var(--x-on-photo); }

/* ---------------------------------------------------------------------- */
/* Booking flow                                                             */
/* ---------------------------------------------------------------------- */

.stepper { display: flex; align-items: center; gap: 0.5rem; }
.stepper-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: var(--muted); }
.stepper-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  border: 1px solid var(--border-strong);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  flex-shrink: 0;
}
.stepper-item.is-active .stepper-dot, .stepper-item.is-done .stepper-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.stepper-item.is-active { color: var(--ink); font-weight: 600; }
.stepper-line { width: 1.5rem; height: 1px; background: var(--border-strong); flex-shrink: 0; }

.summary-card { position: sticky; top: calc(var(--bar-h, 4.75rem) + 1.5rem); }

/* Map embed keeps a fixed aspect without an iframe stretching its box. Between
   sm and lg the address column sits below the map (single-column grid), so an
   uncapped 16/9 box at tablet widths grows tall enough to read as a hole
   between the section heading and the address text — capped here, and
   uncapped again at lg where the two sit side by side. */
.map-frame { position: relative; aspect-ratio: 16/9; overflow: hidden; border: 1px solid var(--border); }
@media (min-width: 40rem) and (max-width: 63.999rem) {
  .map-frame { max-height: 14rem; }
}
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Payment method choice cards, built on a native radio for accessibility. */
.pay-option { display: flex; cursor: pointer; align-items: center; gap: 0.85rem; border: 1px solid var(--border-strong); padding: 1rem 1.1rem; transition: border-color 150ms var(--ease), background-color 150ms var(--ease); }
.pay-option:hover { background: var(--surface-2); }
.pay-option input { accent-color: var(--accent); }
.pay-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
