/* ============================================================
   ARTSY & CO — BOOKING SYSTEM STYLES
   Mobile-first. Design tokens at the top — change brand colours here.
   ============================================================ */

:root {
  /* --- Palette: warm porcelain neutrals + copper-rose accent --- */
  --porcelain: #F7F4EF;   /* page background */
  --paper:     #FFFEFB;   /* cards / surfaces */
  --blush:     #EFE4DC;   /* soft surface tint */
  --espresso:  #221C17;   /* primary text */
  --taupe:     #7A6F66;   /* secondary text */
  --copper:    #A66E5C;   /* accent / buttons */
  --copper-dk: #8C5848;   /* accent hover */
  --gold:      #C8A878;   /* ring / highlights */
  --sage:      #75836B;   /* success */
  --error:     #B0483B;   /* validation errors */
  --line:      rgba(34, 28, 23, 0.12);

  /* --- Type --- */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Karla", -apple-system, "Segoe UI", sans-serif;

  /* --- Rhythm --- */
  --radius: 18px;
  --radius-arch: 999px 999px 18px 18px; /* arch motif: rounded top */
  --shadow: 0 10px 30px rgba(34, 28, 23, 0.08);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--porcelain);
  color: var(--espresso);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 0.4em;
}

p { margin: 0 0 1em; }

button { font-family: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: color-mix(in srgb, var(--porcelain) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  color: var(--espresso);
  text-decoration: none;
}

.brand-amp { font-style: italic; color: var(--copper); }

.header-cta {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--copper);
  text-decoration: none;
}

/* Already inside the booking flow — no need for a second Book now */
body.booking-active .header-cta { display: none; }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  gap: 32px;
  padding: 40px 20px 48px;
  max-width: 1080px;
  margin: 0 auto;
}

/* When booking flow is active, the landing hero is hidden entirely
   so scrolling up never shows the "Book now" page again */
body.booking-active .hero { display: none; }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 18px;
}

.hero-title {
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  letter-spacing: -0.01em;
}

.hero-title em {
  font-style: italic;
  color: var(--copper);
}

.hero-sub {
  color: var(--taupe);
  font-size: 1.05rem;
  max-width: 46ch;
  margin-bottom: 28px;
}

.hero-note {
  font-size: 0.82rem;
  color: var(--taupe);
  margin-top: 14px;
}

/* Decorative arch — pelamin-inspired frame */
.hero-arch { display: flex; justify-content: center; }

.arch-frame {
  position: relative;
  width: min(320px, 80vw);
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  border-radius: var(--radius-arch);
  background:
    radial-gradient(120% 90% at 50% 0%, var(--blush) 0%, transparent 60%),
    linear-gradient(180deg, var(--paper), var(--porcelain));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.arch-glow {
  position: absolute;
  inset: 10px;
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
  border-radius: var(--radius-arch);
}

.arch-word {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--taupe);
  opacity: 0;
  animation: floatIn 0.9s var(--ease) forwards;
}
.arch-word:nth-child(2) { animation-delay: 0.25s; color: var(--copper); }
.arch-word:nth-child(3) { animation-delay: 0.5s; }
.arch-word:nth-child(4) { animation-delay: 0.75s; font-size: 1.7rem; color: var(--espresso); }

@keyframes floatIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 14px 28px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  transition: transform 0.18s var(--ease), background 0.18s, box-shadow 0.18s;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--copper);
  color: #fff;
  box-shadow: 0 6px 18px rgba(166, 110, 92, 0.35);
}

.btn-primary:hover:not(:disabled) { background: var(--copper-dk); }

.btn-primary:disabled {
  background: #C9BFB7;
  box-shadow: none;
  cursor: not-allowed;
}

.btn-ghost {
  background: transparent;
  color: var(--espresso);
  border-color: var(--line);
}

.btn-ghost:hover { background: var(--blush); }

.hero-cta { font-size: 1.05rem; padding: 16px 38px; }

/* ---------- Booking section ---------- */
.booking {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 18px 64px; /* tight on mobile; widened on desktop below */
  position: relative;
}

/* ---------- Progress thread (signature element) ----------
   A thin line with a sliding gold "ring" that marks the current step. */
.progress { margin-bottom: 8px; }

.progress-line {
  position: relative;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  margin: 12px 12px 10px;
}

.progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: var(--copper);
  border-radius: 2px;
  transition: width 0.5s var(--ease);
}

.progress-ring {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 22px;
  height: 22px;
  border: 3px solid var(--gold);
  border-radius: 50%;
  background: var(--porcelain);
  transform: translate(-50%, -50%);
  transition: left 0.5s var(--ease);
  box-shadow: 0 0 0 4px var(--porcelain);
}

.progress-labels {
  list-style: none;
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--taupe);
}

.progress-labels li.is-current { color: var(--copper); }

.step-indicator {
  text-align: right;
  font-size: 0.78rem;
  color: var(--taupe);
  margin: 4px 0 16px;
}

/* ---------- Steps & transitions (no page reload) ---------- */
.step {
  display: none;
  animation: stepIn 0.45s var(--ease);
}

.step.is-active { display: block; }

@keyframes stepIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

.step-title { font-size: clamp(1.6rem, 4.5vw, 2.2rem); }

.step-sub { color: var(--taupe); margin-bottom: 18px; font-size: 0.92rem; }

.step-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
  gap: 12px;
}

/* ---------- Step 1: package cards ---------- */
.package-grid {
  display: grid;
  gap: 12px;
}

.package-card {
  text-align: left;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
  position: relative;
}

.package-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.package-card.is-selected {
  border-color: var(--copper);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--copper) 18%, transparent), var(--shadow);
}

.package-card.is-selected::after {
  content: "✓";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--copper);
  color: #fff;
  font-size: 0.85rem;
  display: grid;
  place-items: center;
}

.package-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 0 0 4px;
}

.package-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--copper);
  background: var(--blush);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 10px;
}

.package-desc {
  color: var(--taupe);
  font-size: 0.88rem;
  margin: 0 0 10px;
}

.package-price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--espresso);
}

.package-price small {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--taupe);
}

/* ---------- Step 2: form ---------- */
.form-grid { display: grid; gap: 14px; }

.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  padding: 13px 16px;
  font: inherit;
  color: var(--espresso);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.field input:focus {
  outline: none;
  border-color: var(--copper);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--copper) 15%, transparent);
}

.field input.is-invalid { border-color: var(--error); }

.field-hint { font-size: 0.78rem; color: var(--taupe); margin: 6px 0 0; }

.field-error {
  display: none;
  font-size: 0.78rem;
  color: var(--error);
  margin: 6px 0 0;
}

.field input.is-invalid ~ .field-error { display: block; }

/* ---------- Step 3: terms ---------- */
.tnc-box {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  max-height: 240px; /* fits one mobile screen with checkbox + buttons */
  overflow-y: auto;
  font-size: 0.88rem;
  color: var(--taupe);
}

.tnc-box h3 { font-size: 1.1rem; color: var(--espresso); }

.tnc-box ol { padding-left: 18px; margin: 0; }

.tnc-box li { margin-bottom: 10px; }

.tnc-box strong { color: var(--espresso); }

.agree-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  font-weight: 600;
  cursor: pointer;
}

.agree-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--copper);
}

/* ---------- Step 4: payment ---------- */
.summary-card {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  font-size: 0.92rem;
  border-bottom: 1px dashed var(--line);
}

.summary-row:last-child { border-bottom: 0; }

.summary-row .label { color: var(--taupe); }

.summary-row.total {
  font-weight: 700;
  font-size: 1rem;
  border-top: 1.5px solid var(--line);
  margin-top: 6px;
  padding-top: 12px;
}

.payment-box {
  background: var(--blush);
  border-radius: var(--radius);
  padding: 22px;
}

.payment-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.payment-head p { font-size: 0.88rem; color: var(--taupe); margin: 0; }

.payment-badge {
  flex-shrink: 0;
  background: var(--espresso);
  color: var(--porcelain);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  border-radius: 8px;
  padding: 8px 12px;
}

.btn-pay { width: 100%; }

.payment-note {
  font-size: 0.8rem;
  color: var(--error);
  margin: 12px 0 0;
  text-align: center;
  min-height: 1em;
}

/* ---------- Loading overlay ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(34, 28, 23, 0.45);
  display: grid;
  place-items: center;
  z-index: 100;
}

/* Fix: class display:grid overrides the [hidden] attribute,
   so we must explicitly hide when hidden */
.overlay[hidden] { display: none; }

.overlay-card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 32px 40px;
  text-align: center;
  box-shadow: var(--shadow);
}

.overlay-card p { margin: 14px 0 0; font-weight: 600; }

.spinner {
  width: 38px;
  height: 38px;
  margin: 0 auto;
  border: 3px solid var(--blush);
  border-top-color: var(--copper);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ---------- Success ---------- */
.success { text-align: center; }

.success-ring {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border: 3px solid var(--sage);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  color: var(--sage);
  animation: pop 0.5s var(--ease);
}

@keyframes pop {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.success .summary-card { text-align: left; }

.success-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.success-note { font-size: 0.85rem; color: var(--taupe); margin-top: 18px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  text-align: center;
  padding: 36px 20px;
  color: var(--taupe);
  font-size: 0.88rem;
}

.footer-fine { font-size: 0.75rem; margin: 4px 0 0; }

/* ---------- Tablet / desktop ---------- */
@media (min-width: 720px) {
  .hero {
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    padding: 80px 24px 64px;
    gap: 40px;
  }

  .booking { padding: 48px 20px 96px; }

  .package-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }

  .package-card { padding: 22px; }

  .form-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }

  .tnc-box { max-height: 320px; }

  .success-actions { flex-direction: row; justify-content: center; }
}

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