/* Z3 Bot — Discord-themed marketing site */

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

:root {
  --bg: #313338;
  --bg-elevated: #2b2d31;
  --bg-darker: #1e1f22;
  --text: #dbdee1;
  --text-muted: #949ba4;
  --heading-gradient: linear-gradient(180deg, #7289da 0%, #5865f2 45%, #dbdee1 100%);
  --contact-gradient: linear-gradient(135deg, #4752c4 0%, #5865f2 50%, #7289da 100%);
  --white: #ffffff;
  --dark: #1e1f22;
  --border-card: rgba(88, 101, 242, 0.28);
  --ease-out: cubic-bezier(0.25, 0.1, 0.25, 1);
  --radius-xl: clamp(40px, 5vw, 60px);
  --radius-lg: clamp(32px, 4vw, 50px);
  --accent: #5865f2;
  --accent-strong: #4752c4;
  --accent-soft: rgba(88, 101, 242, 0.12);
  --section-py: clamp(5rem, 10vw, 8rem);
  --section-px: clamp(1.25rem, 3vw, 2.5rem);
  --nav-height: 4.25rem;
}

html { scroll-behavior: smooth; }
html, body {
  background: var(--bg);
  color: var(--text);
  font-family: "Kanit", "Inter", sans-serif;
  font-weight: 400;
  line-height: 1.65;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }

.hero-heading {
  background: var(--heading-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.text-muted { color: var(--text-muted); font-weight: 300; }

/* ── Nav ── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem var(--section-px);
  background: rgba(49, 51, 56, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: "Kanit", sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--text);
  flex-shrink: 0;
}

.site-nav-logo img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 16px rgba(88, 101, 242, 0.35);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
}

.site-nav-logo:hover img {
  transform: scale(1.06);
  box-shadow: 0 0 22px rgba(88, 101, 242, 0.55);
}

.site-nav-links {
  display: flex;
  align-items: center;
  gap: clamp(0.65rem, 1.8vw, 1.35rem);
  flex-wrap: nowrap;
}

.site-nav-links a {
  font-family: "Kanit", sans-serif;
  font-weight: 500;
  font-size: clamp(0.8rem, 1.1vw, 0.92rem);
  color: var(--text-muted);
  white-space: nowrap;
  transition: color 0.2s;
}

.site-nav-links a:hover,
.site-nav-links a.active { color: var(--accent); }

.nav-cta {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border-card);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.nav-cta:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.nav-dashboard {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(88, 101, 242, 0.55);
  background: var(--contact-gradient);
  color: #fff !important;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 16px rgba(88, 101, 242, 0.35);
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s, border-color 0.2s;
}

.nav-dashboard:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(88, 101, 242, 0.5);
  border-color: rgba(88, 101, 242, 0.75);
  color: #fff !important;
}

.nav-dashboard i {
  font-size: 0.72rem;
  transition: transform 0.2s;
}

.nav-dashboard:hover i { transform: translateX(2px); }

.site-nav-links .nav-dashboard { color: #fff !important; }

.mobile-nav-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
}

.lang-switch-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 72px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(88, 101, 242, 0.25);
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
}

.lang-switch-toggle .toggle-bg {
  position: absolute;
  inset: 3px;
  width: calc(50% - 3px);
  border-radius: 999px;
  background: var(--accent-soft);
  transition: transform 0.25s var(--ease-out);
}

.lang-switch-toggle.active-tr .toggle-bg { transform: translateX(0); }
.lang-switch-toggle.active-en .toggle-bg { transform: translateX(calc(100% + 3px)); }

.lang-opt {
  position: relative;
  z-index: 1;
  flex: 1;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}

.lang-switch-toggle.active-tr .opt-tr,
.lang-switch-toggle.active-en .opt-en { color: var(--accent); }

/* ── Hero ── */
.beyond-hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(88, 101, 242, 0.14), transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 20%, rgba(30, 31, 34, 0.6), transparent),
    var(--bg);
  overflow: hidden;
  padding: clamp(5.5rem, 12vh, 7rem) var(--section-px) var(--section-py);
}

.beyond-sticky {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

.beyond-hero-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.25rem, 3vh, 2rem);
  z-index: 15;
}

.hero-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: min(92vw, 520px);
}

.hero-profile-img {
  width: clamp(220px, 38vw, 360px);
  height: clamp(220px, 38vw, 360px);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(88, 101, 242, 0.25), 0 0 40px rgba(88, 101, 242, 0.12);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

.hero-profile:hover .hero-profile-img {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5), 0 0 0 2px rgba(88, 101, 242, 0.45), 0 0 50px rgba(88, 101, 242, 0.2);
}

.hero-profile-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-action-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--bg-elevated);
  backdrop-filter: blur(8px);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: border-color 0.2s, background 0.2s, transform 0.2s, color 0.2s;
}

.hero-action-btn:hover {
  border-color: rgba(88, 101, 242, 0.55);
  background: var(--accent-soft);
  color: var(--accent);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 20px rgba(88, 101, 242, 0.2);
}

.hero-action-btn.primary-action {
  background: var(--contact-gradient);
  color: #fff;
  border-color: rgba(88, 101, 242, 0.6);
}

/* Hero copy block */
.hero-copy {
  text-align: center;
  max-width: 640px;
  padding: 0 1rem;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border-card);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-copy h1 {
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  margin-bottom: 1rem;
}

.hero-copy .hero-desc {
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.hero-chip {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--bg-elevated);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
}

.hero-chip strong { color: var(--text); font-weight: 600; }

/* Buttons */
.btn-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: clamp(0.75rem, 2vw, 1rem) clamp(1.5rem, 4vw, 2.5rem);
  border-radius: 999px;
  background: var(--contact-gradient);
  box-shadow: 0 4px 24px rgba(88, 101, 242, 0.28);
  outline: 2px solid rgba(88, 101, 242, 0.45);
  outline-offset: -2px;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: clamp(0.8rem, 1.2vw, 0.95rem);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s;
}

.btn-contact:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(88, 101, 242, 0.4);
}

.btn-live-project {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: clamp(0.75rem, 1.5vw, 0.875rem) clamp(1.5rem, 3vw, 2rem);
  border-radius: 999px;
  border: 2px solid var(--border-card);
  color: var(--text);
  font-weight: 500;
  font-size: clamp(0.85rem, 1.2vw, 0.95rem);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.btn-live-project:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* Brand marquee */
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-100% / var(--marquee-count, 2))); }
}

.brand-marquee {
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  padding: 1.25rem 0;
}

.brand-marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll var(--marquee-duration, 28s) linear infinite;
  will-change: transform;
}

.brand-marquee:hover .brand-marquee-track {
  animation-play-state: paused;
}

.marquee-set {
  display: flex;
  flex-shrink: 0;
  align-items: center;
}

.brand-marquee-text {
  flex-shrink: 0;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #949ba4, #5865f2, #dbdee1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: clamp(1.5rem, 4vw, 3rem);
  padding: 0 0.5em;
  transition: filter 0.25s;
}

.brand-marquee:hover .brand-marquee-text {
  filter: brightness(1.15);
}

/* Stats */
.stats-section {
  padding: var(--section-py) var(--section-px);
}

.stats-grid {
  max-width: 72rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 2px solid var(--border-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--bg);
}

.stat-cell {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  text-align: center;
  border-right: 1px solid rgba(88, 101, 242, 0.15);
}

.stat-cell:last-child { border-right: none; }

.stat-value {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  background: var(--heading-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* Features grid */
.section-block {
  padding: var(--section-py) var(--section-px);
}

.section-block.light {
  background: var(--white);
  color: var(--dark);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  margin-top: -2rem;
}

.section-block.light .text-muted { color: rgba(12, 12, 12, 0.65); }

.section-head {
  max-width: 72rem;
  margin: 0 auto clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}

.section-head .hero-heading {
  font-size: clamp(2rem, 6vw, 4rem);
  margin-bottom: 0.75rem;
}

.features-grid {
  max-width: 72rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
}

.feature-card {
  border: 2px solid var(--border-card);
  border-radius: var(--radius-xl);
  background: var(--bg);
  padding: clamp(1.25rem, 2vw, 1.75rem);
  transition: transform 0.25s var(--ease-out), border-color 0.25s, box-shadow 0.25s;
}

.section-block.light .feature-card {
  background: var(--white);
  border-color: rgba(88, 101, 242, 0.22);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(88, 101, 242, 0.55);
  box-shadow: 0 16px 48px rgba(88, 101, 242, 0.14);
}

.feature-card:hover .feature-icon {
  transform: scale(1.08);
  background: rgba(88, 101, 242, 0.2);
  box-shadow: 0 0 20px rgba(88, 101, 242, 0.25);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--accent);
  background: var(--accent-soft);
  margin-bottom: 1rem;
  transition: transform 0.25s var(--ease-out), background 0.25s, box-shadow 0.25s;
}

.feature-card h3 {
  font-weight: 600;
  font-size: 1.15rem;
  margin-bottom: 0.65rem;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-family: "Inter", sans-serif;
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.65;
}

.section-block.light .feature-card p { color: rgba(12, 12, 12, 0.65); }

.feature-card.span-2 { grid-column: span 2; }

/* About / dev note */
.about-section {
  min-height: min(90vh, 900px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--section-py) var(--section-px);
  text-align: center;
}

.about-inner {
  max-width: 720px;
  margin: 0 auto;
}

.about-card {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4rem);
  border: 2px solid var(--border-card);
  border-radius: var(--radius-xl);
  background: var(--bg-elevated);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  transition: transform 0.35s var(--ease-out), border-color 0.35s, box-shadow 0.35s;
}

.about-card:hover {
  transform: translateY(-3px);
  border-color: rgba(88, 101, 242, 0.45);
  box-shadow: 0 28px 70px rgba(88, 101, 242, 0.1);
}

.about-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border-card);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.about-card .hero-heading {
  font-size: clamp(1.75rem, 5vw, 3rem);
  margin-bottom: 1.25rem;
}

.about-card p,
.about-note-body {
  font-family: "Inter", sans-serif;
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 2rem;
}

.about-author {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.about-author-main {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.about-author img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(88, 101, 242, 0.35);
  flex-shrink: 0;
}

.about-author-name.hero-heading {
  font-size: clamp(1.35rem, 4vw, 2rem);
  margin: 0;
  line-height: 1;
  letter-spacing: -0.02em;
}

.about-author-role {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

/* Tag marquee */
.tag-marquee-section {
  padding: clamp(4rem, 8vw, 6rem) 0;
  overflow: hidden;
}

.tag-marquee-title {
  text-align: center;
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: clamp(1.75rem, 3vw, 2.25rem);
  padding: 0 var(--section-px);
}

.tag-marquee-row {
  overflow: hidden;
  margin-bottom: 1rem;
  width: 100%;
  padding: 0.5rem 0;
}
.tag-marquee-row:last-child { margin-bottom: 0; }

.tag-marquee-track {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: max-content;
  will-change: transform;
}

.tag-marquee-track.left { animation: marquee-scroll var(--marquee-duration, 38s) linear infinite; }
.tag-marquee-track.right { animation: marquee-scroll var(--marquee-duration, 42s) linear infinite reverse; }

.tag-marquee-track:has(.tag-pill:hover) { animation-play-state: paused; }

.marquee-set {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
  padding-right: 1rem;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.72rem 1.35rem;
  border-radius: 999px;
  border: 1px solid var(--border-card);
  background: var(--bg-elevated);
  font-size: clamp(0.88rem, 1.1vw, 1rem);
  font-weight: 500;
  white-space: nowrap;
  color: var(--text);
  flex-shrink: 0;
  position: relative;
  z-index: 0;
  cursor: default;
  transition:
    padding 0.25s var(--ease-out),
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

@media (hover: hover) {
  .tag-marquee-track .tag-pill:hover {
    padding: 0.8rem 1.45rem;
    z-index: 2;
    border-color: rgba(88, 101, 242, 0.65);
    background: rgba(88, 101, 242, 0.18);
    box-shadow: 0 0 0 1px rgba(88, 101, 242, 0.35), 0 8px 26px rgba(88, 101, 242, 0.24);
  }

  .tag-marquee-track .tag-pill:hover i {
    color: #7289da;
    transform: scale(1.12);
  }
}

.tag-pill i {
  color: var(--accent);
  font-size: 1.05rem;
  transition: color 0.2s ease, transform 0.25s var(--ease-out);
}

/* CTA */
.contact-section {
  padding: var(--section-py) var(--section-px);
  text-align: center;
}

.contact-title {
  font-size: clamp(2rem, 7vw, 4.5rem);
  margin-bottom: 1.25rem;
}

.contact-desc {
  color: var(--text-muted);
  font-family: "Inter", sans-serif;
  font-weight: 300;
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  max-width: 540px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(215, 226, 234, 0.1);
  padding: clamp(2.5rem, 5vw, 3.5rem) var(--section-px);
}

.footer-grid {
  max-width: 72rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand p {
  font-family: "Inter", sans-serif;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  line-height: 1.65;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
  color: var(--text);
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; }

.footer-col a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

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

.footer-social {
  display: flex;
  gap: 0.65rem;
  margin-top: 1rem;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(215, 226, 234, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.footer-social a:hover {
  background: var(--accent-soft);
  border-color: rgba(88, 101, 242, 0.45);
  color: var(--accent);
}

.footer-copy {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(215, 226, 234, 0.08);
}

/* Legal / inner pages */
.page-inner { padding-top: 5rem; min-height: 100vh; }

.legal-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) var(--section-px) var(--section-py);
}

.legal-card {
  border: 2px solid var(--border-card);
  border-radius: var(--radius-xl);
  background: var(--bg);
  padding: clamp(2rem, 4vw, 3rem);
}

.legal-card h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 0.5rem;
}

.legal-card .last-updated {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 2rem;
  display: block;
}

.legal-card h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 1.75rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(215, 226, 234, 0.1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legal-card h1 i { color: var(--accent); font-size: 1.1rem; margin-right: 0.35rem; }

.legal-card h2 i { color: var(--accent); font-size: 0.95rem; }

.legal-card p, .legal-card li {
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

.legal-card ul { padding-left: 1.25rem; margin-bottom: 1rem; }
.legal-card strong { color: var(--text); font-weight: 600; }
.legal-card a { color: var(--accent); }
.legal-card a:hover { text-decoration: underline; }

[data-lang-block] { display: none; }
[data-lang-block].lang-active { display: block; }

/* Features docs page */
.page-features {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

.features-sidebar {
  width: 280px;
  flex-shrink: 0;
  border-right: 1px solid rgba(215, 226, 234, 0.08);
  background: rgba(12, 12, 12, 0.95);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
}

.features-sidebar-header {
  padding: 1.25rem;
  border-bottom: 1px solid rgba(215, 226, 234, 0.08);
}

.features-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
}

.features-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(215, 226, 234, 0.08);
  background: rgba(12, 12, 12, 0.88);
  backdrop-filter: blur(12px);
}

.features-topbar .back-link {
  color: var(--text-muted);
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s;
}

.features-topbar .back-link:hover { color: var(--accent); }

.features-search {
  flex: 1;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

.features-search i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.features-search input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  border-radius: 999px;
  border: 1px solid var(--border-card);
  background: rgba(12, 12, 12, 0.6);
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  outline: none;
}

.features-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.12);
}

.features-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 2rem clamp(1rem, 3vw, 2.5rem);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.sidebar-nav-item:hover,
.sidebar-nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.command-name {
  font-family: ui-monospace, monospace;
  font-weight: 700;
  color: var(--accent);
  font-size: 1.05rem;
}

.command-badge {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-weight: 600;
}

.command-badge.slash { background: var(--accent-soft); color: var(--accent); }
.command-badge.admin { background: rgba(240, 71, 71, 0.12); color: #f04747; }

.category-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(215, 226, 234, 0.1);
}

.category-header h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
}

.category-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: var(--accent-soft);
  color: var(--accent);
}

.category-section { display: none; max-width: 900px; margin: 0 auto; }
.category-section.active { display: block; }

/* Features page — legacy class aliases */
.sidebar {
  width: 280px;
  flex-shrink: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
}

.sidebar-header { padding: 1.25rem; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.sidebar-header .logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-family: "Kanit", sans-serif;
  transition: color 0.2s;
}
.sidebar-header .logo:hover { color: var(--accent); }
.sidebar-header .logo img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  transition: transform 0.25s, box-shadow 0.25s;
}
.sidebar-header .logo:hover img {
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(88, 101, 242, 0.4);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-nav .nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border-left: none;
  background: transparent;
}

.sidebar-nav .nav-item:hover,
.sidebar-nav .nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  background: var(--bg);
}

.top-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(43, 45, 49, 0.95);
  backdrop-filter: blur(12px);
  height: auto;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 20;
}

.top-bar .back-btn { color: var(--text-muted); font-size: 0.88rem; display: inline-flex; align-items: center; gap: 0.4rem; }
.top-bar .back-btn:hover { color: var(--accent); }

.search-container { flex: 1; max-width: 480px; margin: 0 auto; position: relative; }
.search-container i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.search-container input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  border-radius: 999px;
  border: 1px solid var(--border-card);
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", sans-serif;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-container input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.15);
}

.content-scroll { flex: 1; overflow-y: auto; padding: 2rem clamp(1rem, 3vw, 2.5rem); }

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(215, 226, 234, 0.1);
}

.section-header h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; }
.section-header p { color: var(--text-muted); font-size: 0.95rem; margin-top: 0.25rem; }

.section-header-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  background: var(--accent-soft);
  flex-shrink: 0;
}

.section-header-icon.bg-red { background: rgba(240, 71, 71, 0.15); }
.section-header-icon.bg-yellow { background: rgba(254, 231, 92, 0.15); }
.section-header-icon.bg-pink { background: rgba(235, 69, 158, 0.15); }
.section-header-icon.bg-green { background: rgba(87, 242, 135, 0.15); }
.section-header-icon.bg-violet { background: rgba(155, 89, 182, 0.15); }
.section-header-icon.bg-cyan { background: rgba(88, 101, 242, 0.15); }
.section-header-icon.bg-purple { background: rgba(114, 137, 218, 0.15); }
.section-header-icon.bg-blue { background: rgba(88, 101, 242, 0.2); }

.command-list { display: flex; flex-direction: column; gap: 0.75rem; }

.command-card {
  border: 2px solid var(--border-card);
  border-radius: clamp(24px, 3vw, 40px);
  padding: 1.25rem 1.5rem;
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.command-card:hover {
  border-color: rgba(88, 101, 242, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(88, 101, 242, 0.1);
}

.command-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.command-desc { font-family: "Inter", sans-serif; color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }
.command-badges { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.badge { font-size: 0.72rem; padding: 0.2rem 0.55rem; border-radius: 999px; font-weight: 600; }
.badge-slash { background: var(--accent-soft); color: var(--accent); }
.badge-admin { background: rgba(240, 71, 71, 0.12); color: #f04747; }

.empty-state { display: none; text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty-state i { font-size: 2.5rem; margin-bottom: 1rem; opacity: 0.45; color: var(--accent); }

body.page-features-docs {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
  font-family: "Kanit", "Inter", sans-serif;
}

.page-features-docs .sidebar-nav .nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-left: none;
}

.page-features-docs .content-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 2rem clamp(1rem, 3vw, 2.5rem);
  scroll-behavior: smooth;
}

.features-page-head {
  max-width: 900px;
  margin: 0 auto 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.features-page-head h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  margin-bottom: 0.35rem;
  background: var(--heading-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.features-page-head p {
  color: var(--text-muted);
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  body.page-features-docs { flex-direction: column; }
  .sidebar { width: 100%; height: auto; }
  .main-content { height: auto; }
  .sidebar-nav { flex-direction: row; overflow-x: auto; }
  .sidebar-nav .nav-item { white-space: nowrap; flex-shrink: 0; }
}

/* Fade in */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.fade-in.is-visible { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-card.span-2 { grid-column: span 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .mobile-nav-btn { display: block; }
  .site-nav {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .site-nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    background: rgba(43, 45, 49, 0.98);
    padding: 0.75rem 0.65rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    max-height: calc(100dvh - 4.25rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .site-nav-links.mobile-open { display: flex; }
  .site-nav-links a.nav-item {
    padding: 0.65rem 0.5rem;
  }
  .site-nav-links .nav-cta,
  .site-nav-links .nav-dashboard {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    margin-top: 0.5rem;
    padding: 0.72rem 1rem;
    text-align: center;
    box-sizing: border-box;
  }
  .site-nav-links .nav-cta {
    margin-top: 0.75rem;
  }
  .site-nav-links .nav-dashboard {
    margin-top: 0.5rem;
  }
  .site-nav-links .nav-dashboard:hover {
    transform: none;
  }
  .site-nav-links .lang-switch-toggle { align-self: center; margin-top: 0.85rem; }
  :root { --nav-height: 4.5rem; }
  .beyond-hero {
    align-items: flex-start;
    justify-content: flex-start;
    min-height: auto;
    padding-top: calc(var(--nav-height) + 1.25rem + env(safe-area-inset-top, 0px));
    padding-bottom: clamp(3rem, 8vw, 5rem);
  }
  .hero-profile-img {
    width: clamp(180px, 52vw, 280px);
    height: clamp(180px, 52vw, 280px);
  }
  .beyond-words { display: none; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-cell { border-right: none; border-bottom: 1px solid rgba(88, 101, 242, 0.15); }
  .stat-cell:last-child { border-bottom: none; }
  .features-grid { grid-template-columns: 1fr; }
  .feature-card.span-2 { grid-column: span 1; }
  .footer-grid { grid-template-columns: 1fr; }
  .page-features { flex-direction: column; }
  .features-sidebar { width: 100%; height: auto; position: relative; }
  .features-main { height: auto; }
  .features-sidebar .sidebar-nav { flex-direction: row; overflow-x: auto; flex-wrap: nowrap; }
  .sidebar-nav-item { white-space: nowrap; flex-shrink: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .brand-marquee-track,
  .tag-marquee-track.left,
  .tag-marquee-track.right { animation: none !important; }
  .fade-in { opacity: 1; transform: none; transition: none; }
}
