:root {
  --bg: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, 0.1);
  --glass: rgba(255, 255, 255, 0.72);
  --blue: #0071e3;
  --cyan: #5ac8fa;
  --green: #30d158;
  --orange: #ff9f0a;
  --radius: 28px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, "PingFang SC", sans-serif;
  letter-spacing: 0;
}

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

/* ═══ Nav ═══ */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 clamp(20px, 5vw, 72px);
  background: rgba(245, 245, 247, 0.78);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  backdrop-filter: saturate(180%) blur(22px);
}

.nav__brand { font-size: 15px; font-weight: 700; }

.nav__links {
  display: flex;
  gap: 28px;
  color: rgba(29, 29, 31, 0.78);
  font-size: 13px;
}

.nav__links a[aria-current="page"] { color: var(--blue); }

/* ═══ Section ═══ */
.section { padding: clamp(72px, 10vw, 128px) clamp(20px, 5vw, 72px); }

.hero {
  min-height: calc(100vh - 52px);
  display: grid;
  align-content: start;
  justify-items: center;
  text-align: center;
  overflow: hidden;
  padding-top: clamp(78px, 11vh, 116px);
  padding-bottom: 44px;
  background:
    radial-gradient(circle at 50% 32%, rgba(90, 200, 250, 0.32), transparent 32%),
    linear-gradient(180deg, #fff 0%, #f5f5f7 65%, #ececf0 100%);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 19px;
  font-weight: 700;
}

.hero__title {
  max-width: 980px;
  margin: 0;
  font-size: clamp(50px, 7.6vw, 96px);
  line-height: 0.96;
  font-weight: 800;
}

.hero__subtitle {
  max-width: 820px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.35;
  font-weight: 600;
}

.section-title {
  max-width: 860px;
  margin: 0 0 46px;
  font-size: clamp(38px, 5vw, 72px);
  line-height: 1.04;
  font-weight: 800;
}

.section-sub { margin-top: 52px; margin-bottom: 20px; }
.section-sub h3 { margin: 0; font-size: clamp(28px, 3.2vw, 46px); line-height: 1.08; }

/* ═══ Mindmap ═══ */
.mindmap {
  position: relative;
  width: min(1020px, 94vw);
  min-height: 520px;
  margin-top: 42px;
  border-radius: 38px;
  background:
    radial-gradient(circle at center, rgba(0, 113, 227, 0.2), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(239, 246, 255, 0.72));
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 34px 78px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.mindmap::before, .mindmap::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(0, 113, 227, 0.22);
  border-radius: 50%;
}

.mindmap::before { inset: 70px 80px; }
.mindmap::after { inset: 130px 170px; border-color: rgba(48, 209, 88, 0.22); }

.mindmap__center,
.mindmap__branch {
  position: absolute;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(20px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.1);
}

.mindmap__center {
  left: 50%; top: 50%;
  width: 200px; height: 200px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  text-align: center;
}

.mindmap__center strong { font-size: 28px; }

.mindmap__center span,
.mindmap__branch span {
  color: var(--muted); font-weight: 700; font-size: 13px;
}

.mindmap__branch {
  width: 210px;
  min-height: 84px;
  padding: 16px 18px;
  border-radius: 20px;
  text-align: left;
}

.mindmap__branch b { font-size: 18px; }

.mindmap__branch--solver   { left: 4%; top: 10%; }
.mindmap__branch--reader   { right: 4%; top: 10%; }
.mindmap__branch--calendar { left: 6%; bottom: 20%; }
.mindmap__branch--dashboard { right: 6%; bottom: 20%; }
.mindmap__branch--homepage { left: 50%; bottom: 5%; transform: translateX(-50%); }

/* ═══ Overview ═══ */
.overview { background: #fff; }

.stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.stat {
  padding: 28px 24px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.06);
}

.stat strong {
  display: block;
  font-size: clamp(42px, 5vw, 68px);
  line-height: 1;
}

.stat span { display: block; margin-top: 10px; font-size: 18px; font-weight: 800; }
.stat p { color: var(--muted); line-height: 1.6; }

/* ═══ Science (Dark Section) ═══ */
.science {
  color: #f5f5f7;
  background: #000;
}

.science .eyebrow,
.science .product__kicker { color: #2997ff; }

.science .section-title { color: #f5f5f7; }

.intro-panel {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 28px;
  padding: clamp(26px, 4vw, 44px);
  border-radius: 34px;
  background: linear-gradient(135deg, #151516, #202124);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.intro-panel--light {
  background: #151516;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.intro-panel p {
  margin: 0 0 18px;
  color: rgba(245, 245, 247, 0.76);
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.55;
  font-weight: 600;
}

.intro-panel--light p { color: rgba(245, 245, 247, 0.82); }

.build-list { display: grid; gap: 10px; }

.build-list span {
  display: block;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(245, 245, 247, 0.88);
  font-weight: 800;
}

/* ═══ Feature ═══ */
.feature {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  padding: clamp(18px, 3vw, 36px);
  border-radius: 34px;
  background: #151516;
  overflow: hidden;
  margin-bottom: 22px;
}

.feature--reverse {
  grid-template-columns: 0.7fr 1.3fr;
}

.feature--light {
  background: linear-gradient(135deg, #151516, #1c1d20);
}

.feature img {
  width: 100%;
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  cursor: zoom-in;
}

.feature__copy h3 {
  margin: 14px 0 10px;
  color: #f5f5f7;
  font-size: clamp(24px, 2.8vw, 38px);
  line-height: 1.1;
}

.feature__copy p { color: rgba(245, 245, 247, 0.72); line-height: 1.6; font-size: 15px; }

/* ═══ Full-width Screenshot ═══ */
.screenshot-full {
  border-radius: 34px;
  background: #151516;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 22px;
}

.screenshot-full img {
  display: block;
  width: 100%;
}

.screenshot-full__caption {
  padding: 22px clamp(24px, 3vw, 40px);
}

.screenshot-full__caption h3 {
  margin: 8px 0;
  color: #f5f5f7;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.15;
}

.screenshot-full__caption > p:last-child {
  color: rgba(245, 245, 247, 0.7);
  line-height: 1.6;
  font-size: 15px;
  margin: 0;
}

/* Light variant (calendar section) */
.screenshot-full--light {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.06);
}

.screenshot-full--light .screenshot-full__caption h3 {
  color: var(--ink);
}

.screenshot-full--light .screenshot-full__caption > p:last-child {
  color: var(--muted);
}

/* ═══ Case Grid ═══ */
.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 22px;
}

.case-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-content: start;
  padding: clamp(18px, 3vw, 28px);
  border-radius: 30px;
  background: #151516;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.case-card--wide {
  grid-column: 1 / -1;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: center;
}

.case-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: 22px;
  background: #050507;
  cursor: zoom-in;
}

.case-card h3 {
  margin: 10px 0 8px;
  color: #f5f5f7;
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.15;
}

.case-card p { color: rgba(245, 245, 247, 0.7); line-height: 1.6; }

.product__kicker {
  margin: 0 0 8px;
  color: #86868b;
  font-size: 14px;
  font-weight: 800;
}

.science .product__kicker { color: #2997ff; }

/* ═══ Video Row ═══ */
.video-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 28px;
}

.video-card {
  margin: 0;
  overflow: hidden;
  border-radius: 30px;
  background: #151516;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-card video,
.video-card img {
  display: block;
  width: 100%;
  background: #050507;
}

.video-card img { object-fit: contain; }

.video-card figcaption { padding: 22px; }
.video-card span { color: #fff; font-size: 24px; font-weight: 800; }
.video-card p { max-width: 560px; margin: 10px 0 0; color: rgba(245, 245, 247, 0.7); line-height: 1.55; }

/* ═══ Product Section ═══ */
.product-section { background: #f5f5f7; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.product {
  min-height: 380px;
  padding: clamp(28px, 4vw, 46px);
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.product h3 {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 46px);
  line-height: 1.08;
}

.product p { color: var(--muted); line-height: 1.6; }

.project-points {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
}

.project-points li { margin-top: 10px; }

.project-points li::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--blue);
  vertical-align: middle;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(0, 113, 227, 0.2);
}

.link-note {
  align-self: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

/* ═══ Dashboard Section ═══ */
.dashboard-section { background: #fff; }

.dashboard-copy { max-width: 980px; margin-bottom: 28px; }

.dashboard-copy p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: clamp(19px, 2vw, 25px);
  line-height: 1.5;
  font-weight: 600;
}


/* ═══ Next Panel / Agent ═══ */
.next-panel {
  margin-top: 22px;
  padding: clamp(28px, 4vw, 48px);
  border-radius: 34px;
  background: #111;
  color: #f5f5f7;
}

.next-panel h3 { margin: 0 0 16px; font-size: clamp(28px, 3.5vw, 48px); line-height: 1.08; }
.next-panel > p { max-width: 860px; color: rgba(245, 245, 247, 0.72); font-size: 18px; line-height: 1.6; }

.agent-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px; }

.agent-feat {
  padding: 22px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.agent-feat strong { display: block; font-size: 17px; margin-bottom: 8px; }
.agent-feat span { color: rgba(245, 245, 247, 0.7); font-size: 14px; line-height: 1.55; }

/* ═══ LLM Config Cards ═══ */
.llm-config-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }

.llm-card {
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.llm-card span { display: block; font-weight: 800; font-size: 14px; color: #f5f5f7; margin-bottom: 6px; }
.llm-card code { display: block; color: var(--cyan); font-size: 16px; font-weight: 700; margin-bottom: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.llm-card small { color: rgba(245, 245, 247, 0.5); font-size: 12px; }

/* ═══ Reference Table ═══ */
.ref-table-wrapper {
  overflow-x: auto;
  margin-bottom: 22px;
}

.ref-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.ref-table thead { background: #f5f5f7; }
.ref-table th {
  text-align: left;
  padding: 14px 18px;
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.ref-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  color: var(--ink);
  background: #fff;
}

.ref-table tr:last-child td { border-bottom: none; }

/* ═══ Diff Grid ═══ */
.diff-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.diff-item {
  padding: 22px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  text-align: center;
}

.diff-item strong { display: block; font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.diff-item span { color: var(--muted); font-size: 13px; line-height: 1.5; }

/* ═══ Done Grid ═══ */
.done-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.done-item {
  padding: 16px 18px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 14px;
}

.done-item--done { background: rgba(48, 209, 88, 0.12); color: #30d158; border: 1px solid rgba(48, 209, 88, 0.2); }
.done-item--wip  { background: rgba(255, 159, 10, 0.12); color: #ff9f0a; border: 1px solid rgba(255, 159, 10, 0.2); }
.done-item span { margin-right: 8px; }

/* ═══ Settings Row (inside screenshot-full) ═══ */
.settings-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.settings-row img {
  width: 100%;
  border-radius: 14px;
}

/* ═══ Media Placeholder ═══ */
.media-placeholder {
  margin-top: 28px;
  padding: clamp(24px, 3vw, 38px);
  border-radius: 28px;
  border: 2px dashed rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
}

.product-section .media-placeholder,
.dashboard-section .media-placeholder {
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.02);
}

.media-placeholder__title {
  margin: 0 0 18px;
  color: #86868b;
  font-size: 15px;
  font-weight: 800;
}

.media-placeholder__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.media-placeholder__item { text-align: center; }

.media-placeholder__box {
  padding: 38px 22px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(245, 245, 247, 0.5);
  font-weight: 800;
  font-size: 15px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 10px;
}

.product-section .media-placeholder__box,
.dashboard-section .media-placeholder__box {
  background: rgba(0, 0, 0, 0.03);
  color: var(--muted);
  border-color: rgba(0, 0, 0, 0.06);
}

.media-placeholder__item span {
  color: rgba(245, 245, 247, 0.4);
  font-size: 12px;
  font-weight: 600;
}

.product-section .media-placeholder__item span,
.dashboard-section .media-placeholder__item span {
  color: var(--muted);
}

/* ═══ Lightbox ═══ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 32px;
  background: rgba(0, 0, 0, 0.82);
}

.lightbox[hidden] { display: none; }

.lightbox img {
  max-width: min(96vw, 1500px);
  max-height: 90vh;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}

.lightbox__close {
  position: fixed;
  top: 22px; right: 24px;
  width: 42px; height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 30px;
  cursor: pointer;
}

/* ═══ Footer ═══ */
.footer {
  padding: 36px 20px;
  text-align: center;
  color: var(--muted);
  background: #f5f5f7;
  border-top: 1px solid var(--line);
}

/* ═══ Reveal Animation ═══ */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ═══ Responsive ═══ */
@media (max-width: 1200px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .case-grid { grid-template-columns: repeat(2, 1fr); }
  .done-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1020px) {
  .stats,
  .product-grid,
  .agent-features,
  .diff-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .intro-panel,
  .feature,
  .case-card--wide,



  .mindmap { min-height: auto; padding: 18px; display: grid; gap: 12px; }
  .mindmap::before, .mindmap::after { display: none; }
  .mindmap__center, .mindmap__branch { position: static; width: 100%; min-height: auto; transform: none; border-radius: 20px; text-align: left; }
  .mindmap__center { height: auto; padding: 20px; }
}

@media (max-width: 720px) {
  .nav__links { gap: 16px; font-size: 11px; overflow-x: auto; }

  .section { padding-left: 18px; padding-right: 18px; }

  .hero { text-align: left; justify-items: start; }
  .hero__subtitle { margin-left: 0; }

  .stats,
  .product-grid,
  .case-grid,
  .video-row,
  .agent-features,
  .diff-grid,
  .done-grid { grid-template-columns: 1fr; }

  .product, .case-card, .game-card { min-height: auto; }
}
