/* Core layout + theme */

:root {
  --bg-main: #030614;
  --bg-section-primary: #05091b;
  --bg-section-secondary: #080e26;
  --bg-section-accent: #050818;
  --text-main: #f7f9ff;
  --text-muted: #a4b0d8;
  --accent: #6be6ff;
  --accent-strong: #8f7bff;
  --accent-soft: rgba(107, 230, 255, 0.18);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --card-bg: rgba(7, 12, 32, 0.96);
  --shadow-soft: 0 22px 60px rgba(0, 0, 0, 0.75);
  --radius-lg: 22px;
  --radius-pill: 999px;
  --shell-width: 1120px;
  --footer-bg: #02040b;
  --danger: #ff7b7b;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
  background: radial-gradient(circle at top, #0c1230 0, #02030a 48%, #010109 100%);
  color: var(--text-main);
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-main {
  min-height: 70vh;
}

.shell {
  max-width: var(--shell-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 3.5rem 0;
}

.section-primary {
  background: var(--bg-section-primary);
}

.section-secondary {
  background: var(--bg-section-secondary);
}

.section-accent {
  background: var(--bg-section-accent);
}

h1, h2, h3, h4 {
  color: #ffffff;
  margin-top: 0;
}

p {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

strong {
  color: #ffffff;
}

/* Header + logo */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: linear-gradient(to bottom, rgba(2, 5, 20, 0.96), rgba(2, 6, 23, 0.88));
  border-bottom: 1px solid var(--border-subtle);
}

.shell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  color: inherit;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 650;
  letter-spacing: 0.01em;
  font-size: 1.02rem;
}

.brand-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* 3D quantum logo mark */

.qre-logo-orbit {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.55), transparent 55%),
    radial-gradient(circle at 70% 80%, rgba(143, 123, 255, 0.55), transparent 60%),
    radial-gradient(circle at 50% 50%, rgba(7, 226, 255, 0.15), rgba(5, 10, 30, 0.95));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18) inset,
    0 0 22px rgba(111, 229, 255, 0.85),
    0 18px 34px rgba(0, 0, 0, 0.85);
  overflow: visible;
  backdrop-filter: blur(10px);
  animation: logo-glow 4.2s ease-in-out infinite alternate;
}

.qre-logo-core {
  position: absolute;
  inset: 40%;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 30%, #ffffff, #7ff0ff);
  box-shadow:
    0 0 12px rgba(255, 255, 255, 0.9),
    0 0 24px rgba(143, 123, 255, 0.85);
}

.qre-logo-ring {
  position: absolute;
  inset: 14%;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    0 0 18px rgba(107, 230, 255, 0.55),
    0 0 0 1px rgba(7, 226, 255, 0.22);
  mix-blend-mode: screen;
}

.qre-logo-orbit-dot {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 30%, #ffffff, #ffe071);
  box-shadow: 0 0 12px rgba(255, 224, 113, 0.95);
  top: -4px;
  left: 50%;
  transform-origin: 50% 32px;
  animation: logo-orbit 7.5s linear infinite;
}

@keyframes logo-glow {
  from {
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.18) inset,
      0 0 20px rgba(111, 229, 255, 0.6),
      0 18px 34px rgba(0, 0, 0, 0.9);
  }
  to {
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.26) inset,
      0 0 30px rgba(190, 172, 255, 0.9),
      0 26px 46px rgba(0, 0, 0, 1);
  }
}

@keyframes logo-orbit {
  from {
    transform: rotate(0deg) translateX(0);
  }
  to {
    transform: rotate(360deg) translateX(0);
  }
}

/* Navigation */

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-size: 0.9rem;
}

.site-nav a {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid transparent;
}

.site-nav a:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
}

/* Hero video */

.hero-video-wrapper {
  position: relative;
  overflow: hidden;
  min-height: 60vh;
  background: radial-gradient(circle at top, #161f47 0, #050714 40%, #02030b 100%);
}

.hero-video-wrapper.hero-static {
  min-height: 32vh;
}

.hero-video-bg {
  z-index: 0;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.05) brightness(1.25);
  opacity: 0.95;
}

.hero-overlay {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: inherit;
  background: radial-gradient(circle at top, rgba(18, 24, 58, 0.65), rgba(5, 8, 20, 0.78));
}

.hero-shell {
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
}

.hero-shell h1 {
  font-size: 2.2rem;
  letter-spacing: 0.01em;
}

.hero-lead {
  font-size: 1.03rem;
  max-width: 640px;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.8rem;
}

/* Buttons */

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.7rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.94rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, rgba(107, 230, 255, 0.32), rgba(143, 123, 255, 0.7));
  border-color: rgba(255, 255, 255, 0.24);
  color: #ffffff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(18px);
}

.btn-primary:hover {
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.9);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Cards / layout helpers */

.shell-split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.1fr);
  gap: 2.5rem;
  align-items: start;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.8rem;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 1.4rem 1.6rem;
  box-shadow: var(--shadow-soft);
}

.card h2, .card h3 {
  margin-bottom: 0.5rem;
}

.card-tagline {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.45rem;
}

.list-bullets {
  padding-left: 1.2rem;
}

.list-bullets li {
  margin-bottom: 0.45rem;
}

/* FAQ */

.faq-list {
  display: grid;
  gap: 1.2rem;
}

.faq-item {
  padding: 1.2rem 1.5rem;
  border-radius: var(--radius-lg);
  background: rgba(8, 14, 36, 0.96);
  border: 1px solid var(--border-subtle);
}

/* Forms */

form {
  display: block;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

form label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

form label span {
  display: inline-block;
  margin-bottom: 0.25rem;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(3, 7, 22, 0.9);
  color: var(--text-main);
  font-size: 0.92rem;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(107, 230, 255, 0.5);
}

.form-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
}

/* Footer */

.site-footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--border-subtle);
}

.shell-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  padding: 2.2rem 1.5rem 2.6rem;
}

.footer-title {
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.footer-subtitle {
  font-size: 0.85rem;
}

.footer-legal {
  font-size: 0.78rem;
  max-width: 640px;
  color: var(--text-muted);
}

.footer-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
}

/* Comet cursor layer */

#comet-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 120;
}

.comet-dot {
  position: fixed;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.98), rgba(107, 230, 255, 0.75));
  box-shadow:
    0 0 12px rgba(107, 230, 255, 0.9),
    0 0 28px rgba(143, 123, 255, 0.85),
    0 0 46px rgba(143, 123, 255, 0.55);
  opacity: 0;
  transform: translate(-50%, -50%);
  animation: comet-fade 1.05s ease-out forwards;
}

.comet-dot::after {
  content: "";
  position: absolute;
  left: 45%;
  top: 50%;
  width: 40px;
  height: 12px;
  transform: translate(-100%, -50%) rotateZ(0deg);
  background: linear-gradient(
    90deg,
    rgba(143, 123, 255, 0),
    rgba(143, 123, 255, 0.55),
    rgba(107, 230, 255, 0.35),
    rgba(107, 230, 255, 0)
  );
  opacity: 0.9;
  filter: blur(4px);
  pointer-events: none;
}

@keyframes comet-fade {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
  }
}

/* Chat widget */

.kaiqros-chat-launcher {
  position: fixed;
  right: 1.8rem;
  bottom: 1.7rem;
  z-index: 60;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-pill);
  background: radial-gradient(circle at top, rgba(107, 230, 255, 0.6), rgba(143, 123, 255, 0.8));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.9);
  color: #01030a;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.kaiqros-chat-panel {
  position: fixed;
  right: 1.4rem;
  bottom: 4.5rem;
  width: 360px;
  max-width: calc(100% - 3rem);
  border-radius: 18px;
  background: radial-gradient(circle at top, rgba(11, 20, 56, 0.98), rgba(2, 4, 15, 0.98));
  border: 1px solid rgba(107, 230, 255, 0.45);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.96);
  overflow: hidden;
  display: none;
  z-index: 70;
}

.kaiqros-chat-panel.size-small {
  width: 26vw;
  max-width: 420px;
  height: 32vh;
  min-height: 260px;
}

.kaiqros-chat-panel.size-medium {
  width: 42vw;
  max-width: 640px;
  height: 52vh;
  min-height: 360px;
}

.kaiqros-chat-panel.size-large {
  top: 0.8rem;
  right: 0.8rem;
  bottom: 0.8rem;
  left: 0.8rem;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  border-radius: 22px;
}

.kaiqros-chat-header-main {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.kaiqros-chat-header-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.kaiqros-chat-size-toggle {
  border: none;
  background: rgba(3, 5, 22, 0.3);
  border-radius: 999px;
  width: 26px;
  height: 26px;
  font-size: 0.7rem;
  color: #ffffff;
  cursor: pointer;
}

.kaiqros-chat-size-toggle[data-active="true"] {
  background: rgba(107, 230, 255, 0.9);
  color: #030614;
}

.kaiqros-chat-controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.9rem 0.7rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.kaiqros-chat-controls-row .btn-chat {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(7, 12, 32, 0.96);
  color: #f7f9ff;
  font-size: 0.75rem;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
}

.kaiqros-chat-body {
  padding: 0.9rem 1rem;
  max-height: 280px;
}

.chat-message {
  margin-bottom: 0.75rem;
}

.chat-message-user {
  margin-top: 1.6rem;
}

.chat-message + .chat-message-afira {
  margin-top: 1.8rem;
}

.chat-message-bubble {
  padding: 0.65rem 0.8rem;
}

.chat-message-meta {
  margin-top: 0.2rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.82;
}

@media (max-width: 720px) {
  .kaiqros-chat-panel.size-medium {
    width: calc(100% - 2.4rem);
    height: 52vh;
  }
  .kaiqros-chat-panel.size-small {
    width: calc(100% - 2.4rem);
    height: 40vh;
  }
  .kaiqros-chat-panel.size-large {
    top: 0.5rem;
    right: 0.5rem;
    bottom: 0.5rem;
    left: 0.5rem;
  }
}

.kaiqros-chat-panel.open {
  display: flex;
  flex-direction: column;
}

.kaiqros-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(107, 230, 255, 0.22), rgba(143, 123, 255, 0.45));
}

.kaiqros-chat-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.kaiqros-chat-subtitle {
  font-size: 0.78rem;
  color: #0b1020;
}

.kaiqros-chat-close {
  border: none;
  background: rgba(3, 5, 22, 0.35);
  border-radius: 999px;
  width: 26px;
  height: 26px;
  color: #ffffff;
  cursor: pointer;
}

.kaiqros-chat-body {
  padding: 0.8rem 0.9rem;
  max-height: 260px;
  overflow-y: auto;
  background: radial-gradient(circle at bottom, rgba(2, 4, 12, 0.96), rgba(7, 12, 30, 0.98));
}

.chat-message {
  margin-bottom: 0.55rem;
}

.chat-message-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.chat-message-bubble {
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  font-size: 0.84rem;
}

.chat-message-afira .chat-message-bubble {
  background: rgba(14, 24, 58, 0.94);
  border: 1px solid rgba(107, 230, 255, 0.5);
}

.chat-message-user .chat-message-bubble {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.kaiqros-chat-input-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.6rem 0.9rem 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(3, 6, 22, 0.98);
}

#kaiqrosChatInput {
  width: 100%;
  min-height: 60px;
  max-height: 120px;
  resize: vertical;
  padding: 0.5rem 0.6rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(7, 10, 28, 0.98);
  color: var(--text-main);
  font-size: 0.84rem;
}

.kaiqros-chat-input-row button {
  align-self: flex-end;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: none;
  font-size: 0.82rem;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(107, 230, 255, 0.65), rgba(143, 123, 255, 0.9));
  color: #010308;
  cursor: pointer;
}

.kaiqros-chat-footnote {
  font-size: 0.7rem;
  padding: 0.35rem 0.9rem 0.8rem;
  color: var(--text-muted);
  background: rgba(2, 5, 18, 0.98);
}

/* Small helpers */

.small {
  font-size: 0.8rem;
}

@media (max-width: 768px) {
  .shell-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
  }
  .site-nav {
    flex-wrap: wrap;
    row-gap: 0.45rem;
  }
  .shell-split {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-shell {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }
}

/* Starfield overlay on hero sections */

.hero-video-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.4) 0, transparent 50%),
    radial-gradient(circle at 80% 10%, rgba(143, 123, 255, 0.35) 0, transparent 52%),
    radial-gradient(circle at 20% 80%, rgba(107, 230, 255, 0.35) 0, transparent 55%);
  background-size: 260px 260px, 320px 320px, 280px 280px;
  mix-blend-mode: screen;
  opacity: 0.38;
  z-index: 1;
  animation: starfield-drift 80s linear infinite;
}

@keyframes starfield-drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-140px, -70px, 0); }
}
