/* ============================================================
   PINSAVE — STYLESHEET
   Design: Editorial-Minimal · Dark · Accent: Pinterest Red
   ============================================================ */

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

/* Garante que [hidden] sempre esconde o elemento, mesmo com regras de display no CSS */
[hidden] { display: none !important; }

:root {
  --red:        #E60023;
  --red-dark:   #b0001a;
  --red-glow:   rgba(230, 0, 35, 0.25);
  --coral:      #ff5c73;
  --orange:     #ff7a45;
  --pink:       #ff4d8f;
  --bg:         #0a0a0c;
  --surface:    #111115;
  --surface-2:  #18181e;
  --surface-3:  #1f1f28;
  --border:     rgba(255,255,255,0.07);
  --border-2:   rgba(255,255,255,0.12);
  --text:       #f0f0f5;
  --text-2:     #9898a8;
  --text-3:     #5c5c70;
  --white:      #ffffff;
  --radius:     14px;
  --radius-lg:  20px;
  --radius-xl:  28px;
  --font-head:  'Syne', sans-serif;
  --font-body:  'DM Sans', sans-serif;
  --trans:      cubic-bezier(0.4, 0, 0.2, 1);
  --shadow:     0 4px 24px rgba(0,0,0,0.5);
  --shadow-lg:  0 12px 48px rgba(0,0,0,0.6);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── HEADER ─────────────────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,10,12,0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--white);
}
.logo-icon { display: flex; align-items: center; }
.logo-text .accent { color: var(--red); }

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.2s var(--trans);
  letter-spacing: 0.01em;
}
.nav-links a:hover { color: var(--white); }

/* ── HERO ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 60px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  animation: drift 12s ease-in-out infinite;
}
.orb-1 {
  width: 600px; height: 600px;
  background: var(--red);
  top: -150px; left: -150px;
  animation-duration: 14s;
}
.orb-2 {
  width: 400px; height: 400px;
  background: var(--coral);
  bottom: -100px; right: -100px;
  animation-duration: 18s;
  animation-delay: -6s;
}
.orb-3 {
  width: 300px; height: 300px;
  background: var(--orange);
  top: 40%; left: 60%;
  animation-duration: 22s;
  animation-delay: -10s;
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 30px) scale(0.95); }
}

.grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
  width: 100%;
  text-align: center;
  animation: fadeUp 0.7s var(--trans) both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-2);
  margin-bottom: 28px;
}
.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

h1 {
  font-family: var(--font-head);
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--white);
  margin-bottom: 24px;
}
h1 em {
  font-style: normal;
  color: var(--red);
  position: relative;
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-2);
  max-width: 540px;
  margin: 0 auto 40px;
  line-height: 1.7;
  font-weight: 300;
}

/* ── DOWNLOADER CARD ─────────────────────────────────────────── */
.downloader-card {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xl);
  padding: 28px 28px 20px;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.05);
  margin-bottom: 36px;
  text-align: left;
}

.input-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.input-wrapper {
  flex: 1;
  min-width: 220px;
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  color: var(--red);
  font-size: 1rem;
  pointer-events: none;
  z-index: 2;
}

#pin-url {
  width: 100%;
  padding: 15px 110px 15px 44px;
  background: var(--surface-2);
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.2s var(--trans), box-shadow 0.2s var(--trans);
  outline: none;
}
#pin-url::placeholder { color: var(--text-3); }
#pin-url:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow);
}

.btn-paste {
  position: absolute;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  color: var(--text-2);
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s var(--trans);
}
.btn-paste:hover { background: var(--border-2); color: var(--white); }

.btn-download {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 28px;
  background: var(--red);
  border-radius: var(--radius);
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-head);
  letter-spacing: 0.01em;
  transition: all 0.2s var(--trans);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn-download::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
}
.btn-download:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--red-glow);
}
.btn-download:active { transform: translateY(0); }

.url-hint {
  font-size: 0.78rem;
  color: var(--text-3);
  margin-top: 12px;
  padding-left: 2px;
}

/* ── RESULT AREA ─────────────────────────────────────────────── */
.result-area {
  margin-top: 24px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  animation: fadeUp 0.3s var(--trans) both;
}

.result-inner { /* populated by JS */ }

.media-preview {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.media-thumb {
  width: 140px;
  height: 140px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid var(--border-2);
  flex-shrink: 0;
}

.media-info { flex: 1; min-width: 180px; }
.media-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: var(--white);
}
.media-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.badge-image { background: rgba(59,130,246,0.15); color: #60a5fa; }
.badge-video { background: rgba(230,0,35,0.15); color: var(--coral); }

.download-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dl-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s var(--trans);
  text-decoration: none;
}
.dl-btn:hover {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
  transform: translateX(2px);
}
.dl-btn i { font-size: 0.8rem; }

.error-msg {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(230, 0, 35, 0.08);
  border: 1px solid rgba(230, 0, 35, 0.2);
  border-radius: var(--radius);
  color: var(--coral);
  font-size: 0.9rem;
}

/* ── LOADING ─────────────────────────────────────────────────── */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 32px;
  color: var(--text-2);
  font-size: 0.9rem;
}

.spinner {
  width: 44px; height: 44px;
  position: relative;
}
.spinner-ring {
  width: 100%; height: 100%;
  border: 3px solid var(--border-2);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── HERO STATS ──────────────────────────────────────────────── */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  margin-bottom: 4px;
}
.stat span { font-size: 0.8rem; color: var(--text-3); }
.stat-div {
  width: 1px; height: 36px;
  background: var(--border-2);
}

/* ── SHARED SECTION STYLES ───────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-tag {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(230,0,35,0.12);
  border: 1px solid rgba(230,0,35,0.25);
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 16px;
}
.section-header h2 {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: 12px;
}
.section-header p {
  color: var(--text-2);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto;
}

/* ── HOW TO USE ──────────────────────────────────────────────── */
.how-section {
  padding: 100px 0;
  position: relative;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  counter-reset: step;
}

.step-card {
  position: relative;
  padding: 36px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.3s var(--trans);
  overflow: hidden;
}
.step-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--red), var(--coral));
  opacity: 0;
  transition: opacity 0.3s var(--trans);
}
.step-card:hover { border-color: var(--border-2); transform: translateY(-4px); }
.step-card:hover::before { opacity: 1; }

.step-num {
  position: absolute;
  top: 20px; right: 24px;
  font-family: var(--font-head);
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--border-2);
  line-height: 1;
  letter-spacing: -0.04em;
}

.step-icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(230,0,35,0.1);
  border: 1px solid rgba(230,0,35,0.2);
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 1.3rem;
  color: var(--coral);
}

.step-card h3 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.step-card p { font-size: 0.9rem; color: var(--text-2); line-height: 1.7; }

/* ── FEATURES ────────────────────────────────────────────────── */
.features-section {
  padding: 100px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.feature-card {
  padding: 28px 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.3s var(--trans);
}
.feature-card:hover { border-color: var(--border-2); transform: translateY(-3px); }

.feat-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  font-size: 1.1rem;
  margin-bottom: 18px;
}
.feat-icon.red    { background: rgba(230,0,35,0.12); color: var(--coral); }
.feat-icon.coral  { background: rgba(255,92,115,0.12); color: #ff8099; }
.feat-icon.orange { background: rgba(255,122,69,0.12); color: var(--orange); }
.feat-icon.pink   { background: rgba(255,77,143,0.12); color: var(--pink); }

.feature-card h3 {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.feature-card p { font-size: 0.875rem; color: var(--text-2); line-height: 1.7; }

/* ── FAQ ─────────────────────────────────────────────────────── */
.faq-section { padding: 100px 0; }
.faq-container { max-width: 740px; }

.faq-list { display: flex; flex-direction: column; gap: 12px; }

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s var(--trans);
}
.faq-item[open] { border-color: var(--border-2); }
.faq-item[open] summary { color: var(--white); }

.faq-item summary {
  padding: 20px 24px;
  font-weight: 600;
  font-size: 0.975rem;
  color: var(--text-2);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  list-style: none;
  transition: color 0.2s var(--trans);
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 300;
  flex-shrink: 0;
  color: var(--text-3);
  transition: transform 0.2s var(--trans);
}
.faq-item[open] summary::after {
  content: '−';
}

.faq-answer {
  padding: 0 24px 20px;
  border-top: 1px solid var(--border);
  animation: fadeUp 0.2s var(--trans) both;
}
.faq-answer p {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.75;
  padding-top: 16px;
}

/* ── FOOTER ──────────────────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.footer-top {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 24px 48px;
  display: grid;
  grid-template-columns: 1.4fr 1.8fr;
  gap: 60px;
}

.footer-logo { margin-bottom: 16px; display: inline-flex; }
.footer-tagline {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 28px;
}

.footer-social {
  display: flex;
  gap: 12px;
}
.footer-social a {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  color: var(--text-2);
  font-size: 0.9rem;
  transition: all 0.2s var(--trans);
}
.footer-social a:hover {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
  transform: translateY(-2px);
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer-col h4 {
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 20px;
}

.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  font-size: 0.875rem;
  color: var(--text-2);
  transition: color 0.2s var(--trans);
}
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid var(--border);
}
.footer-bottom-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.copyright {
  font-size: 0.8rem;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sep { opacity: 0.4; }
.disclaimer { font-size: 0.75rem; color: var(--text-3); }

/* ── TOAST ───────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  border-radius: 100px;
  padding: 12px 24px;
  font-size: 0.875rem;
  color: var(--text);
  z-index: 999;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: all 0.35s var(--trans);
  box-shadow: var(--shadow);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }

  .downloader-card { padding: 20px 16px; }
  .input-row { flex-direction: column; }
  .btn-download { width: 100%; justify-content: center; }
  .input-wrapper { min-width: unset; }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .footer-nav {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }
  .footer-bottom-inner { flex-direction: column; text-align: center; }

  .media-preview { flex-direction: column; }
  .media-thumb { width: 100%; height: 200px; }

  .hero-stats { gap: 20px; }
}

@media (max-width: 480px) {
  .footer-nav { grid-template-columns: 1fr 1fr; }
  h1 { letter-spacing: -0.03em; }
  .steps-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
}

/* ── FOCUS / ACCESSIBILITY ───────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── PRINT ───────────────────────────────────────────────────── */
@media print {
  .hero-bg, .site-header, .toast { display: none; }
  body { background: white; color: black; }
}
