/* ── Follow-to-Win — feed-native gradient pop ───────────────────────
   Off-white canvas, sunset gradient hero (peach→magenta→violet),
   rounded feed-post cards, stories-ring bonus checklist. */

:root {
  --canvas: #faf9f7;
  --card: #ffffff;
  --ink: #26222e;
  --ink-soft: #7c7689;
  --peach: #feda75;
  --magenta: #d62976;
  --violet: #962fbf;
  --grad: linear-gradient(120deg, #feda75 0%, #fa7e1e 25%, #d62976 55%, #962fbf 85%);
  --line: #ece9f1;
  --ok: #22a06b;
  --err: #d63649;
  --font: 'Plus Jakarta Sans', sans-serif;
}

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

.hidden { display: none !important; }

body {
  font-family: var(--font);
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

.wrap { width: 100%; max-width: 480px; margin: 0 auto; padding: 0 20px; }

main { flex: 1 0 auto; padding-bottom: 70px; }

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero { padding-top: 34px; }

.hero-panel {
  background: var(--grad);
  border-radius: 28px;
  padding: 44px 30px;
  text-align: center;
  color: #fff;
  box-shadow: 0 24px 60px rgba(214, 41, 118, 0.3);
}

.pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 7px 18px;
  margin-bottom: 16px;
  backdrop-filter: blur(4px);
}

.hero-panel h1 {
  font-weight: 800;
  font-size: clamp(2.2rem, 9vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.18);
}

.hero-panel .sub { margin-top: 10px; font-weight: 700; font-size: 1.02rem; opacity: 0.95; }

/* ── Notes ────────────────────────────────────────────────────────── */
.note {
  margin: 16px 0;
  padding: 15px 18px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  text-align: center;
  font-weight: 600;
}

/* ── Cards ────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 24px;
  padding: 26px 24px 28px;
  margin-top: 18px;
  box-shadow: 0 12px 30px rgba(38, 34, 46, 0.06);
}

.card h2 { font-weight: 800; font-size: 1.3rem; letter-spacing: -0.01em; }

.card-sub { color: var(--ink-soft); font-size: 0.92rem; margin: 4px 0 18px; }

/* Form */
form { display: flex; flex-direction: column; gap: 10px; }

input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 15px 16px;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 600;
  color: var(--ink);
  background: var(--canvas);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus {
  outline: none;
  border-color: var(--magenta);
  box-shadow: 0 0 0 4px rgba(214, 41, 118, 0.1);
}

input.error { border-color: var(--err); }
input::placeholder { color: var(--ink-soft); opacity: 0.7; }

.fine { margin-top: 10px; text-align: center; color: var(--ink-soft); font-size: 0.82rem; }

.rules-link {
  background: none;
  border: none;
  color: var(--magenta);
  font-family: inherit;
  font-size: inherit;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.form-error { color: var(--err); font-weight: 700; text-align: center; }

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.98rem;
  padding: 15px 26px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
  line-height: 1.2;
  white-space: nowrap;
}

.btn:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.06); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 12px 28px rgba(214, 41, 118, 0.3);
}

.btn-small {
  padding: 10px 20px;
  font-size: 0.86rem;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
}

.btn-small.is-done { background: var(--ok); }

.btn-block { width: 100%; }

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Bonus actions ────────────────────────────────────────────────── */
.action {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1.5px solid var(--line);
}

.action:last-of-type { border-bottom: none; }

.ring {
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  padding: 3px;
  background: var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.action.is-done .ring { background: var(--grad); }

.ring-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
}

.action-copy { flex: 1; min-width: 0; }

.action-title { font-weight: 800; font-size: 0.96rem; }

.action-sub { color: var(--ink-soft); font-size: 0.82rem; }

/* Share panel */
.share-panel { margin-top: 18px; padding-top: 18px; border-top: 1.5px dashed var(--line); }

.share-title { font-weight: 800; font-size: 0.95rem; margin-bottom: 10px; }

.copy-row { display: flex; gap: 8px; }

#share-url {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  font-size: 0.88rem;
  font-family: inherit;
  font-weight: 600;
  color: var(--ink);
  background: var(--canvas);
  border: 1.5px solid var(--line);
  border-radius: 12px;
}

/* ── Rules modal ──────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(38, 34, 46, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-card {
  background: var(--card);
  color: var(--ink);
  border-radius: 20px;
  max-width: 620px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1.5px solid var(--line);
}

.modal-head h3 { font-weight: 800; font-size: 1.15rem; }

.modal-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
}

.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
  font-size: 0.92rem;
  white-space: pre-wrap;
}

/* ── Toast ────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 800;
  z-index: 400;
  max-width: 92vw;
  text-align: center;
}

.toast-ok { background: var(--ok); }

/* ── Footer ───────────────────────────────────────────────────────── */
.footer {
  flex-shrink: 0;
  text-align: center;
  padding: 24px 20px;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

#wbx-powered-by-slot { margin-top: 12px; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 420px) {
  .copy-row { flex-direction: column; }
  .action { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
