/*
 * Tik4 AI promo: the services mega-menu row and the AI call-to-action box
 * (home page under the products, pricing page). Loaded on every page; the
 * landing itself adds ai.css. ASCII only.
 */

/* ---------- Shared pieces ---------- */
.t4ai-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 12px 22px; border: 1px solid transparent; border-radius: 14px; font-family: inherit; font-size: 14px; font-weight: 800; line-height: 1.4; text-decoration: none; cursor: pointer; transition: transform .25s var(--t4-ease), box-shadow .25s, background .25s, color .25s, border-color .25s; }
.t4ai-btn svg { flex: none; transition: transform .25s var(--t4-ease); }
.t4ai-btn.is-light { background: #fff; color: #0b2533; box-shadow: 0 14px 30px -14px rgb(25 195 192 / 70%), inset 0 -2px 0 rgb(11 37 51 / 8%); }
.t4ai-btn.is-light:hover { transform: translateY(-2px); color: #0b2533; box-shadow: 0 20px 40px -16px rgb(25 195 192 / 85%); }
.t4ai-btn.is-light:hover svg { transform: translateX(-4px); }
.t4ai-btn.is-ghost { background: rgb(255 255 255 / 6%); color: #e8f6f6; border-color: rgb(255 255 255 / 18%); }
.t4ai-btn.is-ghost:hover { background: rgb(255 255 255 / 12%); color: #fff; }
.t4ai-btn.is-dark { background: var(--t4-dark); color: #fff; }
.t4ai-btn.is-dark:hover { background: var(--t4-blue); }
.t4ai-btn:focus-visible { outline: 2px solid #5ce1d6; outline-offset: 3px; }

.t4ai-live { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #2ee6a8; animation: t4ai-ping 2.2s infinite; }
@keyframes t4ai-ping { 0% { box-shadow: 0 0 0 0 rgb(46 230 168 / 55%); } 70% { box-shadow: 0 0 0 9px rgb(46 230 168 / 0%); } 100% { box-shadow: 0 0 0 0 rgb(46 230 168 / 0%); } }

.t4ai-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 5px 14px; border-radius: 999px; background: color-mix(in srgb, var(--t4-teal) 12%, var(--t4-surface)); color: color-mix(in srgb, var(--t4-teal) 68%, var(--t4-ink)); font-size: 12px; font-weight: 800; line-height: 1.8; }
.t4ai-kicker__spark { flex: none; width: 14px; height: 14px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5c.6 4.9 3.1 8.4 10.5 10.5-7.4 2.1-9.9 5.6-10.5 10.5-.6-4.9-3.1-8.4-10.5-10.5C8.9 9.9 11.4 6.4 12 1.5z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5c.6 4.9 3.1 8.4 10.5 10.5-7.4 2.1-9.9 5.6-10.5 10.5-.6-4.9-3.1-8.4-10.5-10.5C8.9 9.9 11.4 6.4 12 1.5z'/%3E%3C/svg%3E") center / contain no-repeat; }

.t4ai-cta code, .t4ai-chip code, .t4-mega-ai [dir="ltr"] { font-feature-settings: normal; }
.t4ai-cta code, .t4ai-chip code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ---------- Orbit illustration ---------- */
.t4ai-orbit { --dur: 48s; position: relative; width: min(440px, 100%); aspect-ratio: 1; margin-inline: auto; }
.t4ai-orbit__halo { position: absolute; inset: 10%; border-radius: 50%; background: radial-gradient(closest-side, rgb(25 195 192 / 24%), rgb(91 75 214 / 8%) 60%, transparent 72%); }
.t4ai-orbit__ring { position: absolute; inset: var(--inset, 10%); border: 1px dashed rgb(255 255 255 / 18%); border-radius: 50%; animation: t4ai-spin var(--dur) linear infinite; }
.t4ai-orbit__ring.is-2 { --dur: 70s; border-style: solid; border-color: rgb(255 255 255 / 9%); animation-name: t4ai-spin-rev; }
.t4ai-orbit__ring.is-3 { --dur: 96s; border-color: rgb(255 255 255 / 12%); }
.t4ai-orbit__item { --s: 48px; position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); translate: -50% -50%; }
.t4ai-orbit__ring.is-2 .t4ai-orbit__item { --s: 40px; }
.t4ai-orbit__ring.is-3 .t4ai-orbit__item { --s: 34px; }
.t4ai-orbit__item > i { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 30%; background: #fff; box-shadow: 0 12px 26px -10px rgb(0 0 0 / 60%), 0 0 0 1px rgb(255 255 255 / 45%); animation: t4ai-spin-rev var(--dur) linear infinite; }
.t4ai-orbit__ring.is-2 .t4ai-orbit__item > i { animation-name: t4ai-spin; }
.t4ai-orbit__item img { display: block; width: 60%; height: 60%; object-fit: contain; }
.t4ai-orbit__core { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; align-content: center; gap: 2px; width: 21%; aspect-ratio: 1; border-radius: 30%; background: linear-gradient(150deg, #19c3c0, #0078b8 58%, #5b4bd6); color: #fff; translate: -50% -50%; box-shadow: 0 0 0 9px rgb(25 195 192 / 10%), 0 0 70px rgb(25 195 192 / 55%), inset 0 1px 0 rgb(255 255 255 / 40%); }
.t4ai-orbit__mark { display: block; width: 44%; }
.t4ai-orbit__mark svg, .t4ai-orbit__mark img { display: block; width: 100%; height: auto; color: #fff; }
.t4ai-orbit__mark img { filter: brightness(0) invert(1); }
.t4ai-orbit__core small { font-size: 10px; font-weight: 800; letter-spacing: .04em; line-height: 1.4; opacity: .92; font-feature-settings: normal; }
.t4ai-orbit__pulse { position: absolute; inset: -12%; border: 1px solid rgb(92 225 214 / 55%); border-radius: 34%; animation: t4ai-pulse 3.2s ease-out infinite; }
@keyframes t4ai-spin { to { rotate: 360deg; } }
@keyframes t4ai-spin-rev { to { rotate: -360deg; } }
@keyframes t4ai-pulse { 0% { transform: scale(.86); opacity: .9; } 100% { transform: scale(1.55); opacity: 0; } }
@keyframes t4ai-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes t4ai-drift { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(60px, 40px) scale(1.12); } }

/* Floating chips around the orbit */
.t4ai-chip { position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border: 1px solid rgb(255 255 255 / 14%); border-radius: 14px; background: rgb(9 30 41 / 80%); color: #d9f1f2; font-size: 12px; line-height: 1.5; white-space: nowrap; box-shadow: 0 18px 36px -18px rgb(0 0 0 / 70%); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: t4ai-float 6s ease-in-out infinite; }
.t4ai-chip.is-code { left: -2%; bottom: 13%; direction: ltr; }
.t4ai-chip__dots { display: inline-flex; gap: 4px; }
.t4ai-chip__dots i { width: 7px; height: 7px; border-radius: 50%; background: #ff5f57; }
.t4ai-chip__dots i:nth-child(2) { background: #febc2e; }
.t4ai-chip__dots i:nth-child(3) { background: #28c840; }
.t4ai-chip code { font-size: 12px; color: #cfe3e6; }
.t4ai-tok-k { color: #8fd3ff; }
.t4ai-chip.is-stat { right: 1%; top: 7%; animation-delay: -2s; }
.t4ai-chip.is-stat b { color: #fff; font-size: 15px; font-weight: 900; }
.t4ai-chip.is-stat i { width: 1px; height: 16px; margin-inline: 4px; background: rgb(255 255 255 / 20%); }
.t4ai-chip.is-ok { right: 7%; bottom: 2%; direction: ltr; animation-delay: -4s; }
.t4ai-chip.is-ok span { padding: 1px 8px; border-radius: 999px; background: rgb(46 230 168 / 16%); color: #2ee6a8; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; font-weight: 800; }
.t4ai-chip.is-ok small { color: rgb(217 241 242 / 70%); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; }

/* Model name ticker: six names plus the first again, each held, then slid. */
.t4ai-ticker { display: inline-block; height: 1.7em; overflow: hidden; vertical-align: bottom; text-align: left; }
.t4ai-ticker > span { display: flex; flex-direction: column; animation: t4ai-tick 15s cubic-bezier(.7, 0, .3, 1) infinite; }
.t4ai-ticker i { display: block; height: 1.7em; color: #7fe7dd; font-style: normal; line-height: 1.7em; }
@keyframes t4ai-tick {
  0%, 13% { transform: translateY(0); }
  16.66%, 29.66% { transform: translateY(-1.7em); }
  33.33%, 46.33% { transform: translateY(-3.4em); }
  50%, 63% { transform: translateY(-5.1em); }
  66.66%, 79.66% { transform: translateY(-6.8em); }
  83.33%, 96.33% { transform: translateY(-8.5em); }
  100% { transform: translateY(-10.2em); }
}

/* ---------- Call-to-action box ---------- */
.t4ai-cta-section { position: relative; }
.t4ai-cta-section.is-home { padding-top: clamp(24px, 3vw, 48px); padding-bottom: 0; }
.t4ai-cta-section.is-pricing { padding-top: clamp(56px, 6vw, 88px); }
.t4ai-cta-intro { max-width: 780px; margin: 0 0 26px; }
.t4ai-cta-intro h2 { margin: 0 0 10px; color: var(--t4-ink); font-size: clamp(23px, 2.8vw, 34px); font-weight: 900; line-height: 1.55; }
.t4ai-cta-intro h2 span { background: linear-gradient(90deg, var(--t4-teal), var(--t4-blue)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.t4ai-cta-intro p { margin: 0; color: var(--t4-muted); font-size: 14.5px; line-height: 2.05; }

.t4ai-cta { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: 28px; overflow: hidden; padding: clamp(28px, 4.2vw, 60px); border-radius: 34px; background: radial-gradient(120% 140% at 100% 0%, #0f4556 0%, #0b2533 46%, #071a24 100%); color: #e6f3f4; box-shadow: 0 40px 80px -50px rgb(7 26 36 / 90%), inset 0 1px 0 rgb(255 255 255 / 8%); }
.t4ai-cta::after { content: ""; position: absolute; z-index: -1; right: -140px; bottom: -200px; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(closest-side, rgb(91 75 214 / 32%), transparent); pointer-events: none; }
.t4ai-cta__glow { position: absolute; z-index: -1; left: -140px; top: -180px; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(closest-side, rgb(25 195 192 / 34%), transparent); animation: t4ai-drift 14s ease-in-out infinite alternate; pointer-events: none; }
.t4ai-cta__dots { position: absolute; z-index: -1; inset: 0; background-image: radial-gradient(rgb(255 255 255 / 11%) 1px, transparent 1.3px); background-size: 22px 22px; -webkit-mask-image: radial-gradient(ellipse at 75% 50%, #000 0%, transparent 68%); mask-image: radial-gradient(ellipse at 75% 50%, #000 0%, transparent 68%); pointer-events: none; }
.t4ai-cta__copy { position: relative; min-width: 0; }
.t4ai-cta__kicker { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 18px; padding: 6px 14px; border: 1px solid rgb(255 255 255 / 12%); border-radius: 999px; background: rgb(255 255 255 / 7%); color: #bfe9ea; font-size: 12px; font-weight: 700; line-height: 1.7; }
.t4ai-cta h2 { margin: 0 0 14px; color: #fff; font-size: clamp(28px, 3vw, 40px); font-weight: 900; line-height: 1.45; }
.t4ai-cta h2 em, .t4ai-grad { background: linear-gradient(90deg, #5ce1d6, #5cc8ff 55%, #a99bff); -webkit-background-clip: text; background-clip: text; color: transparent; font-style: normal; }
.t4ai-cta__lead { max-width: 580px; margin: 0 0 18px; color: rgb(230 243 244 / 78%); font-size: 15px; line-height: 2.05; }
.t4ai-cta__ticks { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; list-style: none; }
.t4ai-cta__ticks li { display: inline-flex; align-items: center; gap: 6px; color: #dff5f5; font-size: 13px; font-weight: 700; }
.t4ai-cta__ticks svg { color: #2ee6a8; }
.t4ai-cta__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 26px; }
.t4ai-cta__from { color: #bfe9ea; font-size: 13px; text-decoration: none; border-bottom: 1px dashed rgb(191 233 234 / 45%); }
.t4ai-cta__from b { color: #fff; font-size: 15px; font-weight: 900; }
.t4ai-cta__from:hover { color: #fff; }
.t4ai-cta__art { position: relative; display: grid; place-items: center; min-width: 0; min-height: 380px; }
.t4ai-orbit.is-cta { width: min(410px, 100%); }

/* ---------- Services mega menu: the AI row ---------- */
.t4-mega-ai-item { grid-column: 1 / -1; margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--t4-line); list-style: none; }
.t4-mega-ai { position: relative; isolation: isolate; display: flex; align-items: center; gap: 14px; overflow: hidden; padding: 12px 16px; border-radius: 16px; background: linear-gradient(120deg, #0b2533, #0f3a4a 60%, #133f5f); color: #e6f3f4; text-decoration: none; transition: transform .25s var(--t4-ease), box-shadow .25s; }
.t4-mega-ai::before { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(260px 120px at 10% 0%, rgb(25 195 192 / 34%), transparent 70%), radial-gradient(220px 120px at 96% 100%, rgb(139 123 255 / 26%), transparent 70%); pointer-events: none; }
.t4-mega-ai:hover, .t4-mega-ai:focus-visible { transform: translateY(-2px); color: #fff; box-shadow: 0 16px 30px -18px rgb(7 26 36 / 85%); }
.t4-mega-ai:focus-visible { outline: 2px solid #5ce1d6; outline-offset: 2px; }
.t4-mega-ai.is-current { box-shadow: inset 0 0 0 1.5px #5ce1d6; }
.t4-mega-ai__icon { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: linear-gradient(150deg, #19c3c0, #0078b8 60%, #5b4bd6); color: #fff; box-shadow: 0 0 24px rgb(25 195 192 / 45%); }
.t4-mega-ai__copy { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.t4-mega-ai__title { color: #fff; font-size: 14.5px; font-weight: 800; line-height: 1.6; }
.t4-mega-ai__title em { margin-inline-start: 6px; padding: 1px 8px; border-radius: 999px; background: #2ee6a8; color: #05332a; font-size: 10px; font-style: normal; font-weight: 900; vertical-align: 2px; }
.t4-mega-ai__desc { color: rgb(230 243 244 / 72%); font-size: 11.5px; line-height: 1.7; }
.t4-mega-ai__logos { display: flex; flex: none; align-items: center; }
.t4-mega-ai__logos i { display: grid; place-items: center; width: 30px; height: 30px; margin-inline-start: -8px; border: 2px solid #0f3646; border-radius: 50%; background: #fff; }
.t4-mega-ai__logos i:first-child { margin-inline-start: 0; }
.t4-mega-ai__logos img { width: 16px; height: 16px; object-fit: contain; }
.t4-mega-ai__logos b { margin-inline-start: 8px; color: #7fe7dd; font-size: 12px; font-weight: 900; }
.t4-mega-ai__go { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgb(255 255 255 / 10%); color: #fff; transition: transform .25s var(--t4-ease), background .25s; }
.t4-mega-ai:hover .t4-mega-ai__go { transform: translateX(-3px); background: rgb(255 255 255 / 18%); }
.t4-mega-ai-item.is-mobile { margin: 6px 0 8px; padding: 8px 8px 0 6px; border-top: 0; }
.t4-mobile-panel .t4-mega-ai { gap: 12px; padding: 12px; border-radius: 14px; }
.t4-mobile-panel .t4-mega-ai__icon { width: 42px; height: 42px; border-radius: 12px; }
.t4-mobile-panel .t4-mega-ai__title { font-size: 14px; }
.t4-mobile-panel .t4-mega-ai__go { display: none; }
.t4-mobile-panel .t4-mega-ai__logos i:nth-child(n+4) { display: none; }
@media (max-width: 400px) {
  .t4-mobile-panel .t4-mega-ai__logos { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .t4ai-cta { grid-template-columns: minmax(0, 1fr); }
  .t4ai-cta__art { min-height: 0; padding-block: 8px 24px; }
  .t4ai-orbit.is-cta { width: min(380px, 88%); }
}
@media (max-width: 639px) {
  .t4ai-cta { gap: 10px; padding: 28px 20px 30px; border-radius: 26px; }
  .t4ai-cta h2 { font-size: 27px; }
  .t4ai-cta__lead { font-size: 14px; }
  .t4ai-cta__actions .t4ai-btn { width: 100%; }
  .t4ai-orbit.is-cta { width: min(320px, 92%); }
  .t4ai-orbit__item { --s: 38px; }
  .t4ai-orbit__ring.is-2 .t4ai-orbit__item { --s: 32px; }
  .t4ai-chip { padding: 7px 10px; font-size: 11px; }
  .t4ai-chip code { font-size: 10.5px; }
  .t4ai-chip.is-code { left: 0; bottom: 6%; }
  .t4ai-chip.is-ok { display: none; }
  .t4ai-chip.is-stat { right: 0; top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .t4ai-orbit__ring, .t4ai-orbit__item > i, .t4ai-orbit__pulse, .t4ai-chip, .t4ai-cta__glow, .t4ai-ticker > span, .t4ai-live { animation: none !important; }
  .t4ai-btn, .t4-mega-ai, .t4-mega-ai__go { transition: none; }
}
