/* ===== TOKENS ===== */
:root {
  --bg: #f5f7fa;
  --bg-card: #ffffff;
  --bg-header: #ffffff;
  --bg-hero: #f0f9f4;
  --bg-hero-grad: linear-gradient(135deg, #f0f9f4 0%, #e8f5e9 100%);
  --bg-progress: #ffffff;
  --border: #e4e8ef;
  --text-primary: #0f1923;
  --text-secondary: #5a6577;
  --text-muted: #8a95a3;
  --accent: #25d366;
  --accent-dark: #128c7e;
  --accent-light: #e8f8ef;
  --accent-btn: #25d366;
  --accent-btn-hover: #1db954;
  --done-bg: #e8f8ef;
  --done-border: #b7e9c9;
  --done-text: #137a3c;
  --tip-bg: #fffbea;
  --tip-border: #fde68a;
  --tip-text: #92400e;
  --placeholder-bg: #f0f4f8;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.09), 0 2px 8px rgba(0,0,0,.05);
  --radius: 16px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --font: 'Inter', system-ui, sans-serif;
  --transition: 0.22s cubic-bezier(.4,0,.2,1);
}

[data-theme="dark"] {
  --bg: #0d1117;
  --bg-card: #161b22;
  --bg-header: #0d1117;
  --bg-hero: #0d1117;
  --bg-hero-grad: linear-gradient(135deg, #0d1117 0%, #0f1f15 100%);
  --bg-progress: #161b22;
  --border: #21262d;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --accent: #25d366;
  --accent-dark: #34d058;
  --accent-light: #0f2218;
  --accent-btn: #238636;
  --accent-btn-hover: #2ea043;
  --done-bg: #0f2218;
  --done-border: #1a4731;
  --done-text: #3fb950;
  --tip-bg: #1c1810;
  --tip-border: #3d2f10;
  --tip-text: #e3b341;
  --placeholder-bg: #21262d;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,.3);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.4);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

/* ===== LAYOUT ===== */
.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), border-color var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

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

.brand-icon {
  width: 44px;
  height: 44px;
  background: var(--accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.brand-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.brand-subtitle {
  font-size: .75rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* Theme toggle */
.theme-toggle {
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), border-color var(--transition), transform .15s;
  flex-shrink: 0;
}

.theme-toggle:hover { transform: scale(1.08); }
.theme-toggle:active { transform: scale(.95); }

[data-theme="light"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }

/* ===== HERO ===== */
.hero {
  background: var(--bg-hero-grad);
  padding: 72px 0 64px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.hero-badge {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent-dark);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.highlight {
  color: var(--accent);
  background: linear-gradient(90deg, #25d366, #128c7e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 28px;
}

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .85rem;
  color: var(--text-muted);
}

.meta-item svg { opacity: .7; }

.meta-divider {
  color: var(--border);
  font-size: 1rem;
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-btn);
  color: #fff;
  font-family: var(--font);
  font-size: .95rem;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), transform .15s, box-shadow var(--transition);
  box-shadow: 0 4px 14px rgba(37,211,102,.3);
}

.btn-primary:hover {
  background: var(--accent-btn-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37,211,102,.35);
}

.btn-primary:active { transform: translateY(0); }

/* ===== PROGRESS ===== */
.progress-bar-wrap {
  background: var(--bg-progress);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  position: sticky;
  top: 73px;
  z-index: 90;
  transition: background var(--transition), border-color var(--transition);
}

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

.progress-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.progress-track {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #25d366, #128c7e);
  border-radius: var(--radius-pill);
  width: 0%;
  transition: width .5s cubic-bezier(.4,0,.2,1);
}

.progress-count {
  font-size: .78rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

/* ===== STEPS SECTION ===== */
.steps-section {
  padding: 56px 0 80px;
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ===== STEP CARD ===== */
.step-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition), transform .2s;
}

.step-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.step-card.done {
  border-color: var(--done-border);
  background: var(--done-bg);
}

/* Step header */
.step-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 24px 0;
}

.step-number {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-light);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  color: var(--accent-dark);
  flex-shrink: 0;
  transition: background var(--transition), border-color var(--transition);
}

.step-check {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  border-radius: 50%;
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
}

.step-card.done .step-number { border-color: var(--accent); }
.step-card.done .step-number span { display: none; }
.step-card.done .step-check { display: flex; }

.step-title-wrap { flex: 1; }

.step-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 4px;
}

.step-desc {
  font-size: .875rem;
  color: var(--text-secondary);
}

/* Step body */
.step-body {
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.step-content {
  font-size: .925rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.step-content p + p { margin-top: 10px; }

.step-content strong { color: var(--text-primary); }

.step-content ol, .step-content ul {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.step-content a {
  color: var(--accent-dark);
  font-weight: 600;
  text-underline-offset: 3px;
  transition: opacity var(--transition);
}

.step-content a:hover { opacity: .75; }

/* Info box — destaque com borda colorida */
.info-box {
  margin-top: 16px;
  background: var(--accent-light);
  border: 1.5px solid var(--done-border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: .875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.info-box-header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
  font-size: .9rem;
  color: var(--text-primary);
}

.info-box-header span { font-size: 1.1rem; }

.info-box p { margin: 0; }

/* Image */
.step-image-wrap {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1.5px solid var(--border);
}

.step-image-wrap img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  background: var(--placeholder-bg);
}

.img-placeholder {
  background: var(--placeholder-bg);
  aspect-ratio: 16/10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: .8rem;
  text-align: center;
  padding: 24px;
}

/* Step footer */
.step-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.step-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--tip-bg);
  border: 1px solid var(--tip-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: .82rem;
  color: var(--tip-text);
  line-height: 1.5;
  flex: 1;
  min-width: 180px;
}

.tip-icon { flex-shrink: 0; font-size: 1rem; }

.btn-done {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1.5px solid var(--accent);
  color: var(--accent-dark);
  font-family: var(--font);
  font-size: .875rem;
  font-weight: 600;
  padding: 9px 22px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform .15s;
  white-space: nowrap;
}

.btn-done:hover {
  background: var(--accent);
  color: #fff;
  transform: scale(1.03);
}

.step-card.done .btn-done {
  background: var(--accent);
  color: #fff;
  cursor: default;
  pointer-events: none;
}

/* ===== COMPLETION CARD ===== */
.completion-card {
  display: none;
  text-align: center;
  background: var(--bg-card);
  border: 1.5px solid var(--done-border);
  border-radius: var(--radius);
  padding: 56px 32px;
  margin-top: 32px;
  box-shadow: var(--shadow-lg);
}

.completion-card.visible { display: block; animation: fadeUp .5s ease both; }

.completion-icon { font-size: 3.5rem; margin-bottom: 16px; }

.completion-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--done-text);
  margin-bottom: 10px;
}

.completion-card p {
  font-size: .95rem;
  color: var(--text-secondary);
  max-width: 420px;
  margin: 0 auto 28px;
}

/* ===== THUMBNAIL GALLERY ===== */
.thumb-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}

.thumb-item {
  background: var(--placeholder-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), transform .18s, box-shadow var(--transition);
  text-align: center;
}

.thumb-item:hover {
  border-color: var(--accent);
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 6px 18px rgba(37,211,102,.2);
}

.thumb-item img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
}

.thumb-caption {
  font-size: .7rem;
  color: var(--text-muted);
  padding: 5px 6px;
  line-height: 1.3;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}

.gallery-placeholder {
  grid-column: 1 / -1;
  border-radius: var(--radius-sm);
  border: 1.5px dashed var(--border);
  aspect-ratio: auto;
  padding: 32px;
}

/* ===== MODAL LIGHTBOX ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,.88);
  display: none;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-overlay.open {
  display: flex;
  animation: fadeIn .2s ease both;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(860px, 90vw);
  width: 100%;
  animation: zoomIn .22s cubic-bezier(.4,0,.2,1) both;
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(.93); }
  to   { opacity: 1; transform: scale(1); }
}

.modal-img {
  width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  display: block;
  box-shadow: 0 16px 48px rgba(0,0,0,.5);
}

.modal-caption {
  color: rgba(255,255,255,.75);
  font-size: .85rem;
  margin-top: 12px;
  text-align: center;
}

.modal-dots {
  display: flex;
  gap: 7px;
  margin-top: 14px;
}

.modal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.3);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background .18s, transform .18s;
}

.modal-dot.active {
  background: var(--accent);
  transform: scale(1.35);
}

.modal-nav {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .18s, border-color .18s, transform .15s;
}

.modal-nav:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.1);
}

.modal-nav:disabled {
  opacity: .25;
  cursor: not-allowed;
  transform: none;
}

.modal-close {
  position: fixed;
  top: 16px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .18s, transform .15s;
  z-index: 1001;
}

.modal-close:hover {
  background: rgba(255,255,255,.2);
  transform: scale(1.1) rotate(90deg);
}

@media (max-width: 560px) {
  .modal-nav { width: 38px; height: 38px; font-size: 1rem; }
  .modal-overlay { gap: 8px; padding: 12px 8px; }
}

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  background: var(--bg-header);
}

.footer-inner {
  text-align: center;
  font-size: .82rem;
  color: var(--text-muted);
}

.footer-inner strong { color: var(--text-secondary); }

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step-card {
  animation: fadeUp .4s ease both;
}
.step-card:nth-child(1) { animation-delay: .05s; }
.step-card:nth-child(2) { animation-delay: .10s; }
.step-card:nth-child(3) { animation-delay: .15s; }
.step-card:nth-child(4) { animation-delay: .20s; }
.step-card:nth-child(5) { animation-delay: .25s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .hero { padding: 48px 0 40px; }

  .hero-title { font-size: 1.6rem; }

  .header-inner { padding-top: 12px; padding-bottom: 12px; }

  .brand-title { font-size: .9rem; }

  .progress-bar-wrap { top: 68px; }

  .step-header { padding: 18px 16px 0; gap: 12px; }
  .step-body { padding: 16px; grid-template-columns: 1fr; }
  .step-footer { padding: 14px 16px 16px; flex-direction: column; align-items: stretch; }

  .btn-done { justify-content: center; }

  .completion-card { padding: 40px 20px; }
}

@media (max-width: 480px) {
  .hero-meta { gap: 6px; }
  .meta-divider { display: none; }
}
