/* KTS-AIGC Portal — Kiro-inspired dark marketing theme */
:root {
  --bg: #060608;
  --bg-elevated: #0c0c10;
  --bg-card: #111116;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --accent: #9046ff;
  --accent-2: #22d3ee;
  --accent-3: #a78bfa;
  --gradient-hero: linear-gradient(135deg, #c4b5fd 0%, #22d3ee 45%, #9046ff 90%);
  --gradient-btn: linear-gradient(135deg, #7c3aed, #06b6d4);
  --nav-h: 64px;
  --radius: 12px;
  --radius-lg: 20px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", "SF Mono", Consolas, monospace;
  --max: 1120px;
  --section-pad: clamp(2.75rem, 6vw, 4.25rem);
  --gap-cards: 0.65rem;
  --btn-radius: 999px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.aurora {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  overflow: hidden;
}

#aurora-canvas {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.85;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 70% 45% at 50% -15%, rgba(144, 70, 255, 0.12), transparent);
  pointer-events: none;
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.4;
  pointer-events: none;
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* —— Nav —— */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background 0.25s, border-color 0.25s, backdrop-filter 0.25s;
}

.site-nav.is-scrolled {
  background: rgba(6, 6, 8, 0.75);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.nav-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  padding: 0.45rem 0.85rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: var(--btn-radius);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
  font-family: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.btn > span {
  position: relative;
  z-index: 1;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.12), transparent 70%);
  transition: opacity 0.2s;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 8px 32px rgba(0, 0, 0, 0.35);
}

.btn:hover::after {
  opacity: 1;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(180deg, #f4f4f5 0%, #e4e4e7 100%);
  color: #09090b;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 12px 40px rgba(144, 70, 255, 0.25),
    inset 0 1px 0 #fff;
}

.btn-primary:hover {
  background: linear-gradient(180deg, #fff 0%, #ececef 100%);
  color: #000;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  box-shadow: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  padding: 0.5rem;
  cursor: pointer;
}

/* —— Hero —— */
.page-main {
  padding-top: var(--nav-h);
}

.hero {
  padding: var(--section-pad) 0 3rem;
  text-align: center;
}

.hero-stack {
  position: relative;
  margin-bottom: 1.5rem;
  min-height: clamp(3.5rem, 12vw, 6rem);
}

.hero-line {
  font-size: clamp(2rem, 5.5vw, 3.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0;
}

.hero-line--ghost {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.35;
  filter: blur(1px);
  animation: hero-drift 8s ease-in-out infinite alternate;
}

.hero-line--main {
  position: relative;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@keyframes hero-drift {
  from {
    transform: translateY(0) scale(1);
  }
  to {
    transform: translateY(-4px) scale(1.01);
  }
}

.hero-sub {
  max-width: 42rem;
  margin: 0 auto 2rem;
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.download-panel {
  max-width: 560px;
  margin: 0 auto;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: left;
}

.download-panel h3 {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.download-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
}

.download-row:first-of-type {
  border-top: none;
}

.download-row--mirrors {
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
}

.download-meta--full {
  width: 100%;
}

.download-mirror-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.download-mirror-btns .btn-mirror {
  font-size: 0.82rem;
  padding: 0.45rem 0.85rem;
}

.download-meta {
  font-size: 0.9rem;
}

.download-meta strong {
  display: block;
  color: var(--text);
}

.download-meta span {
  color: var(--text-dim);
  font-size: 0.8rem;
}

.version-pill {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 6px;
  background: rgba(144, 70, 255, 0.2);
  color: var(--accent-3);
  margin-left: 0.35rem;
}

/* —— Sections —— */
.section {
  padding: var(--section-pad) 0;
}

.section--tight {
  padding: calc(var(--section-pad) * 0.65) 0;
}

.section-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

.section-lead {
  color: var(--text-muted);
  max-width: 36rem;
  margin-bottom: 2.5rem;
}

/* What's new */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--gap-cards);
}

.card-accent {
  width: 28px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  margin-bottom: 0.65rem;
}

.news-card {
  padding: 1rem 1.15rem;
  background: rgba(17, 17, 22, 0.72);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.news-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.news-card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
  font-weight: 600;
}

.news-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Feature rows (Kiro-style alternating) */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2.75rem;
}

.feature-row:last-child {
  margin-bottom: 0;
}

.feature-row.is-reverse .feature-copy {
  order: 2;
}

.feature-row.is-reverse .feature-visual {
  order: 1;
}

.feature-copy h3 {
  font-size: 1.5rem;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.feature-copy p {
  color: var(--text-muted);
  margin: 0;
  font-size: 1rem;
}

.feature-visual {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.mock-chrome {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--mono);
}

.mock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-strong);
}

.mock-body {
  padding: 1.25rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.55;
  color: #a8b0c0;
  min-height: 220px;
}

.mock-body .kw {
  color: #c792ea;
}

.mock-body .str {
  color: #c3e88d;
}

.mock-body .fn {
  color: #82aaff;
}

.mock-body .cmt {
  color: #546e7a;
}

.mock-ui-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mock-ui-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  margin-bottom: 0.35rem;
  background: rgba(255, 255, 255, 0.03);
}

.mock-ui-list li.is-on {
  background: rgba(144, 70, 255, 0.15);
  border: 1px solid rgba(144, 70, 255, 0.35);
}

/* Pill grid */
.pill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gap-cards);
}

.pill-card {
  padding: 1.15rem 1.2rem;
  background: rgba(17, 17, 22, 0.72);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
}

.pill-card h4 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.pill-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.pill-card a {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--accent-2);
}

/* Testimonials marquee */
.marquee-wrap {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  padding: 2rem 0;
}

.marquee-track {
  display: flex;
  gap: 1rem;
  width: max-content;
  animation: marquee 45s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

.quote-card {
  flex: 0 0 300px;
  padding: 1rem 1.1rem;
  background: rgba(17, 17, 22, 0.72);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
}

.quote-card p {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.quote-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.quote-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.quote-author strong {
  display: block;
  font-size: 0.85rem;
}

.quote-author span {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* FAQ */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 0;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.faq-q::after {
  content: "+";
  color: var(--text-dim);
  font-size: 1.25rem;
  transition: transform 0.2s;
}

.faq-item.is-open .faq-q::after {
  transform: rotate(45deg);
}

.faq-a {
  display: none;
  padding-bottom: 1.15rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.faq-item.is-open .faq-a {
  display: block;
}

/* Inner pages */
.page-hero {
  padding: calc(var(--section-pad) * 0.6) 0 2rem;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin: 0 0 0.75rem;
  letter-spacing: -0.03em;
}

.page-hero p {
  color: var(--text-muted);
  max-width: 36rem;
  margin: 0 auto;
}

/* Features page grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap-cards);
}

.feature-tile {
  padding: 1.15rem 1.2rem;
  background: rgba(17, 17, 22, 0.72);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
}

.feature-tile h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.feature-tile p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.feature-tile ul {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* Changelog */
.changelog-list {
  max-width: 720px;
  margin: 0 auto;
}

.log-entry {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
}

.log-entry header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}

.log-entry h2 {
  margin: 0;
  font-size: 1.35rem;
}

.log-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(34, 211, 238, 0.12);
  color: var(--accent-2);
}

.log-entry ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
}

.log-entry li {
  margin-bottom: 0.35rem;
}

/* Contact */
.contact-grid--single {
  grid-template-columns: minmax(0, 520px);
  justify-content: center;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.contact-card {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.contact-card h3 {
  margin: 0 0 1rem;
}

.contact-card p,
.contact-card li {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.contact-card ul {
  padding-left: 1.1rem;
}

.form-field {
  margin-bottom: 1rem;
}

.form-field label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.form-field textarea {
  min-height: 120px;
  resize: vertical;
}

.form-note {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.75rem;
}

.form-note--ok {
  color: var(--accent-2);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  margin-top: var(--section-pad);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand p {
  color: var(--text-dim);
  font-size: 0.9rem;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin: 0 0 0.75rem;
}

.footer-col a {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 0.25rem 0;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-dim);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

/* Responsive */
@media (max-width: 900px) {
  .feature-row {
    grid-template-columns: 1fr;
  }

  .feature-row.is-reverse .feature-copy,
  .feature-row.is-reverse .feature-visual {
    order: unset;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links,
  .nav-cta .btn-ghost {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav.is-mobile-open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    padding: 1rem;
    background: rgba(6, 6, 8, 0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}
