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

:root {
  --bg: #fafaf8;
  --surface: #ffffff;
  --border: #e8e4de;
  --text: #1c1917;
  --muted: #78716c;
  --accent: #0d9488;
  --accent-dark: #0f766e;
  --accent-light: #ccfbf1;
  --amber: #f59e0b;
  --amber-light: #fef3c7;
  --font-sans: 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.05);
  --shadow: 0 4px 16px -2px rgba(0,0,0,0.07);
  --shadow-lg: 0 8px 32px -4px rgba(0,0,0,0.10);
  --radius: 12px;
  --radius-lg: 20px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,250,248,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}
.logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.logo span { color: var(--accent); }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.15s;
  white-space: nowrap;
}
.nav a:hover, .nav a.active {
  color: var(--text);
  background: var(--accent-light);
}
.nav a.btn-nav {
  background: var(--accent);
  color: white;
  padding: 7px 16px;
}
.nav a.btn-nav:hover {
  background: var(--accent-dark);
  color: white;
}

@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 12px 16px; }
  .nav { width: 100%; overflow-x: auto; padding-bottom: 4px; }
}

/* ===== HERO ===== */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 24px 64px;
  text-align: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
  color: var(--text);
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.65;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
}
.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: #f5f4f0; transform: translateY(-1px); }

/* ===== SECTIONS ===== */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 24px;
}
.section-sm {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px;
}
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
  line-height: 1.2;
}
.section-desc {
  font-size: 1rem;
  color: var(--muted);
  max-width: 540px;
  line-height: 1.7;
  margin-bottom: 40px;
}
.section-desc.center { margin: 0 auto 40px; }

/* ===== FEATURES GRID ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all 0.2s;
}
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--accent);
}
.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.feature-card p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ===== WHO USES ===== */
.who-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.who-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.who-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--amber));
  border-radius: 3px 3px 0 0;
}
.who-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.who-card p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ===== STEPS ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
}
.step {
  position: relative;
  padding-top: 8px;
}
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 0.875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-family: var(--font-mono);
}
.step h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.step p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ===== TOOL PREVIEW ===== */
.tool-preview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.tool-preview-header {
  background: #f5f4f0;
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tool-dots { display: flex; gap: 6px; }
.tool-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.tool-dot:nth-child(1) { background: #fc605c; }
.tool-dot:nth-child(2) { background: #fec02f; }
.tool-dot:nth-child(3) { background: #2aca44; }
.tool-title {
  font-size: 0.8rem;
  color: var(--muted);
  margin-left: 8px;
  font-family: var(--font-mono);
}
.tool-preview-body {
  padding: 24px;
  background: #fff;
  min-height: 300px;
}

/* ===== TOOL PAGE ===== */
.tool-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 24px 40px;
}
.tool-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  line-height: 1.15;
}
.tool-hero p {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 28px;
}
.tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.tool-tag {
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--accent-light);
  color: var(--accent-dark);
  padding: 4px 12px;
  border-radius: 100px;
}
.tool-tag.amber {
  background: var(--amber-light);
  color: #92400e;
}
.tool-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 900px) {
  .tool-content { grid-template-columns: 1fr; }
}
.tool-content h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.tool-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}
.tool-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
}
.tool-list li svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent);
}
.tool-layout-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.layout-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  transition: all 0.15s;
  cursor: default;
}
.layout-card:hover { border-color: var(--accent); color: var(--accent); }
.layout-card svg { margin-bottom: 6px; display: block; margin-inline: auto; }
.layout-card strong { display: block; font-size: 0.75rem; font-weight: 600; margin-bottom: 3px; color: var(--text); }

/* ===== FAQ ===== */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-q {
  width: 100%;
  background: none;
  border: none;
  padding: 18px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-sans);
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-q:hover { background: #faf9f7; }
.faq-a {
  display: none;
  padding: 0 20px 18px;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.7;
}
.faq-item.open .faq-a { display: block; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-arrow { transition: transform 0.2s; }

/* ===== ENGINES ===== */
.engines-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.engine-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 7px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  transition: all 0.15s;
}
.engine-chip:hover {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent-dark);
}

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-brand p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 10px;
  max-width: 260px;
}
.footer h4 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer ul a {
  font-size: 0.875rem;
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s;
}
.footer ul a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .section, .section-sm { padding: 48px 16px; }
  .hero { padding: 48px 16px 40px; }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-up {
  animation: fadeUp 0.5s ease forwards;
}

/* ===== DIVIDER ===== */
.divider {
  height: 1px;
  background: var(--border);
  max-width: 1200px;
  margin: 0 auto;
}

/* ===== MORE TOOLS ===== */
.more-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.more-tool-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  text-decoration: none;
  transition: all 0.2s;
}
.more-tool-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.more-tool-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.more-tool-card p {
  font-size: 0.825rem;
  color: var(--muted);
  line-height: 1.5;
}
