/* ReidHaven — warm guest-facing styles */
:root {
  --bg: #faf7f2;
  --bg-elev: #ffffff;
  --ink: #1f1a17;
  --muted: #6d645c;
  --line: #e8e0d6;
  --brand: #e8614d;
  --brand-ink: #fff;
  --brand-soft: #fde8e3;
  --accent: #2f5d50;
  --accent-soft: #e4f0eb;
  --danger: #b42318;
  --shadow: 0 10px 30px rgba(31, 26, 23, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --font: "DM Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5rem; letter-spacing: -0.02em; }
p { margin: 0 0 1rem; }
hr.soft { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; color: var(--muted); font-weight: 600; margin-bottom: 0.35rem; }

.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.85rem 0;
}
.brand {
  display: inline-flex; align-items: center; gap: 0;
  font-weight: 700; font-size: 1.15rem; color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand-logo {
  height: 56px; width: auto; max-width: 320px;
  border-radius: 0;
  object-fit: contain; background: transparent;
  flex-shrink: 0;
}
.brand-mark { color: var(--brand); }
.nav { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.nav a { font-weight: 500; font-size: 0.95rem; color: var(--muted); }
.nav a:hover, .nav a.active { color: var(--ink); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  border: 1px solid transparent; border-radius: 999px;
  padding: 0.65rem 1.15rem; font: inherit; font-weight: 600;
  cursor: pointer; background: var(--brand); color: var(--brand-ink);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); color: var(--brand-ink); }
.btn.secondary { background: var(--ink); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: var(--ink); color: var(--ink); box-shadow: none; }
.btn.danger { background: var(--danger); }
.btn.danger.ghost { background: transparent; color: var(--danger); border-color: #f3c4bf; }
.btn.sm { padding: 0.4rem 0.75rem; font-size: 0.85rem; }
.btn.block { width: 100%; }

/* Hero */
.hero {
  padding: 2.5rem 0 1.5rem;
  background:
    radial-gradient(1000px 400px at 10% -10%, #fde8e3, transparent 60%),
    radial-gradient(800px 300px at 90% 0%, #e4f0eb, transparent 55%);
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); max-width: 14ch; }
.hero .lede { font-size: 1.1rem; color: var(--muted); max-width: 40ch; }

.search-strip {
  margin-top: 1.5rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  padding: 0.4rem;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr auto;
  gap: 0.25rem;
  align-items: center;
}
.search-strip label {
  display: flex; flex-direction: column; gap: 0.15rem;
  padding: 0.45rem 1rem; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
}
.search-strip input, .search-strip select {
  border: 0; outline: 0; font: inherit; font-weight: 500; color: var(--ink);
  background: transparent; padding: 0; text-transform: none; letter-spacing: 0;
}
.search-strip .btn { margin: 0.15rem; }

/* Cards */
.section-head {
  display: flex; justify-content: space-between; align-items: end;
  gap: 1rem; margin: 1.75rem 0 1rem;
}
.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  padding-bottom: 3rem;
}
.property-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  transition: transform .18s ease, box-shadow .18s ease;
}
.property-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: inherit; }
.card-media {
  aspect-ratio: 4/3;
  background-size: cover;
  background-position: center;
  position: relative;
}
.badge {
  position: absolute; left: 0.75rem; top: 0.75rem;
  background: rgba(255,255,255,0.92);
  border-radius: 999px; padding: 0.25rem 0.65rem;
  font-size: 0.75rem; font-weight: 700;
}
.card-body { padding: 0.95rem 1rem 1.15rem; }
.card-top { display: flex; justify-content: space-between; gap: 0.75rem; align-items: start; }
.card-top h3 { font-size: 1.05rem; margin: 0; }
.rating { font-weight: 700; white-space: nowrap; font-size: 0.92rem; }
.price { margin: 0.5rem 0 0; }

.panel {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 1px 0 rgba(31,26,23,0.03);
}

/* Property detail */
.detail-hero { padding-top: 1rem; }
.detail-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 180px 180px;
  gap: 0.55rem;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 360px;
}
.gal-item { background-size: cover; background-position: center; min-height: 140px; }
.gal-0 { grid-row: 1 / span 2; }
.detail-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.85fr;
  gap: 1.75rem;
  padding: 1.75rem 0 3rem;
  align-items: start;
}
.detail-meta { color: var(--muted); margin-bottom: 0; }
.lede { font-size: 1.05rem; }
.amenity-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0.55rem 1rem;
}
.amenity-grid li {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-size: 0.9rem; font-weight: 600;
}
.booking-card { position: sticky; top: 5.5rem; }
.booking-price { font-size: 1.35rem; margin-bottom: 0.5rem; }
.tip { margin-top: 0.75rem; margin-bottom: 0; }

/* Calendar */
.cal { margin-top: 0.5rem; }
.cal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.65rem;
}
.cal-title { font-weight: 700; }
.cal-nav {
  width: 2rem; height: 2rem; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 1.1rem;
}
.cal-nav:hover { border-color: var(--ink); }
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.3rem;
}
.cal-dow { text-align: center; font-size: 0.72rem; color: var(--muted); font-weight: 700; padding: 0.25rem 0; }
.cal-cell {
  aspect-ratio: 1; border-radius: 10px; border: 1px solid transparent;
  background: transparent; font: inherit; cursor: default;
  display: grid; place-items: center;
}
.cal-cell.day { cursor: pointer; }
.cal-cell.open { background: #eef7f2; border-color: #cfe5da; color: var(--accent); }
.cal-cell.booked { background: var(--brand-soft); border-color: #f3c4b8; color: #9a3b2e; text-decoration: line-through; }
.cal-cell.past { opacity: 0.4; cursor: not-allowed; }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--ink); }
.cal-cell .num { font-weight: 700; font-size: 0.85rem; }
.cal-legend {
  display: flex; gap: 1rem; margin-top: 0.75rem;
  font-size: 0.8rem; color: var(--muted);
}
.swatch {
  display: inline-block; width: 0.75rem; height: 0.75rem;
  border-radius: 4px; margin-right: 0.35rem; vertical-align: -1px;
}
.swatch.open { background: #cfe5da; }
.swatch.booked { background: #f3c4b8; }

/* Auth / host */
.auth-wrap {
  min-height: calc(100vh - 70px);
  display: grid; place-items: center; padding: 2rem 1rem;
}
.auth-card { width: min(100%, 420px); }
.auth-card h1 { margin-bottom: 0.25rem; }
.form-grid { display: grid; gap: 0.85rem; }
.form-grid.two { grid-template-columns: 1fr 1fr; gap: 0.85rem; }
label.field { display: grid; gap: 0.35rem; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
input, select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem; font: inherit; color: var(--ink); background: #fff;
}
textarea { min-height: 100px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid #f3c4b8; border-color: var(--brand); }
.error {
  background: #fef3f2; color: var(--danger); border: 1px solid #f3c4bf;
  border-radius: var(--radius-sm); padding: 0.65rem 0.8rem; font-size: 0.9rem;
}
.host-layout { padding: 1.5rem 0 3rem; display: grid; gap: 1.25rem; }
.host-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.75rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.actions { display: flex; gap: 0.35rem; flex-wrap: wrap; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
  color: var(--muted); font-size: 0.9rem;
}
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.empty {
  text-align: center; padding: 2.5rem 1rem; color: var(--muted);
  border: 1px dashed var(--line); border-radius: var(--radius);
}

@media (max-width: 860px) {
  .search-strip { grid-template-columns: 1fr; border-radius: var(--radius); }
  .detail-gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 200px 120px; }
  .gal-0 { grid-column: 1 / -1; grid-row: auto; min-height: 200px; }
  .detail-layout { grid-template-columns: 1fr; }
  .booking-card { position: static; }
  .form-grid.two { grid-template-columns: 1fr; }
  .amenity-grid { grid-template-columns: 1fr; }
}

/* Modal */
body.modal-open { overflow: hidden; }
.modal-backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(31, 26, 23, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal-backdrop[hidden] { display: none !important; }
.modal {
  width: min(100%, 640px);
  max-height: min(92vh, 900px);
  overflow: auto;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--bg-elev); z-index: 1;
}
.modal-header h2 { margin: 0; font-size: 1.25rem; }
.modal-body { padding: 1.15rem; }
.modal-footer-actions { margin-top: 0.25rem; }
.icon-btn {
  border: 0; background: transparent; cursor: pointer;
  font-size: 1.5rem; line-height: 1; color: var(--muted);
  width: 2rem; height: 2rem; border-radius: 999px;
}
.icon-btn:hover { background: var(--brand-soft); color: var(--ink); }