/* Kloud Meet marketing site: shared styles (tokens, base, nav, footer, buttons, animations). */

:root {
  --bg: #07070B;
  --text: #F5F6FA;
  --muted: #A6ADBB;
  --dim: #8B92A1;
  --link: #C9C8FF;
  --link-hover: #E2E1FF;
  --kicker: #A9A8FF;
  --accent: #5E5CE6;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Bricolage Grotesque', 'Plus Jakarta Sans', system-ui, sans-serif;
  --gutter: 28px;
  /* Pill buttons vary slightly per page in the designs; pages override these. */
  --pill-h: 54px;
  --pill-px: 26px;
  --pill-fs: 15px;
  color-scheme: dark;
}

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--link); }
a:hover { color: var(--link-hover); }
h1, h2, .h2 { font-family: var(--display); }
img, svg { max-width: none; }
[hidden] { display: none !important; }

.page { position: relative; min-height: 100vh; overflow: hidden; }
/* `clip` (where supported) hides horizontal overflow without creating a scroll container, so position:sticky still works. */
@supports (overflow: clip) { .page { overflow: clip; } }
.site-header, main, .site-footer { position: relative; z-index: 1; }
.site-header { z-index: 5; }

/* Skip link + visible keyboard focus */
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 999px; background: #fff; color: #1F1D6B;
  font-weight: 800; font-size: 14px; text-decoration: none;
}
.skip:focus { top: 12px; }
:focus { outline: none; }
:focus-visible { outline: 3px solid #C4B5FD; outline-offset: 3px; border-radius: 12px; }
.pill:focus-visible, .nl:focus-visible, .menu-btn:focus-visible { border-radius: 999px; }

.serif { font-family: var(--display); font-style: normal; font-weight: 800; letter-spacing: -0.04em; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); box-sizing: border-box; }
.glass {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
}
.kicker { font-size: 13px; font-weight: 800; letter-spacing: 0.16em; color: var(--kicker); }
.h2 { margin: 0; font-size: 64px; line-height: 1.02; font-weight: 800; letter-spacing: -0.045em; }
.lead { margin: 0; font-size: 19px; line-height: 1.7; color: var(--muted); }

/* Gradient text used on headline accents */
.gt { -webkit-background-clip: text; background-clip: text; color: transparent; }
.gt-violet { background-image: linear-gradient(110deg, #C4B5FD, #E879F9); }
.gt-lilac { background-image: linear-gradient(110deg, #E2E1FF, #A9A8FF 45%, #F0ABFC); }
.gt-pink { background-image: linear-gradient(110deg, #E9D5FF, #C084FC 45%, #F472B6); }

/* Buttons */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--pill-h); padding: 0 var(--pill-px); border-radius: 999px; border: 1px solid transparent;
  font: 800 var(--pill-fs)/1 var(--font);
  cursor: pointer; text-decoration: none; box-sizing: border-box; white-space: nowrap;
  transition: transform .2s, box-shadow .2s;
}
.pill:hover { transform: translateY(-2px); }
.grad { background: linear-gradient(135deg, #6A5CF4, #4D6CF5); color: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,0.15) inset, 0 18px 44px rgba(94,92,230,0.55); }
.grad:hover { color: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,0.2) inset, 0 22px 56px rgba(94,92,230,0.7); }
.ghost { background: rgba(255,255,255,0.06); color: var(--text); border-color: rgba(255,255,255,0.14); }
.ghost:hover { background: rgba(255,255,255,0.12); color: #fff; }
.white { background: #fff; color: #2A1E7A; }
.white:hover { color: #2A1E7A; }
.on-color { background: rgba(255,255,255,0.16); color: #fff; border-color: rgba(255,255,255,0.35); }
.on-color:hover { color: #fff; background: rgba(255,255,255,0.24); }

/* Aurora background blobs */
.aurora { position: absolute; left: 0; right: 0; top: 0; height: var(--aurora-h, 900px); z-index: 0; pointer-events: none; }
.aurora.clip { overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(110px); opacity: .6; pointer-events: none; }
.drift1 { animation: drift1 18s ease-in-out infinite; }
.drift2 { animation: drift2 22s ease-in-out infinite; }
.drift3 { animation: drift3 20s ease-in-out infinite; }
@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(120px,60px) scale(1.15); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-140px,40px) scale(1.1); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(60px,-80px) scale(1.2); } }
.grid-bg {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
}

/* ---------- Navigation ---------- */
.site-header { padding-top: 18px; }
.navbar {
  position: relative; display: flex; align-items: center; gap: 6px; height: 64px;
  padding: 0 10px 0 18px; border-radius: 999px;
  /* Dark neutral glass so the logo and links stand off the violet hero glow. */
  background: linear-gradient(100deg, rgba(14,12,26,0.82), rgba(20,16,34,0.74) 55%, rgba(38,16,44,0.78));
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 14px 40px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.08);
}
.brand {
  display: flex; align-items: center; gap: 10px; flex: none;
  font-weight: 800; font-size: 18px; letter-spacing: -0.02em; color: var(--text);
  text-decoration: none; margin-right: 14px;
}
.brand:hover { color: #fff; }
/* White app-icon chip: the logo's violet→cyan gradient needs a light ground to read. */
.brand-mark { width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,0.35); }
.brand-mark svg { width: 26px; height: 20px; }
.nav-links { display: flex; gap: 2px; }
.nav-spacer { flex: 1; }
.nl { color: #E4E0F5; text-decoration: none; font-weight: 600; font-size: 14px; padding: 9px 14px; border-radius: 999px; white-space: nowrap; }
.nl:hover { color: #fff; background: rgba(196,181,253,0.18); }
.nl.on { color: #fff; background: linear-gradient(135deg, rgba(124,92,255,0.6), rgba(217,70,239,0.45)); }
.navcta {
  height: 44px; padding: 0 20px; font-size: 14px;
  background: linear-gradient(120deg, #6A5CF4, #A855F7, #EC4899, #6A5CF4); background-size: 300% 100%;
  animation: navflow 6s ease infinite; color: #fff; box-shadow: 0 8px 24px rgba(168,85,247,0.5);
}
.navcta:hover { color: #fff; }
@keyframes navflow { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.menu-btn {
  display: none; flex: none; width: 44px; height: 44px; border-radius: 999px;
  border: 1px solid rgba(196,181,253,0.3); background: rgba(255,255,255,0.06); color: #fff;
  align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.menu-btn svg { display: block; }
.menu-btn .i-close { display: none; }
.menu-btn[aria-expanded="true"] .i-open { display: none; }
.menu-btn[aria-expanded="true"] .i-close { display: block; }
.mobile-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px);
  display: flex; flex-direction: column; gap: 4px; padding: 10px;
  border-radius: 24px; background: rgba(20,18,32,0.96);
  border: 1px solid rgba(196,181,253,0.28); box-shadow: 0 24px 60px rgba(0,0,0,0.6);
}
.mobile-menu .nl { font-size: 16px; padding: 14px 16px; }
.mobile-menu hr { width: 100%; border: 0; border-top: 1px solid rgba(255,255,255,0.08); margin: 4px 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid rgba(255,255,255,0.08); }
.footer-top { padding-top: 56px; padding-bottom: 40px; display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.footer-brand { display: flex; flex-direction: column; gap: 12px; max-width: 320px; }
.footer-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.footer-brand p { margin: 0; color: var(--dim); font-size: 14px; line-height: 1.6; }
.footer-nav { display: grid; grid-template-columns: repeat(3, minmax(140px, 1fr)); gap: 24px; font-size: 14px; }
.footer-nav > div { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a, .footer-nav span { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: #fff; }
.footer-bottom { padding-bottom: 28px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--dim); font-size: 13px; }
.footer-word {
  text-align: center; font-size: 220px; line-height: 0.8; font-weight: 800; letter-spacing: -0.06em;
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: 20px; user-select: none; white-space: nowrap;
}

/* ---------- Shared bits ---------- */
.swap { display: inline-block; animation: swapin .6s cubic-bezier(.2,.8,.2,1); }
@keyframes swapin { from { opacity: 0; transform: translateY(30px); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes eq { 0%,100% { transform: scaleY(.4); } 50% { transform: scaleY(1); } }
.eq { display: inline-block; width: 3px; height: 11px; border-radius: 2px; background: #fff; transform-origin: bottom; animation: eq .9s ease-in-out infinite; }
@keyframes draw { 0% { stroke-dashoffset: 600; } 60%,100% { stroke-dashoffset: 0; } }
.draw { stroke-dasharray: 600; animation: draw 4s ease-in-out infinite; }
@keyframes hue { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes msgin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.cta-panel { position: relative; overflow: hidden; border-radius: 44px; padding: 80px 48px; text-align: center; }
.cta-panel h2 { position: relative; margin: 0; font-size: 64px; line-height: 1.02; font-weight: 800; letter-spacing: -0.05em; color: #fff; }
.cta-actions { position: relative; margin-top: 32px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.seg { display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Scaled mockups: JS sets `zoom` so a fixed-width design fits its container. */
.fit { width: var(--fit-w); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav-links, .nav-signin { display: none; }
  .menu-btn { display: inline-flex; }
  .h2 { font-size: clamp(38px, 7.4vw, 64px); }
  .cta-panel h2 { font-size: clamp(36px, 7vw, 64px); }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .navbar { padding: 0 8px 0 14px; }
  .brand { margin-right: 0; font-size: 17px; gap: 8px; }
  .navcta { height: 40px; padding: 0 14px; }
  .lead { font-size: 17px; }
  .cta-panel { padding: 56px 20px; border-radius: 32px; }
  .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .footer-word { font-size: 22vw; }
  .pill { --pill-h: 52px; --pill-px: 22px; }
}
@media (max-width: 360px) {
  .brand-name { display: none; }
}

/* Respect reduced motion: the designs stop all looping animation and the JS timers. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Live webcam tiles (camera on) ---------- */
.cam { position: relative; overflow: hidden; background: #2E3036; isolation: isolate; }
.cam > .cam-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%;
  transform-origin: 50% 35%; animation: camlive 9s ease-in-out infinite alternate; z-index: 0;
}
.cam::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 45%; background: linear-gradient(transparent, rgba(0,0,0,0.6)); pointer-events: none; z-index: 1; }
.cam > *:not(.cam-img) { z-index: 2; }
.cam.speaking::before { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 3px #8B87FF; z-index: 3; pointer-events: none; animation: camring 1.6s ease-in-out infinite; }
@keyframes camlive {
  0% { transform: scale(1.04) translate(0, 0); }
  35% { transform: scale(1.065) translate(-0.8%, 0.5%); }
  70% { transform: scale(1.05) translate(0.6%, -0.4%); }
  100% { transform: scale(1.07) translate(-0.3%, 0.2%); }
}
@keyframes camring { 0%, 100% { box-shadow: inset 0 0 0 3px #8B87FF; } 50% { box-shadow: inset 0 0 0 3px #C4B5FD, 0 0 0 0 transparent; } }
.cam-av { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
@media (prefers-reduced-motion: reduce) { .cam > .cam-img, .cam.speaking::before { animation: none; } }
