/* style.css — TabKebab Website Design System */

/* ── Design Tokens ── */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #f1f3f5;
  --bg-card: #ffffff;
  --bg-hover: #f1f3f5;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --accent-medium: rgba(37, 99, 235, 0.15);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.08);
  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.08);
  --warning: #f59e0b;
  --kebab: #f59e0b;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.10);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-pill: 100px;
  --transition: 150ms ease;
  --transition-slow: 250ms ease;
  --font: 'Segoe UI', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  /* Brand colors */
  --brand-red: #ef4444;
  --brand-amber: #f59e0b;
  --brand-teal: #14b8a6;
  --brand-purple: #8b5cf6;
}

/* ── Dark Theme ── */
[data-theme="dark"] {
  --bg-primary: #0f0f10;
  --bg-secondary: #1a1a1d;
  --bg-tertiary: #222225;
  --bg-card: #1a1a1d;
  --bg-hover: #222225;
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-tertiary: #6b7280;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-soft: rgba(59, 130, 246, 0.1);
  --accent-medium: rgba(59, 130, 246, 0.2);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.1);
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.1);
  --kebab: #f97316;
  --border: #2a2a2e;
  --border-strong: #3f3f46;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-primary: #0f0f10;
    --bg-secondary: #1a1a1d;
    --bg-tertiary: #222225;
    --bg-card: #1a1a1d;
    --bg-hover: #222225;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-tertiary: #6b7280;
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --accent-soft: rgba(59, 130, 246, 0.1);
    --accent-medium: rgba(59, 130, 246, 0.2);
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, 0.1);
    --success: #34d399;
    --success-soft: rgba(52, 211, 153, 0.1);
    --kebab: #f97316;
    --border: #2a2a2e;
    --border-strong: #3f3f46;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.5);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a:hover {
  color: var(--accent-hover);
}

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

/* ── Container ── */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Sticky Nav ── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}

[data-theme="dark"] .site-nav,
.dark-nav .site-nav {
  background: rgba(15, 15, 16, 0.85);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-nav {
    background: rgba(15, 15, 16, 0.85);
  }
}

.site-nav.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 24px;
  max-width: 1140px;
  margin: 0 auto;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-brand img {
  width: 28px;
  height: 28px;
}

.nav-brand-text {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.nav-brand-text .t { color: var(--text-primary); }
.nav-brand-text .k { color: var(--brand-red); }
.nav-brand-text .e { color: var(--brand-amber); }
.nav-brand-text .b1 { color: var(--brand-teal); }
.nav-brand-text .a { color: var(--brand-teal); }
.nav-brand-text .b2 { color: var(--brand-purple); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-github {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  transition: color var(--transition);
}

.nav-github:hover {
  color: var(--text-primary);
}

.nav-github svg {
  width: 22px;
  height: 22px;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  font-size: 18px;
}

.theme-toggle:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

/* Mobile hamburger */
.hamburger {
  display: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.mobile-drawer {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  background: var(--bg-primary);
  border-left: 1px solid var(--border);
  z-index: 1100;
  flex-direction: column;
  padding: 20px;
  box-shadow: var(--shadow-xl);
  transform: translateX(100%);
  transition: transform var(--transition-slow);
}

.mobile-drawer.open {
  transform: translateX(0);
}

.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1050;
}

.drawer-overlay.open {
  display: block;
}

.drawer-close {
  align-self: flex-end;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.mobile-drawer a {
  display: block;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}

.mobile-drawer .drawer-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

@media (max-width: 768px) {
  .nav-links, .nav-actions {
    display: none;
  }
  .hamburger {
    display: flex;
    margin-left: auto;
  }
  .mobile-drawer {
    display: flex;
  }
}

/* ── Hero ── */
.hero {
  padding: 140px 0 80px;
  text-align: center;
}

.hero-logo {
  max-width: 400px;
  margin: 0 auto 24px;
}

.hero-tagline {
  font-size: 20px;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 32px;
  line-height: 1.5;
}

.hero-ctas {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  background: var(--bg-secondary);
  border-color: var(--accent);
  color: var(--accent);
}

.hero-promo {
  max-width: 900px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.hero-promo img {
  width: 100%;
}

/* ── Section Shared ── */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-secondary);
}

.section-title {
  font-size: 32px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 48px;
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: box-shadow var(--transition), transform var(--transition);
}

.feature-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.feature-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.feature-thumb {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: box-shadow var(--transition);
}

.feature-thumb:hover {
  box-shadow: var(--shadow-md);
}

.feature-thumb img {
  width: 100%;
  display: block;
}

@media (max-width: 960px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Screenshot Gallery ── */
.gallery-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 24px 20px;
  -webkit-overflow-scrolling: touch;
}

.gallery-track::-webkit-scrollbar {
  height: 6px;
}

.gallery-track::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: 3px;
}

.gallery-track::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}

.gallery-item {
  flex: 0 0 auto;
  width: 340px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  scroll-snap-align: start;
  transition: box-shadow var(--transition), transform var(--transition);
}

.gallery-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.gallery-item img {
  width: 100%;
  display: block;
}

@media (max-width: 600px) {
  .gallery-item {
    width: 280px;
  }
}

/* ── Highlights Strip ── */
.highlights {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.highlight-card {
  text-align: center;
  padding: 32px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: transform var(--transition), box-shadow var(--transition);
}

.highlight-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.highlight-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 14px;
}

.highlight-card.red .highlight-icon {
  background: rgba(239, 68, 68, 0.12);
  color: var(--brand-red);
}

.highlight-card.amber .highlight-icon {
  background: rgba(245, 158, 11, 0.12);
  color: var(--brand-amber);
}

.highlight-card.teal .highlight-icon {
  background: rgba(20, 184, 166, 0.12);
  color: var(--brand-teal);
}

.highlight-card.purple .highlight-icon {
  background: rgba(139, 92, 246, 0.12);
  color: var(--brand-purple);
}

.highlight-value {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
}

.highlight-card.red .highlight-value { color: var(--brand-red); }
.highlight-card.amber .highlight-value { color: var(--brand-amber); }
.highlight-card.teal .highlight-value { color: var(--brand-teal); }
.highlight-card.purple .highlight-value { color: var(--brand-purple); }

.highlight-label {
  font-size: 13px;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .highlights {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .highlights {
    grid-template-columns: 1fr;
  }
}

/* ── Guide Section ── */
.guide-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 40px;
}

.toc-pill {
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  font-family: var(--font);
}

.toc-pill:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.guide-accordion {
  max-width: 820px;
  margin: 0 auto;
}

.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  margin-bottom: 12px;
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.accordion-item:hover {
  box-shadow: var(--shadow-sm);
}

.accordion-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  cursor: pointer;
  user-select: none;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: var(--font);
  transition: background var(--transition);
}

.accordion-header:hover {
  background: var(--bg-hover);
}

.accordion-chevron {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-tertiary);
  transition: transform var(--transition-slow);
  flex-shrink: 0;
}

.accordion-item.open .accordion-chevron {
  transform: rotate(180deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.accordion-item.open .accordion-body {
  max-height: 5000px;
}

.accordion-content {
  padding: 0 24px 24px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.accordion-content h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 20px 0 8px;
}

.accordion-content h3:first-child {
  margin-top: 0;
}

.accordion-content p {
  margin-bottom: 12px;
}

.accordion-content ul, .accordion-content ol {
  margin: 0 0 12px 24px;
}

.accordion-content li {
  margin-bottom: 6px;
}

.accordion-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.accordion-content code {
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: 'Cascadia Code', 'Fira Code', monospace;
}

.accordion-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 13px;
}

.accordion-content th,
.accordion-content td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.accordion-content th {
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.accordion-content .guide-screenshot {
  margin: 16px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
}

.accordion-content .guide-screenshot img {
  width: 100%;
  display: block;
}

.accordion-content pre {
  background: var(--bg-tertiary);
  padding: 12px 16px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 12px 0;
  font-size: 13px;
  font-family: 'Cascadia Code', 'Fira Code', monospace;
  line-height: 1.5;
}

.accordion-content pre code {
  background: none;
  padding: 0;
}

/* ── Contact ── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 700px;
  margin: 0 auto 40px;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  transition: box-shadow var(--transition), transform var(--transition);
}

.contact-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.contact-icon {
  font-size: 32px;
  margin-bottom: 14px;
}

.contact-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.contact-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.contact-links {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

.contact-links a {
  margin: 0 8px;
}

@media (max-width: 600px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Footer ── */
.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-logo {
  width: 32px;
  height: 32px;
  margin: 0 auto 12px;
  opacity: 0.7;
}

.footer-credit {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.footer-sub {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.footer-links {
  font-size: 13px;
  color: var(--text-tertiary);
}

.footer-links a {
  color: var(--text-secondary);
  margin: 0 8px;
}

.footer-links a:hover {
  color: var(--accent);
}

/* ── Lightbox ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  padding: 40px;
  cursor: pointer;
  animation: lightbox-in 0.2s ease;
}

.lightbox.open {
  display: flex;
}

@keyframes lightbox-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.5);
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ── Responsive Typography ── */
@media (max-width: 768px) {
  .section-title {
    font-size: 26px;
  }

  .section-subtitle {
    font-size: 15px;
  }

  .hero {
    padding: 120px 0 60px;
  }

  .hero-logo {
    max-width: 300px;
  }

  .hero-tagline {
    font-size: 17px;
  }

  .btn {
    padding: 10px 22px;
    font-size: 14px;
  }

  .section {
    padding: 60px 0;
  }

  .accordion-header {
    padding: 14px 18px;
    font-size: 15px;
  }

  .accordion-content {
    padding: 0 18px 18px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero-logo {
    max-width: 240px;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: center;
  }
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}

/* ── Selection ── */
::selection {
  background: var(--accent-medium);
  color: var(--text-primary);
}
