/* PDF Tools v2 — Conversion-optimized landing */
:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --primary-light: #e8f0fe;
  --accent: #34a853;
  --bg: #f8fafc;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--gray-800);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.05); opacity: 1; }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.fade-in {
  animation: fadeInUp 0.6s ease-out both;
}
.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.bounce { animation: bounce 1.5s ease-in-out infinite; }

.card-animate {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.card-animate.visible {
  opacity: 1;
  transform: translateY(0);
}
.card-animate:nth-child(2) { transition-delay: 0.08s; }
.card-animate:nth-child(3) { transition-delay: 0.16s; }
.card-animate:nth-child(4) { transition-delay: 0.24s; }
.card-animate:nth-child(5) { transition-delay: 0.32s; }

/* ===== Header ===== */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo svg { width: 28px; height: 28px; }
.header-nav { display: flex; gap: 1.5rem; }
.header-nav a {
  color: var(--gray-600);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.header-nav a:hover { color: var(--primary); text-decoration: none; }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #0d1b3e 0%, #1a3a7a 40%, #2563eb 100%);
  color: white;
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59,130,246,0.2) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}
.hero-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.hero-sub {
  font-size: 1rem;
  opacity: 0.85;
  margin-bottom: 1.5rem;
}

/* Drop zone in hero */
.drop-hero {
  background: rgba(255,255,255,0.08);
  border: 2px dashed rgba(255,255,255,0.35);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  backdrop-filter: blur(4px);
}
.drop-hero:hover, .drop-hero.dragover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.7);
  transform: scale(1.01);
}
.drop-hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.drop-icon-wrap {
  width: 64px;
  height: 64px;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.drop-icon {
  width: 36px;
  height: 36px;
  color: white;
}
.drop-label {
  font-size: 1.1rem;
  font-weight: 600;
}
.drop-hint {
  font-size: 0.8rem;
  opacity: 0.6;
}
.drop-btn {
  background: white;
  color: var(--primary);
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 0.25rem;
}
.drop-btn:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}

.drop-arrow {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
}

/* Detection result */
.detect-result {
  margin-top: 1.25rem;
  padding: 1rem;
  background: rgba(52,168,83,0.15);
  border: 1px solid rgba(52,168,83,0.3);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
}
.detect-msg {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.detect-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}
.detect-btn {
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
.detect-btn.primary {
  background: white;
  color: var(--primary);
}
.detect-btn.primary:hover { background: var(--primary-light); text-decoration: none; }
.detect-btn.secondary {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
}
.detect-btn.secondary:hover { background: rgba(255,255,255,0.25); text-decoration: none; }

/* Trust bar */
.trust-bar {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  opacity: 0.75;
}
.trust-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ===== Container ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Tools Section ===== */
.tools-section {
  padding: 2rem 0 1rem;
}
.tool-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}
.tool-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tool-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
  transform: translateY(-4px);
  text-decoration: none;
  color: inherit;
}
.tool-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}
.tool-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--gray-900);
}
.tool-card p {
  color: var(--gray-500);
  font-size: 0.8rem;
  line-height: 1.4;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; color: white; }
.btn-secondary { background: var(--gray-100); color: var(--gray-700); }
.btn-secondary:hover { background: var(--gray-200); }
.btn-success { background: var(--accent); color: white; }
.btn-success:hover { background: #2d9249; }
.btn-lg { padding: 0.8rem 2rem; font-size: 1rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== Tool Page Layout (sub-pages keep working) ===== */
.tool-page { padding: 2rem 0 3rem; }
.tool-header { text-align: center; margin-bottom: 2rem; }
.tool-header h1 { font-size: 1.8rem; font-weight: 800; color: var(--gray-900); margin-bottom: 0.5rem; }
.tool-header p { color: var(--gray-500); font-size: 1rem; }

/* Drop Zone (sub-pages) */
.drop-zone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  background: var(--gray-50);
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 1.5rem;
}
.drop-zone:hover, .drop-zone.dragover { border-color: var(--primary); background: var(--primary-light); }
.drop-zone svg { width: 48px; height: 48px; color: var(--gray-400); margin-bottom: 1rem; }
.drop-zone p { color: var(--gray-500); margin-bottom: 0.5rem; }
.drop-zone .hint { font-size: 0.8rem; color: var(--gray-400); }

/* File List */
.file-list { list-style: none; margin-bottom: 1.5rem; }
.file-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-sm); margin-bottom: 0.5rem; cursor: grab; }
.file-item:active { cursor: grabbing; }
.file-item .drag-handle { color: var(--gray-400); cursor: grab; }
.file-item .file-name { flex: 1; font-size: 0.9rem; font-weight: 500; }
.file-item .file-size { color: var(--gray-400); font-size: 0.8rem; }
.file-item .remove-btn { background: none; border: none; color: var(--gray-400); cursor: pointer; padding: 0.25rem; border-radius: 4px; font-size: 1.2rem; line-height: 1; }
.file-item .remove-btn:hover { color: #ef4444; background: #fef2f2; }

/* Options Panel */
.options-panel { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem; }
.options-panel h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 1rem; color: var(--gray-700); }
.option-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.option-row label { font-size: 0.85rem; color: var(--gray-600); min-width: 100px; }
.option-row select, .option-row input[type="text"], .option-row input[type="password"], .option-row input[type="number"] { padding: 0.5rem 0.75rem; border: 1px solid var(--gray-300); border-radius: 6px; font-size: 0.9rem; background: var(--white); min-width: 180px; }
.option-row select:focus, .option-row input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,115,232,0.1); }
textarea { width: 100%; padding: 1rem; border: 1px solid var(--gray-300); border-radius: var(--radius-sm); font-size: 0.95rem; font-family: inherit; resize: vertical; min-height: 200px; line-height: 1.6; }
textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,115,232,0.1); }

/* Progress */
.progress-bar { width: 100%; height: 6px; background: var(--gray-200); border-radius: 3px; overflow: hidden; margin: 1rem 0; display: none; }
.progress-bar.active { display: block; }
.progress-fill { height: 100%; background: var(--primary); border-radius: 3px; transition: width 0.3s; width: 0%; }

/* Actions */
.actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }

/* Limit Notice */
.limit-notice { background: #fffbeb; border: 1px solid #fbbf24; border-radius: var(--radius-sm); padding: 1rem 1.25rem; font-size: 0.85rem; color: #92400e; margin-bottom: 1.5rem; display: none; }
.limit-notice a { color: var(--primary); font-weight: 600; }

/* Premium Badge */
.premium-badge { display: inline-flex; align-items: center; gap: 0.35rem; background: linear-gradient(135deg, #f59e0b, #d97706); color: white; font-size: 0.7rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 50px; text-transform: uppercase; letter-spacing: 0.05em; }

/* ===== Footer ===== */
.site-footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 2.5rem 1.5rem;
  margin-top: 3rem;
  text-align: center;
  font-size: 0.85rem;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-links { display: flex; justify-content: center; gap: 2rem; margin-bottom: 1rem; flex-wrap: wrap; }
.footer-links a { color: var(--gray-400); }
.footer-links a:hover { color: white; }
.footer-security { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-top: 1rem; color: var(--accent); font-size: 0.8rem; }

/* ===== FAQ ===== */
.faq-section { padding: 2rem 0; }
.faq-section h2 { font-size: 1.5rem; font-weight: 700; text-align: center; margin-bottom: 1.5rem; }
.faq-item { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-sm); margin-bottom: 0.75rem; overflow: hidden; }
.faq-question { padding: 1rem 1.25rem; font-weight: 600; font-size: 0.95rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; user-select: none; }
.faq-question:hover { background: var(--gray-50); }
.faq-question::after { content: '+'; font-size: 1.2rem; color: var(--gray-400); }
.faq-item.open .faq-question::after { content: '-'; }
.faq-answer { padding: 0 1.25rem; max-height: 0; overflow: hidden; transition: max-height 0.3s, padding 0.3s; font-size: 0.9rem; color: var(--gray-600); line-height: 1.7; }
.faq-item.open .faq-answer { max-height: 300px; padding: 0 1.25rem 1rem; }

/* ===== Ads ===== */
.ad-space { background: var(--gray-100); border: 1px dashed var(--gray-300); border-radius: var(--radius-sm); padding: 1rem; text-align: center; margin: 1.5rem 0; min-height: 90px; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .tool-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .hero { padding: 2rem 1rem 2rem; }
  .hero-title { font-size: 1.5rem; }
  .hero-sub { font-size: 0.9rem; }
  .tool-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .tool-card { padding: 1rem; }
  .tool-card h3 { font-size: 0.85rem; }
  .tool-card p { font-size: 0.75rem; }
  .header-nav { display: none; }
  .trust-bar { gap: 1rem; }
  .trust-item { font-size: 0.7rem; }
  .drop-zone { padding: 2rem 1rem; }
  .option-row { flex-direction: column; align-items: flex-start; }
  .option-row select, .option-row input { width: 100%; }
  .actions { flex-direction: column; }
  .actions .btn { width: 100%; justify-content: center; }
  .drop-hero { padding: 1.5rem 1rem; }
}
@media (max-width: 480px) {
  .hero { padding: 1.5rem 0.75rem; }
  .hero-title { font-size: 1.3rem; }
  .tool-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .tool-icon { width: 40px; height: 40px; }
  .tool-icon svg { width: 22px; height: 22px; }
  .trust-bar { flex-direction: column; gap: 0.5rem; align-items: center; }
  .detect-actions { flex-direction: column; }
}
