/* Pierre's Tintype — shared mockup styles
   Brand tokens from DESIGN.md §2/§3; motion from emil-design-eng. */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..600;1,9..144,300..500&family=Inter:wght@400;450;500;600&display=swap');

:root {
  /* Color tokens (DESIGN.md §2) */
  --burgundy: #700000;
  --burgundy-deep: #5a0000;
  --cream: #faf8f5;
  --sand: #f7ecd9;
  --sand-text: #6b5a3e;
  --ink: #1a1a1a;
  --muted: #666666;
  --faint: #888888;
  --line: #e6e0d8;
  --surface: #ffffff;
  --error: #ba1a1a;

  /* Motion (emil-design-eng) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  /* Depth — sanctioned flex (DESIGN.md §3): diffuse, low-opacity, warm-tinted */
  --shadow-raise: 0 1px 2px rgba(80, 50, 30, 0.05), 0 4px 14px -8px rgba(80, 50, 30, 0.18);
  --shadow-card: 0 1px 2px rgba(80, 50, 30, 0.05), 0 12px 32px -16px rgba(60, 40, 25, 0.22);
  --shadow-modal: 0 24px 70px -20px rgba(40, 25, 15, 0.40);
  --shadow-slot: 0 1px 2px rgba(80, 50, 30, 0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Type roles (DESIGN.md §4) ---------- */
.font-display { font-family: 'Fraunces', serif; }
.display-xl {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(2rem, 5.5vw, 2.9rem);  /* ~32 mobile → ~46 desktop */
  line-height: 1.05;
  letter-spacing: -0.015em;
}
.display-lg {
  font-family: 'Fraunces', serif;
  font-weight: 450;
  font-size: clamp(1.5rem, 3vw, 1.95rem);  /* ~24 → ~31 */
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.label-sm {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.body-lg { font-size: 1.12rem; line-height: 1.6; }

/* ---------- Buttons (DESIGN.md §5/§5b) ---------- */
.btn {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.btn:active { transform: scale(0.975); }

.btn-primary {
  background: var(--burgundy);
  color: #fff;
  box-shadow: var(--shadow-raise);
}
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--burgundy-deep); box-shadow: var(--shadow-card); }
}

.btn-ghost {
  background: transparent;
  color: var(--burgundy);
  border-color: var(--line);
}
@media (hover: hover) and (pointer: fine) {
  .btn-ghost:hover { background: var(--cream); border-color: #d8cdbe; }
}

/* ---------- Date strip (DESIGN.md §5) ---------- */
.date-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 60px;
  padding: 12px 10px 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}
.date-cell .dow { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.date-cell .num { font-family: 'Fraunces', serif; font-size: 1.3rem; font-weight: 450; color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .date-cell:not(.is-disabled):hover { border-color: var(--burgundy); background: var(--cream); }
}
.date-cell.is-selected { background: var(--burgundy); border-color: var(--burgundy); box-shadow: var(--shadow-raise); }
.date-cell.is-selected .dow { color: rgba(255,255,255,0.72); }
.date-cell.is-selected .num { color: #fff; }
.date-cell.is-disabled { cursor: not-allowed; background: #fafafa; border-color: #ededed; }
.date-cell.is-disabled .dow,
.date-cell.is-disabled .num { color: #c4c4c4; }
.date-cell.is-disabled .num { text-decoration: line-through; text-decoration-color: #d8d8d8; }

/* ---------- Time slots (DESIGN.md §5/§5b — staggered reveal) ---------- */
.time-slot {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow-slot);
  transition: transform 160ms var(--ease-out), border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}
.time-slot:active { transform: scale(0.975); }
@media (hover: hover) and (pointer: fine) {
  .time-slot:not(.is-selected):hover { border-color: var(--burgundy); background: var(--cream); }
}
.time-slot.is-selected { background: var(--burgundy); border-color: var(--burgundy); color: #fff; box-shadow: var(--shadow-raise); }
.time-slot .chk { display: none; }
.time-slot.is-selected .chk { display: inline; margin-right: 5px; }

/* Stagger-in for revealed groups */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(8px);
  animation: revealUp 320ms var(--ease-out) forwards;
}
@keyframes revealUp { to { opacity: 1; transform: translateY(0); } }

/* On page-load reveal for the hero block */
.load-rise { opacity: 0; transform: translateY(10px); animation: revealUp 480ms var(--ease-out) forwards; }

/* ---------- Package / add-on rows (DESIGN.md §5) ---------- */
.pkg-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 180ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .pkg-row:hover { border-color: #d8cdbe; background: var(--cream); box-shadow: var(--shadow-raise); }
}
.pkg-row.is-selected { border-color: var(--burgundy); background: var(--cream); box-shadow: var(--shadow-raise); }
.pkg-price { font-family: 'Fraunces', serif; font-weight: 500; font-size: 1.25rem; color: var(--burgundy); white-space: nowrap; }
.pkg-price .was { display: block; font-family: 'Inter', sans-serif; font-weight: 400; font-size: 0.8rem; color: var(--faint); text-decoration: line-through; text-align: right; }

/* selection marker (never color alone — paired with a check) */
.sel-dot {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--line); margin-top: 2px;
  display: grid; place-items: center;
  transition: border-color 150ms ease, background-color 150ms ease;
}
.pkg-row.is-selected .sel-dot { background: var(--burgundy); border-color: var(--burgundy); }
.sel-dot svg { opacity: 0; }
.pkg-row.is-selected .sel-dot svg { opacity: 1; }

/* ---------- Inputs ---------- */
.field {
  width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--ink);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.field::placeholder { color: var(--faint); }
.field:focus { outline: none; border-color: var(--burgundy); box-shadow: 0 0 0 3px rgba(112,0,0,0.10); }
textarea.field { resize: vertical; min-height: 104px; line-height: 1.55; }

/* ---------- Discount tag ---------- */
.tag-discount {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: 0.72rem; letter-spacing: 0.06em;
  color: var(--burgundy); background: var(--sand);
  padding: 4px 9px; border-radius: 4px;
}

/* ---------- Progress dots (DESIGN.md §5) ---------- */
.dots { display: flex; align-items: center; gap: 10px; }
.dots .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); transition: background-color 200ms ease, transform 200ms var(--ease-out); }
.dots .dot.done { background: var(--burgundy); }
.dots .dot.active { background: var(--burgundy); transform: scale(1.35); }

/* ---------- Modal scaffolding (DESIGN.md §5b — scale from 0.95, centered) ---------- */
.modal-scrim {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(35, 22, 14, 0.42);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal-card {
  width: 100%; max-width: 560px; max-height: 90vh; overflow: auto;
  background: #fff; border-radius: 8px; box-shadow: var(--shadow-modal);
  animation: modalIn 240ms var(--ease-out) both;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

/* Mobile: modal becomes a full-screen sheet (DESIGN.md §7 open item — resolved) */
@media (max-width: 600px) {
  .modal-scrim { padding: 0; align-items: stretch; }
  .modal-card { max-width: none; max-height: 100vh; height: 100vh; border-radius: 0; animation: sheetIn 300ms var(--ease-out) both; }
  @keyframes sheetIn { from { opacity: 1; transform: translateY(100%); } to { opacity: 1; transform: translateY(0); } }
}

/* dimmed page behind a modal (for the B/C mockups) */
.page-dimmed { filter: blur(2px) saturate(0.9); }

.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 4px; border: 1px solid var(--line); background: #fff; color: var(--muted);
  cursor: pointer; transition: transform 160ms var(--ease-out), background-color 150ms ease, color 150ms ease;
}
.icon-btn:active { transform: scale(0.95); }
@media (hover: hover) and (pointer: fine) {
  .icon-btn:hover { background: var(--cream); color: var(--ink); border-color: #d8cdbe; }
}

.divider-rule { height: 1px; background: var(--line); border: 0; }

/* Reduced motion (DESIGN.md §5b) */
@media (prefers-reduced-motion: reduce) {
  .load-rise, .reveal-stagger > * { animation: fadeOnly 300ms ease forwards; transform: none; }
  .modal-card { animation: fadeOnly 200ms ease both; }
  @keyframes fadeOnly { from { opacity: 0; } to { opacity: 1; } }
  .btn:active, .time-slot:active, .icon-btn:active { transform: none; }
}
