/* ============================================================
   GLOBAL STYLES — XOGENT.AI
   ============================================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  color: var(--foreground-primary);
  background: var(--surface-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================================
   LAYOUT
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section {
  padding: var(--section-padding) var(--section-padding-x);
}

/* ============================================================
   NAVIGATION
   ============================================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 40px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

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

.nav__links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--foreground-secondary);
  transition: color 0.2s;
}

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

.nav__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-primary);
  color: var(--foreground-primary) !important;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 9999px;
  transition: background 0.2s;
  text-decoration: none;
}

.nav__cta:hover {
  background: var(--accent-dark);
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--foreground-primary);
  border-radius: 2px;
  transition: all 0.3s;
}


.nav__mobile {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface-primary);
  padding: 8px 20px 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  border-radius: 0 0 16px 16px;
  flex-direction: column;
  gap: 0;
  z-index: 99;
}

.nav__mobile.open {
  display: flex;
}

.nav__mobile a {
  display: block;
  padding: 14px 4px;
  font-size: 16px;
  font-weight: 500;
  color: var(--foreground-primary);
  border-bottom: 1px solid var(--border-subtle);
  text-decoration: none;
}

.nav__mobile a.active {
  color: var(--accent-primary);
}

.nav__mobile a:last-child {
  border-bottom: none;
}

.nav__mobile .nav__cta {
  margin-top: 12px;
  border-bottom: none;
  color: var(--foreground-primary) !important;
  justify-content: center;
}

.nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 8px 24px;
  background: transparent;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-primary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}

.btn--primary {
  background: var(--accent-primary);
  color: var(--foreground-primary);
  padding: 16px 36px;
  border-radius: 9999px;
  font-size: 16px;
}

.btn--primary:hover {
  background: var(--accent-dark);
}

.btn--outline-white {
  background: rgba(255,255,255,0.13);
  color: var(--foreground-inverse);
  padding: 16px 36px;
  border-radius: 9999px;
  font-size: 16px;
  border: 1px solid rgba(255,255,255,0.2);
}

.btn--outline-white:hover {
  background: rgba(255,255,255,0.22);
}

.btn--white {
  background: var(--surface-primary);
  color: var(--accent-primary);
  padding: 16px 36px;
  border-radius: 9999px;
  font-size: 16px;
  font-weight: 700;
}

.btn--white:hover {
  background: var(--surface-secondary);
}

.btn-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ============================================================
   PILLS / BADGES
   ============================================================ */

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: 0.3px;
}

.pill--blue {
  background: var(--accent-primary);
  color: var(--foreground-inverse);
}

.pill--light {
  background: var(--accent-light);
  color: var(--foreground-primary);
}

.pill--ghost {
  background: rgba(255,255,255,0.13);
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.27);
}

/* ============================================================
   SECTION HEADINGS
   ============================================================ */

.section-heading {
  font-size: 40px;
  font-weight: 700;
  color: var(--foreground-primary);
  text-align: center;
  line-height: 1.15;
}

.section-heading--white {
  color: var(--foreground-inverse);
}

/* ============================================================
   CARDS
   ============================================================ */

.card {
  background: var(--surface-card);
  border-radius: 14px;
  padding: 32px 28px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  border: 1px solid var(--border-subtle);
}

/* ============================================================
   GRADIENT HERO
   ============================================================ */

.hero-gradient {
  background: linear-gradient(180deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
}

.hero-gradient--135 {
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
}

/* ============================================================
   CTA BLOCK
   ============================================================ */

.cta-block {
  background: linear-gradient(135deg, var(--surface-inverse) 0%, var(--accent-primary) 100%);
  border-radius: 24px;
  padding: 64px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  text-align: center;
}

.cta-block__pill {
  background: rgba(255,255,255,0.13);
  color: rgba(255,255,255,0.9);
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  display: inline-block;
}

.cta-block__heading {
  font-size: 44px;
  font-weight: 800;
  color: var(--foreground-inverse);
  line-height: 1.1;
}

.cta-block__subtitle {
  font-size: 17px;
  font-weight: 400;
  color: rgba(255,255,255,0.8);
  line-height: 1.6;
  max-width: 600px;
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  background: var(--surface-inverse);
  padding: 48px 80px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.footer__top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  width: 100%;
  max-width: var(--max-width);
}

.footer__brand-name {
  font-size: 24px;
  font-weight: 800;
  color: var(--foreground-inverse);
}

.footer__brand-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
  margin-top: 8px;
  max-width: 300px;
}

.footer__col-heading {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.4);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 14px;
  font-family: var(--font-display);
}

.footer__col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer__col ul li a {
  font-size: 14px;
  color: rgba(255,255,255,0.73);
  transition: color 0.2s;
}

.footer__col ul li a:hover {
  color: var(--foreground-inverse);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 24px;
  width: 100%;
  max-width: var(--max-width);
}

.footer__copyright {
  font-size: 12px;
  color: rgba(255,255,255,0.33);
}

.footer__legal {
  display: flex;
  gap: 24px;
}

.footer__legal a {
  font-size: 12px;
  color: rgba(255,255,255,0.33);
  transition: color 0.2s;
}

.footer__legal a:hover {
  color: rgba(255,255,255,0.6);
}

/* ============================================================
   TAG CHIPS
   ============================================================ */

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 6px;
  background: var(--surface-secondary);
  border: 1px solid var(--border-subtle);
  font-size: 13px;
  color: var(--foreground-secondary);
}

.tag--pill {
  border-radius: 9999px;
}

/* ============================================================
   STATS ROW
   ============================================================ */

.stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 20px 40px;
  background: var(--surface-secondary);
  border-radius: 12px;
  width: 100%;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-item__value {
  font-size: 28px;
  font-weight: 700;
  color: var(--foreground-primary);
  font-family: var(--font-primary);
}

.stat-item__label {
  font-size: 13px;
  font-weight: 400;
  color: var(--foreground-muted);
}

/* ============================================================
   ICON WRAPPERS
   ============================================================ */

.icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 9999px;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-wrap svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent-primary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground-muted);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--surface-primary);
  font-family: var(--font-primary);
  font-size: 15px;
  color: var(--foreground-primary);
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(252,175,23,0.25);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 6 8 10 12 6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.btn--submit {
  width: 100%;
  padding: 18px 40px;
  background: var(--accent-primary);
  color: var(--foreground-inverse);
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-family: var(--font-primary);
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn--submit:hover {
  background: var(--accent-dark);
}

.btn--submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.form-message {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  display: none;
}

.form-message--success {
  background: #D1FAE5;
  color: #065F46;
  display: block;
}

.form-message--error {
  background: #FEE2E2;
  color: #991B1B;
  display: block;
}

/* ============================================================
   METRIC / SAVINGS BOXES
   ============================================================ */

.metric-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--accent-light);
  border-radius: 12px;
  padding: 12px 20px;
}

.metric-box__value {
  font-size: 28px;
  font-weight: 800;
  color: var(--foreground-primary);
}

.metric-box__label {
  font-size: 15px;
  font-weight: 500;
  color: var(--foreground-secondary);
}

.metric-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.metric-row__dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: var(--accent-primary);
  flex-shrink: 0;
}

.metric-row__text {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground-primary);
}

/* ============================================================
   BLOG
   ============================================================ */

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

.article-card {
  background: var(--surface-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}

.article-card:hover {
  box-shadow: 0 8px 32px rgba(55,65,80,0.12);
  transform: translateY(-2px);
}

.article-card__image {
  height: 200px;
  overflow: hidden;
}

.article-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-card__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.article-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.article-card__meta time {
  font-size: 13px;
  color: var(--foreground-muted);
}

.article-card__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.article-card__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--foreground-primary);
  line-height: 1.35;
  margin: 0;
}

.article-card__title a {
  color: inherit;
  text-decoration: none;
}

.article-card__title a:hover {
  color: var(--accent-primary);
}

.article-card__excerpt {
  font-size: 14px;
  color: var(--foreground-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.article-card__link {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-primary);
  text-decoration: none;
  margin-top: auto;
}

.article-card__link:hover {
  color: var(--accent-dark);
}

/* Tag pills */
.article-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.tag-color-0 { background: #EFF6FF; color: #1D4ED8; }
.tag-color-1 { background: #FFF7ED; color: #C2410C; }
.tag-color-2 { background: #F0FDF4; color: #15803D; }
.tag-color-3 { background: #FDF4FF; color: #9333EA; }
.tag-color-4 { background: #FFF1F2; color: #BE123C; }
.tag-color-5 { background: #ECFDF5; color: #047857; }
.tag-color-6 { background: #FEF3C7; color: #92400E; }
.tag-color-7 { background: #F0F9FF; color: #0369A1; }

/* Tag filter buttons */
.blog-tag-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.blog-tag-btn {
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  background: var(--surface-primary);
  color: var(--foreground-secondary);
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-primary);
}

.blog-tag-btn:hover,
.blog-tag-btn.active {
  background: var(--foreground-primary);
  color: var(--foreground-inverse);
  border-color: var(--foreground-primary);
}

/* Pagination */
.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 48px;
}

.blog-pagination button {
  padding: 10px 24px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  background: var(--surface-primary);
  color: var(--foreground-primary);
  cursor: pointer;
  font-family: var(--font-primary);
  transition: all 0.15s;
}

.blog-pagination button:hover:not(:disabled) {
  background: var(--foreground-primary);
  color: var(--foreground-inverse);
  border-color: var(--foreground-primary);
}

.blog-pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#page-info {
  font-size: 14px;
  color: var(--foreground-muted);
  min-width: 120px;
  text-align: center;
}

.blog-empty,
.blog-loading {
  text-align: center;
  padding: 48px 24px;
  color: var(--foreground-muted);
  font-size: 15px;
}

/* Article detail */
.article-hero-image {
  width: 100%;
  max-height: 480px;
  overflow: hidden;
}

.article-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-full-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.article-back {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-primary);
  text-decoration: none;
  margin-bottom: 32px;
}

.article-back:hover {
  color: var(--accent-dark);
}

.article-full {
  background: var(--surface-primary);
  border-radius: 16px;
  padding: 48px;
  box-shadow: 0 2px 24px rgba(0,0,0,0.07);
  border: 1px solid var(--border-subtle);
}

.article-full__header {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-subtle);
}

.article-full__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.article-full__meta time {
  font-size: 14px;
  color: var(--foreground-muted);
}

.article-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.article-full__title {
  font-size: 36px;
  font-weight: 800;
  color: var(--foreground-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.article-full__author {
  font-size: 14px;
  color: var(--foreground-secondary);
  margin-top: 12px;
  font-style: italic;
}

.article-full__content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--foreground-secondary);
}

.article-full__content h2,
.article-full__content h3,
.article-full__content h4 {
  color: var(--foreground-primary);
  font-weight: 700;
  margin: 32px 0 12px;
  line-height: 1.3;
}

.article-full__content h2 { font-size: 26px; }
.article-full__content h3 { font-size: 21px; }
.article-full__content h4 { font-size: 17px; }

.article-full__content p { margin-bottom: 20px; }

.article-full__content ul,
.article-full__content ol {
  margin: 0 0 20px 24px;
}

.article-full__content li { margin-bottom: 6px; }

.article-full__content a {
  color: var(--accent-primary);
  text-decoration: underline;
}

.article-full__content blockquote {
  border-left: 4px solid var(--accent-primary);
  padding: 8px 20px;
  margin: 24px 0;
  background: var(--accent-light);
  border-radius: 0 8px 8px 0;
  font-style: italic;
}

.article-full__content img {
  max-width: 100%;
  border-radius: 10px;
  margin: 20px 0;
}

.article-full__content code {
  background: var(--surface-secondary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
  font-family: monospace;
}

.article-full__content pre {
  background: var(--surface-inverse);
  color: var(--foreground-inverse);
  padding: 20px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 24px 0;
}

.article-full__content pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: 14px;
}

.article-full__content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
}

.article-full__content th,
.article-full__content td {
  padding: 10px 14px;
  border: 1px solid var(--border-subtle);
  text-align: left;
  vertical-align: top;
}

.article-full__content th {
  background: var(--surface-secondary);
  font-weight: 600;
  color: var(--foreground-primary);
}

.article-full__content hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 32px 0;
}

.article-full__content h1 {
  font-size: 32px;
  font-weight: 800;
  color: var(--foreground-primary);
  line-height: 1.2;
  margin: 32px 0 16px;
}

.article-error {
  text-align: center;
  padding: 80px 24px;
  max-width: 500px;
  margin: 0 auto;
}

.article-error h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--foreground-primary);
  margin-bottom: 12px;
}

.article-error p {
  color: var(--foreground-secondary);
  margin-bottom: 24px;
}

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

@media (max-width: 640px) {
  .articles-grid { grid-template-columns: 1fr; }
  .article-full { padding: 28px 20px; }
  .article-full__title { font-size: 26px; }
}

