:root {
  --bg: #131313;
  --surface: #1f1f1f;
  --surface-high: #2a2a2a;
  --surface-low: #1b1b1b;
  --on-surface: #e2e2e2;
  --on-surface-muted: #d8c2b4;
  --primary: #ffb77c;
  --primary-container: #d38743;
  --outline: #534439;
  --radius: 0.75rem;
  --font-display: "Bayon", sans-serif;
  --font-body: "Open Sans", sans-serif;
  --max-width: 72rem;
  --checkout-embed-height: clamp(320px, 52vw, 520px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--on-surface);
  background: var(--bg);
  background-image: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(211, 135, 67, 0.12), transparent);
}

body.checkout-overlay-open {
  overflow: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

.hidden {
  display: none !important;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}

.logo {
  display: block;
  height: 44px;
  width: auto;
}

.header-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--on-surface-muted);
  white-space: nowrap;
}

.header-link:hover {
  color: var(--primary);
  text-decoration: none;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.hero {
  padding: 1.5rem 0 2rem;
  text-align: center;
  transition: padding 0.25s ease;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary-container);
}

.hero h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: font-size 0.25s ease;
}

.accent {
  color: var(--primary);
}

.lead {
  max-width: 40rem;
  margin: 0 auto;
  font-size: 1.0625rem;
  color: var(--on-surface-muted);
}

.booking-panel {
  background: var(--surface);
  border: 1px solid rgba(160, 141, 128, 0.2);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

.panel-header {
  padding: 1.5rem 1.5rem 0;
}

.panel-header h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.panel-header p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--on-surface-muted);
}

/* —— Step 1: picker —— */

.picker-layout {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 1fr);
  gap: 1.5rem;
  padding: 1.25rem 1.5rem 0;
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.calendar-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  background: var(--surface-high);
  color: var(--on-surface);
  font-size: 1.25rem;
  cursor: pointer;
}

.icon-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  margin-bottom: 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(216, 194, 180, 0.55);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
}

.cal-pad {
  aspect-ratio: 1;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  background: var(--surface-high);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.cal-day:hover:not(:disabled) {
  border-color: var(--primary);
}

.cal-day.is-selected {
  background: var(--primary-container);
  color: #2e1500;
  border-color: var(--primary);
}

.cal-day.has-slots:not(.is-selected) {
  border-color: rgba(255, 183, 124, 0.35);
}

.cal-day.is-past {
  opacity: 0.25;
  cursor: not-allowed;
}

.timezone-note {
  margin: 0.85rem 0 0;
  font-size: 0.75rem;
  color: var(--on-surface-muted);
}

.slots-date {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.slots-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 22rem;
  overflow-y: auto;
}

.slot-btn {
  width: 100%;
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  background: var(--surface-high);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.slot-btn.is-selected {
  background: rgba(211, 135, 67, 0.2);
  border-color: var(--primary);
  color: var(--primary);
}

.slots-loading,
.slots-empty,
.slots-error {
  margin: 0;
  font-size: 0.875rem;
  color: var(--on-surface-muted);
}

.slots-error {
  color: #ffb4ab;
}

.picker-footer {
  padding: 1.25rem 1.5rem 1.5rem;
  border-top: 1px solid rgba(160, 141, 128, 0.12);
}

.selection-summary {
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  color: var(--on-surface-muted);
}

.summary-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.75rem;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  width: 100%;
  color: #2e1500;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-container) 100%);
  box-shadow: 0 4px 24px rgba(211, 135, 67, 0.35);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--on-surface);
  background: var(--surface-high);
  border: 1px solid var(--outline);
}

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

/* —— Full-screen checkout overlay (stay on site) —— */

.checkout-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  background-image: radial-gradient(ellipse 90% 40% at 50% 0%, rgba(211, 135, 67, 0.1), transparent);
}

.checkout-overlay-top {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(160, 141, 128, 0.15);
  background: var(--surface);
}

.checkout-overlay-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.checkout-logo {
  flex-shrink: 0;
  height: 36px;
  width: auto;
}

.checkout-stay {
  margin: 0 0 0.15rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-container);
}

.checkout-overlay-top h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.checkout-selection {
  margin: 0.15rem 0 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
}

.checkout-embed-shell {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 0.75rem 1rem;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #0e0e0e;
  border: 1px solid rgba(160, 141, 128, 0.15);
  aspect-ratio: 16 / 9;
  max-height: none;
}

.checkout-embed {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: 0;
  background: #0e0e0e;
}

.embed-loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--surface-low);
  color: var(--on-surface-muted);
  font-size: 0.9375rem;
  font-weight: 600;
}

.embed-loading.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.embed-spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid rgba(255, 183, 124, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.embed-fallback {
  flex-shrink: 0;
  margin: 0;
  padding: 0.5rem 1rem 0.85rem;
  font-size: 0.8125rem;
  text-align: center;
  color: rgba(216, 194, 180, 0.55);
}

.link-btn {
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  text-decoration: underline;
}

.fallback-sep {
  margin: 0 0.35rem;
  opacity: 0.5;
}

.fallback-quiet {
  font-size: 0.8125rem;
  color: rgba(216, 194, 180, 0.45);
}

.fallback-quiet:hover {
  color: var(--primary);
}

@media (min-width: 768px) {
  .checkout-embed-shell {
    margin-left: auto;
    margin-right: auto;
    width: min(96rem, calc(100% - 2rem));
    aspect-ratio: 21 / 9;
  }
}

@media (orientation: landscape) {
  .checkout-overlay-top {
    padding: 0.65rem 1rem;
  }

  .checkout-overlay-top h2 {
    font-size: 1.15rem;
  }

  .checkout-embed-shell {
    aspect-ratio: 16 / 9;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
  }
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}

.info-card {
  padding: 1.25rem 1.5rem;
  background: var(--surface-low);
  border: 1px solid rgba(160, 141, 128, 0.12);
  border-radius: var(--radius);
}

.info-card h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--primary);
  text-transform: uppercase;
}

.info-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--on-surface-muted);
}

.site-footer {
  margin-top: 3rem;
  padding: 1.5rem;
  text-align: center;
  border-top: 1px solid rgba(160, 141, 128, 0.12);
}

.site-footer p {
  margin: 0;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(216, 194, 180, 0.55);
}

@media (max-width: 768px) {
  .picker-layout {
    grid-template-columns: 1fr;
  }

  .slots-list {
    max-height: 14rem;
  }

}

@media (max-width: 640px) {
  .booking-panel {
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .checkout-overlay-brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .checkout-overlay-top .btn {
    width: 100%;
  }
}
