/* ============================================
   HTML to Markdown Converter & Viewer - Website
   (c) 2025-2026 Laurel Gate Technologies Ltd.
   ============================================ */

/* --- Variables --- */
:root {
  --primary: #386b82;
  --primary-dark: #2d5668;
  --primary-light: #4a8ca8;
  --primary-bg: #eaf2f6;
  --accent: #e8913a;
  --accent-dark: #d07a2a;
  --success: #4caf50;
  --success-bg: #e8f5e9;
  --warning: #ff9800;
  --error: #d32f2f;
  --error-bg: #fdecea;
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #333333;
  --text-muted: #666666;
  --text-light: #999999;
  --border: #dde2e8;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-w: 800px;
  --transition: 0.2s ease;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Page Header (shared across all pages) --- */
.page-header {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 40px 20px 32px;
}
.page-header .logo { width: 600px; margin-bottom: 12px; }
.page-header h1 { margin: 0 0 6px; font-size: 1.6rem; font-weight: 700; }
.page-header p { margin: 0; opacity: 0.85; font-size: 1.05rem; }
.page-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  margin-bottom: 14px;
}
.page-header-icon svg { width: 28px; height: 28px; fill: #fff; }

/* Compact header variant for sub-pages */
.page-header.compact { padding: 28px 20px 22px; }
.page-header.compact h1 { font-size: 1.35rem; }

/* --- Nav bar --- */
.site-nav {
  background: var(--primary-dark);
  text-align: center;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}
.site-nav a {
  color: rgba(255,255,255,0.8);
  padding: 10px 18px;
  font-size: 0.85rem;
  transition: color var(--transition), background var(--transition);
}
.site-nav a:hover, .site-nav a.active {
  color: #fff;
  background: rgba(255,255,255,0.1);
  text-decoration: none;
}

/* --- Container --- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 30px 20px;
}

/* --- Cards --- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 24px;
}
.card h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
  color: var(--primary);
}
.card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}
.card p {
  margin: 0 0 14px;
  color: var(--text-muted);
}
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: var(--primary-bg);
  border-radius: 50%;
  margin-bottom: 14px;
}
.card-icon svg { width: 22px; height: 22px; fill: var(--primary); }
.card-icon.accent { background: #fef3e6; }
.card-icon.accent svg { fill: var(--accent); }
.card-icon.success { background: var(--success-bg); }
.card-icon.success svg { fill: var(--success); }
.card-icon.error { background: var(--error-bg); }
.card-icon.error svg { fill: var(--error); }

/* Card with centered content */
.card.center { text-align: center; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.4;
  font-family: var(--font);
}
.btn:hover { text-decoration: none; }
.btn:focus-visible {
  outline: 3px solid var(--primary-light);
  outline-offset: 2px;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); }

.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover { background: var(--accent-dark); }

.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-success:hover { background: #43a047; }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.btn-lg { padding: 14px 32px; font-size: 1.05rem; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Text link button */
.btn-link {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 8px 0;
  font-family: var(--font);
}
.btn-link:hover { color: var(--primary); text-decoration: underline; }

/* --- Forms --- */
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}
.form-group .helper {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 4px;
}

input[type="text"],
input[type="email"],
textarea,
select {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font);
  transition: border-color var(--transition);
  background: #fff;
  color: var(--text);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(56,107,130,0.12);
}
textarea { resize: vertical; min-height: 80px; }

/* Radio / Checkbox groups */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.radio-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.95rem;
}
.radio-option:hover { border-color: var(--primary-light); background: var(--primary-bg); }
.radio-option input[type="radio"] {
  width: 18px; height: 18px;
  accent-color: var(--primary);
  margin: 0;
}
.radio-option.selected {
  border-color: var(--primary);
  background: var(--primary-bg);
}

/* Form messages */
.form-success {
  background: var(--success-bg);
  color: #2e7d32;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  display: none;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}
.form-success.show { display: flex; }
.form-error {
  background: var(--error-bg);
  color: var(--error);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  display: none;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}
.form-error.show { display: flex; }

/* Honeypot - visually hidden but accessible to bots */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  z-index: -1;
}

/* --- Star Rating --- */
.star-rating {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 20px 0;
}
.star-rating input { display: none; }
.star-rating label {
  cursor: pointer;
  transition: transform 0.15s ease;
}
.star-rating label svg {
  width: 44px; height: 44px;
  fill: var(--border);
  transition: fill 0.15s ease;
}
.star-rating label:hover svg,
.star-rating label.active svg {
  fill: var(--accent);
}
.star-rating label:hover { transform: scale(1.15); }

/* --- Keyboard Shortcut Badges --- */
.kbd {
  display: inline-block;
  padding: 2px 8px;
  background: #eee;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--text);
  white-space: nowrap;
}

/* --- Step Overlays (Welcome onboarding) --- */
.overlay-step {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.55);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  z-index: 999;
  animation: fadeIn 0.3s ease;
}
.hidden { display: none !important; }

.step-box {
  background: var(--card);
  color: var(--text);
  padding: 28px 28px 22px;
  border-radius: var(--radius);
  width: 380px;
  text-align: center;
  position: absolute;
  top: 90px;
  right: 60px;
  box-shadow: var(--shadow-lg);
}
.step-box h2 { font-size: 1.1rem; margin: 0 0 6px; color: var(--primary); }
.step-box p { margin: 0 0 14px; color: var(--text-muted); font-size: 0.95rem; }

.toolbar-preview { width: 260px; margin-bottom: 16px; }

.arrow-toolbar {
  position: absolute;
  top: -38px; right: 60px;
  width: 0; height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-bottom: 24px solid var(--success);
  animation: bounce 1.5s infinite;
}

.step-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}
.step-counter {
  font-size: 0.8rem;
  color: var(--text-light);
}
.step-close {
  position: absolute;
  top: 10px; right: 14px;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}
.step-close:hover { color: var(--text); }

/* Spotlight */
#spotlight {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 998;
  display: none;
}

/* Final modal */
.final-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.modal-box {
  background: var(--card);
  color: var(--text);
  padding: 34px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-lg);
  max-width: 420px;
}
.modal-box h2 { color: var(--primary); margin: 12px 0 8px; }
.modal-box p { color: var(--text-muted); margin: 0 0 20px; }

/* --- Welcome Page Sections --- */
.main-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 24px 20px;
}

.demo-article, .convert-section {
  background: var(--card);
  color: var(--text);
  padding: 24px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.demo-article h3 { color: var(--primary); margin-top: 0; }
.demo-article table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
}
.demo-article th, .demo-article td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
}
.demo-article th { background: var(--primary-bg); color: var(--primary); }

/* Shortcuts grid */
.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.shortcut-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.shortcut-item .kbd { margin-right: 2px; }

/* FAQ accordion */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  color: var(--text);
  font-family: var(--font);
}
.faq-question:hover { color: var(--primary); }
.faq-chevron {
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 12px;
}
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}
.faq-item.open .faq-answer { max-height: 300px; }
.faq-answer-inner { padding: 0 0 14px; }

/* --- Uninstall Page --- */
.reinstall-highlight {
  text-align: center;
  padding: 32px;
  background: var(--primary-bg);
  border-radius: var(--radius);
  border: 2px dashed var(--primary-light);
  margin-bottom: 24px;
}
.reinstall-highlight h2 { margin: 0 0 8px; color: var(--primary); font-size: 1.3rem; }
.reinstall-highlight p { color: var(--text-muted); margin: 0 0 18px; }

/* Troubleshooting quick links */
.troubleshoot-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.troubleshoot-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: all var(--transition);
}
.troubleshoot-link:hover {
  background: var(--primary-bg);
  color: var(--primary);
  text-decoration: none;
}
.troubleshoot-link svg { width: 16px; height: 16px; flex-shrink: 0; fill: currentColor; }

/* --- Feedback Page --- */
.rating-prompt {
  text-align: center;
  padding: 10px 0 4px;
}
.rating-prompt h2 { margin: 0 0 4px; }
.rating-prompt p { color: var(--text-muted); }

.review-cta {
  text-align: center;
  padding: 20px 0 8px;
}
.review-cta h3 { color: var(--success); margin: 0 0 8px; }
.review-cta p { color: var(--text-muted); margin: 0 0 18px; }

.review-note {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 18px;
  text-align: center;
}
.review-note a { color: var(--text-muted); }

/* --- Privacy Page --- */
.policy-section {
  margin-bottom: 28px;
}
.policy-section h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  color: var(--primary);
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-bg);
}
.policy-section h2 svg { width: 20px; height: 20px; fill: var(--primary); flex-shrink: 0; }
.policy-section p, .policy-section li {
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.7;
}
.policy-section ul { padding-left: 20px; }
.policy-section li { margin-bottom: 4px; }
.policy-date {
  font-size: 0.85rem;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 20px;
}

/* --- Footer --- */
.site-footer {
  text-align: center;
  padding: 28px 20px;
  color: var(--text-light);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}
.site-footer a { color: var(--text-muted); margin: 0 8px; }
.site-footer a:hover { color: var(--primary); }
.footer-links { margin-bottom: 8px; }

/* --- Utility --- */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 16px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }
.flex-center { display: flex; align-items: center; justify-content: center; gap: 10px; }
.gap-sm { gap: 8px; }
.gap-md { gap: 14px; }

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Animations --- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: slideUp 0.4s ease forwards; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .step-box {
    position: relative;
    top: auto; right: auto;
    margin: 80px 16px 0;
    width: auto;
    max-width: 380px;
  }
  .overlay-step {
    align-items: flex-start;
    justify-content: center;
  }
  .troubleshoot-links { grid-template-columns: 1fr; }
  .shortcuts-grid { grid-template-columns: 1fr; }
  .container { padding: 20px 16px; }
  .card { padding: 20px; }
  .star-rating label svg { width: 36px; height: 36px; }
}

@media (max-width: 480px) {
  .page-header h1 { font-size: 1.3rem; }
  .step-box { margin: 60px 12px 0; }
  .toolbar-preview { width: 220px; }
  .btn-lg { padding: 12px 24px; font-size: 1rem; }
  .site-nav a { padding: 8px 12px; font-size: 0.8rem; }
}

/* ============================================
   Shared top nav + bottom footer
   (matches product.html style)
   ============================================ */

/* --- Top Nav --- */
.site-nav {
  background: #2d5668;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 0;
  text-decoration: none;
}
.nav-brand img { width: 28px; height: 28px; flex-shrink: 0; }
.nav-links { display: flex; gap: 0; align-items: center; }
.nav-links a {
  color: rgba(255,255,255,.75);
  padding: 12px 14px;
  font-size: 0.82rem;
  transition: color .15s, background .15s;
  text-decoration: none;
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; }
.nav-links .nav-cta {
  background: #e8913a;
  color: #fff;
  border-radius: 6px;
  margin: 6px 0 6px 6px;
  padding: 7px 16px;
  font-weight: 700;
  font-size: 0.82rem;
  transition: background .15s;
}
.nav-links .nav-cta:hover { background: #c97828; }

/* --- Dark footer (replaces old footer-links style) --- */
.site-footer-dark {
  background: #111c23;
  color: rgba(255,255,255,.38);
  text-align: center;
  padding: 20px;
  font-size: .78rem;
}
.site-footer-dark a { color: rgba(255,255,255,.5); text-decoration: none; }
.site-footer-dark a:hover { color: rgba(255,255,255,.8); }

/* ── Footer CTA block (shared across all pages) ── */
.foot-cta {
  background: linear-gradient(135deg, #1a2730, #2d5668);
  color: #fff;
  text-align: center;
  padding: 68px 24px;
}
.foot-cta h2 { font-size: 1.75rem; font-weight: 800; margin-bottom: 12px; font-family: 'Sora', system-ui, sans-serif; }
.foot-cta p { opacity: .78; margin-bottom: 30px; }
.btn-cta-accent {
  display: inline-flex; align-items: center; gap: 9px;
  background: #e8913a; color: #fff;
  padding: 14px 30px; border-radius: 50px;
  font-weight: 700; font-size: .9rem;
  text-decoration: none; margin: 6px;
  box-shadow: 0 4px 18px rgba(232,145,58,.45);
  transition: transform .2s;
}
.btn-cta-accent:hover { transform: translateY(-2px); color: #fff; text-decoration: none; }
.btn-cta-accent svg { width: 16px; height: 16px; fill: currentColor; }
.btn-cta-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  border: 2px solid rgba(255,255,255,.32);
  color: rgba(255,255,255,.85);
  padding: 12px 24px; border-radius: 50px;
  font-weight: 600; font-size: .88rem;
  text-decoration: none; margin: 6px;
  transition: background .2s, border-color .2s;
}
.btn-cta-ghost:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.6); color: #fff; text-decoration: none; }

/* ── Benefits bar (shared across all pages) ── */
.benefits { background: #386b82; color: #fff; }
.benefits-inner {
  max-width: 1080px; margin: 0 auto;
  padding: 52px 24px;
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 32px;
  text-align: center;
}
@media (max-width: 700px) { .benefits-inner { grid-template-columns: repeat(2,1fr); } }
.ben svg { width: 34px; height: 34px; fill: #e8913a; margin-bottom: 10px; display: block; margin-left: auto; margin-right: auto; }
.ben h4 { font-size: .93rem; font-weight: 700; margin-bottom: 4px; }
.ben p { font-size: .78rem; opacity: .78; line-height: 1.5; }
