/**
 * SANSA AI — Adobe Creative Cloud inspired UI layer
 * Works with sansa-light + sansa-motion (classic light, colorful accents)
 */

:root {
  --adobe-blue: #1473e6;
  --adobe-blue-hover: #0d66d0;
  --adobe-red: #eb1000;
  --adobe-hero-dark: #3d3d29;
  --adobe-hero-gradient: linear-gradient(
    105deg,
    #0ea5e9 0%,
    #84cc16 18%,
    #eab308 36%,
    #f97316 54%,
    #ec4899 72%,
    #8b5cf6 88%,
    #2563eb 100%
  );
  --adobe-mega-shadow: 0 24px 64px rgba(15, 23, 42, 0.14);
}

/* ── App launch splash ── */
.sansa-app-launch {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  pointer-events: all;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.sansa-app-launch.is-active {
  opacity: 1;
  visibility: visible;
}

.sansa-app-launch.hidden {
  display: none !important;
}

.sansa-launch-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.sansa-launch-stage {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 32px;
}

.sansa-launch-logo-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
  animation: sansaLaunchPop 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.sansa-launch-logo {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 20px 48px rgba(37, 99, 235, 0.28);
  animation: sansaLaunchFloat 1.2s ease-in-out infinite;
}

.sansa-launch-badge {
  position: absolute;
  right: -6px;
  bottom: -6px;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font: 700 11px/1 Inter, system-ui, sans-serif;
  color: #fff;
  background: var(--adobe-blue);
  box-shadow: 0 8px 20px rgba(20, 115, 230, 0.35);
  animation: sansaLaunchPop 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.sansa-launch-ring {
  position: absolute;
  inset: -8px;
  border-radius: 28px;
  border: 2px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box,
    var(--sansa-classic-gradient, linear-gradient(135deg, #ff6b00, #7c3aed, #2563eb)) border-box;
  opacity: 0.7;
  animation: sansaLaunchSpin 2.4s linear infinite;
}

.sansa-launch-ring.ring-b {
  inset: -18px;
  opacity: 0.35;
  animation-direction: reverse;
  animation-duration: 3.2s;
}

.sansa-launch-title {
  margin: 0 0 6px;
  font: 700 18px/1.3 Inter, system-ui, sans-serif;
  color: #0f172a;
}

.sansa-launch-sub {
  margin: 0 0 18px;
  font: 500 13px/1.4 Inter, system-ui, sans-serif;
  color: #64748b;
}

.sansa-launch-bar {
  width: 180px;
  height: 4px;
  margin: 0 auto;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.sansa-launch-bar span {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: inherit;
  background: var(--adobe-hero-gradient);
  animation: sansaLaunchBar 0.9s ease-in-out infinite;
}

@keyframes sansaLaunchPop {
  from { transform: scale(0.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes sansaLaunchFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes sansaLaunchSpin {
  to { transform: rotate(360deg); }
}

@keyframes sansaLaunchBar {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

/* ── Adobe body shell ── */
body.sansa-adobe {
  font-family: Inter, "Adobe Clean", system-ui, sans-serif;
}

body.sansa-adobe .promo-bar {
  background: #000;
  color: #fff;
  font-size: 13px;
  padding: 8px 16px;
  text-align: center;
}

body.sansa-adobe .promo-button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  margin-left: 12px;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
}

body.sansa-adobe .site-header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: none;
  min-height: 56px;
  padding: 0 20px;
}

body.sansa-adobe .top-nav .nav-link {
  color: #2c2c2c;
  font-weight: 400;
  font-size: 14px;
  padding: 18px 14px;
  border-bottom: 2px solid transparent;
}

body.sansa-adobe .top-nav .nav-link.active,
body.sansa-adobe .top-nav .nav-link:hover {
  color: #000;
  border-bottom-color: #000;
}

body.sansa-adobe .top-nav .nav-link[data-menu]::after {
  content: "▾";
  font-size: 10px;
  margin-left: 4px;
  opacity: 0.6;
}

body.sansa-adobe .primary-button {
  background: var(--adobe-blue);
  border-radius: 999px;
  font-weight: 600;
  padding: 8px 20px;
  border: none;
}

body.sansa-adobe .primary-button:hover {
  background: var(--adobe-blue-hover);
}

body.sansa-adobe .ghost-button {
  border-radius: 999px;
}

body.sansa-adobe .os-search-btn {
  border: none;
  background: transparent;
  color: #2c2c2c;
  padding: 8px;
  border-radius: 8px;
}

body.sansa-adobe .icon-grid {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 8px;
}

body.sansa-adobe .icon-grid:hover {
  background: #f3f4f6;
}

/* ── Mega menu (Adobe-style) ── */
body.sansa-adobe .mega-menu {
  position: fixed;
  left: 0;
  right: 0;
  top: calc(var(--promo-h, 36px) + var(--header-h, 56px));
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: var(--adobe-mega-shadow);
  z-index: 900;
  max-height: calc(100vh - 120px);
  overflow: auto;
}

body.sansa-adobe .mega-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 32px 32px;
  display: grid;
  grid-template-columns: repeat(4, 1fr) minmax(220px, 280px);
  gap: 28px;
}

body.sansa-adobe .mega-column h3 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  margin: 0 0 14px;
}

body.sansa-adobe .mega-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
  color: #111;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  width: 100%;
  transition: color 0.15s ease;
}

body.sansa-adobe .mega-link:hover {
  color: var(--adobe-blue);
}

body.sansa-adobe .mega-link small {
  font-size: 12px;
  font-weight: 400;
  color: #6b7280;
}

body.sansa-adobe .mega-promo {
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  color: #fff;
  display: flex;
  flex-direction: column;
}

body.sansa-adobe .mega-promo-visual {
  min-height: 120px;
  background: var(--adobe-hero-gradient);
  opacity: 0.9;
}

body.sansa-adobe .mega-promo-body {
  padding: 18px;
}

body.sansa-adobe .mega-promo-body strong {
  display: block;
  font-size: 15px;
  margin-bottom: 12px;
  line-height: 1.35;
}

body.sansa-adobe .mega-promo .primary-button {
  width: 100%;
  background: #fff;
  color: #000;
}

body.sansa-adobe .mega-promo .primary-button:hover {
  background: #f3f4f6;
}

/* ── App switcher (Adobe grid) ── */
body.sansa-adobe .app-switcher {
  position: fixed;
  top: calc(var(--promo-h, 36px) + var(--header-h, 56px) + 8px);
  right: 16px;
  width: min(420px, calc(100vw - 32px));
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: var(--adobe-mega-shadow);
  padding: 20px;
  z-index: 950;
}

body.sansa-adobe .app-switcher h3 {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

body.sansa-adobe .app-switcher-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

body.sansa-adobe .switcher-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #f9fafb;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

body.sansa-adobe .switcher-app:hover {
  background: #fff;
  border-color: #d1d5db;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

body.sansa-adobe .switcher-app .app-badge {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

body.sansa-adobe .switcher-app-label {
  font-size: 11px;
  font-weight: 600;
  color: #374151;
  text-align: center;
  line-height: 1.2;
}

/* ── Hero (Adobe dark + gradient variant) ── */
body.sansa-adobe .hero-section {
  background: var(--adobe-hero-dark);
  color: #fff;
  border-radius: 0;
  margin: 0;
  max-width: none;
  padding: 56px 32px 64px;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

body.sansa-adobe .hero-section .eyebrow {
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

body.sansa-adobe .hero-section h1 {
  color: #fff;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

body.sansa-adobe .hero-section p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
  max-width: 480px;
}

body.sansa-adobe .hero-section .outline-dark {
  border: 2px solid #fff;
  color: #fff;
  background: transparent;
  border-radius: 999px;
  padding: 10px 22px;
}

body.sansa-adobe .hero-section .ghost-button {
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.35);
}

body.sansa-adobe .hero-section .primary-button {
  background: var(--adobe-blue);
}

body.sansa-adobe .studio-card {
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
}

body.sansa-adobe .studio-card h2,
body.sansa-adobe .studio-card p {
  color: #0f172a;
}

/* ── Gradient feature band ── */
body.sansa-adobe .adobe-gradient-band {
  background: var(--adobe-hero-gradient);
  padding: 64px 32px;
  text-align: center;
  color: #fff;
}

body.sansa-adobe .adobe-gradient-band h2 {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  margin: 0 0 12px;
}

body.sansa-adobe .adobe-gradient-band p {
  max-width: 640px;
  margin: 0 auto 24px;
  opacity: 0.92;
}

body.sansa-adobe .adobe-feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 32px auto 0;
  text-align: left;
}

body.sansa-adobe .adobe-feature-card {
  background: #fff;
  color: #0f172a;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

body.sansa-adobe .adobe-feature-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

body.sansa-adobe .adobe-feature-card p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}

/* ── Adobe-style app catalog grid ── */
body.sansa-adobe .adobe-apps-catalog {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px 64px;
  background: #fff;
}

body.sansa-adobe .adobe-catalog-head {
  text-align: center;
  margin-bottom: 28px;
}

body.sansa-adobe .adobe-catalog-head h2 {
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin: 12px 0 10px;
}

body.sansa-adobe .adobe-catalog-head p {
  color: #64748b;
  font-size: 15px;
  max-width: 640px;
  margin: 0 auto;
}

body.sansa-adobe .adobe-catalog-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 28px;
}

body.sansa-adobe .adobe-catalog-tab {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  border-radius: 999px;
  padding: 8px 16px;
  font: 600 13px/1 Inter, system-ui, sans-serif;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

body.sansa-adobe .adobe-catalog-tab.active,
body.sansa-adobe .adobe-catalog-tab:hover {
  background: #111;
  color: #fff;
  border-color: #111;
}

body.sansa-adobe .adobe-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

body.sansa-adobe .adobe-catalog-app {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

body.sansa-adobe .adobe-catalog-app:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
  border-color: #1473e6;
}

body.sansa-adobe .adobe-catalog-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font: 700 12px/1 Inter, system-ui, sans-serif;
  color: #fff;
}

body.sansa-adobe .adobe-catalog-name {
  font: 700 15px/1.25 Inter, system-ui, sans-serif;
  color: #0f172a;
}

body.sansa-adobe .adobe-catalog-desc {
  font: 400 12px/1.45 Inter, system-ui, sans-serif;
  color: #64748b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.sansa-adobe .adobe-catalog-cta {
  font: 600 12px/1 Inter, system-ui, sans-serif;
  color: #1473e6;
  margin-top: auto;
}

body.sansa-adobe .adobe-catalog-foot {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
  flex-wrap: wrap;
}

body.sansa-adobe .adobe-catalog-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #64748b;
  padding: 32px;
}

/* ── App cards grid ── */
body.sansa-adobe .app-card {
  border-radius: 12px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

body.sansa-adobe .app-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
}

body.sansa-adobe .category-tabs button {
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #fff;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
}

body.sansa-adobe .category-tabs button.active {
  background: #111;
  color: #fff;
  border-color: #111;
}

/* ── Sticky bottom CTA (Adobe bar) ── */
.sansa-sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 800;
  background: #1a1a1a;
  color: #fff;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.sansa-sticky-cta.is-visible {
  transform: translateY(0);
}

.sansa-sticky-cta-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sansa-sticky-cta-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.sansa-sticky-cta-brand strong {
  display: block;
  font-size: 14px;
}

.sansa-sticky-cta-brand span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
}

.sansa-sticky-cta-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.sansa-sticky-cta .outline-light {
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #fff;
  background: transparent;
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}

.sansa-sticky-cta .primary-button {
  border-radius: 999px;
  padding: 8px 20px;
  font-size: 13px;
}

body.sansa-adobe.has-sticky-cta {
  padding-bottom: 72px;
}

body.sansa-adobe.os-immersive.has-sticky-cta {
  padding-bottom: 0;
}

/* ── Immersive polish (Adobe Express / Firefly chrome) ── */
body.sansa-adobe.os-immersive .os-workspace-bar.os-app-chrome {
  background: linear-gradient(180deg, #2a2a2a 0%, #323232 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 24px rgba(0, 0, 0, 0.35);
}

body.sansa-adobe.os-immersive .os-chrome-back svg {
  opacity: 0.9;
}

/* ── Footer (Adobe multi-column) ── */
body.sansa-adobe .footer {
  background: #fff;
  border-top: 1px solid #e5e7eb;
  padding: 48px 32px 32px;
  display: grid;
  grid-template-columns: 1.2fr repeat(4, 1fr);
  gap: 32px;
  max-width: 1280px;
  margin: 0 auto;
}

body.sansa-adobe .footer-brand p {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
  margin-top: 8px;
}

body.sansa-adobe .footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #374151;
  margin: 0 0 14px;
}

body.sansa-adobe .footer-col a {
  display: block;
  color: #4b5563;
  text-decoration: none;
  font-size: 13px;
  padding: 4px 0;
}

body.sansa-adobe .footer-col a:hover {
  color: var(--adobe-blue);
  text-decoration: underline;
}

body.sansa-adobe .footer-bottom {
  grid-column: 1 / -1;
  border-top: 1px solid #e5e7eb;
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  font-size: 12px;
  color: #6b7280;
}

body.sansa-adobe .footer-featured {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid #f3f4f6;
  border-bottom: 1px solid #f3f4f6;
}

body.sansa-adobe .footer-featured a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #374151;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

@media (max-width: 960px) {
  body.sansa-adobe .mega-inner {
    grid-template-columns: 1fr 1fr;
  }

  body.sansa-adobe .footer {
    grid-template-columns: 1fr 1fr;
  }

  body.sansa-adobe .hero-section {
    grid-template-columns: 1fr;
    padding: 40px 20px;
  }

  .sansa-sticky-cta-brand span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sansa-launch-logo,
  .sansa-launch-ring,
  .sansa-launch-bar span {
    animation: none !important;
  }
}

/* Hub Tamil catalog (marketplace cards) */
body.sansa-adobe .hub-ta-only { display: none; }
body.sansa-adobe.hub-lang-ta .hub-en-only { display: none !important; }
body.sansa-adobe.hub-lang-ta .hub-ta-only { display: block; }
body.sansa-adobe.hub-lang-ta span.hub-ta-only,
body.sansa-adobe.hub-lang-ta button.hub-ta-only { display: inline-block; }
body.sansa-adobe .hdr-lang-toggle {
  margin-top: 8px;
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  cursor: pointer;
}
body.sansa-adobe .hdr-lang-toggle:hover { border-color: #1473e6; color: #1473e6; }
body.sansa-adobe .os-top-actions .hdr-lang-toggle {
  margin-top: 0;
  margin-right: 4px;
}
body.sansa-adobe.hub-lang-ta .adobe-catalog-name,
body.sansa-adobe.hub-lang-ta .adobe-catalog-desc {
  font-family: 'Noto Sans Tamil', 'Inter', system-ui, sans-serif;
}
