/* ═══════════════════════════════════════════════════════════════
   Shortix — SaaS Redesign Layer
   Vercel / Linear / Raycast style — shorter, more premium
   ═══════════════════════════════════════════════════════════════ */

/* ─── Scroll Reveal Animations ─── */
@keyframes revealUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes revealFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-32px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(32px); }
  to   { opacity: 1; transform: translateX(0); }
}

.reveal-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s cubic-bezier(.22,1,.36,1), transform 0.55s cubic-bezier(.22,1,.36,1);
}
.reveal-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-fade {
  opacity: 0;
  transition: opacity 0.55s ease;
}
.reveal-fade.visible { opacity: 1; }

/* ─── Navbar improvements ─── */
@media (max-width: 768px) {
  .nav-inner {
    height: 52px !important;
    padding: 0 16px !important;
  }
  header {
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    background: rgba(var(--bg-rgb, 239,246,255), 0.82) !important;
  }
  [data-theme="dark"] header {
    background: rgba(7,16,30, 0.88) !important;
  }
  .logo-img { height: 28px !important; }
  .mobile-menu-header { height: 52px !important; }
}

/* Enhanced glass blur for nav */
header {
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

/* ─── Hero Enhancements ─── */
.hero-sub-new {
  font-size: clamp(15px, 2vw, 17px);
  color: rgba(255,255,255,.65);
  max-width: 480px;
  line-height: 1.7;
  margin: 16px 0 28px;
  font-family: var(--font-body);
  letter-spacing: .01em;
}

.hero-cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
}

.hero-cta-primary {
  box-shadow: 0 0 0 0 rgba(37,99,235,0);
  transition: all .2s var(--ease), box-shadow .3s;
}
.hero-cta-primary:hover {
  box-shadow: 0 0 20px rgba(96,165,250,.5), 0 4px 24px rgba(37,99,235,.4);
  transform: translateY(-2px);
}

.hero-cta-ghost {
  background: rgba(255,255,255,.1);
  border: 1.5px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all .2s;
  font-family: var(--font-body);
}
.hero-cta-ghost:hover {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.35);
  transform: translateY(-1px);
}

.hero-trust-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.hero-trust-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: rgba(255,255,255,.45);
  font-family: var(--font-body);
}
.hero-trust-sep {
  color: rgba(255,255,255,.2);
  font-size: 14px;
}

/* ─── Section System ─── */
.sx-section {
  padding: 80px 24px;
  position: relative;
}
.sx-section--light {
  background: var(--bg);
}
.sx-section--white {
  background: var(--surface-solid);
}
.sx-section--dark {
  background: linear-gradient(150deg, #060d1f 0%, #0d1d3e 50%, #0f2344 100%);
}
.sx-section--accent-light {
  background: linear-gradient(150deg, var(--bg) 0%, var(--bg-sub) 100%);
}
[data-theme="dark"] .sx-section--light { background: var(--bg); }
[data-theme="dark"] .sx-section--white { background: #060C18; }
[data-theme="dark"] .sx-section--accent-light { background: linear-gradient(150deg, #060C18 0%, #080E1E 100%); }

.sx-section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.sx-section-header {
  text-align: center;
  margin-bottom: 52px;
}
.sx-section-header h2 { margin-bottom: 12px; }
.sx-section-header p { color: var(--text-2); font-size: 16px; max-width: 480px; margin: 0 auto; }

.sx-section-eyebrow {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ─── Two Column Layout ─── */
.sx-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.sx-two-col--reverse {
  grid-template-columns: 1fr 1fr;
}
.sx-two-col--reverse .sx-two-col__visual { order: -1; }
.sx-two-col--align-center { align-items: center; }
.sx-two-col--feature { align-items: start; }

.sx-feature-title {
  font-size: clamp(24px, 3.5vw, 38px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 14px;
  font-family: var(--font-heading);
}
.sx-accent { color: var(--accent); }
.sx-feature-desc {
  color: var(--text-2);
  font-size: 15.5px;
  line-height: 1.7;
  margin-bottom: 24px;
  font-family: var(--font-body);
}

.sx-tool-card {
  margin-top: 0 !important;
}

/* ─── Visual Stack (image + badges) ─── */
.sx-visual-stack {
  position: relative;
  display: inline-block;
  width: 100%;
}
.sx-feature-img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 8px 48px rgba(37,99,235,.14);
  object-fit: cover;
  max-height: 420px;
  display: block;
}
.sx-feature-img--shadow {
  box-shadow: var(--shadow-lg);
}
.sx-img-badge {
  position: absolute;
  background: var(--surface-solid);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  box-shadow: var(--shadow);
  white-space: nowrap;
  font-family: var(--font-body);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: floatY 4s ease-in-out infinite;
}
.sx-img-badge svg { color: var(--accent); flex-shrink: 0; }
.sx-img-badge--tl { top: -14px; left: -14px; animation-delay: 0s; }
.sx-img-badge--br { bottom: -14px; right: -14px; animation-delay: -2s; }
.sx-img-badge--tr { top: -14px; right: -14px; animation-delay: -1s; }

/* Tools divider */
.sx-tools-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 64px 0;
}

/* ─── Converter Visual ─── */
.sx-converter-showcase {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 28px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.sx-fmt-pill {
  background: var(--accent-bg);
  border: 1.5px solid var(--accent-border);
  color: var(--accent);
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  letter-spacing: .04em;
  font-family: var(--font-mono);
  transition: all .2s;
}
.sx-fmt-pill:hover {
  background: var(--accent);
  color: #fff;
  transform: scale(1.04);
}
.sx-fmt-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .5;
}
.sx-converter-privacy {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(34,197,94,.07);
  border: 1px solid rgba(34,197,94,.2);
  border-radius: 12px;
  font-size: 13px;
  color: var(--text-2);
}
.sx-converter-privacy strong {
  display: block;
  font-size: 13px;
  color: var(--text);
  font-weight: 700;
}
.sx-converter-privacy span { font-size: 12px; }
.sx-converter-privacy svg { flex-shrink: 0; }

/* ─── Features Grid ─── */
.sx-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.sx-feat-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  padding: 24px;
  transition: all .25s var(--ease);
}
.sx-feat-card:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.2);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
}
.sx-feat-card h4 {
  color: #fff;
  font-size: 15px;
  margin: 14px 0 7px;
  font-family: var(--font-heading);
  font-weight: 700;
}
.sx-feat-card p {
  color: rgba(255,255,255,.5);
  font-size: 13.5px;
  line-height: 1.6;
  font-family: var(--font-body);
}
.sx-feat-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.sx-feat-icon svg { width: 20px; height: 20px; }
.sx-feat-icon--blue  { background: rgba(59,130,246,.2);  color: #93C5FD; }
.sx-feat-icon--purple{ background: rgba(139,92,246,.2);  color: #C4B5FD; }
.sx-feat-icon--green { background: rgba(34,197,94,.2);   color: #86EFAC; }
.sx-feat-icon--orange{ background: rgba(251,146,60,.2);  color: #FCA97A; }

/* ─── Check List ─── */
.sx-check-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
}
.sx-check-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  color: var(--text-2);
  font-family: var(--font-body);
}
.sx-check-list li svg { flex-shrink: 0; }

/* ─── New Footer ─── */
.sx-footer {
  background: var(--surface-solid);
  border-top: 1.5px solid var(--border);
}
[data-theme="dark"] .sx-footer { background: #060C18; }

.sx-footer-top {
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 24px 40px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 64px;
}

.sx-footer-logo {
  margin-bottom: 14px;
}
.sx-footer-brand p {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 24px;
  font-family: var(--font-body);
}

/* Newsletter */
.sx-newsletter-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 10px;
  font-family: var(--font-heading);
}
.sx-newsletter-row {
  display: flex;
  gap: 8px;
}
.sx-newsletter-input {
  flex: 1;
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-size: 13px;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color .15s;
}
.sx-newsletter-input:focus { border-color: var(--accent); }
.sx-newsletter-btn {
  white-space: nowrap;
  padding: 9px 16px;
  font-size: 13px;
}

.sx-footer-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.sx-footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sx-footer-col h5 {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 4px;
  font-family: var(--font-heading);
}
.sx-footer-col a {
  font-size: 13.5px;
  color: var(--text-2);
  transition: color .15s;
  font-family: var(--font-body);
}
.sx-footer-col a:hover { color: var(--accent); }

.sx-footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-3);
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-body);
}

.sx-footer-social {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sx-social-link {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--bg-sub);
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
  transition: all .15s;
}
.sx-social-link:hover { color: var(--accent); border-color: var(--accent); }
.sx-social-link svg { width: 14px; height: 14px; }

/* ─── Parallax subtle background ─── */
.sx-section--dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 80%);
}

/* ─── Chat widget: push up from forms ─── */
body.user-in-form #tidio-chat,
body.user-in-form .support-widget-btn {
  bottom: 80px !important;
}

/* ─── Hover effects on feature cards ─── */
.sx-feat-card { cursor: default; }

/* ─── Performance: lazy images ─── */
img[loading="lazy"] {
  content-visibility: auto;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .sx-two-col {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .sx-two-col--reverse .sx-two-col__visual { order: 0; }
  .sx-features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .sx-footer-top {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .sx-footer-links {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sx-section { padding: 56px 16px; }
  .sx-section-header { margin-bottom: 36px; }
  .sx-section-header h2 { font-size: clamp(22px, 6vw, 30px); }

  .sx-features-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .sx-feat-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 18px;
  }
  .sx-feat-card h4 { margin: 0 0 5px; }
  .sx-feat-icon { flex-shrink: 0; }

  .sx-footer-top { padding: 40px 16px 24px; }
  .sx-footer-links { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .sx-footer-bottom { padding: 16px; flex-direction: column; align-items: flex-start; }

  .hero-trust-row { gap: 6px; }
  .hero-trust-sep { display: none; }
  .hero-trust-item { font-size: 11px; }

  .sx-converter-showcase { grid-template-columns: 1fr; }
  .sx-fmt-arrow { transform: rotate(90deg); }

  .sx-tools-divider { margin: 40px 0; }

  .hero-cta-row .btn { font-size: 14px; padding: 11px 20px; }
}

@media (max-width: 480px) {
  .sx-footer-links { grid-template-columns: 1fr 1fr; }
  .sx-newsletter-row { flex-direction: column; }
  .sx-newsletter-btn { width: 100%; }
  .hero-sub-new { font-size: 14px; }
}

/* ─── Staggered animations on feature grid ─── */
.sx-features-grid .sx-feat-card:nth-child(1) { transition-delay: 0s; }
.sx-features-grid .sx-feat-card:nth-child(2) { transition-delay: .07s; }
.sx-features-grid .sx-feat-card:nth-child(3) { transition-delay: .14s; }
.sx-features-grid .sx-feat-card:nth-child(4) { transition-delay: .21s; }
.sx-features-grid .sx-feat-card:nth-child(5) { transition-delay: .28s; }
.sx-features-grid .sx-feat-card:nth-child(6) { transition-delay: .35s; }

/* ─── Fix: prevent rendering glitch on mobile during stagger animation ─── */
.sx-features-grid {
  isolation: isolate;
}
.sx-feat-card {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
}

/* ─── Light mode overrides for Platform & Platform Activity sections ─── */
:root:not([data-theme="dark"]) #features.sx-section--dark,
:root:not([data-theme="dark"]) #site-analytics.sx-section--dark {
  background: #ffffff;
}
:root:not([data-theme="dark"]) #features.sx-section--dark::before,
:root:not([data-theme="dark"]) #site-analytics.sx-section--dark::before {
  display: none;
}

/* Fix title & tag colors in light mode for these two sections */
:root:not([data-theme="dark"]) #features .sx-section-header h2,
:root:not([data-theme="dark"]) #site-analytics .sx-section-header h2 {
  color: #0f172a !important;
}
:root:not([data-theme="dark"]) #features .section-tag,
:root:not([data-theme="dark"]) #site-analytics .section-tag {
  background: rgba(59,130,246,.1) !important;
  color: #2563eb !important;
}

/* Chart cards: white background in light mode */
:root:not([data-theme="dark"]) #site-analytics .sa-chart-card {
  background: #ffffff;
  border-color: rgba(0,0,0,.1);
}
:root:not([data-theme="dark"]) #site-analytics .sa-chart-header h3 {
  color: #0f172a;
}

/* ─── Marquee / Ticker for Features section ─── */
.sx-marquee-wrapper {
  overflow: hidden;
  width: 100%;
  /* fade edges */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.sx-marquee-track {
  display: flex;
  gap: 20px;
  width: max-content;
  /* pause on hover */
}
.sx-marquee:hover .sx-marquee-track {
  animation-play-state: paused;
}

/* LTR: row 1 goes left, row 2 goes right */
.sx-marquee--left .sx-marquee-track {
  animation: marquee-ltr-left 28s linear infinite;
}
.sx-marquee--right .sx-marquee-track {
  animation: marquee-ltr-right 28s linear infinite;
}

/* RTL: flip directions so behaviour feels natural */
[dir="rtl"] .sx-marquee--left .sx-marquee-track {
  animation: marquee-rtl-left 28s linear infinite;
}
[dir="rtl"] .sx-marquee--right .sx-marquee-track {
  animation: marquee-rtl-right 28s linear infinite;
}

@keyframes marquee-ltr-left {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes marquee-ltr-right {
  0%   { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}
@keyframes marquee-rtl-left {
  0%   { transform: translateX(0); }
  100% { transform: translateX(50%); }
}
@keyframes marquee-rtl-right {
  0%   { transform: translateX(50%); }
  100% { transform: translateX(0); }
}

/* Cards inside marquee: fixed width so they don't shrink */
.sx-marquee-track .sx-feat-card {
  flex: 0 0 280px;
  min-width: 280px;
}

/* ─── Light-mode: give feature cards the dark navy look (matching dark mode) ─── */
:root:not([data-theme="dark"]) #features .sx-feat-card {
  background: rgba(13, 29, 62, 0.88);
  border: 1px solid rgba(255,255,255,.12);
}
:root:not([data-theme="dark"]) #features .sx-feat-card:hover {
  background: rgba(15, 35, 68, 0.95);
  border-color: rgba(255,255,255,.22);
}
:root:not([data-theme="dark"]) #features .sx-feat-card h4 {
  color: #fff;
}
:root:not([data-theme="dark"]) #features .sx-feat-card p {
  color: rgba(255,255,255,.55);
}

/* Also restore the section dark background in light mode for features */
:root:not([data-theme="dark"]) #features.sx-section--dark {
  background: linear-gradient(150deg, #060d1f 0%, #0d1d3e 50%, #0f2344 100%) !important;
}
:root:not([data-theme="dark"]) #features.sx-section--dark::before {
  display: block !important;
}
/* Restore white headings in features section for light mode */
:root:not([data-theme="dark"]) #features .sx-section-header h2 {
  color: #fff !important;
}
:root:not([data-theme="dark"]) #features .section-tag {
  background: rgba(59,130,246,.15) !important;
  color: #93C5FD !important;
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .sx-marquee-track {
    animation: none !important;
  }
  .sx-marquee-wrapper {
    overflow-x: auto;
  }
}
