/* ── Pinterest Studio Website ── Premium SaaS Design ── */

/* ── Theme Variables ── */
:root {
  --accent: #e60023;
  --accent-hover: #ff0023;
  --accent-glow: rgba(230, 0, 35, 0.25);
  --accent-gradient: linear-gradient(135deg, #e60023, #ff4d6a);
  --text: #0f1117;
  --text2: #4b5563;
  --bg: #ffffff;
  --surface: #f8f9fa;
  --card: #ffffff;
  --card-hover: #f3f4f6;
  --border: #e5e7eb;
  --border2: #d1d5db;
  --hero-bg: #fafbfc;
  --section-bg: #ffffff;
  --code-bg: #f3f4f6;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-w: 1200px;
  --nav-h: 64px;
}

.dark {
  --text: #f1f5f9;
  --text2: #94a3b8;
  --bg: #0b0d15;
  --surface: #11131f;
  --card: #171a29;
  --card-hover: #1e2132;
  --border: #252840;
  --border2: #323654;
  --hero-bg: #0d0f1a;
  --section-bg: #0b0d15;
  --code-bg: #1a1d2e;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.35);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.4);
  --accent-glow: rgba(230, 0, 35, 0.15);
}

/* ── Base ── */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: #fff; }

/* ── Typography ── */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
a { color: var(--accent); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.85; }

/* ── Container ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) { .container { padding: 0 32px; } }

/* ── Nav ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h); background: rgba(255,255,255,0.75);
  backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s, border-color 0.3s;
}
.dark nav {
  background: rgba(11,13,21,0.8);
}
nav .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 16px; color: var(--text); text-decoration: none;
}
.nav-logo img { width: 28px; height: 28px; border-radius: 6px; }
.nav-links { display: none; align-items: center; gap: 24px; }
@media (min-width: 768px) { .nav-links { display: flex; } }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--text2);
  text-decoration: none; transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.theme-toggle {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text2); cursor: pointer; transition: all 0.2s;
  font-size: 16px;
}
.theme-toggle:hover { background: var(--card-hover); color: var(--text); }
.mobile-menu-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; background: none; border: none;
  color: var(--text); cursor: pointer; padding: 0;
}
@media (min-width: 768px) { .mobile-menu-btn { display: none; } }

/* ── Mobile Menu ── */
.mobile-menu {
  position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0;
  background: var(--bg); padding: 24px; display: none;
  flex-direction: column; gap: 8px; z-index: 99;
  border-top: 1px solid var(--border);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 12px 16px; border-radius: 10px;
  font-size: 16px; font-weight: 500; color: var(--text);
  text-decoration: none; transition: background 0.2s;
}
.mobile-menu a:hover { background: var(--surface); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 10px;
  font-size: 15px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: all 0.2s;
  text-decoration: none; border: none; line-height: 1.3;
}
.btn-primary {
  background: var(--accent); color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover); transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--accent-glow); opacity: 1;
}
.btn-secondary {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--card-hover); transform: translateY(-1px); opacity: 1;
}
.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: 8px; }

/* ── Section ── */
section { padding: clamp(60px, 10vw, 120px) 0; }
.section-label {
  display: inline-block; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--accent); margin-bottom: 12px;
}
.section-title { margin-bottom: 12px; }
.section-desc {
  font-size: 18px; color: var(--text2); max-width: 640px;
  line-height: 1.6;
}

/* ── Hero ── */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  padding-top: var(--nav-h); background: var(--hero-bg);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -50%; right: -20%;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(230,0,35,0.06), transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; bottom: -30%; left: -10%;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(230,0,35,0.04), transparent 70%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 100px;
  background: var(--accent-glow); color: var(--accent);
  font-size: 13px; font-weight: 600; margin-bottom: 20px;
  border: 1px solid rgba(230,0,35,0.15);
}
.hero h1 { margin-bottom: 16px; }
.hero .subtitle {
  font-size: clamp(16px, 2vw, 20px); color: var(--text2);
  max-width: 640px; line-height: 1.6; margin-bottom: 32px;
}
.hero-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-visuals {
  margin-top: 48px;
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (min-width: 768px) { .hero-visuals { grid-template-columns: repeat(4, 1fr); } }
.hero-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  text-align: center; transition: all 0.3s;
}
.hero-card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}
.hero-card-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px; font-size: 24px;
}
.hero-card:nth-child(1) .hero-card-icon { background: rgba(230,0,35,0.1); }
.hero-card:nth-child(2) .hero-card-icon { background: rgba(99,102,241,0.1); }
.hero-card:nth-child(3) .hero-card-icon { background: rgba(16,185,129,0.1); }
.hero-card:nth-child(4) .hero-card-icon { background: rgba(245,158,11,0.1); }
.hero-card-label { font-size: 13px; font-weight: 600; color: var(--text2); }

/* ── Feature Cards Grid ── */
.feature-grid {
  display: grid; gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }

.feature-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  transition: all 0.3s; position: relative; overflow: hidden;
}
.feature-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--accent-gradient); opacity: 0;
  transition: opacity 0.3s;
}
.feature-card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-lg);
  border-color: rgba(230,0,35,0.2);
}
.feature-card:hover::before { opacity: 1; }
.feature-card .icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px; font-size: 22px;
}
.feature-card h3 { font-size: 18px; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text2); line-height: 1.6; }
.feature-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; }
.feature-tag {
  padding: 3px 10px; border-radius: 6px;
  font-size: 11px; font-weight: 600;
  background: var(--surface); color: var(--text2);
  border: 1px solid var(--border);
}

/* ── How It Works ── */
.steps-grid {
  display: grid; gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .steps-grid { grid-template-columns: repeat(3, 1fr); } }
.step-card {
  text-align: center; padding: 32px 24px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); position: relative;
}
.step-num {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px; font-size: 16px; font-weight: 800;
  background: var(--accent); color: #fff;
}
.step-card h3 { font-size: 16px; margin-bottom: 6px; }
.step-card p { font-size: 14px; color: var(--text2); line-height: 1.6; }

/* ── Comparison Table ── */
.compare-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border);
}
.compare-table th, .compare-table td {
  padding: 16px 20px; text-align: left; font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.compare-table th {
  background: var(--surface); font-weight: 600;
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text2);
}
.compare-table td:first-child { font-weight: 600; }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table .check { color: #22c55e; font-weight: 700; }
.compare-table .cross { color: var(--text2); opacity: 0.4; }

/* ── CTA Section ── */
.cta-section {
  background: var(--accent-gradient);
  color: #fff; text-align: center; position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.1), transparent 60%);
  pointer-events: none;
}
.cta-section h2 { color: #fff; }
.cta-section .subtitle { color: rgba(255,255,255,0.85); max-width: 560px; margin: 0 auto 24px; }
.cta-section .btn-primary {
  background: #fff; color: var(--accent);
}
.cta-section .btn-primary:hover {
  background: #fff; box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}
.cta-section .btn-secondary {
  background: rgba(255,255,255,0.1); color: #fff;
  border-color: rgba(255,255,255,0.2);
}
.cta-section .btn-secondary:hover { background: rgba(255,255,255,0.2); }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border); padding: 48px 0 24px;
  background: var(--surface);
}
.footer-grid {
  display: grid; gap: 32px; grid-template-columns: 1fr;
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
footer h4 { font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text2); margin-bottom: 12px; }
footer a { display: block; font-size: 14px; color: var(--text2);
  margin-bottom: 8px; transition: color 0.2s; }
footer a:hover { color: var(--text); }
.footer-bottom { margin-top: 32px; padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px;
  font-size: 13px; color: var(--text2);
}

/* ── Inner Pages ── */
.page-header {
  padding: calc(var(--nav-h) + 48px) 0 32px;
  background: var(--hero-bg);
  border-bottom: 1px solid var(--border);
}
.page-header h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
.page-header .subtitle { font-size: 16px; color: var(--text2); margin-top: 8px; max-width: 640px; }
.page-content { padding: 48px 0 80px; }
.page-content h2 { font-size: 24px; margin: 40px 0 12px; }
.page-content h2:first-child { margin-top: 0; }
.page-content h3 { font-size: 18px; margin: 24px 0 8px; }
.page-content p { font-size: 15px; line-height: 1.7; margin-bottom: 16px; color: var(--text2); }
.page-content ul, .page-content ol { margin: 0 0 20px 20px; }
.page-content li { font-size: 15px; line-height: 1.7; margin-bottom: 6px; color: var(--text2); }
.page-content strong { color: var(--text); }
.page-content .info-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 24px; margin-bottom: 24px;
}
.page-content .info-card h3 { margin-top: 0; }

/* ── FAQ ── */
.faq-list { max-width: 720px; }
.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius-md);
  margin-bottom: 8px; overflow: hidden;
}
.faq-q {
  padding: 16px 20px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; font-size: 15px;
  transition: background 0.2s; user-select: none;
}
.faq-q:hover { background: var(--surface); }
.faq-q .arrow { transition: transform 0.3s; font-size: 12px; color: var(--text2); }
.faq-item.open .faq-q .arrow { transform: rotate(180deg); }
.faq-a {
  max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
  padding: 0 20px; font-size: 14px; color: var(--text2); line-height: 1.7;
}
.faq-item.open .faq-a {
  max-height: 400px; padding: 0 20px 16px;
}

/* ── Changelog ── */
.changelog-version {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 24px; margin-bottom: 16px;
}
.changelog-version h3 { margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.changelog-version .date { font-size: 12px; color: var(--text2); font-weight: 400; }
.changelog-version ul { margin: 12px 0 0; }
.changelog-version li { font-size: 14px; margin-bottom: 4px; }
.changelog-version .tag {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tag-new { background: rgba(16,185,129,0.15); color: #10b981; }
.tag-fix { background: rgba(245,158,11,0.15); color: #f59e0b; }

/* ── Permissions Cards ── */
.perm-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 24px; margin-bottom: 12px;
}
.perm-card h3 { margin: 0 0 4px; font-size: 16px; }
.perm-card .perm-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; background: var(--surface);
  color: var(--text2); border: 1px solid var(--border); margin-bottom: 8px;
}
.perm-card p { font-size: 14px; color: var(--text2); line-height: 1.6; }

/* ── Scroll Animation ── */
.fade-in {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  padding: 12px 24px; border-radius: 10px;
  background: var(--text); color: var(--bg);
  font-size: 14px; font-weight: 500;
  opacity: 0; transition: opacity 0.3s, transform 0.3s;
  pointer-events: none; z-index: 200;
  box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; }

/* ── Gradient Text ── */
.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Misc ── */
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.gap-3 { gap: 12px; }
.text-center { text-align: center; }
.max-w-2xl { max-width: 640px; }
.max-w-3xl { max-width: 720px; }
.mx-auto { margin-left: auto; margin-right: auto; }
