/* CORTEX — dark, technical AI tools preview.
   Self-contained: defines its own tokens, independent of the IOTA shell. */

:root {
  --a-bg: #0b0b12;
  --a-surface: #14141f;
  --a-ink: #ededf4;
  --a-soft: #9b9bb0;
  --a-line: #262637;
  --a-accent: #8b5cf6;
  --a-accent2: #22d3ee;
  /* Space Grotesk renders Latin (logo, numerals); Pretendard covers Korean. */
  --a-sans: "Space Grotesk", "Pretendard Variable", Pretendard,
            "Apple SD Gothic Neo", "Noto Sans KR", -apple-system, sans-serif;
  --a-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; }

body {
  font-family: var(--a-sans);
  background: var(--a-bg);
  color: var(--a-ink);
  line-height: 1.65;
  word-break: keep-all;
}

a { color: inherit; }

/* Preview banner */
.preview-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1.5rem;
  background: var(--a-surface);
  border-bottom: 1px solid var(--a-line);
  font-size: 0.85rem;
  color: var(--a-soft);
}

.preview-banner a { color: var(--a-accent2); text-decoration: none; }
.preview-banner a:hover { text-decoration: underline; }

/* Header */
.ai-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem clamp(1rem, 5vw, 3rem);
}

.ai-logo {
  font-weight: 700;
  letter-spacing: 0.15em;
  text-decoration: none;
}

.ai-nav { display: flex; gap: 1.5rem; align-items: center; }

.ai-nav a {
  font-size: 0.9rem;
  color: var(--a-soft);
  text-decoration: none;
}

.ai-nav a:hover { color: var(--a-ink); }

.ai-nav .ai-cta-sm {
  padding: 0.45em 1.2em;
  border-radius: 8px;
  background: linear-gradient(120deg, var(--a-accent), var(--a-accent2));
  color: #0b0b12;
  font-weight: 600;
}

/* Hero */
.ai-hero {
  text-align: center;
  padding: clamp(4rem, 10vw, 7rem) 1.5rem 3rem;
  background:
    radial-gradient(620px 340px at 50% 0%, rgb(139 92 246 / 0.18), transparent 70%);
}

.ai-hero__badge {
  display: inline-block;
  font-family: var(--a-mono);
  font-size: 0.75rem;
  color: var(--a-accent2);
  border: 1px solid var(--a-line);
  border-radius: 999px;
  padding: 0.3em 1em;
  margin-bottom: 1.5rem;
}

.ai-hero h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin-bottom: 1rem;
}

.ai-hero h1 span {
  background: linear-gradient(120deg, var(--a-accent), var(--a-accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ai-hero p { color: var(--a-soft); max-width: 52ch; margin: 0 auto; }

/* Tools */
.ai-tools { padding: 2rem clamp(1rem, 5vw, 3rem); max-width: 1080px; margin: 0 auto; }

.ai-tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.ai-tool {
  padding: 1.6rem;
  background: var(--a-surface);
  border: 1px solid var(--a-line);
  border-radius: 14px;
  transition: border-color 0.2s, transform 0.2s;
}

.ai-tool:hover {
  border-color: var(--a-accent);
  transform: translateY(-3px);
}

.ai-tool__icon { font-size: 1.6rem; margin-bottom: 0.8rem; }
.ai-tool h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.ai-tool p { font-size: 0.88rem; color: var(--a-soft); }

/* Demo terminal */
.ai-demo { padding: 4rem 1.5rem 5rem; max-width: 720px; margin: 0 auto; }

.ai-terminal {
  border: 1px solid var(--a-line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--a-surface);
  box-shadow: 0 24px 60px rgb(139 92 246 / 0.12);
}

.ai-terminal__bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--a-line);
}

.ai-terminal__bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--a-line);
}

.ai-terminal__bar em {
  margin-left: 0.6rem;
  font-family: var(--a-mono);
  font-style: normal;
  font-size: 0.75rem;
  color: var(--a-soft);
}

.ai-terminal__body {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  font-size: 0.9rem;
}

.msg {
  max-width: 85%;
  padding: 0.7em 1em;
  border-radius: 12px;
}

.msg--user {
  align-self: flex-end;
  background: linear-gradient(120deg, var(--a-accent), #6d28d9);
  border-bottom-right-radius: 4px;
}

.msg--bot {
  align-self: flex-start;
  background: #1c1c2b;
  border: 1px solid var(--a-line);
  border-bottom-left-radius: 4px;
  color: var(--a-soft);
}

.msg--bot strong { color: var(--a-ink); }

.typing span {
  animation: blink 1.2s infinite;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .typing span { animation: none; }
}

.ai-demo__note {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--a-soft);
}

/* Footer */
.ai-footer {
  padding: 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--a-soft);
  border-top: 1px solid var(--a-line);
}
