/* ===== Codelf Landing · dark premium ===== */
:root {
  --bg: #08090c;
  --bg-soft: #0d0f14;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-brd: rgba(255, 255, 255, 0.09);
  --text: #eef1f6;
  --muted: #9aa3b2;
  --faint: #5c6474;
  --teal: #06b6d4;
  --teal-soft: #22d3ee;
  --violet: #7c6cff;
  --radius: 20px;
  --maxw: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans SC", "Sora", system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ===== background canvas + cursor glow ===== */
#bg-graph {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.9;
}

#cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.14) 0%, rgba(6, 182, 212, 0) 65%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.4s ease;
  will-change: transform;
}

body > *:not(#bg-graph):not(#cursor-glow) { position: relative; z-index: 2; }
/* ===== nav ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 56px);
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease), padding 0.4s var(--ease), border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(8, 9, 12, 0.72);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom-color: var(--panel-brd);
  padding-top: 12px;
  padding-bottom: 12px;
}
.nav__brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: 0.3px; }
.nav__logo { width: 30px; height: 30px; border-radius: 8px; }
.nav__links { display: flex; gap: 30px; font-size: 14.5px; color: var(--muted); }
.nav__links a { position: relative; transition: color 0.25s; }
.nav__links a:hover { color: var(--text); }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--teal); transition: width 0.3s var(--ease);
}
.nav__links a:hover::after { width: 100%; }
.nav__cta {
  padding: 9px 20px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: linear-gradient(135deg, var(--teal), var(--teal-soft));
  color: #04121a; transition: transform 0.25s var(--ease), box-shadow 0.25s;
  box-shadow: 0 6px 24px rgba(6, 182, 212, 0.28);
}
.nav__cta:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(6, 182, 212, 0.42); }
/* ===== hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 20px 80px;
  overflow: hidden;
}
.hero__aura {
  position: absolute;
  top: 32%; left: 50%;
  width: 900px; height: 900px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(6, 182, 212, 0.16) 0%, rgba(124, 108, 255, 0.08) 38%, rgba(6, 182, 212, 0) 68%);
  filter: blur(20px);
  pointer-events: none;
}
.hero__inner { max-width: 900px; }
.hero__pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: 999px; font-size: 13.5px; color: var(--muted);
  background: var(--panel); border: 1px solid var(--panel-brd);
  backdrop-filter: blur(10px); margin-bottom: 28px;
}
.hero__pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px var(--teal); animation: pulse 2s infinite; }
.hero__title {
  font-family: "Sora", "Noto Sans SC", sans-serif;
  font-size: clamp(48px, 8.5vw, 104px);
  font-weight: 800; line-height: 1.02; letter-spacing: -2px;
}
.hero__title .line { display: block; }
.grad {
  background: linear-gradient(120deg, var(--teal-soft) 0%, var(--teal) 40%, var(--violet) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero__sub { margin: 28px auto 0; max-width: 620px; font-size: clamp(16px, 2vw, 19px); color: var(--muted); }
.hero__actions { display: flex; gap: 16px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.hero__meta { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 34px; font-size: 13.5px; color: var(--faint); }
.hero__meta .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--faint); }
.hero__scroll { position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%); width: 24px; height: 40px; border: 2px solid var(--panel-brd); border-radius: 14px; }
.hero__scroll span { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 4px; height: 8px; border-radius: 2px; background: var(--teal); animation: scrolldot 1.8s infinite; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 28px; border-radius: 999px; font-size: 15px; font-weight: 600; transition: transform 0.28s var(--ease), box-shadow 0.28s, background 0.28s, border-color 0.28s; cursor: pointer; }
.btn--lg { padding: 16px 36px; font-size: 16.5px; }
.btn--primary { background: linear-gradient(135deg, var(--teal), var(--teal-soft)); color: #04121a; box-shadow: 0 8px 30px rgba(6, 182, 212, 0.32); }
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(6, 182, 212, 0.5); }
.btn--primary .arrow { transition: transform 0.28s var(--ease); }
.btn--primary:hover .arrow { transform: translateY(3px); }
.btn--ghost { background: var(--panel); border: 1px solid var(--panel-brd); color: var(--text); backdrop-filter: blur(10px); }
.btn--ghost:hover { transform: translateY(-3px); border-color: rgba(6, 182, 212, 0.5); background: rgba(6, 182, 212, 0.08); }
/* ===== product reveal (scroll scale) ===== */
.reveal-stage { min-height: 150vh; padding: 0 20px; }
.reveal-stage__sticky {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px;
}
.reveal-stage__frame {
  position: relative; width: min(1000px, 92vw); border-radius: 16px; overflow: hidden;
  border: 1px solid var(--panel-brd);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(6, 182, 212, 0.12);
  will-change: transform;
}
.reveal-stage__frame img { width: 100%; display: block; }
.reveal-stage__glow {
  position: absolute; inset: -2px; border-radius: 16px; pointer-events: none; z-index: 3;
  box-shadow: inset 0 0 60px rgba(6, 182, 212, 0.15);
}
.reveal-stage__cap { color: var(--muted); font-size: clamp(15px, 2vw, 19px); text-align: center; max-width: 560px; }
/* ===== marquee ===== */
.marquee { padding: 40px 0; overflow: hidden; border-top: 1px solid var(--panel-brd); border-bottom: 1px solid var(--panel-brd); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee__track { display: inline-flex; align-items: center; gap: 22px; white-space: nowrap; animation: marquee 32s linear infinite; font-family: "Sora", sans-serif; font-size: 22px; font-weight: 600; color: var(--faint); }
.marquee__track span { transition: color 0.3s; }
.marquee:hover .marquee__track span { color: var(--muted); }
.marquee__track i { color: var(--teal); font-style: normal; }
/* ===== generic section ===== */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(90px, 12vw, 160px) 20px; }
.section__head { text-align: center; max-width: 720px; margin: 0 auto clamp(48px, 6vw, 80px); }
.eyebrow { display: inline-block; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--teal); font-weight: 600; margin-bottom: 18px; }
.section h2 { font-family: "Sora", "Noto Sans SC", sans-serif; font-size: clamp(30px, 5vw, 54px); font-weight: 800; line-height: 1.1; letter-spacing: -1px; }
.section__head p { margin-top: 20px; color: var(--muted); font-size: clamp(15px, 2vw, 18px); }
/* ===== features grid ===== */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feat-card {
  position: relative; padding: 34px 30px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--panel-brd); backdrop-filter: blur(12px);
  transition: transform 0.4s var(--ease), border-color 0.4s, background 0.4s;
  overflow: hidden; transform-style: preserve-3d;
}
.feat-card::before {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius); opacity: 0;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(6, 182, 212, 0.12), transparent 60%);
  transition: opacity 0.4s; pointer-events: none;
}
.feat-card:hover { transform: translateY(-6px); border-color: rgba(6, 182, 212, 0.35); }
.feat-card:hover::before { opacity: 1; }
.feat-card--wide { grid-column: span 2; }
.feat-card--accent { background: linear-gradient(160deg, rgba(6, 182, 212, 0.14), rgba(124, 108, 255, 0.06)); border-color: rgba(6, 182, 212, 0.3); }
.feat-card__icon { font-size: 30px; margin-bottom: 18px; }
.feat-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.feat-card p { color: var(--muted); font-size: 14.5px; }
/* ===== memory ===== */
.memory { position: relative; }
.memory__bg { position: absolute; inset: 0; background: radial-gradient(ellipse at 70% 40%, rgba(124, 108, 255, 0.1), transparent 60%); pointer-events: none; }
.memory__layout { display: grid; grid-template-columns: 1fr 1.05fr; gap: 40px; align-items: center; }
.memory__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mem-card { padding: 24px 22px; border-radius: 16px; background: var(--panel); border: 1px solid var(--panel-brd); backdrop-filter: blur(10px); transition: transform 0.35s var(--ease), border-color 0.35s; }
.mem-card:hover { transform: translateY(-4px); border-color: rgba(124, 108, 255, 0.4); }
.mem-card h4 { font-size: 16.5px; margin-bottom: 8px; color: var(--teal-soft); }
.mem-card p { font-size: 13.8px; color: var(--muted); }
.memory__graph { position: relative; height: 460px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--panel-brd); background: rgba(6, 8, 14, 0.5); }
.memory__graph canvas { width: 100%; height: 100%; display: block; cursor: grab; }
.memory__graph canvas:active { cursor: grabbing; }
.memory__graph-tip { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); font-size: 12.5px; color: var(--faint); background: rgba(8, 9, 12, 0.6); padding: 5px 14px; border-radius: 999px; backdrop-filter: blur(6px); }
/* ===== rag + control ===== */
.rag__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.rag__text .eyebrow { margin-bottom: 16px; }
.rag__text h2 { font-family: "Sora", "Noto Sans SC", sans-serif; font-size: clamp(28px, 4vw, 46px); font-weight: 800; line-height: 1.12; letter-spacing: -1px; }
.rag__text > p { margin-top: 18px; color: var(--muted); font-size: 16px; }
.rag__list { list-style: none; margin: 24px 0 18px; display: grid; gap: 12px; }
.rag__list li { position: relative; padding-left: 26px; color: var(--muted); font-size: 14.5px; }
.rag__list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 8px; height: 8px; border-radius: 2px; background: var(--teal); box-shadow: 0 0 10px var(--teal); }
.rag__list b { color: var(--text); }
.rag__note { font-size: 13.5px; color: var(--faint); }
.rag__visual { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--panel-brd); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5); transition: transform 0.4s var(--ease); transform-style: preserve-3d; }
.rag__visual img { width: 100%; }
.control__chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.control__chips span { padding: 8px 16px; border-radius: 999px; font-size: 13.5px; background: var(--panel); border: 1px solid var(--panel-brd); color: var(--muted); transition: all 0.3s; }
.control__chips span:hover { border-color: rgba(6, 182, 212, 0.5); color: var(--text); transform: translateY(-2px); }
/* ===== stats ===== */
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { text-align: center; padding: 40px 20px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--panel-brd); backdrop-filter: blur(10px); }
.stat__num { font-family: "Sora", sans-serif; font-size: clamp(40px, 6vw, 68px); font-weight: 800; line-height: 1; background: linear-gradient(120deg, var(--teal-soft), var(--teal)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat__label { margin-top: 12px; color: var(--muted); font-size: 14.5px; }
/* ===== tech ===== */
.tech__grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; max-width: 820px; margin: 0 auto; }
.tech__grid span { padding: 12px 24px; border-radius: 999px; font-family: "JetBrains Mono", monospace; font-size: 14.5px; color: var(--muted); background: var(--panel); border: 1px solid var(--panel-brd); transition: all 0.3s var(--ease); }
.tech__grid span:hover { color: var(--teal-soft); border-color: rgba(6, 182, 212, 0.5); transform: translateY(-3px) scale(1.04); }
/* ===== download ===== */
.download { position: relative; text-align: center; }
.download__aura { position: absolute; top: 50%; left: 50%; width: 700px; height: 700px; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(6, 182, 212, 0.18), transparent 65%); filter: blur(30px); pointer-events: none; }
.download__inner { position: relative; }
.download h2 { font-family: "Sora", "Noto Sans SC", sans-serif; font-size: clamp(34px, 6vw, 66px); font-weight: 800; line-height: 1.08; letter-spacing: -1.5px; }
.download__inner > p { margin: 22px auto 0; max-width: 520px; color: var(--muted); font-size: 17px; }
.download__btns { display: flex; gap: 16px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.download__gh { display: inline-block; margin-top: 26px; color: var(--muted); font-size: 14.5px; transition: color 0.3s; }
.download__gh:hover { color: var(--teal-soft); }
/* ===== footer ===== */
.footer { max-width: var(--maxw); margin: 0 auto; padding: 60px 20px 40px; border-top: 1px solid var(--panel-brd); }
.footer__contact { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; padding-bottom: 40px; }
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__brand img { width: 44px; height: 44px; border-radius: 10px; }
.footer__brand b { display: block; font-size: 18px; }
.footer__brand span { color: var(--muted); font-size: 13.5px; }
.footer__qr { display: flex; gap: 20px; }
.footer__qr figure { text-align: center; }
.footer__qr img { width: 96px; height: 96px; border-radius: 12px; border: 1px solid var(--panel-brd); object-fit: cover; transition: transform 0.35s var(--ease); }
.footer__qr figure:hover img { transform: scale(1.06); }
.footer__qr figcaption { margin-top: 8px; font-size: 12.5px; color: var(--faint); }
.footer__bar { display: flex; align-items: center; justify-content: space-between; padding-top: 24px; border-top: 1px solid var(--panel-brd); font-size: 13.5px; color: var(--faint); flex-wrap: wrap; gap: 12px; }
.footer__links { display: flex; gap: 22px; }
.footer__links a:hover { color: var(--teal-soft); }
/* ===== animations ===== */
[data-reveal] { opacity: 0; transform: translateY(38px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.8); } }
@keyframes scrolldot { 0% { top: 8px; opacity: 1; } 70% { top: 22px; opacity: 0; } 100% { top: 8px; opacity: 0; } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}
/* ===== responsive ===== */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .feat-grid { grid-template-columns: 1fr; }
  .feat-card--wide { grid-column: span 1; }
  .memory__layout { grid-template-columns: 1fr; }
  .memory__cards { grid-template-columns: 1fr 1fr; }
  .rag__grid { grid-template-columns: 1fr; }
  .control__grid { direction: ltr; }
  .control .rag__visual { order: 2; }
  .stats__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .memory__cards { grid-template-columns: 1fr; }
  .hero__meta { flex-wrap: wrap; }
  .footer__contact { flex-direction: column; align-items: flex-start; }
}
