/* ---------- Tokens ---------- */
:root {
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-surface-alt: #f7f7f5;
  --color-text: #1c1f1d;
  --color-text-muted: #6a716e;
  --color-border: #e4e6e3;
  --color-border-strong: #c9ccc7;

  /* Brand: lake/forest tones inspired by Resort Lac Ste-Marie */
  --color-accent: #053E5C;
  --color-accent-hover: #032e45;
  --color-accent-soft: #cfd4db;     /* lake grey-blue, taken from site */
  --color-accent-soft-2: #e8ebe6;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 6px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Video background ---------- */
.video-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.50) 50%,
    rgba(0, 0, 0, 0.65) 100%
  );
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Hero ---------- */
main { width: 100%; }
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  padding-bottom: 20vh;
}
.hero-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.hero-inner {
  width: 100%;
  text-align: center;
}
.hero-logo-link {
  display: inline-block;
}
.hero-logo {
  height: 260px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.4));
}
.hero h1 {
  font-size: clamp(32px, 4.5vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.hero-sub {
  margin: 0 auto;
  max-width: 580px;
  color: rgba(255,255,255,0.8);
  font-size: 17px;
}
.search-container {
  margin-top: 32px;
  width: 100%;
}

/* ---------- Search bar ---------- */
.search-bar {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1.2fr auto;
  align-items: center;
  margin: 0 auto;
  max-width: 880px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease;
  padding: 6px;
}
.search-bar:hover { box-shadow: var(--shadow-md); }

.search-field {
  display: flex;
  flex-direction: column;
  padding: 14px 24px;
  text-align: left;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background .15s ease;
  outline: none;
  min-width: 0;
}
.search-field:hover { background: var(--color-surface-alt); }
.search-field.is-active {
  background: #fff;
  box-shadow: var(--shadow-md);
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.01em;
}
.field-value {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.field-value.has-value { color: var(--color-text); }

.search-divider {
  width: 1px;
  height: 32px;
  background: var(--color-border);
}
.search-bar:hover .search-divider,
.search-bar:focus-within .search-divider { background: transparent; }

.search-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 600;
  height: 48px;
  margin: 0 10px 0 0;
  transition: background .15s ease, transform .05s ease;
}
.search-btn:hover { background: var(--color-accent-hover); }
.search-btn:active { transform: scale(0.98); }

/* ---------- Popovers ---------- */
.popover-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 40;
  animation: fade-in .15s ease;
}
.popover-backdrop.is-visible { display: block; }
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.popover {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  padding: 28px;
  z-index: 50;
  animation: pop-in .18s ease;
}
@keyframes pop-in {
  from { opacity: 0; transform: translate(-50%, -48%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

.calendar-popover {
  width: min(720px, calc(100vw - 32px));
}
.guests-popover {
  width: min(420px, calc(100vw - 32px));
}

.popover-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}
.link-btn {
  background: none;
  border: none;
  text-decoration: underline;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  padding: 8px 4px;
}
.link-btn:hover { color: var(--color-accent); }
.primary-btn {
  background: var(--color-text);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
}
.primary-btn:hover { background: var(--color-accent); }

.calendar-hint {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
  min-height: 20px;
}

/* ---------- Calendar ---------- */
.calendar-header {
  position: relative;
  height: 0;
}
.cal-nav {
  position: absolute;
  top: 4px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  transition: background .15s ease;
  z-index: 2;
}
.cal-nav:hover { background: var(--color-surface-alt); }
#calPrev { left: 8px; }
#calNext { right: 8px; }
#accCalPrev { left: 8px; }
#accCalNext { right: 8px; }

.calendar-months {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.calendar-month {
  display: flex;
  flex-direction: column;
}
.calendar-title {
  text-align: center;
  font-weight: 600;
  font-size: 15px;
  margin: 0 0 16px;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.calendar-dow {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  padding: 6px 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.calendar-day {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  border: none;
  background: transparent;
  border-radius: 50%;
  color: var(--color-text);
  cursor: pointer;
  position: relative;
  transition: background .12s ease, color .12s ease;
}
.calendar-day:hover:not(:disabled):not(.is-selected) {
  border: 1px solid var(--color-text);
}
.calendar-day:disabled,
.calendar-day.is-empty {
  color: #c5c8c3;
  cursor: default;
  text-decoration: line-through;
}
.calendar-day.is-empty { visibility: hidden; }
.calendar-day.is-selected {
  background: var(--color-accent);
  color: #fff;
  font-weight: 600;
}
.calendar-day.is-in-range {
  background: var(--color-accent-soft-2);
  border-radius: 0;
  color: var(--color-text);
}
.calendar-day.is-range-start { border-radius: 50% 0 0 50%; }
.calendar-day.is-range-end { border-radius: 0 50% 50% 0; }
.calendar-day.is-range-start.is-range-end { border-radius: 50%; }

/* ---------- Guests ---------- */
.guests-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}
.guests-row:last-of-type { border-bottom: none; }
.guests-popover .popover-footer { border-top: none; justify-content: flex-end; }
.guests-row-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
}
.guests-row-sub {
  font-size: 13px;
  color: var(--color-text-muted);
}
.counter {
  display: flex;
  align-items: center;
  gap: 14px;
}
.counter-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--color-border-strong);
  background: #fff;
  font-size: 18px;
  line-height: 1;
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s ease, color .15s ease;
}
.counter-btn:hover:not(:disabled) {
  border-color: var(--color-text);
}
.counter-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.counter-value {
  min-width: 20px;
  text-align: center;
  font-size: 15px;
  font-weight: 500;
}

/* ---------- Summary (debug / next-step preview) ---------- */
.search-summary {
  margin: 32px auto 80px;
  max-width: 560px;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 14px;
  color: var(--color-text-muted);
  text-align: center;
}
.search-summary strong { color: var(--color-text); }

/* ---------- Language switcher ---------- */
.lang-switch {
  position: fixed;
  top: 16px;
  right: 24px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lang-switch-btn {
  background: #fff;
  border: 1px solid #ccc;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease;
  padding: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.lang-switch-btn img {
  width: 24px;
  height: 16px;
  display: block;
  border-radius: 2px;
  pointer-events: none;
}
.lang-switch-btn:hover {
  background: #f0f0f0;
}
.lang-switch-text {
  font-size: 14px;
  font-weight: 700;
  color: #333;
  letter-spacing: .5px;
  cursor: pointer;
  user-select: none;
}
/* On index hero — light version over dark background */
.hero-inner .lang-switch-btn {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: none;
}
.hero-inner .lang-switch-btn:hover {
  background: rgba(255,255,255,0.25);
}
.hero-inner .lang-switch-text {
  color: #fff;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .search-container { margin-top: 24px; }
}
@media (max-width: 760px) {
  .hero {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    min-height: 100dvh;
  }
  .hero-unit {
    justify-content: center;
    min-height: 100dvh;
    padding: 0 16px;
  }
  .hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: -100px;
  }
  .hero-logo-link {
    text-align: center;
  }
  .hero-logo { height: 240px; }
  .hero-content {
    width: 100%;
  }
  .hero h1 { font-size: clamp(26px, 6vw, 36px); }
  .hero-sub { font-size: 15px; max-width: 100%; }
  .search-container { margin-top: 20px; }
  .search-bar {
    border-radius: var(--radius-lg);
    padding: 4px;
    gap: 0;
  }
  .search-field {
    padding: 8px 12px;
    border-radius: var(--radius-pill);
  }
  .search-field:hover { background: transparent; }
  .field-label { font-size: 12px; letter-spacing: 0.03em; }
  .field-value { font-size: 15px; margin-top: 1px; }
  .search-divider { height: 24px; }
  .search-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0 2px 0 0;
    justify-content: center;
    flex-shrink: 0;
  }
  .search-btn span { display: none; }
  .calendar-months { grid-template-columns: 1fr; gap: 20px; }
  .calendar-popover:not([hidden]) {
    width: auto;
    top: auto;
    bottom: 0;
    left: 8px;
    right: 8px;
    transform: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    padding: 24px 20px 0;
    animation: slide-up .25s ease;
  }
  @keyframes slide-up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
  .calendar-popover .calendar-months {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding: 0 0 4px;
  }
  .calendar-popover .popover-footer {
    flex-shrink: 0;
    background: #fff;
    padding: 16px 20px;
    margin: 0 -20px;
    border-top: 1px solid var(--color-border);
  }
  .calendar-day { font-size: 14px; }
  .calendar-grid { gap: 1px; }
  .guests-popover {
    width: auto;
    top: auto;
    bottom: 0;
    left: 8px;
    right: 8px;
    transform: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    animation: slide-up .25s ease;
  }
  .popover-backdrop.is-visible { display: block; }
  .popover { padding: 24px 20px; }
  .search-summary { margin: 24px auto 60px; font-size: 13px; }
  .container { padding: 0 16px; }
}
@media (max-width: 480px) {
  .hero-logo { height: 240px; }
  .hero-unit { padding: 0 16px; }

  .hero-content { width: 100%; }
  .hero h1 { font-size: clamp(22px, 7vw, 28px); }
  .hero-sub { font-size: 14px; }
  .hero { padding-bottom: 0; }
  .search-field { padding: 8px 12px; }
  .field-label { font-size: 11px; }
  .field-value { font-size: 14px; }
  .search-btn { width: 40px; height: 40px; }
  .search-divider { height: 20px; }
  .calendar-title { font-size: 14px; }
  .calendar-day { font-size: 13px; }
}
