/* Saanchal Rentals — shared design system + layout.
   Self-contained, no build step. Used by index.html and listings/*.html. */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;1,9..144,500&display=swap");

:root {
  --bg: #fdfbf5;
  --bg-alt: #f5f2ec;
  --ink: #23201c;
  --muted: #6f6a63;
  --line: #e5e0d7;

  --accent: #b08445;
  --accent-dark: #8c6734;
  --accent-2: #6b7355;
  --accent-2-dark: #556049;

  --success: #6b8f5a;
  --warning: #c98a2c;
  --error: #b5543f;

  --radius: 12px;
  --radius-lg: 20px;
  --maxw: 1080px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;

  --shadow-sm: 0 1px 3px rgba(92, 74, 51, 0.12), 0 1px 2px rgba(92, 74, 51, 0.08);
  --shadow-md: 0 8px 24px rgba(92, 74, 51, 0.14), 0 2px 8px rgba(92, 74, 51, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, .brand { font-family: var(--font-display); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 999px;
  transition: background 0.15s ease, transform 0.05s ease;
  text-align: center;
}
.btn:hover { background: var(--accent-dark); }
.btn:active { transform: translateY(1px); }
.btn--small { padding: 0.5rem 1.1rem; font-size: 0.95rem; }
.btn--large { padding: 0.9rem 2rem; font-size: 1.1rem; }
.btn--invert { background: #fff; color: var(--accent-dark); }
.btn--invert:hover { background: #f1e9db; }
.btn--secondary { background: var(--accent-2); }
.btn--secondary:hover { background: var(--accent-2-dark); }

/* ---------- Nav ---------- */
.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0.2px;
  text-decoration: none;
  color: inherit;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, #5c4a33 0%, #b08445 100%);
  color: #fff;
  padding-bottom: 4rem;
}
.hero__inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 0;
  text-align: center;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  margin: 0 0 1rem;
  line-height: 1.1;
}
.hero__subtitle {
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  margin: 0 auto 2rem;
  max-width: 560px;
  opacity: 0.95;
}
.hero__note {
  margin-top: 1rem;
  font-size: 0.9rem;
  opacity: 0.85;
}
.hero__actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Listing cards (landing page) ---------- */
.listings {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 4rem 1.5rem;
}
.listings__title { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 0.75rem; }
.listings__lead { color: var(--muted); margin: 0 0 2.5rem; }
.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}
.listing-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.listing-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.listing-card__photo-wrap {
  position: relative;
  overflow: hidden;
}
.listing-card__photo {
  aspect-ratio: 4 / 3;
  display: block;
  width: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.listing-card:hover .listing-card__photo { transform: scale(1.06); }
.listing-card__badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.listing-card__badge--short { background: var(--accent); }
.listing-card__badge--long { background: var(--accent-2); }
.listing-card__body { padding: 1.5rem; }
.listing-card__location {
  display: block;
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.listing-card__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin: 0 0 0.5rem;
}
.listing-card__blurb { color: var(--muted); margin: 0 0 1rem; }
.listing-card__cta { font-weight: 600; color: var(--accent-dark); }

/* ---------- Sections ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 4rem 1.5rem;
}
.section--alt {
  background: var(--bg-alt);
  max-width: none;
}
.section--alt > * {
  max-width: var(--maxw);
  margin-left: auto;
  margin-right: auto;
}
.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin: 0 0 0.75rem;
}
.section__lead { color: var(--muted); margin: 0 0 2rem; }
.section__body { font-size: 1.1rem; margin: 0 0 1rem; max-width: 720px; }
.section__body--muted { color: var(--muted); font-size: 1rem; }

code {
  background: rgba(176, 132, 69, 0.14);
  color: var(--accent-dark);
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  font-size: 0.9em;
}

/* ---------- Facts row (listing pages) ---------- */
.facts {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}
.fact {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  text-align: center;
}
.fact__value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--accent-2-dark);
}
.fact__label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.gallery__item { margin: 0; }
.gallery__item img,
.gallery__item .placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  object-fit: cover;
  display: block;
}
.gallery__trigger {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  border-radius: var(--radius-lg);
}
.gallery__trigger img { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.gallery__trigger:hover img,
.gallery__trigger:focus-visible img { transform: scale(1.02); box-shadow: var(--shadow-md); }
.gallery__trigger:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.placeholder {
  background: repeating-linear-gradient(
    45deg,
    #efe9df,
    #efe9df 12px,
    #e7e0d3 12px,
    #e7e0d3 24px
  );
  border: 2px dashed #cbbfa9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-align: center;
  padding: 1rem;
}
.placeholder__label {
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent-dark);
  font-size: 0.85rem;
}
.placeholder__file {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  color: var(--muted);
}
.gallery__item figcaption {
  margin-top: 0.6rem;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- Amenities ---------- */
.amenities {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}
.amenity {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font-weight: 500;
}
.amenity::before {
  content: "✓";
  color: var(--accent-2);
  font-weight: 700;
  margin-right: 0.5rem;
}

/* ---------- CTA ---------- */
.cta {
  background: linear-gradient(135deg, #5c4a33 0%, #b08445 100%);
  color: #fff;
  text-align: center;
  padding: 4rem 1.5rem;
}
.cta__title { font-family: var(--font-display); font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0 0 0.75rem; }
.cta__text { max-width: 540px; margin: 0 auto 2rem; opacity: 0.95; }

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer p { margin: 0.25rem 0; }
.footer__muted { opacity: 0.8; }
.footer a { color: var(--accent-dark); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 10, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
}
.lightbox[hidden] { display: none; }
.lightbox__image {
  max-width: min(90vw, 1100px);
  max-height: 80vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  object-fit: contain;
}
.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover { background: rgba(255, 255, 255, 0.28); }
.lightbox__close:focus-visible,
.lightbox__prev:focus-visible,
.lightbox__next:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lightbox__close { top: 1.25rem; right: 1.25rem; width: 44px; height: 44px; font-size: 1.6rem; line-height: 1; }
.lightbox__prev, .lightbox__next { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 2rem; line-height: 1; }
.lightbox__prev { left: 1rem; }
.lightbox__next { right: 1rem; }
.lightbox__counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.95rem;
  background: rgba(0, 0, 0, 0.35);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
}

/* ---------- Booking calendar ---------- */
.booking-main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}
.booking-calendars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}
.calendar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.calendar__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 1rem;
  text-align: center;
}
.calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.calendar__weekday {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding-bottom: 0.35rem;
}
.calendar__day {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.9rem;
  background: var(--bg-alt);
  border: 1px solid transparent;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font);
}
.calendar__day--empty { background: transparent; cursor: default; border: none; }
.calendar__day--past {
  color: var(--muted);
  opacity: 0.45;
  cursor: not-allowed;
  background: transparent;
}
.calendar__day--booked {
  background: repeating-linear-gradient(45deg, #efe9df, #efe9df 6px, #e7e0d3 6px, #e7e0d3 12px);
  color: var(--muted);
  text-decoration: line-through;
  cursor: not-allowed;
}
.calendar__day--available:hover,
.calendar__day--available:focus-visible { background: var(--accent); color: #fff; }
.calendar__day--selected { background: var(--accent); color: #fff; font-weight: 700; }
.calendar__day--in-range { background: rgba(176, 132, 69, 0.25); }
.calendar__day:disabled { pointer-events: none; }
.calendar__day:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 2px; }

.booking-legend {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.booking-legend__swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  margin-right: 0.4rem;
  vertical-align: middle;
}
.booking-legend__swatch--booked {
  background: repeating-linear-gradient(45deg, #efe9df, #efe9df 6px, #e7e0d3 6px, #e7e0d3 12px);
  border: 1px solid #cbbfa9;
}
.booking-legend__swatch--past { background: var(--bg-alt); opacity: 0.6; }
.booking-legend__swatch--selected { background: var(--accent); }

.booking-summary {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 2rem;
  text-align: center;
}
.booking-summary__dates { font-weight: 600; margin: 0 0 0.35rem; font-size: 1.05rem; }
.booking-summary__nights { color: var(--muted); margin: 0 0 1.25rem; }
.booking-summary__cta[aria-disabled="true"] {
  background: var(--line);
  color: var(--muted);
  cursor: not-allowed;
  pointer-events: none;
}
