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

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

:root {
  --bg: #0a0a0a;
  --bg-gradient: radial-gradient(ellipse at 50% 0%, #141210 0%, #0a0a0a 70%);
  --surface: #131313;
  --surface-raised: #1a1a1a;
  --border: #242424;
  --border-subtle: #1c1c1c;
  --text: #ede8e3;
  --text-secondary: #9a948e;
  --text-muted: #817b76;
  --accent: #c8a97e;
  --accent-hover: #d9bc94;
  --accent-press: #b89a70;
  --accent-glow: rgba(200, 169, 126, 0.1);
  --accent-glow-strong: rgba(200, 169, 126, 0.18);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5), 0 4px 8px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 20px rgba(200, 169, 126, 0.15), 0 0 40px rgba(200, 169, 126, 0.05);
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'SF Mono', 'Fira Code', Menlo, monospace;
  --radius: 4px;
  --radius-lg: 8px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --speed: 0.25s var(--ease);
}

body {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Header / logo ── */

.site-header {
  padding: 40px 20px 36px;
  text-align: center;
  position: relative;
  background: radial-gradient(ellipse at 50% 100%, rgba(200, 169, 126, 0.04) 0%, transparent 70%);
}

.site-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.logo { display: inline-block; }

.logo-name {
  display: block;
  font-family: var(--serif);
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--text);
  line-height: 1;
  text-shadow: 0 0 40px rgba(200, 169, 126, 0.08);
}

.logo-sub {
  display: block;
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.4em;
  color: var(--accent);
  margin-top: 8px;
  text-transform: uppercase;
}

/* ── Layout ── */

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

/* ── Typography ── */

h1 {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text);
  margin: 48px 0 8px;
}

h2 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin: 36px 0 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  font-family: var(--sans);
}

p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin: 0 0 24px;
  line-height: 1.6;
}

/* ── Form ── */

.form-group { margin-bottom: 20px; }

label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select {
  width: 100%;
  padding: 13px 16px;
  font-size: 0.9375rem;
  font-family: var(--sans);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: border-color var(--speed), box-shadow var(--speed);
}

input::placeholder { color: var(--text-muted); }

input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow), inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%239a948e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

select option { background: var(--surface); color: var(--text); }

/* ── Combobox / city autocomplete ── */

.combobox { position: relative; }

.suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: 240px;
  overflow-y: auto;
  z-index: 10;
  display: none;
  box-shadow: var(--shadow-lg);
}

.suggestions.open { display: block; }

.suggestion-item {
  padding: 10px 14px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--speed);
}

.suggestion-item:hover,
.suggestion-item.active {
  background: var(--surface-raised);
  color: var(--text);
}

.suggestion-item mark {
  color: var(--accent);
  background: none;
  font-weight: 500;
}

/* ── Captcha page ── */

.captcha-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.captcha-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.captcha-card .logo { margin-bottom: 28px; }
.captcha-card .logo-name { font-size: 1.5rem; }
.captcha-card .logo-sub { font-size: 0.625rem; }

.captcha-card h1 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
  margin: 0 0 6px;
}

.captcha-card p {
  font-size: 0.8125rem;
  margin: 0 0 28px;
}

.captcha-wrapper { display: flex; justify-content: center; }

/* ── Calendar ── */

.calendar-section, .timeslot-section { display: none; }
.calendar-section.visible, .timeslot-section.visible { display: block; }

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

.calendar-nav-title {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.04em;
}

.calendar-nav-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 34px;
  height: 34px;
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--speed), color var(--speed), transform var(--speed), box-shadow var(--speed);
}

.calendar-nav-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.calendar-nav-btn:active:not(:disabled) { transform: translateY(0); }

.calendar-nav-btn:disabled {
  color: var(--text-muted);
  border-color: var(--border);
  cursor: not-allowed;
  opacity: 0.35;
}

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

.calendar-grid .day-header {
  font-size: 0.6875rem;
  font-weight: 500;
  text-align: center;
  padding: 8px 0;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.calendar-grid .day-cell {
  text-align: center;
  padding: 10px 4px;
  font-size: 0.875rem;
  border-radius: 2px;
  color: var(--text-muted);
  cursor: default;
  user-select: none;
  border: 1px solid transparent;
  transition: background var(--speed), color var(--speed), border-color var(--speed), transform var(--speed);
}

.calendar-grid .day-cell.empty { visibility: hidden; }

.calendar-grid .day-cell.available {
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
  font-weight: 500;
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.calendar-grid .day-cell.available:hover {
  background: var(--surface-raised);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md), 0 0 8px rgba(200, 169, 126, 0.08);
}

.calendar-grid .day-cell.available:active { transform: translateY(0); box-shadow: var(--shadow-sm); }

.calendar-grid .day-cell.selected,
.calendar-grid .day-cell.selected:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  font-weight: 600;
  transform: none;
  box-shadow: 0 0 12px rgba(200, 169, 126, 0.3), var(--shadow-sm);
}

/* ── Time slots ── */

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

.timeslot-btn {
  padding: 10px 20px;
  font-size: 0.8125rem;
  font-family: var(--mono);
  letter-spacing: 0.03em;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: background var(--speed), border-color var(--speed), color var(--speed), transform var(--speed), box-shadow var(--speed);
}

.timeslot-btn:hover {
  background: var(--surface-raised);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), 0 0 8px rgba(200, 169, 126, 0.08);
}

.timeslot-btn:active { transform: translateY(0); box-shadow: var(--shadow-sm); }

.timeslot-btn.selected,
.timeslot-btn.selected:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  font-weight: 600;
  transform: none;
  box-shadow: 0 0 12px rgba(200, 169, 126, 0.3), var(--shadow-sm);
}

/* ── Submit ── */

.btn-submit {
  display: inline-block;
  padding: 15px 48px;
  font-size: 0.8125rem;
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bg);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-press) 100%);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  margin-top: 36px;
  box-shadow: var(--shadow-md), 0 0 20px rgba(200, 169, 126, 0.12);
  transition: background var(--speed), transform var(--speed), box-shadow var(--speed);
}

.btn-submit:hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-submit:active {
  background: linear-gradient(135deg, var(--accent-press) 0%, #a8905e 100%);
  transform: translateY(0) scale(0.98);
  box-shadow: var(--shadow-sm);
}

.btn-submit:disabled {
  background: rgba(200, 169, 126, 0.08);
  color: rgba(200, 169, 126, 0.3);
  border: 1px solid rgba(200, 169, 126, 0.08);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Confirmation ── */

.confirmation { display: none; padding: 40px 0; }

.confirmation.visible {
  display: block;
  animation: conf-enter 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.confirmation h2 { margin-bottom: 20px; border: none; padding: 0; text-align: center; }
.confirmation > p { text-align: center; }

@keyframes conf-enter {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

#booking-form.exiting {
  animation: form-exit 0.4s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes form-exit {
  to { opacity: 0; transform: translateY(-16px) scale(0.97); }
}

.confirmation .summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
}

.confirmation .summary dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 20px;
}

.confirmation .summary dt {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.confirmation .summary dd {
  font-size: 0.9375rem;
  color: var(--text);
}

/* ── Complete page ── */

.complete-card {
  text-align: center;
  padding: 60px 0;
}

.complete-check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(200, 169, 126, 0.06);
  border: 2px solid var(--accent);
  color: var(--accent);
  margin: 0 auto 28px;
  box-shadow: 0 0 24px rgba(200, 169, 126, 0.15), 0 0 48px rgba(200, 169, 126, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.complete-check svg {
  width: 28px;
  height: 28px;
}

.complete-check .check-path {
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
}

.confirmation.visible .complete-check {
  animation: check-ring 0.5s 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.confirmation.visible .check-path {
  animation: check-draw 0.4s 0.55s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes check-ring {
  0%   { transform: scale(0.5); opacity: 0; box-shadow: 0 0 0 rgba(200, 169, 126, 0); }
  60%  { transform: scale(1.08); opacity: 1; }
  80%  { transform: scale(0.96); }
  100% { transform: scale(1); box-shadow: 0 0 32px rgba(200, 169, 126, 0.25), 0 0 64px rgba(200, 169, 126, 0.08); }
}

@keyframes check-draw {
  to { stroke-dashoffset: 0; }
}

.complete-card h1 { margin: 0 0 12px; }
.complete-card p { max-width: 400px; margin: 0 auto 12px; }

/* ── Focus ── */

button:focus-visible,
select:focus-visible,
.timeslot-btn:focus-visible,
.calendar-nav-btn:focus-visible,
.day-cell.available:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

input:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ── Reduced motion ── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ── Responsive ── */

@media (max-width: 480px) {
  .site-header { padding: 24px 16px; }
  .container { padding: 0 16px 40px; }
  .logo-name { font-size: 1.75rem; }
  h1 { font-size: 1.5rem; }

  .timeslot-grid { gap: 8px; }
  .timeslot-btn { padding: 8px 14px; font-size: 0.75rem; }

  .calendar-grid .day-cell { padding: 7px 2px; font-size: 0.8125rem; }

  .captcha-card { padding: 32px 24px; }
}
