/* =========================================================
   Hanumanta Homestay — custom styles (on top of Bootstrap 5)
   Palette drawn from the building itself: vermilion trim,
   grey cladding, gold canopy, warm ivory walls.
   ========================================================= */

:root {
  --bg: #faf6ef;
  --surface: #ffffff;
  --sand: #f3eadc;
  --line: #e6dac7;
  --ink: #2b2420;
  --muted: #655a52;
  --brand: #b4412a;
  --brand-dark: #8f3220;
  --brand-soft: #f7e3dc;
  --gold: #c79a3c;
  --slate: #59616b;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(43, 36, 32, .05), 0 10px 30px -12px rgba(43, 36, 32, .18);
  --topbar-h: 0px;
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --bs-body-bg: var(--bg);
  --bs-body-color: var(--ink);
  --bs-body-font-family: var(--font-body);
  --bs-link-color-rgb: 143, 50, 32;
  --bs-link-hover-color-rgb: 43, 36, 32;
  --bs-border-color: var(--line);
}

@media (min-width: 992px) {
  :root { --topbar-h: 38px; }
}

html { scroll-padding-top: calc(var(--topbar-h) + 84px); }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  padding-top: var(--topbar-h);
  overflow-x: hidden;
}

h1, h2, h3, .display-font {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--ink);
}
h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.5rem); }
h2 { font-size: clamp(1.7rem, 1.25rem + 1.7vw, 2.5rem); }
h3 { font-size: 1.3rem; }

img { max-width: 100%; height: auto; }
a { text-underline-offset: 3px; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 2000;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 8px;
}
.skip-link:focus { top: 1rem; color: #fff; }
main:focus { outline: none; }

/* ---------- Top contact bar (lg+ only) ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 1031;
  height: var(--topbar-h);
  background: var(--ink); color: #efe6da;
  font-size: .875rem;
}
.topbar .container { height: 100%; }
.topbar-item {
  display: inline-flex; align-items: center; gap: .45rem;
  color: #efe6da; text-decoration: none; white-space: nowrap;
}
.topbar-item svg { width: 15px; height: 15px; fill: var(--gold); flex: none; }
a.topbar-item:hover { color: #fff; text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: var(--topbar-h); z-index: 1030;
  background: rgba(250, 246, 239, .94);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px -16px rgba(0,0,0,.4); }
.site-header .navbar { padding-block: .7rem; }

.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { width: 40px; height: 40px; color: var(--brand); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--font-head); font-weight: 600; font-size: 1.4rem; }
.brand-sub { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }

.nav-link {
  color: var(--ink); font-weight: 600; padding: .5rem .85rem !important; border-radius: 999px;
}
.nav-link:hover { color: var(--brand-dark); background: var(--sand); }
.nav-link.active { color: var(--brand-dark); background: var(--brand-soft); }

.nav-toggle {
  display: inline-flex; align-items: center; gap: .6rem;
  border: 1px solid var(--line); border-radius: 999px; padding: .45rem .9rem;
  font-weight: 700; font-size: .9rem; color: var(--ink); background: var(--surface);
}
.nav-toggle:focus { box-shadow: none; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px;
  position: relative; transition: transform .2s, background-color .2s;
}
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 767.98px) {
  .navbar-collapse .navbar-nav { padding: .75rem 0 .5rem; }
  .navbar-collapse .nav-link { padding: .75rem 1rem !important; }
  .navbar-collapse .btn { width: 100%; padding-block: .7rem; }
}

/* ---------- Buttons ---------- */
.btn { font-weight: 700; border-radius: 999px; padding: .75rem 1.4rem; }
.btn-sm { padding: .45rem 1rem; }
.btn-brand {
  --bs-btn-color: #fff; --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--brand-dark); --bs-btn-hover-border-color: var(--brand-dark);
  --bs-btn-active-bg: var(--brand-dark); --bs-btn-active-color: #fff;
  --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand);
}
.btn-ghost {
  --bs-btn-color: var(--ink); --bs-btn-border-color: var(--ink);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--ink); --bs-btn-hover-border-color: var(--ink);
  --bs-btn-active-bg: var(--ink); --bs-btn-active-color: #fff;
}
.btn svg { width: 18px; height: 18px; fill: currentColor; margin-right: .4rem; vertical-align: -3px; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(3.5rem, 2rem + 6vw, 6.5rem); }
.section-tint { background: var(--sand); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand-dark); margin-bottom: .9rem;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--gold); }
.lead-copy { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.section-head { max-width: 680px; margin-bottom: 2.5rem; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2rem, 1rem + 4vw, 4.5rem) clamp(3rem, 2rem + 4vw, 5.5rem); }
.hero h1 { margin-bottom: 1.1rem; }
.hero h1 em { font-style: italic; color: var(--brand); }
.hero-lead { font-size: 1.2rem; color: var(--muted); max-width: 52ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.hero-facts { display: flex; flex-wrap: wrap; gap: .5rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.hero-facts li {
  font-size: .9rem; font-weight: 600; padding: .35rem .85rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
}
.hero-media { position: relative; }
.hero-media .frame-main img {
  width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; object-position: 50% 40%;
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.hero-media .frame-inset {
  position: absolute; left: -2.5rem; bottom: -2rem; width: 42%;
  border: 6px solid var(--bg); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.hero-media .frame-inset img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hero-hindi {
  position: absolute; right: 1.1rem; top: 1.1rem;
  background: rgba(255,255,255,.92); color: var(--brand-dark);
  font-weight: 700; padding: .3rem .8rem; border-radius: 999px; font-size: .95rem;
}
@media (max-width: 991.98px) {
  .hero-media { margin-top: 2.5rem; }
  .hero-media .frame-inset { left: auto; right: -.25rem; bottom: -1.5rem; width: 40%; }
}

/* Page hero (inner pages) */
.page-hero { padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem) 2rem; }
.page-hero .lead-copy { margin-top: .75rem; }
.breadcrumb { font-size: .9rem; margin-bottom: 1rem; --bs-breadcrumb-divider-color: var(--muted); }
.breadcrumb a { color: var(--muted); }

/* ---------- Media + cards ---------- */
.rounded-media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.rounded-media img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

.card-soft {
  height: 100%; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.6rem;
}
.card-soft h3 { margin-bottom: .5rem; }
.card-soft p { color: var(--muted); margin-bottom: 0; }
.card-tag {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--slate); background: var(--sand); border-radius: 6px; padding: .2rem .55rem; margin-bottom: .9rem;
}

.icon-badge {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-dark); margin-bottom: 1rem;
}
.icon-badge svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.amenity { display: flex; gap: 1rem; align-items: flex-start; }
.amenity .icon-badge { margin-bottom: 0; flex: none; }
.amenity h3 { font-size: 1.15rem; margin-bottom: .2rem; }
.amenity p { color: var(--muted); margin: 0; }

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { position: relative; padding-left: 1.9rem; margin-bottom: .6rem; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 1.1rem; height: 1.1rem; border-radius: 50%;
  background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%238f3220' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
}

/* Owner placeholders — visible notes the owner must replace (toggle in config: SHOW_PLACEHOLDERS) */
.placeholder-note {
  border: 1.5px dashed var(--gold); background: #fffaf0; color: #6b5121;
  border-radius: 10px; padding: .8rem 1rem; font-size: .95rem;
}
.placeholder-note strong { color: #5a431a; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--ink); color: #f3ebe0; border-radius: var(--radius-lg);
  padding: clamp(2rem, 1rem + 4vw, 3.5rem); position: relative; overflow: hidden;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #d9cfc2; }
.cta-band::after {
  content: ""; position: absolute; right: -60px; bottom: -60px; width: 240px; height: 240px;
  border-radius: 50%; border: 36px solid rgba(199, 154, 60, .18);
}
.cta-band .btn-ghost { --bs-btn-color: #fff; --bs-btn-border-color: #fff; --bs-btn-hover-bg: #fff; --bs-btn-hover-color: var(--ink); }

/* ---------- Gallery ---------- */
.gallery-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: clamp(.6rem, .4rem + .8vw, 1.1rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}
.gallery-thumb {
  display: block; width: 100%; padding: 0; border: 0; background: var(--sand);
  border-radius: var(--radius); overflow: hidden; cursor: zoom-in; position: relative;
}
.gallery-thumb img {
  display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  transition: transform .4s ease;
}
.gallery-thumb:hover img { transform: scale(1.04); }
.gallery-thumb:focus-visible { outline-offset: 2px; }
.gallery-preview .gallery-grid { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .gallery-preview .gallery-grid { grid-template-columns: repeat(4, 1fr); } }

.gallery-status { min-height: 1.5rem; color: var(--muted); }

/* Lightbox (native <dialog>) */
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: rgba(20, 16, 14, .94); color: #fff;
}
.lightbox::backdrop { background: rgba(20, 16, 14, .6); }
.lightbox-stage {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 4.5rem 1rem 1.5rem;
}
.lightbox-figure { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 100%; max-height: 100%; }
.lightbox-figure img {
  max-width: min(1400px, 100%); max-height: calc(100dvh - 9rem); width: auto; height: auto;
  object-fit: contain; border-radius: 8px; background: #111;
}
.lightbox-caption { margin-top: .9rem; text-align: center; font-size: .98rem; color: #e9e1d6; }
.lightbox-count { color: #b9ada0; margin-left: .5rem; font-variant-numeric: tabular-nums; }
.lb-btn {
  position: absolute; z-index: 2; display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35);
  background: rgba(0,0,0,.45); color: #fff; cursor: pointer;
}
.lb-btn:hover { background: rgba(255,255,255,.18); }
.lb-btn svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2.2; fill: none; stroke-linecap: round; }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 575.98px) {
  .lb-prev, .lb-next { top: auto; bottom: 1rem; transform: none; }
  .lightbox-stage { padding-bottom: 5rem; }
}

/* ---------- Contact ---------- */
.form-panel, .info-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 1rem + 2vw, 2.4rem); height: 100%;
}
.info-panel { background: var(--ink); color: #efe6da; border: 0; }
.info-panel h2 { color: #fff; }
.info-panel a { color: #fff; }
.info-row { display: flex; gap: .9rem; padding: 1rem 0; border-top: 1px solid rgba(255,255,255,.12); }
.info-row:first-of-type { border-top: 0; }
.info-row svg { width: 22px; height: 22px; fill: var(--gold); flex: none; margin-top: .2rem; }
.info-label { display: block; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: #bfb3a6; }

.form-label { font-weight: 700; font-size: .95rem; margin-bottom: .35rem; }
.form-label .opt { font-weight: 400; color: var(--muted); }
.form-control, .form-select {
  border-radius: 10px; border-color: #d9ccb8; padding: .7rem .9rem; font-size: 1rem; background-color: #fffdf9;
}
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(180, 65, 42, .18); }
.form-control.is-invalid, .form-select.is-invalid { border-color: #b02a37; }
.invalid-feedback { font-size: .9rem; font-weight: 600; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.form-alert { border-radius: 12px; padding: 1rem 1.1rem; margin-bottom: 1.25rem; font-weight: 600; }
.form-alert p { margin: .3rem 0 0; font-weight: 400; }
.form-alert-success { background: #e8f3ea; color: #1d5a2c; border: 1px solid #b9dcc1; }
.form-alert-error { background: #fbecec; color: #8a1f2b; border: 1px solid #efc2c6; }
.form-alert a { color: inherit; font-weight: 700; }

.spinner { width: 1rem; height: 1rem; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; display: inline-block; vertical-align: -2px; margin-right: .5rem; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.map-wrap {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--sand);
  border: 1px solid var(--line); height: 380px;
}
@media (min-width: 768px) { .map-wrap { height: auto; aspect-ratio: 16 / 7; } }
.map-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-facade {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .8rem; text-align: center; padding: 1.5rem;
  background:
    radial-gradient(circle at 20% 30%, rgba(199,154,60,.18), transparent 40%),
    repeating-linear-gradient(45deg, rgba(89,97,107,.06) 0 2px, transparent 2px 22px),
    var(--sand);
}
.map-facade p { color: var(--muted); max-width: 46ch; margin: 0; font-size: .95rem; }
.map-pin { width: 44px; height: 44px; fill: var(--brand); }

/* ---------- Footer ---------- */
.site-footer { background: #241e1a; color: #d6ccc0; padding: 3.5rem 0 1.5rem; margin-top: 0; }
.brand-footer { color: #fff; }
.brand-footer:hover { color: #fff; }
.brand-footer .brand-mark { color: var(--gold); }
.brand-footer .brand-sub { color: #b9ada0; }
.footer-note { max-width: 42ch; }
.footer-heading { font-family: var(--font-body); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: #b9ada0; margin-bottom: 1rem; }
.footer-links { font-style: normal; line-height: 1.9; }
.footer-links a { color: #f3ebe0; text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem;
  margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.1); font-size: .88rem; color: #a99d90;
}

/* ---------- Scroll reveal ----------
   Content is visible by default. main.js adds .reveal-ready to <html> only
   after IntersectionObserver is set up, so a JS failure never hides content. */
.reveal-ready .reveal:not(.is-visible) { opacity: 0; transform: translateY(18px); }
.reveal-ready .reveal { transition: opacity .55s ease, transform .55s ease; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal-ready .reveal:not(.is-visible) { opacity: 1; transform: none; }
  .gallery-thumb:hover img { transform: none; }
}

/* ---------- 404 ---------- */
.notfound-code { font-family: var(--font-head); font-size: clamp(4rem, 3rem + 6vw, 7rem); color: var(--brand); line-height: 1; }

@media print {
  .reveal { opacity: 1 !important; transform: none !important; }
  .topbar, .site-header, .map-wrap { display: none !important; }
  body { padding-top: 0; }
}
