/* ---------- hero ---------- */
#hero-canvas { position: absolute; inset: 0; display: block; pointer-events: none; }

/* ---------- 3D carousel ---------- */
.cz-wrap { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.cz-stage { position: relative; width: 100%; height: clamp(260px, 42vw, 520px); perspective: 1600px; }
.cz-card { --tx: 0deg; --ty: 0deg; position: absolute; left: 50%; top: 0; width: min(760px, 78%); border-radius: 16px; overflow: hidden; background: #0B2246; border: 1px solid rgba(127,193,240,0.35); box-shadow: 0 30px 80px rgba(0,0,0,0.55); text-decoration: none; transition: transform .8s cubic-bezier(.2,.8,.2,1), opacity .8s, filter .8s; transform-style: preserve-3d; }
.cz-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.cz-chrome { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #0E2A52; border-bottom: 1px solid rgba(127,193,240,0.2); }
.cz-chrome i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.28); }
.cz-chrome b { margin: 0 auto; font: 500 12px Inter, sans-serif; color: #BFD3E8; background: rgba(255,255,255,0.07); padding: 4px 28px; border-radius: 6px; }
.cz-card[data-pos="center"] { transform: translateX(-50%) translateZ(0) rotateY(var(--tx)) rotateX(var(--ty)); opacity: 1; z-index: 3; box-shadow: 0 30px 90px rgba(0,0,0,0.6), 0 0 60px rgba(75,156,211,0.3); }
.cz-card[data-pos="left"] { transform: translateX(-108%) translateZ(-260px) rotateY(32deg); opacity: .55; z-index: 1; filter: saturate(.7) brightness(.8); cursor: pointer; }
.cz-card[data-pos="right"] { transform: translateX(8%) translateZ(-260px) rotateY(-32deg); opacity: .55; z-index: 1; filter: saturate(.7) brightness(.8); cursor: pointer; }
.cz-controls { display: flex; align-items: center; gap: 18px; width: 100%; max-width: 760px; justify-content: space-between; }
.cz-btn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(127,193,240,0.4); background: rgba(5,15,34,0.6); color: #FFFFFF; font-size: 20px; cursor: pointer; transition: background .2s, box-shadow .2s; }
.cz-btn:hover { background: rgba(75,156,211,0.25); box-shadow: 0 0 24px rgba(75,156,211,0.45); }
.cz-caption { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.cz-caption strong { font: 700 20px 'Space Grotesk', Inter, sans-serif; color: #FFFFFF; }
.cz-caption span { font: 500 12.5px 'JetBrains Mono', monospace; color: #9FB3CC; }
.cz-caption a { margin-top: 6px; color: #7FC1F0; font-weight: 600; text-decoration: none; }
.cz-dots { display: flex; gap: 10px; }
.cz-dot { width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0; background: rgba(127,193,240,0.3); cursor: pointer; }
.cz-dot[aria-current="true"] { background: #7FC1F0; box-shadow: 0 0 12px #7FC1F0; }
.cz-note { margin: 0; font-size: 13px; color: #8EA3BE; }

/* ---------- AI phone ---------- */
#ai > div > div:first-child { flex: 1 1 520px !important; }
.phone-col { flex: 0 1 340px; display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 0 auto; }
.phone { position: relative; width: 320px; height: 620px; border-radius: 44px; background: #050F22; border: 1px solid rgba(191,230,255,0.35); box-shadow: 0 40px 90px rgba(0,0,0,0.55), 0 0 70px rgba(75,156,211,0.28), inset 0 0 0 10px #0A1B36; padding: 54px 18px 18px; box-sizing: border-box; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.phone-notch { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); width: 96px; height: 24px; border-radius: 14px; background: #000; }
.phone-banner { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #FFFFFF; background: rgba(255,255,255,0.08); border: 1px solid rgba(127,193,240,0.3); border-radius: 14px; padding: 10px 12px; color: #BFE6FF; }
.phone-banner.ring { animation: ring .5s ease-in-out infinite alternate; border-color: #5EE0A0; }
@keyframes ring { from { transform: translateX(-2px); } to { transform: translateX(2px); } }
.phone-head { display: flex; align-items: center; gap: 8px; font: 600 13px Inter, sans-serif; color: #C9D6E8; padding: 2px 4px; }
.phone-head em { font-style: normal; font: 500 11px 'JetBrains Mono', monospace; color: #5EE0A0; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: #5EE0A0; box-shadow: 0 0 10px #5EE0A0; }
.phone-chat { flex: 1; overflow: hidden; display: flex; flex-direction: column; gap: 9px; padding: 4px 2px; scroll-behavior: smooth; }
.msg { max-width: 84%; font-size: 13.5px; line-height: 1.4; padding: 9px 12px; border-radius: 16px; opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .35s; }
.msg.in { opacity: 1; transform: none; }
.msg.ai { align-self: flex-start; background: rgba(75,156,211,0.22); border: 1px solid rgba(127,193,240,0.35); color: #FFFFFF; border-bottom-left-radius: 5px; }
.msg.caller { align-self: flex-end; background: #FFFFFF; color: #050F22; border-bottom-right-radius: 5px; }
.msg.sys { align-self: center; max-width: 100%; font: 500 11.5px 'JetBrains Mono', monospace; color: #9FB3CC; background: none; padding: 2px 0; }
.msg.typing { display: flex; gap: 4px; padding: 12px 14px; }
.msg.typing i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .5; animation: blink 1s infinite; }
.msg.typing i:nth-child(2) { animation-delay: .15s; } .msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: 1; } }
.phone-toast { display: flex; flex-direction: column; gap: 2px; background: #FFFFFF; color: #050F22; border-radius: 16px; padding: 11px 14px; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,0.4); transform: translateY(140%); opacity: 0; transition: transform .5s cubic-bezier(.2,.8,.2,1), opacity .5s; }
.phone-toast strong { font: 700 14px 'Space Grotesk', Inter, sans-serif; color: #1E7F55; }
.phone-toast.show { transform: none; opacity: 1; }
.phone-cap { margin: 0; max-width: 320px; text-align: center; font-size: 12.5px; color: #8EA3BE; }

/* ---------- phone layout ---------- */
@media (max-width: 760px) {
  #hero header nav[aria-label="Main"] a:last-child { padding: 9px 14px !important; font-size: 13px; }
  #hero header { flex-wrap: nowrap !important; }
  .cz-card { width: 84%; }
  .cz-card[data-pos="left"] { transform: translateX(-118%) translateZ(-200px) rotateY(30deg); }
  .cz-card[data-pos="right"] { transform: translateX(18%) translateZ(-200px) rotateY(-30deg); }
  .phone { width: 290px; height: 560px; }
}
@media (prefers-reduced-motion: reduce) {
  .cz-card, .msg, .phone-toast { transition: none; }
  .phone-banner.ring { animation: none; }
}
.ai-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
@media (max-width: 560px) { .ai-tiles { grid-template-columns: 1fr !important; } }

/* ---------- soft glow on the headline accent + main button ---------- */
#hero-cta { animation: ctaGlow 6s ease-in-out infinite; }
@keyframes accentGlow { 0%, 100% { filter: none; } 50% { filter: drop-shadow(0 0 10px rgba(127,193,240,0.38)); } }
@keyframes ctaGlow { 0%, 100% { box-shadow: 0 0 0 rgba(127,193,240,0); } 50% { box-shadow: 0 0 0 3px rgba(127,193,240,0.16), 0 0 26px rgba(127,193,240,0.3); } }

/* ---------- in-page demo viewer ---------- */
.cz-card[data-pos="center"] { cursor: zoom-in; }
.dv { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 28px; opacity: 0; transition: opacity .25s; }
.dv.open { opacity: 1; }
.dv[hidden] { display: none; }
.dv-backdrop { position: absolute; inset: 0; background: rgba(2,8,20,0.82); backdrop-filter: blur(6px); }
.dv-panel { position: relative; width: min(1320px, 100%); height: min(860px, 100%); display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #0B2246; border: 1px solid rgba(127,193,240,0.35); box-shadow: 0 40px 120px rgba(0,0,0,0.6); transform: translateY(12px) scale(.985); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.dv.open .dv-panel { transform: none; }
.dv-bar { display: flex; align-items: center; gap: 16px; padding: 10px 14px; background: #0E2A52; border-bottom: 1px solid rgba(127,193,240,0.2); }
.dv-dots { display: flex; gap: 6px; } .dv-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.28); }
.dv-title { flex: 1; display: flex; align-items: baseline; gap: 10px; min-width: 0; color: #fff; font: 700 15px 'Space Grotesk', Inter, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-title small { font: 500 12px 'JetBrains Mono', monospace; color: #9FB3CC; }
.dv-tools { display: flex; align-items: center; gap: 8px; }
.dv-toggle { display: flex; padding: 3px; border-radius: 10px; background: rgba(5,15,34,0.6); border: 1px solid rgba(127,193,240,0.25); }
.dv-toggle button { border: 0; background: none; color: #BFD3E8; font: 600 12.5px Inter, sans-serif; padding: 6px 12px; border-radius: 7px; cursor: pointer; }
.dv-toggle button[aria-pressed="true"] { background: #4B9CD3; color: #fff; }
.dv-nav, .dv-close { border: 1px solid rgba(127,193,240,0.35); background: rgba(5,15,34,0.6); color: #fff; border-radius: 10px; padding: 7px 12px; font: 600 13px Inter, sans-serif; cursor: pointer; }
.dv-close { background: #fff; color: #050F22; border-color: #fff; }
.dv-frame-wrap { flex: 1; display: flex; justify-content: center; background: #050F22; overflow: hidden; }
.dv-frame-wrap iframe { width: 100%; height: 100%; border: 0; background: #fff; transition: width .35s, margin .35s, border-radius .35s; }
.dv[data-size="phone"] .dv-frame-wrap iframe { width: 390px; margin: 18px 0; border-radius: 28px; box-shadow: 0 0 0 8px #0A1B36, 0 0 0 9px rgba(191,230,255,0.3); }
@media (max-width: 760px) {
  .dv { padding: 0; }
  .dv-panel { width: 100%; height: 100%; border-radius: 0; }
  .dv-dots, .dv-toggle, .dv-title small { display: none; }
  .dv-bar { padding: 10px; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { #hero-title, #hero-cta { animation: none; } }

/* ---------- headline: slow colour sweep back and forth ---------- */
#hero-title {
  background: linear-gradient(90deg, #FFFFFF 0%, #FFFFFF 22%, #BFE6FF 34%, #7FC1F0 46%, #4B9CD3 54%, #7FC1F0 62%, #BFE6FF 72%, #FFFFFF 84%, #FFFFFF 100%);
  background-size: 260% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  animation: titleSweep 14s ease-in-out infinite alternate, accentGlow 7s ease-in-out infinite;
}
#hero-title #hero-accent { color: transparent; -webkit-text-fill-color: transparent; }
@keyframes titleSweep { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
