/* ===== Design Tokens ===== */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --bg-dark: #000000;
  --text: #111111;
  --text-secondary: #666666;
  --text-muted: #888888;
  --text-on-dark: #ffffff;
  --border: rgba(0, 0, 0, 0.08);
  --card-border: rgba(0, 0, 0, 0.06);
  --accent: #007aff;
  --accent-soft: rgba(0, 122, 255, 0.08);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);
  --max-width: 1100px;
  --transition: 0.2s ease;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --bg-alt: #141414;
    --text: #f5f5f7;
    --text-secondary: #a1a1a6;
    --text-muted: #6e6e73;
    --border: rgba(255, 255, 255, 0.1);
    --card-border: rgba(255, 255, 255, 0.08);
    --accent: #0a84ff;
    --accent-soft: rgba(10, 132, 255, 0.12);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4);
  }
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ===== Navigation ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

@media (prefers-color-scheme: dark) {
  .nav {
    background: rgba(10, 10, 10, 0.72);
  }
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
}

.nav-brand img {
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--text-secondary);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  background: var(--text);
  color: var(--bg);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  transition: opacity var(--transition), transform var(--transition);
}

.nav-cta:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
}

/* ===== Hero ===== */
.hero {
  padding: 100px 24px 80px;
  text-align: center;
}

.hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.hero-icon {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  margin: 0 auto 28px;
  box-shadow: var(--shadow-lg);
}

.hero-title {
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 32px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.hero-meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* ===== Buttons ===== */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  transition: transform var(--transition), opacity var(--transition), box-shadow var(--transition);
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-alt);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.btn-large {
  padding: 16px 32px;
  font-size: 16px;
}

/* ===== Sections ===== */
.section {
  padding: 80px 24px;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  margin: 0 0 12px;
}

.section-desc {
  text-align: center;
  color: var(--text-secondary);
  font-size: 17px;
  max-width: 560px;
  margin: 0 auto 48px;
}

.section-dark .section-desc {
  color: var(--text-muted);
}

/* ===== Feature Grid ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: transform var(--transition), border-color var(--transition);
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* ===== Steps ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step {
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 28px;
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 16px;
}

.step h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 8px;
}

.step p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

.step kbd {
  font-family: inherit;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 12px;
}

@media (max-width: 768px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* ===== Region Cloud ===== */
.region-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 800px;
  margin: 0 auto;
}

.region-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: border-color var(--transition), color var(--transition);
}

.region-tag:hover {
  border-color: var(--accent);
  color: var(--text);
}

.region-tag.popular {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent);
  font-weight: 600;
}

/* ===== CTA Block ===== */
.cta-block {
  text-align: center;
}

.cta-block h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.cta-block p {
  color: var(--text-muted);
  font-size: 17px;
  margin: 0 0 28px;
}

.cta-note {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 16px;
}

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

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a:hover {
  color: var(--text);
}

@media (max-width: 480px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ===== Privacy Page ===== */
.privacy {
  padding: 80px 24px;
}

.privacy-inner {
  max-width: 720px;
  margin: 0 auto;
}

.privacy-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.privacy-date {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 40px;
}

.privacy-summary {
  background: var(--accent-soft);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
}

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

.privacy-summary h2 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 8px;
}

.privacy-summary p {
  font-size: 15px;
  margin: 0;
  line-height: 1.5;
}

.privacy-section {
  margin-bottom: 40px;
}

.privacy-section h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

.privacy-section p {
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 12px;
}

.privacy-section ul {
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 12px;
  padding-left: 20px;
}

.privacy-section ul li {
  margin-bottom: 6px;
}

.privacy-section a {
  color: var(--accent);
}

.privacy-section a:hover {
  text-decoration: underline;
}

.privacy-section code {
  font-family: "SF Mono", Menlo, Monaco, monospace;
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 13px;
}

/* ===== Privacy Table ===== */
.privacy-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 14px;
}

.privacy-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--bg-alt);
  font-weight: 600;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

.privacy-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  line-height: 1.4;
}

.privacy-table td code {
  font-size: 12px;
}

/* ===== Permission Cards ===== */
.permission-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin: 16px 0 24px;
}

.permission-card {
  background: var(--bg-alt);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 20px;
}

.permission-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.permission-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 8px;
}

.permission-card h3 code {
  font-size: 13px;
}

.permission-card p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 480px) {
  .privacy-summary {
    flex-direction: column;
  }
}

/* ===== Welcome Page ===== */
.welcome-hero {
  padding: 100px 24px 60px;
  text-align: center;
}

.welcome-hero-inner {
  max-width: 600px;
  margin: 0 auto;
}

.welcome-icon {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  margin: 0 auto 24px;
  box-shadow: var(--shadow-lg);
  animation: welcome-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes welcome-pop {
  from { transform: scale(0.6); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.welcome-badge {
  display: inline-flex;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
  animation: welcome-fade 0.4s ease 0.2s both;
}

@keyframes welcome-fade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.welcome-title {
  font-size: clamp(36px, 6vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  animation: welcome-fade 0.4s ease 0.3s both;
}

.welcome-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  margin: 0;
  animation: welcome-fade 0.4s ease 0.4s both;
}

/* ===== Welcome Steps ===== */
.welcome-steps {
  padding: 0 24px 60px;
}

.welcome-steps-inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.welcome-step {
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  gap: 20px;
  transition: border-color var(--transition);
  animation: welcome-slide 0.4s ease both;
}

.welcome-step:nth-child(1) { animation-delay: 0.5s; }
.welcome-step:nth-child(2) { animation-delay: 0.6s; }
.welcome-step:nth-child(3) { animation-delay: 0.7s; }
.welcome-step:nth-child(4) { animation-delay: 0.8s; }

@keyframes welcome-slide {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.welcome-step:hover {
  border-color: var(--accent);
}

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

.welcome-step-body {
  flex: 1;
}

.welcome-step-body h2 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 8px;
}

.welcome-step-body p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 8px;
  line-height: 1.5;
}

.welcome-step-tip {
  font-size: 13px;
  color: var(--text-muted);
  margin: 4px 0 0;
}

.welcome-step-tip kbd {
  font-family: inherit;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 12px;
}

.inline-icon {
  vertical-align: middle;
  margin: -2px 2px;
}

.inline-icon-img {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  vertical-align: middle;
  margin: -2px 2px;
}

/* ===== Demo Links ===== */
.welcome-demo-links {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.welcome-demo-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: border-color var(--transition), color var(--transition);
}

.welcome-demo-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.demo-flag {
  font-size: 16px;
}

/* ===== Welcome Feature Cards ===== */
.welcome-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.welcome-feature-card {
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: transform var(--transition), border-color var(--transition);
}

.welcome-feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.welcome-feature-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px;
}

.welcome-feature-card p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

@media (max-width: 640px) {
  .welcome-step {
    flex-direction: column;
    gap: 16px;
  }
  .welcome-demo-links {
    flex-direction: column;
  }
}

/* ===== Uninstall Survey ===== */
.uninstall-card {
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 32px;
}

.uninstall-fieldset {
  border: none;
  padding: 0;
  margin: 0 0 24px;
}

.uninstall-fieldset legend {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  padding: 0;
}

.uninstall-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  transition: border-color var(--transition), background var(--transition);
}

.uninstall-option:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.uninstall-option input[type="radio"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.uninstall-comment-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.uninstall-card textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  resize: vertical;
  margin-bottom: 20px;
}

.uninstall-card textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1.5px var(--accent-soft);
}

.uninstall-thanks {
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 48px 32px;
  text-align: center;
}

.uninstall-thanks .welcome-step-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.uninstall-thanks h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 12px;
}

.uninstall-thanks p {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0 0 28px;
}

