/* Root theme tokens */
:root {
  color-scheme: light;
  --bg: #f7f8fc;
  --surface: #ffffff;
  --text: #1b1f2a;
  --muted: #5b6170;
  --border: #e3e6ef;
  --primary: #3b5bdb;
  --primary-dark: #2b49b9;
  --accent: #22c55e;
  --shadow: 0 18px 35px rgba(15, 23, 42, 0.08);
  --radius: 16px;
}

body.dark {
  color-scheme: dark;
  --bg: #0f172a;
  --surface: #151c2c;
  --text: #f1f5f9;
  --muted: #c0c6d4;
  --border: #273149;
  --primary: #6c8cff;
  --primary-dark: #4c6be8;
  --accent: #4ade80;
  --shadow: 0 18px 35px rgba(5, 8, 20, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.section {
  padding: 80px 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 12px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 248, 252, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease;
}

body.dark .site-header {
  background: rgba(15, 23, 42, 0.95);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 20px;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links a {
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav-toggle-bar {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s ease;
}

.mode-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.3s ease, border 0.3s ease;
}

.mode-toggle:hover {
  transform: translateY(-1px);
}

/* Hero */
.hero {
  padding-top: 120px;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  align-items: center;
}

.hero-content h1 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-description {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 28px;
}

.hero-card {
  background: var(--surface);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.hero-card ul {
  margin-top: 16px;
  display: grid;
  gap: 12px;
  color: var(--muted);
  padding-left: 18px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
}

.btn.primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 12px 20px rgba(59, 91, 219, 0.2);
}

.btn.primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn.ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn.subtle {
  background: transparent;
  color: var(--muted);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 40px;
}

.section-header p {
  color: var(--muted);
  margin-top: 10px;
}

/* Tool */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.tool-card,
.output-card,
.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

label {
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 16px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(59, 91, 219, 0.35);
  border-color: var(--primary);
}

small {
  display: block;
  margin-top: -8px;
  margin-bottom: 16px;
  color: var(--muted);
}

.tool-actions {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.output-card textarea {
  resize: vertical;
  min-height: 260px;
}

.form-message {
  margin-top: 12px;
  font-weight: 600;
  color: var(--accent);
  min-height: 24px;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 16px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.faq-question {
  width: 100%;
  background: transparent;
  border: none;
  text-align: left;
  padding: 18px 22px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}

.faq-answer {
  padding: 0 22px 18px;
  color: var(--muted);
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

/* Page layouts */
.page-hero {
  padding-top: 120px;
  padding-bottom: 40px;
}

.page-lead {
  max-width: 720px;
  color: var(--muted);
  margin-top: 16px;
}

.content-section {
  padding-top: 30px;
}

.content-card h2 {
  margin-top: 24px;
}

.content-card h2:first-child {
  margin-top: 0;
}

.content-card p {
  margin-top: 14px;
  color: var(--muted);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.contact-list {
  margin-top: 16px;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 8px;
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 50px 0 20px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.footer-grid p,
.footer-grid li {
  color: var(--muted);
}

.footer-grid ul {
  list-style: none;
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid,
  .tool-grid,
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    order: -1;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 72px;
    right: 4%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 18px;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    min-width: 220px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: all 0.2s ease;
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  .section {
    padding: 60px 0;
  }

  .hero {
    padding-top: 100px;
  }

  .btn {
    width: 100%;
  }

  .tool-actions {
    grid-template-columns: 1fr;
  }
}
