/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --orange-50: #fff7ed;
  --orange-100: #ffedd5;
  --orange-200: #fed7aa;
  --orange-300: #fdba74;
  --orange-400: #fb923c;
  --orange-500: #e8721c;
  --orange-600: #c45a10;
  --orange-700: #9a3412;
  --orange-800: #7c2d12;
  --orange-900: #431407;

  --gray-50: #fafafa;
  --gray-100: #f4f4f5;
  --gray-200: #e4e4e7;
  --gray-300: #d4d4d8;
  --gray-400: #a1a1aa;
  --gray-500: #71717a;
  --gray-600: #52525b;
  --gray-700: #3f3f46;
  --gray-800: #27272a;
  --gray-900: #18181b;

  --white: #ffffff;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --max-width: 1120px;
  --header-height: 64px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

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

a {
  color: var(--orange-500);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--orange-600);
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== Layout ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header / Nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  height: var(--header-height);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  text-decoration: none;
}

.nav-brand:hover {
  color: var(--gray-900);
}

.nav-brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--gray-600);
  font-size: 0.938rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--orange-500);
}

.nav-links .btn-sm {
  font-size: 0.875rem;
  padding: 6px 16px;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gray-700);
  margin: 5px 0;
  transition: 0.3s;
  border-radius: 2px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--orange-500);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(232, 114, 28, 0.3);
}

.btn-primary:hover {
  background: var(--orange-600);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(232, 114, 28, 0.4);
}

.btn-secondary {
  background: var(--white);
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
  background: var(--gray-50);
  color: var(--gray-900);
  border-color: var(--gray-400);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.875rem;
  border-radius: 6px;
}

/* ===== Hero ===== */
.hero {
  padding: 80px 0 64px;
  text-align: center;
  background: linear-gradient(180deg, var(--orange-50) 0%, var(--white) 100%);
}

.hero-icon {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(232, 114, 28, 0.2);
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero h1 .highlight {
  color: var(--orange-500);
}

.hero .tagline {
  font-size: 1.25rem;
  color: var(--gray-500);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-meta {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.813rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 100px;
  background: var(--orange-100);
  color: var(--orange-700);
}

.badge-neutral {
  background: var(--gray-100);
  color: var(--gray-600);
}

/* ===== Features Grid ===== */
.features {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 12px;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--gray-500);
  max-width: 560px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  padding: 28px;
  border-radius: 12px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  border-color: var(--orange-300);
  box-shadow: 0 4px 16px rgba(232, 114, 28, 0.08);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--orange-50);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--orange-500);
}

.feature-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--orange-500);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.938rem;
  color: var(--gray-500);
  line-height: 1.6;
}

/* ===== Formats Strip ===== */
.formats {
  padding: 48px 0;
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
}

.formats-inner {
  text-align: center;
}

.formats-inner h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 24px;
}

.format-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.format-tag {
  display: inline-block;
  padding: 8px 20px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  font-family: var(--font-mono);
}

/* ===== CTA Banner ===== */
.cta {
  padding: 64px 0;
  text-align: center;
}

.cta-box {
  background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
  border-radius: 16px;
  padding: 56px 40px;
  color: var(--white);
}

.cta-box h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.cta-box p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 28px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.cta-box .btn-primary {
  background: var(--white);
  color: var(--orange-600);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.cta-box .btn-primary:hover {
  background: var(--orange-50);
  color: var(--orange-700);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 48px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
}

.footer-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.footer-desc {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--gray-400);
  max-width: 280px;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: var(--gray-400);
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--orange-400);
}

.footer-bottom {
  border-top: 1px solid var(--gray-800);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.813rem;
  color: var(--gray-500);
}

.footer-bottom a {
  color: var(--gray-500);
}

.footer-bottom a:hover {
  color: var(--orange-400);
}

/* ===== Page Content (for sub-pages) ===== */
.page-content {
  padding: 64px 0 80px;
  min-height: calc(100vh - var(--header-height) - 200px);
}

.page-content h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.page-content .subtitle {
  font-size: 1.1rem;
  color: var(--gray-500);
  margin-bottom: 40px;
}

.page-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-top: 40px;
  margin-bottom: 12px;
}

.page-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-top: 28px;
  margin-bottom: 8px;
}

.page-content p {
  font-size: 1rem;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 16px;
  max-width: 720px;
}

.page-content ul,
.page-content ol {
  margin-bottom: 16px;
  padding-left: 24px;
  max-width: 720px;
}

.page-content li {
  font-size: 1rem;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 6px;
}

.page-content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--orange-700);
}

/* Feature detail list on features page */
.feature-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 40px;
  margin-bottom: 40px;
}

.feature-detail-card {
  padding: 24px;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  background: var(--white);
}

.feature-detail-card h3 {
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.feature-detail-card ul {
  margin-top: 8px;
  padding-left: 20px;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .feature-detail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 48px 0 40px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero .tagline {
    font-size: 1.1rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px 24px;
    border-bottom: 1px solid var(--gray-200);
    gap: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .cta-box {
    padding: 40px 24px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-meta {
    flex-direction: column;
    gap: 8px;
  }
}
