/* ============================================================
   Cabo Pulmo Resort — Team Recognition / Review System
   Design tokens tomados del spec del cliente.
   ============================================================ */

:root {
  --primary: #0B4765;
  --primary-10: rgba(11, 71, 101, 0.1);
  --primary-05: rgba(11, 71, 101, 0.05);
  --primary-40: rgba(11, 71, 101, 0.4);
  --accent: #F0E9DB;
  --bg: #FFFFFF;
  --text: rgb(21, 28, 40);
  --muted: rgb(92, 99, 112);
  --border: rgb(224, 230, 235);
  --muted-bg: rgb(243, 245, 247);
  --destructive: rgb(239, 67, 67);

  --radius-card: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 45px rgba(11, 71, 101, 0.28);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------------- Sticky header + progress ---------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 0.8px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.header__row {
  max-width: 64rem;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.header__left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-indicator {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.icon-btn {
  height: 40px;
  width: 40px;
  border-radius: var(--radius-pill);
  border: 0.8px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  transition: background .2s, transform .2s;
}
.icon-btn:hover { background: var(--accent); }
.icon-btn:active { transform: scale(0.95); }

.link-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  padding: 6px 4px;
}
.link-btn:hover { color: var(--text); }

.progress {
  width: 100%;
  height: 6px;
  background: var(--muted-bg);
}
.progress__fill {
  height: 100%;
  background: var(--primary);
  width: 25%;
  transition: width 500ms ease-out;
}

/* ---------------- Main content ---------------- */
.main {
  flex: 1;
  width: 100%;
}
.container {
  max-width: 64rem;       /* max-w-5xl */
  margin: 0 auto;
  padding: 48px 32px;
}
.container--narrow { max-width: 48rem; }   /* max-w-3xl */
.container--review { max-width: 42rem; }   /* max-w-2xl */
.container--success { max-width: 56rem; }  /* max-w-4xl */

.step { display: none; animation: fade .35s ease; }
.step.is-active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  width: 100%;
  min-height: 360px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--primary);
}
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(11,71,101,0.92) 0%, rgba(11,71,101,0.45) 45%, rgba(11,71,101,0.15) 100%),
    linear-gradient(120deg, rgba(11,71,101,0.35), rgba(0,0,0,0));
}
.hero__inner {
  position: relative;
  max-width: 64rem;
  margin: 0 auto;
  width: 100%;
  padding: 56px 32px 40px;
  color: #fff;
}
.hero__kicker {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
  backdrop-filter: blur(4px);
}
.hero__title {
  margin: 0 0 12px;
  font-weight: 700;
  line-height: 1.05;
  font-size: clamp(30px, 5.2vw, 50px);
  text-wrap: balance;
  max-width: 16ch;
  text-shadow: 0 2px 18px rgba(0,0,0,0.35);
}
.hero__sub {
  margin: 0;
  font-size: clamp(15px, 2.2vw, 19px);
  color: rgba(255,255,255,0.92);
  max-width: 46ch;
  line-height: 1.5;
  text-shadow: 0 1px 10px rgba(0,0,0,0.3);
}
@media (min-width: 768px) { .hero { min-height: 440px; } }

.heading-block { text-align: center; margin-bottom: 40px; }
.title {
  font-weight: 700;
  color: var(--text);
  line-height: 1.05;
  margin: 0 0 16px;
  font-size: clamp(30px, 5vw, 48px);
  text-wrap: balance;
}
.title--md { font-size: clamp(28px, 4vw, 36px); }
.subtitle {
  font-size: clamp(16px, 2.4vw, 20px);
  color: var(--muted);
  line-height: 1.4;
  margin: 0 auto;
  max-width: 42rem;
  text-wrap: balance;
}
.subtitle strong { color: var(--text); font-weight: 600; }

/* ---------------- Step 1: staff grid ---------------- */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (min-width: 768px) {
  .staff-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}
@media (min-width: 1024px) {
  .staff-grid { grid-template-columns: repeat(4, 1fr); }
}

.staff-card {
  position: relative;
  text-align: left;
  overflow: hidden;
  border-radius: var(--radius-card);
  border: 0.8px solid var(--border);
  background: #fff;
  padding: 0;
  cursor: pointer;
  transition: box-shadow .3s, transform .3s, border-color .3s;
  font-family: inherit;
}
.staff-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.staff-card.is-selected {
  border: 2px solid var(--primary);
  background: var(--primary-05);
}

.staff-card__img-wrap {
  aspect-ratio: 4 / 5;
  background: var(--muted-bg);
  position: relative;
}
.staff-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.staff-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to bottom right, var(--primary-10), var(--accent));
}
.staff-card__placeholder svg { width: 64px; height: 64px; color: rgba(11, 71, 101, 0.3); }

.staff-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.2) 55%, transparent);
  opacity: 0.9;
  pointer-events: none;
}
.staff-card__text {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 16px;
}
.staff-card__name {
  font-weight: 700;
  font-size: clamp(18px, 2.4vw, 20px);
  line-height: 1.15;
  color: #fff;
  margin: 0 0 2px;
}
.staff-card__role {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  letter-spacing: 0.35px;
  text-transform: uppercase;
  margin: 0;
}
.staff-card__check {
  position: absolute;
  top: 12px; right: 12px;
  width: 28px; height: 28px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}
.staff-card.is-selected .staff-card__check { display: flex; }

/* multi-select hint pill above the grid */
.select-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-10);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  margin: 0 auto 24px;
}
.select-hint svg { width: 16px; height: 16px; }

/* ---------------- Step 2: activity grid ---------------- */
.activity-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) { .activity-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .activity-grid { grid-template-columns: repeat(4, 1fr); } }

.activity-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  border-radius: var(--radius-card);
  border: 1.6px solid var(--border);
  background: #fff;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}
.activity-card:hover { border-color: var(--primary-40); box-shadow: var(--shadow-sm); }
.activity-card:active { transform: scale(0.98); }
.activity-card.is-selected {
  border-color: var(--primary);
  background: var(--primary-05);
  box-shadow: var(--shadow-md), 0 0 0 2px #fff, 0 0 0 4px var(--primary);
}
.activity-card__icon {
  width: 64px; height: 64px;
  border-radius: var(--radius-pill);
  background: var(--muted-bg);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  transition: all .2s;
}
.activity-card.is-selected .activity-card__icon { background: var(--primary); color: #fff; }
.activity-card__label { font-size: 16px; color: var(--muted); font-weight: 400; transition: all .2s; }
.activity-card.is-selected .activity-card__label { color: var(--primary); font-weight: 600; font-size: 18px; }

/* ---------------- Step 3: questions ---------------- */
.questions { display: flex; flex-direction: column; gap: 32px; }
.q-card {
  background: #fff;
  border: 0.8px solid var(--border);
  border-radius: var(--radius-card);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .3s;
}
.q-card:hover { box-shadow: var(--shadow-md); }
@media (max-width: 640px) { .q-card { padding: 24px; } }

.q-label {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  display: block;
  margin-bottom: 24px;
  line-height: 1.3;
}
.q-label .q-num { color: var(--muted); margin-right: 8px; font-weight: 500; }
.q-label .req { color: var(--destructive); margin-left: 4px; }

/* stars */
.stars-wrap {
  background: rgba(243, 245, 247, 0.5);
  padding: 24px;
  border-radius: 12px;
  border: 0.8px solid rgba(224, 230, 235, 0.5);
}
.stars {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
@media (min-width: 640px) { .stars { justify-content: flex-start; gap: 16px; } }
.star-btn {
  background: transparent;
  border: none;
  padding: 8px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  color: var(--muted);
  transition: transform .2s, color .3s;
  line-height: 0;
}
.star-btn svg { width: 40px; height: 40px; }
@media (min-width: 768px) { .star-btn svg { width: 48px; height: 48px; } }
.star-btn:hover { transform: scale(1.1); }
.star-btn:active { transform: scale(0.9); }
.star-btn.is-on { color: var(--primary); }
.star-btn.is-on svg { fill: var(--primary); }
.stars-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  padding: 0 8px;
  font-size: 12px;
  color: var(--muted);
}

/* yes / no */
.yesno {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (min-width: 640px) { .yesno { flex-direction: row; gap: 24px; } }
.yesno__opt { flex: 1; }
.yesno__opt input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.yesno__label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border: 1.6px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  transition: all .2s;
}
.yesno__label:active { transform: scale(0.98); }
.yesno__opt input:checked + .yesno__label {
  border-color: var(--primary);
  background: var(--primary-05);
  color: var(--primary);
}
.yesno__opt input:focus-visible + .yesno__label { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--primary); }

/* textarea */
.q-textarea {
  width: 100%;
  min-height: 120px;
  resize: none;
  border: 0.8px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
}
.q-textarea::placeholder { color: var(--muted); }
.q-textarea:focus-visible { outline: none; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--primary); }

/* ---------------- Footer actions ---------------- */
.footer-actions {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column-reverse;
  gap: 16px;
}
@media (min-width: 640px) {
  .footer-actions { flex-direction: row; justify-content: space-between; }
}
.footer-actions--top1 { justify-content: flex-end; }

.btn {
  border-radius: var(--radius-pill);
  padding: 14px 32px;
  font-size: 18px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0.8px solid transparent;
  transition: opacity .2s, transform .2s, background .2s;
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: #0a3e58; }
.btn--ghost { background: #fff; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { background: var(--muted-bg); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn--full { width: 100%; }

/* ---------------- Step 4: review summary ---------------- */
.summary-card {
  background: #fff;
  border: 0.8px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.summary-row { padding-bottom: 24px; border-bottom: 0.8px solid var(--border); }
.summary-row--last { padding-bottom: 0; border-bottom: none; }
.summary-member {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}
@media (min-width: 640px) { .summary-member { flex-direction: row; align-items: center; } }
.summary-avatar {
  width: 96px; height: 96px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--muted-bg);
  border: 0.8px solid var(--border);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.summary-avatar img { width: 100%; height: 100%; object-fit: cover; }
.summary-avatar__ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-10);
  color: var(--primary-40);
}
.section-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin: 0 0 4px;
}
.summary-name { font-size: 24px; font-weight: 700; color: var(--text); margin: 0; }
.summary-role { color: var(--muted); font-size: 16px; margin: 2px 0 0; }

/* multiple selected team members in review step */
.summary-members { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.summary-member-item { display: flex; align-items: center; gap: 16px; }
.summary-member-item .summary-avatar { width: 64px; height: 64px; border-radius: 14px; }
.summary-member-item .summary-name { font-size: 19px; }
.summary-member-item .summary-role { font-size: 14px; }
.summary-count { color: var(--muted); font-weight: 500; }
.activity-badge {
  display: inline-flex;
  padding: 8px 16px;
  background: var(--primary-10);
  color: var(--primary);
  border-radius: 12px;
  font-weight: 500;
  font-size: 18px;
}
.completion-text { font-size: 18px; font-weight: 500; color: var(--text); margin: 0; }

/* ---------------- Success page ---------------- */
.success { max-width: 56rem; margin: 0 auto; padding: 48px 24px; }
.success__hero { text-align: center; margin-bottom: 48px; }
.success__icon {
  width: 96px; height: 96px;
  background: var(--primary-10);
  color: var(--primary);
  border-radius: var(--radius-pill);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
}
.success__title { font-size: clamp(34px, 5vw, 48px); font-weight: 700; margin: 0 0 16px; text-wrap: balance; }
.success__sub { font-size: 20px; color: var(--muted); max-width: 42rem; margin: 0 auto; line-height: 1.5; text-wrap: balance; }

.section { margin-bottom: 48px; }
.section__head { text-align: center; margin-bottom: 28px; }
.section__title { font-size: clamp(26px, 4vw, 36px); font-weight: 700; margin: 0 0 12px; }
.section__sub { font-size: 18px; color: var(--muted); max-width: 42rem; margin: 0 auto; line-height: 1.5; }

.platforms {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (min-width: 768px) { .platforms { grid-template-columns: repeat(4, 1fr); } }
.platform {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 16px;
  border-radius: 16px;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, filter .2s;
}
.platform:hover { filter: brightness(0.94); box-shadow: var(--shadow-md); }
.platform:active { transform: scale(0.98); }

.cards-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 48px;
}
@media (min-width: 768px) { .cards-row { grid-template-columns: repeat(2, 1fr); } }

.loyalty {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.loyalty__blob {
  position: absolute;
  top: -48px; right: -48px;
  width: 192px; height: 192px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-pill);
}
.loyalty__iconbox {
  width: 48px; height: 48px;
  background: rgba(255,255,255,0.2);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
  position: relative;
}
.loyalty__title { font-size: 24px; font-weight: 700; margin: 0 0 12px; position: relative; text-wrap: balance; }
.loyalty__sub { color: rgba(255,255,255,0.8); margin: 0 0 24px; position: relative; text-wrap: balance; }
.loyalty__list { list-style: none; padding: 0; margin: 0 0 32px; display: flex; flex-direction: column; gap: 12px; position: relative; }
.loyalty__list li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.loyalty__bullet {
  width: 24px; height: 24px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.loyalty__cta { display: flex; align-items: center; gap: 16px; margin-top: auto; position: relative; flex-wrap: wrap; }
.btn--invert { background: #fff; color: var(--primary); padding: 10px 24px; font-size: 16px; }
.btn--invert:hover { background: #f3f5f7; }
.loyalty__later { color: rgba(255,255,255,0.85); font-size: 16px; font-weight: 500; text-decoration: none; }

.social-card {
  background: #fff;
  border: 0.8px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.social-card__title { font-size: 24px; font-weight: 700; margin: 0 0 12px; text-wrap: balance; }
.social-card__sub { color: var(--muted); margin: 0 0 32px; text-wrap: balance; }
.social-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  border-radius: 12px;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, filter .2s;
}
.social-btn:hover { filter: brightness(0.94); }
.social-btn:active { transform: scale(0.98); }

.back-home {
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 48px;
}

/* ---------------- Toast ---------------- */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--text);
  color: #fff;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  transition: transform .35s ease;
  max-width: 90vw;
}
.toast.is-on { transform: translateX(-50%) translateY(0); }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
