/* Santa Calls — App styles (built on brand.css + festive.css tokens) */

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

html, body { background: var(--sc-bg); }

body {
  color: var(--sc-cream);
  font-family: var(--sc-body);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}

a { color: var(--sc-gold); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--sc-gold-hi); }

.container { max-width: 620px; margin: 0 auto; padding: 24px 20px; position: relative; z-index: 2; }

h1, h2, h3 {
  font-family: var(--sc-display);
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* ─── Buttons ───────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border: none;
  border-radius: var(--sc-r-md);
  font-family: var(--sc-body);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.2s;
  text-align: center;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--sc-red); color: var(--sc-cream); }
.btn-primary:hover:not(:disabled) { background: var(--sc-red-hi); color: var(--sc-cream); }

.btn-secondary { background: var(--sc-card); color: var(--sc-cream); border: 1px solid var(--sc-line-hi); }
.btn-secondary:hover:not(:disabled) { border-color: var(--sc-muted); }

.btn-green {
  background: var(--sc-green);
  color: var(--sc-cream);
  box-shadow: var(--sc-shadow-cta);
}
.btn-green:hover:not(:disabled) { background: var(--sc-green-hi); }

.btn-block { display: block; width: 100%; }

/* ─── Forms ─────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 13px;
  color: var(--sc-muted);
  margin-bottom: 6px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  background: var(--sc-card-deep);
  border: 1px solid var(--sc-line);
  border-radius: var(--sc-r-sm);
  color: var(--sc-cream);
  font-family: var(--sc-body);
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s;
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--sc-gold-deep);
  box-shadow: 0 0 0 2px var(--sc-gold-tint);
}
.form-group input::placeholder { color: var(--sc-quiet); }
.form-group select { appearance: none; }

/* ─── Cards ─────────────────────────────────────── */
.card {
  background: var(--sc-card);
  border: 1px solid var(--sc-line);
  border-radius: var(--sc-r-lg);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--sc-shadow-card);
}

/* ─── Section headers ───────────────────────────── */
.section-title {
  font-family: var(--sc-display);
  font-style: italic;
  font-size: 18px;
  font-weight: 600;
  color: var(--sc-cream);
  margin-bottom: 4px;
}
.section-subtitle {
  font-family: var(--sc-handwriting);
  font-size: 16px;
  color: var(--sc-gold);
  margin-bottom: 14px;
}

/* ─── Status messages ───────────────────────────── */
.status { padding: 12px 16px; border-radius: var(--sc-r-sm); margin-bottom: 16px; font-size: 14px; }
.status-success { background: var(--sc-green-tint); color: #7ec97e; border: 1px solid #2d4a2d; }
.status-error { background: var(--sc-red-tint); color: #e07070; border: 1px solid #4a2d2d; }
.status-info { background: var(--sc-gold-tint); color: var(--sc-gold); border: 1px solid var(--sc-gold-deep); }

/* ─── Hero ──────────────────────────────────────── */
.hero { text-align: center; padding: 60px 0 40px; }
.hero h1 { font-size: 38px; color: var(--sc-cream); margin-bottom: 16px; line-height: 1.15; font-weight: 500; }
.hero h1 em { font-style: italic; color: var(--sc-gold); font-weight: 600; }
.hero p { font-size: 17px; color: var(--sc-cream-2); max-width: 460px; margin: 0 auto 28px; line-height: 1.55; }

/* ─── Trust strip ───────────────────────────────── */
.trust-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 32px;
}
.trust-item {
  font-size: 13px;
  color: var(--sc-cream-2);
  padding: 12px;
  background: var(--sc-card);
  border-radius: var(--sc-r-md);
  text-align: center;
  border: 1px solid var(--sc-line);
  box-shadow: var(--sc-shadow-card);
}

/* ─── Badge ─────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.badge-green { background: var(--sc-green-tint); color: #7ec97e; }
.badge-red { background: var(--sc-red-tint); color: #e07070; }

/* ─── Nav ───────────────────────────────────────── */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--sc-line);
  margin-bottom: 24px;
}
.nav-brand {
  font-family: var(--sc-display);
  font-size: 20px;
  font-weight: 600;
  font-style: italic;
}
.nav-links { display: flex; gap: 16px; align-items: center; }
.nav-links a, .nav-links button {
  font-size: 14px; color: var(--sc-muted); background: none; border: none; cursor: pointer;
  font-family: var(--sc-body);
}
.nav-links a:hover, .nav-links button:hover { color: var(--sc-cream); text-decoration: none; }

/* ─── Calling state ─────────────────────────────── */
.calling-overlay {
  text-align: center;
  padding: 60px 20px;
}
.calling-overlay h2 {
  font-family: var(--sc-display);
  font-style: italic;
  color: var(--sc-green-hi);
  font-size: 28px;
  margin-bottom: 12px;
}
.calling-overlay p { color: var(--sc-cream-2); }

/* Ring pulse on calling state */
.ring-pulse-wrap {
  display: inline-block;
  position: relative;
  margin-bottom: 24px;
}
.ring-pulse-wrap .ring {
  position: absolute;
  inset: -12px;
  border: 2px solid var(--sc-green);
  border-radius: 50%;
  opacity: 0;
}
.ring-pulse-wrap .ring:nth-child(1) { animation: sc-ring-pulse 1.6s ease-out infinite; }
.ring-pulse-wrap .ring:nth-child(2) { animation: sc-ring-pulse 1.6s ease-out 0.5s infinite; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.pulse { animation: pulse 1.5s infinite; }

/* ─── Handwriting flourish ─────────────────────── */
.handwriting {
  font-family: var(--sc-handwriting);
  color: var(--sc-gold);
}

/* ─── How it works steps ───────────────────────── */
.steps { list-style: none; padding: 0; }
.steps li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  color: var(--sc-cream-2);
  font-size: 16px;
  line-height: 1.5;
  border-bottom: 1px dashed var(--sc-line);
}
.steps li:last-child { border-bottom: none; }
.step-num {
  font-family: var(--sc-display);
  font-style: italic;
  font-weight: 600;
  color: var(--sc-gold);
  font-size: 22px;
  min-width: 28px;
  text-align: center;
  flex-shrink: 0;
}

/* ─── Footer ────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 40px 0 24px;
  color: var(--sc-muted);
  font-size: 13px;
  border-top: 1px solid var(--sc-line);
  margin-top: 40px;
}

/* ─── Garland divider ───────────────────────────── */
.garland-divider {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}

/* ─── Magic chips (ad-libs style slot inputs) ──── */
.chip-board {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.magic-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-family: var(--sc-body);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s, background 0.15s;
  user-select: none;
}
.magic-chip:hover { transform: translateY(-1px); }
.magic-chip:active { transform: scale(0.97); }

/* Empty chip — dashed invite */
.magic-chip--empty {
  background: transparent;
  border: 1.5px dashed var(--sc-line-hi);
  color: var(--sc-muted);
}
.magic-chip--empty:hover {
  border-color: var(--sc-gold-deep);
  color: var(--sc-cream-2);
}
.magic-chip--empty .chip-plus {
  font-size: 16px;
  line-height: 1;
  color: var(--sc-gold);
}

/* Filled chip — solid with value */
.magic-chip--filled {
  background: var(--sc-gold-tint);
  border: 1.5px solid var(--sc-gold-deep);
  color: var(--sc-cream);
}
.magic-chip--filled .chip-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sc-gold);
  font-weight: 600;
}
.magic-chip--filled .chip-value {
  font-family: var(--sc-handwriting);
  font-size: 17px;
  color: var(--sc-cream);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.magic-chip--filled .chip-x {
  font-size: 14px;
  color: var(--sc-muted);
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}
.magic-chip--filled .chip-x:hover { color: var(--sc-red); }

/* Chip editing state */
.chip-editor {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1.5px solid var(--sc-gold);
  background: var(--sc-card-deep);
}
.chip-editor .chip-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sc-gold);
  font-weight: 600;
  white-space: nowrap;
}
.chip-editor input {
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--sc-cream);
  font-family: var(--sc-handwriting);
  font-size: 17px;
  min-width: 100px;
  width: 140px;
  padding: 2px 0;
}
.chip-editor input::placeholder { color: var(--sc-quiet); }
.chip-editor .chip-save {
  font-size: 16px;
  color: var(--sc-green-hi);
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}
.chip-editor .chip-save:hover { color: var(--sc-green); }

/* ─── Parchment letter preview ─────────────────── */
.santa-letter {
  position: relative;
  padding: 22px 24px 30px;
  margin-bottom: 18px;
  font-family: var(--sc-handwriting);
  font-size: 19px;
  line-height: 1.5;
  color: #3d2620;
}
.santa-letter .letter-greeting {
  font-family: var(--sc-display);
  font-style: italic;
  font-weight: 600;
  font-size: 20px;
  color: #761722;
  margin-bottom: 8px;
}
.santa-letter .blank {
  display: inline;
  border-bottom: 2px dashed #b08a3e;
  color: #9c8978;
  padding: 0 4px;
  font-family: var(--sc-handwriting);
  font-weight: 600;
}
.santa-letter .blank.filled {
  border-bottom-style: solid;
  border-bottom-color: #761722;
  color: #3d2620;
}
.santa-letter .seal-wrap {
  position: absolute;
  bottom: -14px;
  right: 20px;
}
