:root {
  --primary: #0F172A;
  --accent: #0EA5A4;
  --secondary: #2563EB;
  --background: #F8FAFC;
  --text: var(--primary);
  --muted: #475569;
  --line: #D9E2EC;
  --white: #FFFFFF;
  --surface: rgba(255,255,255,0.95);
  --surface-soft: #F1F5F9;
  --radius: 8px;
  --transition: 0.3s ease-in-out;
  --shadow: 0 20px 60px rgba(15,23,42,0.08);
  --shadow-sm: 0 4px 16px rgba(15,23,42,0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--background);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--secondary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

/* ─── HEADER ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248,250,252,0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: flex; align-items: center; }
.brand img { height: 72px; width: auto; object-fit: contain; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a { color: var(--text); font-weight: 600; font-size: 15px; }
.site-nav a:hover { color: var(--secondary); }
.header-right { display: flex; align-items: center; gap: 12px; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ─── HERO ─── */
.hero {
  padding: 80px 0 56px;
  background: radial-gradient(circle at top center, rgba(14,165,164,0.09), transparent 42%), var(--background);
}
.hero-inner { text-align: center; }
.social-proof {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.hero h1 {
  max-width: 860px;
  margin: 0 auto 20px;
  font-size: clamp(38px, 5.5vw, 68px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: var(--primary);
}
.hero-copy {
  max-width: 680px;
  margin: 0 auto 28px;
  font-size: clamp(17px, 2.1vw, 21px);
  color: var(--muted);
  line-height: 1.55;
}
.badge-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
}
.badge-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  padding: 8px 16px;
  font-weight: 600;
  font-size: 14px;
  color: #334155;
}
.btn-hero {
  font-size: 17px;
  padding: 16px 32px;
  border-radius: 12px;
}

/* ─── PROOF STRIP ─── */
.proof-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--white);
  padding: 24px 0;
}
.proof-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}
.proof-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 40px;
}
.proof-item strong {
  font-size: 26px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.proof-item span { font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.proof-divider { width: 1px; height: 40px; background: var(--line); }

/* ─── TOOL ─── */
.tool-section { padding: 40px 0 52px; }
.tool-controls {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  align-items: flex-end;
}
.control-group { display: flex; flex-direction: column; gap: 8px; }
.control-group label { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.toggle-group { display: flex; gap: 6px; }
.toggle-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--muted);
  border-radius: var(--radius);
  padding: 8px 16px;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.toggle-btn:hover { border-color: var(--accent); color: var(--accent); }
.toggle-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

.tool-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.panel-head h2 { margin: 0; font-size: 22px; color: var(--primary); }
.panel-head span, #wordCount { color: var(--muted); font-weight: 600; font-size: 14px; }
.output-actions { display: flex; gap: 8px; }

textarea, .output-box {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--text);
}
textarea {
  padding: 16px;
  min-height: 280px;
  resize: vertical;
  font: inherit;
  font-size: 15px;
  line-height: 1.72;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.08);
}
.output-box {
  padding: 16px;
  min-height: 280px;
  white-space: pre-wrap;
  line-height: 1.72;
  font-size: 15px;
}
.output-box.placeholder { color: var(--muted); font-style: italic; }
.action-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.action-row .btn { flex: 1; }

/* Diff styles */
.diff-add { background: #d1fae5; border-radius: 2px; }
.diff-del { background: #fee2e2; text-decoration: line-through; border-radius: 2px; }

/* ─── BUTTONS ─── */
.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--text);
  border-radius: var(--radius);
  padding: 13px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition), transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(15,23,42,0.08); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--white); }
.btn-primary:hover { background: #0C8E8D; border-color: #0C8E8D; color: var(--white); }
.btn-secondary:hover { border-color: var(--secondary); color: var(--secondary); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); font-weight: 600; }
.btn-ghost:hover { color: var(--secondary); border-color: var(--line); box-shadow: none; }
.btn-small { padding: 9px 14px; font-size: 13px; }
.btn.success { background: var(--accent); border-color: var(--accent); color: var(--white); }

/* ─── SCORE CARD ─── */
.score-card {
  display: none;
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  animation: fadeUp 0.3s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.score-card.active { display: block; }
.score-row {
  display: flex;
  gap: 24px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.score-metric { display: flex; flex-direction: column; gap: 2px; }
.metric-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.metric-value { font-size: 22px; font-weight: 800; color: var(--primary); }
.bar {
  height: 10px;
  background: #DCE5F1;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}
.bar span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--secondary));
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.status { margin-top: 10px; font-weight: 700; font-size: 14px; }
.status.ok { color: #0F8F72; }
.status.err { color: #B42318; }

/* ─── SECTIONS ─── */
.section { padding: 56px 0; }
.section-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.section h2, .section-label + h2 {
  font-size: clamp(28px, 3.8vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 36px;
}

/* ─── STEPS ─── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  position: relative;
}
.step-num {
  font-size: 48px;
  font-weight: 900;
  color: var(--line);
  line-height: 1;
  margin-bottom: 16px;
  letter-spacing: -0.04em;
}
.step h3 { font-size: 18px; margin-bottom: 10px; }
.step p { color: var(--muted); font-size: 15px; }

/* ─── FEATURES ─── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.feature-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.feat-icon {
  font-size: 22px;
  margin-bottom: 14px;
  color: var(--accent);
}
.feature-card h3 { font-size: 17px; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 15px; }

/* ─── TESTIMONIALS ─── */
.testimonials-section {
  background: linear-gradient(135deg, rgba(14,165,164,0.05), rgba(37,99,235,0.04));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.testimonial {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  margin: 0;
}
.testimonial p {
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 16px;
}
.testimonial cite {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  font-style: normal;
}

/* ─── WHY SECTION ─── */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.why-block h3 { font-size: 17px; font-weight: 700; margin-bottom: 10px; color: var(--primary); }
.why-block p { color: var(--muted); font-size: 15px; line-height: 1.7; }

/* ─── FAQ ─── */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.faq-item summary {
  padding: 18px 22px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 22px;
  color: var(--accent);
  font-weight: 400;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 22px 18px; color: var(--muted); font-size: 15px; line-height: 1.7; }

/* ─── CTA SECTION ─── */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, #1e3a5f 100%);
  padding: 64px 0;
  margin-top: 0;
}
.cta-inner { text-align: center; }
.cta-inner h2 { color: var(--white); font-size: clamp(26px, 3.5vw, 40px); margin-bottom: 12px; letter-spacing: -0.02em; }
.cta-inner p { color: rgba(255,255,255,0.7); font-size: 17px; margin-bottom: 28px; }
.cta-inner .btn-primary { background: var(--accent); border-color: var(--accent); font-size: 17px; padding: 16px 36px; }

/* ─── FOOTER ─── */
.site-footer {
  border-top: 1px solid var(--line);
  padding-top: 48px;
  padding-bottom: 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.footer-brand img { height: 36px; margin-bottom: 12px; }
.footer-brand p { color: var(--muted); font-size: 14px; max-width: 260px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links strong { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--primary); }
.footer-links a { color: var(--muted); font-size: 14px; }
.footer-links a:hover { color: var(--secondary); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.footer-bottom p { font-size: 13px; color: var(--muted); }

/* ─── UTILITIES ─── */
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ─── RESPONSIVE ─── */
@media (max-width: 980px) {
  .tool-wrap,
  .feature-grid,
  .steps-grid,
  .testimonial-grid,
  .why-grid { grid-template-columns: 1fr; }
  .brand img { height: 56px; }
  .site-nav { display: none; }
  .site-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 20px;
    gap: 18px;
    z-index: 100;
    box-shadow: var(--shadow);
  }
  .hamburger { display: flex; }
  .site-header { position: relative; }
  .proof-item { padding: 8px 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .tool-controls { gap: 18px; }
}

@media (max-width: 600px) {
  .hero { padding: 48px 0 36px; }
  .hero h1 { font-size: 34px; }
  .hero-copy { font-size: 16px; }
  .proof-strip .proof-inner { gap: 0; }
  .proof-divider { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .toggle-group { flex-wrap: wrap; }
}
