/* ==========================================================
   MrJelly brand palette — change colors here, in one place.
   ========================================================== */
:root {
  --brand-primary:      #D7202B; /* strawberry jelly red (from the logo) — white text: 5.1:1 */
  --brand-primary-dark: #A9141E; /* pressed / text-on-light red */
  --brand-secondary:    #1A7A33; /* leaf green (from the logo ribbon) — white text: 5.4:1 */
  --brand-accent:       #FFB627; /* mango yellow — decoration only, never for text */
  --brand-soft:         #FFE6E8; /* pink jelly tint for the header */
  --brand-mint:         #E5F5E9; /* mint tint for icon chips */

  --bg:        #FFF8F0;          /* cream page background */
  --surface:   #FFFFFF;
  --text:      #2B1B1E;
  --text-muted:#6B5A5D;
  --border:    #F1E3E0;

  --radius-lg: 28px;
  --radius-md: 16px;
  --shadow:    0 12px 32px rgba(169, 20, 30, 0.12), 0 2px 6px rgba(43, 27, 30, 0.06);
  --tap:       48px;             /* minimum tap target (>= 44px) */
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 16px 12px calc(24px + env(safe-area-inset-bottom));
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, var(--brand-soft) 0, transparent 40%),
    radial-gradient(circle at 100% 100%, var(--brand-mint) 0, transparent 45%),
    var(--bg);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  line-height: 1.4;
}

/* ---------- Card ---------- */
.card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

@media (min-width: 600px) {
  body { align-items: center; padding: 32px; }
}

/* ---------- Header ---------- */
.card__header {
  text-align: center;
  padding: 24px 20px 20px;
  background:
    radial-gradient(120% 70% at 50% 0%, var(--brand-soft) 0 60%, transparent 61%),
    var(--surface);
}

.logo {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 64px;
  margin-bottom: 12px;
}

.logo img {
  width: 140px;
  height: auto;
  max-height: 120px;
  object-fit: contain;
}

/* Text placeholder used until assets/logo-mrjelly.png exists */
.logo__text {
  font-size: 2.25rem;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.02em;
  color: var(--brand-primary);
  text-shadow: 0 3px 0 #fff, 0 5px 0 rgba(169, 20, 30, 0.18);
}
.logo__text span { color: var(--brand-primary-dark); }

.avatar {
  display: block;
  width: 112px;
  height: 112px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 4px solid var(--surface);
  box-shadow: 0 0 0 3px var(--brand-primary), 0 8px 20px rgba(169, 20, 30, 0.2);
  background: var(--brand-soft);
  object-fit: cover;
}

.card__name {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
}

.card__title {
  margin: 4px 0 0;
  font-size: 1rem;
  color: var(--text-muted);
}

.card__company {
  display: inline-block;
  margin: 12px 0 0;
  padding: 4px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-secondary);
  background: var(--brand-mint);
  border-radius: 999px;
}

/* ---------- Contact rows ---------- */
.contacts {
  list-style: none;
  margin: 0;
  padding: 4px 16px;
}

.contact {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 8px 6px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  border-radius: 12px;
}
.contacts li:last-child .contact { border-bottom: 0; }

.contact:hover { background: #FFF5F5; }
.contact:focus-visible {
  outline: 3px solid var(--brand-accent);
  outline-offset: 2px;
}

.contact__icon {
  flex: none;
  width: var(--tap);
  height: var(--tap);
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand-primary);
}
.contact__icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact__text { min-width: 0; flex: 1; }
.contact__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.contact__value {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* ---------- Buttons ---------- */
.actions {
  display: grid;
  gap: 10px;
  padding: 12px 20px 8px;
}
.actions__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 12px 16px;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: scale(0.97); }
.btn:focus-visible {
  outline: 3px solid var(--brand-accent);
  outline-offset: 2px;
}

.btn--primary {
  color: #fff;
  background: var(--brand-primary);
  box-shadow: 0 4px 0 var(--brand-primary-dark);
}
.btn--primary:active { box-shadow: 0 1px 0 var(--brand-primary-dark); }

.btn--secondary {
  color: #fff;
  background: var(--brand-secondary);
}

.btn--outline {
  color: var(--brand-primary-dark);
  background: var(--surface);
  border-color: var(--brand-primary);
}

/* ---------- Footer ---------- */
.card__footer {
  padding: 14px 20px 20px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.card__footer::before {
  content: "";
  display: block;
  width: 48px;
  height: 6px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent), var(--brand-secondary));
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--text);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Respect "reduce motion" ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
