/* ============================================
   BLOOM COTTAGES — Design System v3
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

/* ---- Tokens ---- */
:root {
  --fern:        #4F7942;
  --fern-dark:   #3d5e33;
  --russet:      #8B4513;
  --russet-dark: #6e360f;
  --ink:         #1A1A18;
  --ink-soft:    #3D3D38;
  --ink-muted:   rgba(26,26,24,0.45);
  --white:       #FFFFFF;
  --off-white:   #F7F6F2;
  --border:      rgba(26,26,24,0.1);
  --border-mid:  rgba(26,26,24,0.18);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  --r-sm:  4px;
  --r-md:  10px;
  --r-lg:  16px;
  --r-xl:  24px;

  --shadow-card: 0 1px 3px rgba(26,26,24,0.06), 0 4px 16px rgba(26,26,24,0.08);
  --shadow-lift: 0 6px 24px rgba(26,26,24,0.14), 0 2px 6px rgba(26,26,24,0.07);

  --max-w: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ---- Base ---- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.6rem, 6vw, 5rem); font-weight: 300; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 300; }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.9rem); }
h4 { font-size: 1.2rem; }

p { max-width: 68ch; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fern);
}

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(56px, 8vw, 96px);
}

.section--alt {
  background: var(--off-white);
}

.section--dark {
  background: var(--ink);
  color: var(--white);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn--primary {
  background: var(--fern);
  color: var(--white);
}
.btn--primary:hover {
  background: var(--fern-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lift);
}

.btn--secondary {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border-mid);
}
.btn--secondary:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.btn--ghost {
  background: rgba(255,255,255,0.12);
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.35);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.65);
}

.btn--russet {
  background: var(--russet);
  color: var(--white);
}
.btn--russet:hover {
  background: var(--russet-dark);
  transform: translateY(-1px);
}

/* ---- Nav ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav__links a {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  transition: color 0.18s;
}

.nav__links a:hover { color: var(--fern); }

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav__hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    165deg,
    #1b2e1a 0%,
    #253e22 45%,
    #3a5430 75%,
    #4a6840 100%
  );
}

.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 70% 30%, rgba(139,69,19,0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 20% 80%, rgba(79,121,66,0.2) 0%, transparent 50%);
}

.hero__bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(26,26,24,0.35) 0%,
    rgba(26,26,24,0.55) 60%,
    rgba(26,26,24,0.7) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-inline: var(--gutter);
  max-width: 820px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-bottom: 18px;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 40px;
  font-style: italic;
}

/* ---- Hero Search Bar ---- */
.hero-search {
  background: var(--white);
  border-radius: var(--r-xl);
  display: flex;
  align-items: stretch;
  box-shadow: 0 8px 40px rgba(26,26,24,0.3);
  overflow: visible;
  max-width: 780px;
  margin-inline: auto;
  isolation: isolate;
}

/* Clip background colour to rounded container without clipping dropdowns */
.hero-search::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--r-xl);
  background: var(--white);
  z-index: -1;
  pointer-events: none;
}

.hero-search {
  position: relative;
}

/* Round left edge of first field — no overflow hidden so dropdown isn't clipped */
.hero-search__field:first-child {
  border-radius: var(--r-xl) 0 0 var(--r-xl);
}

.hero-search__field {
  width: 240px;
  flex: none;
  display: flex;
  flex-direction: column;
  padding: 16px 22px;
  cursor: pointer;
  position: relative;
  transition: background 0.15s;
  border-right: 1px solid var(--border);
}

.hero-search__field:hover {
  background: var(--off-white);
}

.hero-search__field:last-of-type {
  border-right: none;
}

.hero-search__label {
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 3px;
}

.hero-search__value {
  font-size: 0.9rem;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-search__value.placeholder {
  color: var(--ink-muted);
}

.hero-search__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--fern);
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0 28px;
  border-radius: 0 var(--r-xl) var(--r-xl) 0;
  transition: background 0.18s;
  flex-shrink: 0;
  border: none;
  cursor: pointer;
  /* Clip its own corners without affecting dropdown siblings */
  overflow: hidden;
}

.hero-search__btn:hover {
  background: var(--fern-dark);
}

.hero-search__btn svg {
  width: 18px;
  height: 18px;
}

/* ---- Search Dropdowns ---- */
.search-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  background: var(--white);
  border-radius: var(--r-lg);
  box-shadow: 0 8px 32px rgba(26,26,24,0.18);
  z-index: 200;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  min-width: 340px;
  text-align: left;
}

.search-dropdown.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

/* Date picker dropdown */
.date-picker {
  padding: 20px 24px 24px;
}

.date-picker__toggle {
  display: flex;
  background: var(--off-white);
  border-radius: 100px;
  padding: 4px;
  margin-bottom: 20px;
}

.date-picker__toggle-btn {
  flex: 1;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: all 0.15s;
  text-align: center;
  cursor: pointer;
}

.date-picker__toggle-btn.active {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(26,26,24,0.1);
}

.date-picker__calendar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.calendar-month {}

.calendar-month__header {
  text-align: center;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.calendar-nav-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-soft);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 1rem;
  line-height: 1;
  transition: background 0.15s;
}

.calendar-nav-btn:hover { background: var(--off-white); }

.calendar-month__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.calendar-month__dow {
  text-align: center;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  padding: 4px 0 8px;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.12s;
  position: relative;
}

.cal-day:hover:not(.cal-day--past):not(.cal-day--empty) {
  background: var(--off-white);
}

.cal-day--past {
  color: var(--ink-muted);
  cursor: default;
}

.cal-day--empty { cursor: default; }

.cal-day--selected {
  background: var(--ink) !important;
  color: var(--white);
}

.cal-day--in-range {
  background: rgba(79,121,66,0.12);
  border-radius: 0;
}

.cal-day--range-start, .cal-day--range-end {
  background: var(--ink) !important;
  color: var(--white);
  border-radius: 50% !important;
}

/* Flexible dates strip */
.date-picker__flexible {
  padding: 20px 24px 24px;
}

.date-picker__flexible p {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 16px;
  max-width: none;
}

.flex-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.flex-option {
  padding: 8px 16px;
  border-radius: 100px;
  border: 1.5px solid var(--border-mid);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--ink);
  background: var(--white);
}

.flex-option:hover {
  border-color: var(--ink);
}

.flex-option.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

/* Guests dropdown */
.guests-dropdown {
  padding: 20px 24px;
  min-width: 320px;
  text-align: left;
}

.guest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.guest-row:last-child { border-bottom: none; }

.guest-row__label {}
.guest-row__name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
}
.guest-row__note {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-top: 1px;
}

.guest-row__controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.guest-count-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--border-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.15s;
  background: var(--white);
  line-height: 1;
}

.guest-count-btn:hover:not(:disabled) {
  border-color: var(--ink);
  color: var(--ink);
}

.guest-count-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.guest-count-btn.active {
  border-color: var(--ink);
  color: var(--ink);
}

.guest-row__count {
  font-size: 0.95rem;
  font-weight: 500;
  min-width: 16px;
  text-align: center;
}

/* ---- Section header ---- */
.section-header {
  margin-bottom: 48px;
}

.section-header .eyebrow { margin-bottom: 12px; }
.section-header h2 { margin-bottom: 12px; }
.section-header p { color: var(--ink-soft); }

/* ---- Property Grid ---- */
.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.property-card {
  background: var(--white);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  display: flex;
  flex-direction: column;
}

.property-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.property-card__image {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--off-white);
  position: relative;
}

.property-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.property-card:hover .property-card__image img {
  transform: scale(1.03);
}

.property-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--white);
  color: var(--fern);
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 100px;
}

.property-card__body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.property-card__location {
  font-size: 0.72rem;
  color: var(--fern);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 7px;
}

.property-card__name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 10px;
  color: var(--ink);
}

.property-card__desc {
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 18px;
  flex: 1;
}

.property-card__meta {
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.property-card__meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.property-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.property-card__price {
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.property-card__price span {
  font-family: var(--font-body);
  font-size: 0.73rem;
  color: var(--ink-soft);
  font-weight: 400;
}

/* Unavailable state for search filtering */
.property-card.no-availability {
  opacity: 0.45;
  pointer-events: none;
}

/* ---- Footer ---- */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,0.65);
  padding-block: 48px 32px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer__brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--white);
  display: block;
  margin-bottom: 10px;
}

.footer__tagline {
  font-size: 0.84rem;
  line-height: 1.6;
  max-width: 28ch;
}

.footer__heading {
  font-family: var(--font-body);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 16px;
}

.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__links a {
  font-size: 0.88rem;
  transition: color 0.18s;
}
.footer__links a:hover { color: var(--white); }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
}

.footer__bottom a { transition: color 0.18s; }
.footer__bottom a:hover { color: var(--white); }

/* ---- Utility ---- */
.text-center { text-align: center; }
.text-center p { margin-inline: auto; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

/* ---- Mobile nav overlay ---- */
@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__hamburger { display: flex; }

  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--white);
    justify-content: center;
    align-items: center;
    gap: 28px;
    z-index: 99;
  }

  .nav__links.open a {
    font-size: 1.5rem;
    font-family: var(--font-display);
    color: var(--ink);
  }

  .hero-search {
    flex-direction: column;
    border-radius: var(--r-lg);
    max-width: 100%;
  }

  .hero-search::before {
    border-radius: var(--r-lg);
  }

  .hero-search__field:first-child {
    border-radius: var(--r-lg) var(--r-lg) 0 0;
  }

  .hero-search__field {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    text-align: left !important;
    align-items: flex-start;
    padding: 14px 20px;
  }

  /* Hide labels on mobile — cleaner without them */
  .hero-search__label {
    display: none;
  }

  .hero-search__value {
    text-align: left !important;
    font-size: 0.95rem;
  }

  .hero-search__btn {
    border-radius: 0 0 var(--r-lg) var(--r-lg);
    padding: 18px;
    justify-content: center;
  }

  .date-picker__calendar {
    grid-template-columns: 1fr;
  }

  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .footer__bottom { flex-direction: column; gap: 10px; text-align: center; }
}

@media (max-width: 480px) {
  .property-grid { grid-template-columns: 1fr; }
}
