:root {
  --background: #06111f;
  --background-soft: #0b1c31;
  --panel: rgba(255, 255, 255, 0.98);
  --panel-dark: rgba(10, 29, 50, 0.84);
  --text: #122033;
  --text-soft: #536174;
  --text-on-dark: #f5f9ff;
  --text-on-dark-soft: #b8c8da;
  --primary: #0a1f45;
  --primary-hover: #12376e;
  --cyan: #40e0ff;
  --cyan-soft: rgba(64, 224, 255, 0.15);
  --red: #d91c24;
  --border: rgba(17, 46, 78, 0.13);
  --focus: #43e5ff;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.24);
  --radius-large: 28px;
  --radius-medium: 18px;
  --content-width: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--text-on-dark);
  background:
    radial-gradient(
      circle at 15% 15%,
      rgba(41, 172, 255, 0.18),
      transparent 36%
    ),
    radial-gradient(
      circle at 85% 80%,
      rgba(217, 28, 36, 0.13),
      transparent 34%
    ),
    linear-gradient(145deg, #040b14 0%, var(--background) 55%, #081a2e 100%);
}

button,
textarea,
a {
  font: inherit;
}

a {
  color: inherit;
}

button {
  border: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 14px;
  color: #00101d;
  background: #ffffff;
  border-radius: 10px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  width: min(calc(100% - 32px), var(--content-width));
  min-height: 86px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  width: 52px;
  height: 50px;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
}

.brand-name {
  font-size: 0.87rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 13px;
  color: var(--text-on-dark-soft);
  text-decoration: none;
  border-radius: 10px;
  transition:
    color 160ms ease,
    background-color 160ms ease;
}

.nav-link:hover,
.nav-link-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.page-shell {
  width: min(calc(100% - 32px), var(--content-width));
  margin: 24px auto 36px;
  display: grid;
  grid-template-columns: minmax(320px, 0.83fr) minmax(430px, 1.17fr);
  gap: 24px;
  align-items: stretch;
}

.intro-panel,
.chat-card {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow);
}

.intro-panel {
  min-height: 690px;
  padding: 48px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(
      180deg,
      rgba(13, 39, 66, 0.78),
      rgba(7, 23, 41, 0.9)
    );
  backdrop-filter: blur(18px);
}

.intro-panel::before {
  content: "";
  position: absolute;
  inset: auto -90px -120px auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(64, 224, 255, 0.08);
  filter: blur(5px);
}

.visual {
  width: min(100%, 410px);
  aspect-ratio: 1;
  margin: 0 auto 34px;
  position: relative;
  display: grid;
  place-items: center;
}

.visual-glow {
  position: absolute;
  width: 46%;
  height: 46%;
  border-radius: 50%;
  background: rgba(64, 224, 255, 0.25);
  filter: blur(45px);
}

.intela-core {
  position: relative;
  z-index: 5;
  width: 128px;
  height: 128px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(143, 238, 255, 0.65);
  border-radius: 34px;
  background:
    linear-gradient(
      145deg,
      rgba(52, 220, 255, 0.22),
      rgba(8, 30, 54, 0.9)
    );
  box-shadow:
    0 0 50px rgba(64, 224, 255, 0.23),
    inset 0 0 30px rgba(255, 255, 255, 0.07);
  transform: rotate(45deg);
}

.intela-core span {
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.17em;
  transform: rotate(-45deg);
}

.orbit {
  position: absolute;
  border: 1px solid rgba(121, 224, 255, 0.24);
  border-radius: 50%;
}

.orbit-one {
  width: 47%;
  height: 47%;
}

.orbit-two {
  width: 70%;
  height: 70%;
}

.orbit-three {
  width: 93%;
  height: 93%;
}

.node {
  position: absolute;
  width: 13px;
  height: 13px;
  border: 3px solid rgba(5, 27, 47, 0.95);
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 22px rgba(64, 224, 255, 0.8);
}

.node-one {
  top: 12%;
  left: 49%;
}

.node-two {
  top: 51%;
  right: 7%;
}

.node-three {
  right: 34%;
  bottom: 6%;
}

.node-four {
  top: 54%;
  left: 13%;
  background: #ff6268;
  box-shadow: 0 0 22px rgba(255, 77, 83, 0.75);
}

.intro-copy {
  position: relative;
  z-index: 2;
}

.eyebrow,
.chat-label {
  margin: 0 0 10px;
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.18em;
}

.eyebrow {
  color: var(--cyan);
}

.intro-copy h1 {
  max-width: 580px;
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.intro-text {
  max-width: 570px;
  margin: 23px 0 0;
  color: var(--text-on-dark-soft);
  font-size: 1.05rem;
  line-height: 1.75;
}

.capability-list {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.capability-list span {
  padding: 9px 12px;
  color: #dff9ff;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid rgba(91, 225, 255, 0.2);
  border-radius: 999px;
  background: var(--cyan-soft);
}

.about-link {
  width: fit-content;
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-weight: 750;
  text-decoration: none;
}

.about-link:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.chat-card {
  min-height: 690px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background: var(--panel);
}

.chat-header {
  padding-bottom: 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--border);
}

.chat-label {
  color: var(--red);
}

.chat-header h2 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.3rem);
  letter-spacing: -0.035em;
}

.status-indicator {
  flex: 0 0 auto;
  padding: 8px 11px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #17492c;
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: 999px;
  background: #e7f7ed;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1aaa57;
  box-shadow: 0 0 0 4px rgba(26, 170, 87, 0.12);
}

.messages {
  min-height: 250px;
  max-height: 360px;
  margin: 22px 0 18px;
  padding-right: 6px;
  overflow-y: auto;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 11px;
  scroll-behavior: smooth;
}

.message {
  width: fit-content;
  max-width: min(86%, 620px);
  padding: 13px 15px;
  border-radius: 16px;
  font-size: 0.94rem;
  line-height: 1.58;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.assistant-message {
  align-self: flex-start;
  color: #203148;
  background: #edf2f7;
  border-bottom-left-radius: 5px;
}

.user-message {
  align-self: flex-end;
  color: #ffffff;
  background: var(--primary);
  border-bottom-right-radius: 5px;
}

.prompt-options {
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prompt-option {
  padding: 9px 11px;
  cursor: pointer;
  color: #29425d;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid #d5e0eb;
  border-radius: 999px;
  background: #f8fafc;
  transition:
    border-color 150ms ease,
    background-color 150ms ease;
}

.prompt-option:hover {
  border-color: #9fc7db;
  background: #edf9fc;
}

.prompt-option:disabled {
  cursor: not-allowed;
  opacity: 0.54;
}


.document-tools {
  margin: -2px 0 14px;
  display: flex;
  justify-content: flex-start;
}

.document-download-button {
  min-height: 40px;
  padding: 9px 14px;
  cursor: pointer;
  color: #17324d;
  font-size: 0.8rem;
  font-weight: 800;
  border: 1px solid #b9d5e4;
  border-radius: 11px;
  background: #edf9fc;
  transition:
    border-color 150ms ease,
    background-color 150ms ease,
    transform 150ms ease;
}

.document-download-button:hover {
  border-color: #7db9d4;
  background: #e0f5fb;
  transform: translateY(-1px);
}

.document-download-button:disabled {
  cursor: wait;
  opacity: 0.58;
  transform: none;
}

.composer {
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid #ccd8e4;
  border-radius: var(--radius-medium);
  background: #ffffff;
}

.composer textarea {
  width: 100%;
  min-height: 54px;
  max-height: 160px;
  padding: 8px 9px;
  resize: none;
  overflow-y: auto;
  color: var(--text);
  line-height: 1.45;
  border: 0;
  outline: 0;
  background: transparent;
}

.composer textarea::placeholder {
  color: #7d8b9b;
}

.send-button {
  min-height: 48px;
  padding: 0 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #ffffff;
  font-weight: 800;
  border-radius: 13px;
  background: var(--primary);
  transition:
    background-color 150ms ease,
    transform 150ms ease;
}

.send-button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.send-button:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.chat-guidance {
  margin: 12px 3px 0;
  color: var(--text-soft);
  font-size: 0.74rem;
  line-height: 1.5;
}

.site-footer {
  width: min(calc(100% - 32px), var(--content-width));
  margin: 0 auto;
  padding: 0 0 28px;
  display: flex;
  justify-content: space-between;
  gap: 22px;
  color: var(--text-on-dark-soft);
  font-size: 0.78rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: #d9f9ff;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.noscript-notice {
  width: min(calc(100% - 32px), var(--content-width));
  margin: 0 auto 24px;
  padding: 14px;
  color: #4b1d00;
  border-radius: 12px;
  background: #fff0d9;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  border: 0;
  clip: rect(0, 0, 0, 0);
}

@media (max-width: 980px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .intro-panel {
    min-height: auto;
  }

  .visual {
    width: min(80vw, 420px);
  }
}

@media (max-width: 680px) {
  .site-header {
    min-height: 74px;
  }

  .brand-name {
    display: none;
  }

  .site-header nav {
    gap: 2px;
  }

  .nav-link {
    padding: 8px;
    font-size: 0.78rem;
  }

  .page-shell {
    width: min(calc(100% - 20px), var(--content-width));
    margin-top: 10px;
    gap: 14px;
  }

  .intro-panel,
  .chat-card {
    border-radius: 21px;
  }

  .intro-panel {
    padding: 27px 22px 31px;
  }

  .visual {
    margin-bottom: 24px;
  }

  .chat-card {
    min-height: 650px;
    padding: 22px 16px;
  }

  .chat-header {
    align-items: flex-start;
  }

  .status-indicator {
    padding: 7px 9px;
  }

  .message {
    max-width: 92%;
  }

  .composer {
    grid-template-columns: 1fr;
  }

  .send-button {
    width: 100%;
  }

  .site-footer {
    width: min(calc(100% - 24px), var(--content-width));
    flex-direction: column;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
