/* ═══════════════════════════════════════════════════════════
   THE CALENDAR PROJECT — Shared Design System
   Aesthetic: Refined editorial · Warm minimalism · Premium gifting
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Figtree:wght@300;400;500&family=Caveat:wght@500&display=swap');

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  /* Palette — warm off-white + charcoal, no yellow */
  --bg:           #F8F6F2;
  --bg-elevated:  #FFFFFF;
  --bg-sunken:    #F0EDE7;
  --ink:          #232020;
  --ink-2:        #4E4A45;
  --ink-3:        #8A857E;
  --border:       #E4DDD5;
  --border-mid:   #CCC6BC;

  /* Accent — single warm terracotta */
  --accent:       #C04B30;
  --accent-light: #F9EAE5;
  --accent-dark:  #A03C24;

  /* Semantic */
  --green:        #2B6349;
  --green-light:  #EAF4EE;
  --red:          #C0392B;
  --red-light:    #FCECEA;

  /* Typography */
  --font-serif:   'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-body:    'Figtree', system-ui, sans-serif;
  --font-hand:    'Caveat', cursive;

  /* Spacing */
  --r-xs:  6px;
  --r-sm:  10px;
  --r-md:  16px;
  --r-lg:  24px;
  --r-xl:  32px;

  /* Shadows */
  --shadow-xs: 0 1px 3px rgba(35,32,32,0.06);
  --shadow-sm: 0 2px 8px rgba(35,32,32,0.08);
  --shadow-md: 0 6px 24px rgba(35,32,32,0.10);
  --shadow-lg: 0 16px 56px rgba(35,32,32,0.13);
}

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-weight: 400;
  background: var(--bg);
  color: var(--ink);
  min-height: 100svh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.6;
}
img { display: block; max-width: 100%; }
button { font-family: var(--font-body); }

/* ── TYPOGRAPHY ──────────────────────────────────────────── */
.t-display {
  font-family: var(--font-serif);
  font-weight: 400; /* Instrument Serif — never bold */
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.t-heading {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
}
.t-hand {
  font-family: var(--font-hand);
  font-weight: 500;
}
.t-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.t-body { font-weight: 400; line-height: 1.65; }
.t-muted { color: var(--ink-2); }
.t-soft  { color: var(--ink-3); }

/* ── LAYOUT ──────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 660px;
  margin: 0 auto;
  padding: 0 20px;
}
.container-wide {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── CARDS ───────────────────────────────────────────────── */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-xs);
}
.card + .card { margin-top: 12px; }

/* ── FORM ELEMENTS ───────────────────────────────────────── */
.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }

label.flabel {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 7px;
}

input[type=text],
input[type=tel],
input[type=date],
input[type=email],
input[type=password],
select,
textarea {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px 15px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  color: var(--ink);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  line-height: 1.5;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  background: var(--bg-elevated);
  box-shadow: 0 0 0 3px var(--accent-light);
}
textarea { resize: vertical; min-height: 88px; }
.fhint { font-size: 12px; color: var(--ink-3); margin-top: 5px; }
.fhint.ok  { color: var(--green); }
.fhint.err { color: var(--red); }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  padding: 14px 28px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all 0.22s ease;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.btn-full { width: 100%; justify-content: center; }

.btn-dark {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 3px 12px rgba(35,32,32,0.18);
}
.btn-dark:hover:not(:disabled) {
  background: #3a3535;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(35,32,32,0.24);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 3px 12px rgba(192,75,48,0.2);
}
.btn-accent:hover:not(:disabled) {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(192,75,48,0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { border-color: var(--ink-2); color: var(--ink); }

.btn-sm { font-size: 13px; padding: 9px 18px; }
.btn-xs { font-size: 12px; padding: 6px 14px; }

.btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ── PILL TOGGLES ────────────────────────────────────────── */
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: all 0.18s;
  background: var(--bg-elevated);
  color: var(--ink-2);
  user-select: none;
}
.pill:hover { border-color: var(--ink-2); color: var(--ink); }
.pill.active { border-color: var(--accent); background: var(--accent-light); color: var(--accent-dark); }

/* ── BADGES ──────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
}
.badge-pending    { background: #FEF3E2; color: #92580C; }
.badge-processing { background: #EEF3FF; color: #2046B0; }
.badge-shipped    { background: var(--green-light); color: var(--green); }
.badge-delivered  { background: #F0FDF4; color: #15803D; }

/* ── DIVIDER ─────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ── INFO BANNER ─────────────────────────────────────────── */
.info-banner {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  font-size: 14px;
  line-height: 1.6;
}
.info-banner.neutral { background: var(--bg-sunken); color: var(--ink-2); }
.info-banner.warn    { background: #FEF3E2; border: 1px solid #FCD09A; color: #7A4A0A; }
.info-banner.ok      { background: var(--green-light); border: 1px solid #B6DECA; color: var(--green); }
.info-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }

/* ── TOAST ───────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 500;
  padding: 12px 24px;
  border-radius: 24px; z-index: 9999;
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
  white-space: nowrap;
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
  pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.ok   { background: var(--green); }
.toast.err  { background: var(--red); }

/* ── MODALS ──────────────────────────────────────────────── */
.modal-bg {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(35,32,32,0.5);
  display: none; align-items: flex-end; justify-content: center;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.modal-bg.open { display: flex; }
.modal-sheet {
  background: var(--bg-elevated);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  width: 100%; max-width: 480px;
  padding: 20px 22px 44px;
  max-height: 88svh; overflow-y: auto;
  animation: sheetUp 0.36s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-handle {
  width: 36px; height: 4px;
  background: var(--border-mid); border-radius: 2px;
  margin: 0 auto 22px;
}
.modal-title { font-family: var(--font-serif); font-size: 24px; text-align: center; margin-bottom: 4px; }
.modal-sub { font-size: 14px; color: var(--ink-3); text-align: center; margin-bottom: 22px; }
.err-msg {
  background: var(--red-light); color: var(--red);
  font-size: 13px; padding: 10px 14px;
  border-radius: var(--r-xs); margin-bottom: 14px; display: none;
}

/* ── SPINNER ─────────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── PROGRESS BAR ────────────────────────────────────────── */
.prog-track {
  flex: 1; height: 3px;
  background: var(--border); border-radius: 2px; overflow: hidden;
}
.prog-fill {
  height: 100%; background: var(--accent); border-radius: 2px;
  transition: width 0.45s cubic-bezier(0.22,1,0.36,1);
}

/* ── PAGE ANIMATION ──────────────────────────────────────── */
.page-enter {
  animation: pageIn 0.5s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes pageIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* ── SITE NAV ────────────────────────────────────────────── */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 58px;
  background: rgba(248,246,242,0.94);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 22px;
}
.nav-inner {
  width: 100%; max-width: 960px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo img { height: 22px; width: auto; }
.nav-logo-fallback { font-family: var(--font-body); font-weight: 500; font-size: 14px; }
.nav-actions { display: flex; align-items: center; gap: 12px; }

/* ── STEP INDICATOR ──────────────────────────────────────── */
.step-bar {
  display: flex; align-items: center; gap: 0;
  padding: 0; list-style: none;
}
.step-item {
  display: flex; align-items: center; gap: 0;
  font-size: 12px; font-weight: 500; color: var(--ink-3);
}
.step-item.active { color: var(--ink); }
.step-item.done   { color: var(--accent); }
.step-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--border); flex-shrink: 0;
  transition: all 0.3s;
}
.step-item.done   .step-dot { background: var(--accent); }
.step-item.active .step-dot { background: var(--accent); transform: scale(1.5); box-shadow: 0 0 0 3px var(--accent-light); }
.step-connector { width: 20px; height: 1px; background: var(--border); margin: 0 5px; }

/* ── WHATSAPP BUTTON ─────────────────────────────────────── */
.btn-wa {
  background: #25D366; color: #fff;
  box-shadow: 0 3px 12px rgba(37,211,102,0.25);
}
.btn-wa:hover { background: #1eb85a; transform: translateY(-1px); }

/* ── FOOTER ──────────────────────────────────────────────── */
.site-footer {
  background: var(--ink); color: rgba(255,255,255,0.35);
  padding: 32px 22px; text-align: center;
  font-size: 13px; line-height: 1.8;
}
.footer-links { display: flex; gap: 20px; justify-content: center; margin-top: 8px; flex-wrap: wrap; }
.footer-links a, .footer-links button {
  color: rgba(255,255,255,0.3); font-size: 12px;
  text-decoration: none; background: none; border: none;
  cursor: pointer; font-family: var(--font-body);
  transition: color 0.2s; padding: 0;
}
.footer-links a:hover, .footer-links button:hover { color: rgba(255,255,255,0.7); }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 420px) {
  .container { padding: 0 16px; }
  .card { padding: 18px 16px; }
}
