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

:root {
  --primary: #6C5CE7;
  --primary-dark: #5A4BD1;
  --secondary: #00B894;
  --accent: #FDCB6E;
  --dark: #2D3436;
  --dark-light: #636E72;
  --light: #F8F9FA;
  --white: #FFFFFF;
  --border: #DFE6E9;
  --shadow: 0 2px 15px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 30px rgba(108,92,231,0.15);
  --radius: 12px;
  --transition: 0.3s ease;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--dark);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

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

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--dark);
}

h1 { font-size: 3rem; }
h2 { font-size: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.4rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.15rem; }

p {
  margin-bottom: 1rem;
  color: var(--dark-light);
}

/* ===== LAYOUT ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--narrow {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 5rem 0;
}

/* ===== HEADER / NAV ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav__logo span {
  font-size: 1.5rem;
}

.nav__links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav__links a {
  color: var(--dark-light);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition);
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--primary);
}

.nav__links a.btn--primary,
.nav__links a.btn--primary:hover {
  color: var(--white);
}

.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  margin: 5px 0;
  transition: var(--transition);
}

/* ===== HERO ===== */
.hero {
  padding: 6rem 0 4rem;
  text-align: center;
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 50%, #e0e7ff 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(108,92,231,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero__badge {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary) 0%, #a29bfe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 1.3rem;
  color: var(--dark-light);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.hero__mottos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.hero__motto {
  background: var(--white);
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--dark);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid rgba(108,92,231,0.1);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
}

.btn--primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(108,92,231,0.3);
}

.btn--primary:hover {
  background: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108,92,231,0.4);
}

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

.btn--outline:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

.btn--small {
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
}

/* ===== CARDS ===== */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  border-color: rgba(108,92,231,0.2);
}

.card__icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
}

.card__tag {
  display: inline-block;
  background: #f5f3ff;
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

/* ===== GRID LAYOUTS ===== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* ===== SECTION HEADER ===== */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3rem;
}

.section-header p {
  font-size: 1.1rem;
}

/* ===== FEATURE LIST ===== */
.feature-list {
  list-style: none;
}

.feature-list li {
  padding: 0.75rem 0;
  padding-left: 2rem;
  position: relative;
  color: var(--dark-light);
}

.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--secondary);
  font-weight: 700;
}

/* ===== ARTICLE STYLING ===== */
.article-content {
  padding: 3rem 0 5rem;
}

.article-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.article-meta {
  color: var(--dark-light);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.article-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.article-content h3 {
  margin-top: 2rem;
}

.article-content p {
  font-size: 1.05rem;
  line-height: 1.8;
}

.article-content ul,
.article-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--dark-light);
}

.article-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.article-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: #f5f3ff;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--dark);
}

.article-content code {
  background: #f1f0f5;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.article-content pre {
  background: var(--dark);
  color: #dfe6e9;
  padding: 1.5rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1.5rem 0;
  line-height: 1.5;
}

.article-content pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: 0.85rem;
}

/* ===== CALLOUT BOX ===== */
.callout {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  border: 1px solid rgba(108,92,231,0.15);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 2rem 0;
}

.callout--tip {
  background: linear-gradient(135deg, #e8f8f5 0%, #d5f5e3 100%);
  border-color: rgba(0,184,148,0.2);
}

.callout h4 {
  margin-bottom: 0.5rem;
}

/* ===== CTA SECTION ===== */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, #a29bfe 100%);
  color: var(--white);
  text-align: center;
  padding: 4rem 0;
}

.cta-section h2 {
  color: var(--white);
}

.cta-section p {
  color: rgba(255,255,255,0.85);
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto 2rem;
}

.cta-section .btn--primary {
  background: var(--white);
  color: var(--primary);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.cta-section .btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0,0,0,0.2);
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.6);
  padding: 3rem 0 2rem;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer__brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer__links a {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
}

.footer__links a:hover {
  color: var(--white);
}

.footer__bottom {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
}

/* ===== HOW-IT-WORKS STEPS ===== */
.steps {
  counter-reset: step;
}

.step {
  display: flex;
  gap: 2rem;
  margin-bottom: 3rem;
  align-items: flex-start;
}

.step__number {
  counter-increment: step;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #a29bfe);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
}

.step__content h3 {
  margin-bottom: 0.5rem;
}

.step__content p {
  margin-bottom: 0;
}

.step__img {
  display: block;
  width: 100%;
  max-width: 640px;
  margin-top: 1.25rem;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* ===== TSV TABLE EXAMPLE ===== */
.tsv-example {
  overflow-x: auto;
  margin: 1.5rem 0;
}

.tsv-example table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.tsv-example th,
.tsv-example td {
  padding: 0.75rem 1rem;
  text-align: left;
  border: 1px solid var(--border);
}

.tsv-example th {
  background: #f5f3ff;
  font-weight: 600;
  color: var(--dark);
}

.tsv-example td {
  color: var(--dark-light);
}

/* ===== ARTICLES LIST ===== */
.article-card {
  display: block;
  color: inherit;
}

.article-card:hover {
  color: inherit;
}

.article-card h3 {
  transition: color var(--transition);
}

.article-card:hover h3 {
  color: var(--primary);
}

.article-card__excerpt {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.article-card__read-more {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  padding: 1rem 0;
  font-size: 0.85rem;
  color: var(--dark-light);
}

.breadcrumb a {
  color: var(--dark-light);
}

.breadcrumb a:hover {
  color: var(--primary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }

  .hero h1 { font-size: 2.5rem; }
  .hero__subtitle { font-size: 1.1rem; }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  section {
    padding: 3rem 0;
  }

  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .nav__links.open {
    display: flex;
  }

  .nav__toggle {
    display: block;
  }

  .footer__inner {
    flex-direction: column;
  }

  .step {
    flex-direction: column;
    gap: 1rem;
  }

  .article-content h1 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2rem; }
  .hero__mottos { flex-direction: column; align-items: center; }
}
