/* =========================================================
   JeeGantt landing — styles
   Theme: light/dark, auto from system (prefers-color-scheme),
   overridable via [data-theme="light"|"dark"] on <html>.
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  --brand: #5b6ef5;
  --brand-2: #8b5cf6;
  --crit: #ef4444;

  --bg: #ffffff;
  --bg-alt: #f5f6fb;
  --surface: #ffffff;
  --surface-2: #f0f2fa;
  --border: #e4e7f2;
  --text: #11131c;
  --text-soft: #4b5168;
  --text-mute: #767d96;
  --shadow: 0 1px 2px rgba(17,19,28,.04), 0 12px 32px -12px rgba(17,19,28,.18);
  --shadow-sm: 0 1px 2px rgba(17,19,28,.06), 0 6px 16px -10px rgba(17,19,28,.16);

  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1120px;
  --header-h: 64px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
}

/* Dark palette: applied when system prefers dark AND theme=auto, or theme=dark */
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #0c0e16;
    --bg-alt: #11131f;
    --surface: #161927;
    --surface-2: #1d2132;
    --border: #262a3d;
    --text: #f2f4fb;
    --text-soft: #b9bfd4;
    --text-mute: #8a90a8;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 18px 40px -16px rgba(0,0,0,.65);
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 8px 20px -12px rgba(0,0,0,.6);
  }
}
:root[data-theme="dark"] {
  --bg: #0c0e16;
  --bg-alt: #11131f;
  --surface: #161927;
  --surface-2: #1d2132;
  --border: #262a3d;
  --text: #f2f4fb;
  --text-soft: #b9bfd4;
  --text-mute: #8a90a8;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 18px 40px -16px rgba(0,0,0,.65);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 8px 20px -12px rgba(0,0,0,.6);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.15rem; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); font-size: .9em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 24px; border-radius: 999px; font-weight: 600; font-size: .98rem;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), background-color .2s, border-color .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--brand) 70%, transparent);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -10px color-mix(in srgb, var(--brand) 75%, transparent); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; color: var(--brand); }
.brand-name { color: var(--text); letter-spacing: -.02em; }
.brand-mark { display: inline-flex; color: var(--brand); }

.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--text-soft); font-weight: 500; font-size: .95rem; position: relative; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--brand); border-radius: 2px; transform: scaleX(0); transform-origin: left;
  transition: transform .25s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-actions { display: flex; gap: 8px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-width: 40px; height: 40px; padding: 0 12px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-soft); cursor: pointer; font-weight: 600; font-size: .85rem;
  transition: color .2s, border-color .2s, background-color .2s, transform .15s var(--ease);
}
.icon-btn:hover { color: var(--brand); border-color: var(--brand); }
.icon-btn:active { transform: scale(.95); }
/* sun/moon swap */
.icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: inline; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .icon-sun { display: none; }
  :root[data-theme="auto"] .icon-moon { display: inline; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(56px, 9vw, 110px) 0 64px; overflow: hidden; }
.hero-bg {
  position: absolute; inset: -20% -10% auto -10%; height: 120%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(48% 42% at 22% 18%, color-mix(in srgb, var(--brand) 28%, transparent), transparent 70%),
    radial-gradient(45% 40% at 82% 12%, color-mix(in srgb, var(--brand-2) 26%, transparent), transparent 70%);
  filter: blur(8px);
}
.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 820px; }
.hero-inner h1 { margin: 14px 0 0; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700;
  color: var(--brand);
}
.lead { margin: 22px auto 0; max-width: 660px; font-size: clamp(1.05rem, 2vw, 1.22rem); color: var(--text-soft); }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.hero-badges {
  list-style: none; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  margin: 30px 0 0; padding: 0;
}
.hero-badges li {
  font-size: .82rem; font-weight: 600; color: var(--text-mute);
  border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; background: var(--surface);
}

/* ---------- Gantt mockup ---------- */
.mockup {
  position: relative; z-index: 1; margin: 56px auto 0; max-width: 920px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.mockup-bar {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.mockup-bar .dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-r { background: #ff5f57; } .dot-y { background: #febc2e; } .dot-g { background: #28c840; }
.mockup-title { margin-left: 10px; font-size: .82rem; color: var(--text-mute); font-family: var(--mono); }
.mockup-body { padding: 22px clamp(16px, 4vw, 34px); }
.gantt-grid { display: flex; flex-direction: column; gap: 14px; }
.g-row { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 14px; position: relative; }
.g-name { font-size: .85rem; color: var(--text-soft); font-weight: 500; }
.g-bar {
  position: relative; height: 22px; border-radius: 7px;
  margin-left: calc(var(--s)); width: var(--w); min-width: 28px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 4px 10px -4px color-mix(in srgb, var(--brand) 60%, transparent);
  transform-origin: left; animation: growBar .9s var(--ease) both;
}
.g-bar.crit { background: linear-gradient(135deg, #f97316, var(--crit)); box-shadow: 0 4px 10px -4px color-mix(in srgb, var(--crit) 55%, transparent); }
.g-milestone {
  width: 18px; height: 18px; margin-left: var(--s); border-radius: 4px;
  background: var(--text); transform: rotate(45deg); animation: pop .6s var(--ease) both .3s;
}
@keyframes growBar { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }
@keyframes pop { from { transform: rotate(45deg) scale(0); } to { transform: rotate(45deg) scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .g-bar, .g-milestone { animation: none; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(60px, 9vw, 100px) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto clamp(36px, 6vw, 56px); }
.section-head p { margin-top: 12px; color: var(--text-soft); font-size: 1.08rem; }

.grid { display: grid; gap: 20px; }
.features-grid { grid-template-columns: repeat(3, 1fr); }
.interop-grid { grid-template-columns: repeat(4, 1fr); }
.tech-grid { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }
.card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 12px; font-size: 1.4rem; margin-bottom: 16px;
  background: color-mix(in srgb, var(--brand) 12%, transparent);
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-soft); font-size: .96rem; }

/* ---------- Split (privacy) ---------- */
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 64px); align-items: center; }
.split-text h2 { margin: 12px 0 16px; }
.split-text p { color: var(--text-soft); font-size: 1.05rem; }
.split-text code { background: var(--surface-2); padding: 2px 7px; border-radius: 6px; color: var(--brand); }
.check-list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
.check-list li { position: relative; padding-left: 32px; color: var(--text-soft); }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0; width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
  background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand);
  font-size: .8rem; font-weight: 800;
}
.split-visual { display: flex; justify-content: center; }
.file-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 44px 56px; border-radius: 20px; background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  transform: rotate(-3deg); transition: transform .4s var(--ease);
}
.file-card:hover { transform: rotate(0); }
.file-ext {
  font-family: var(--mono); font-weight: 700; font-size: 1.1rem; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  padding: 8px 16px; border-radius: 10px;
}
.file-name { font-weight: 700; font-size: 1.25rem; margin-top: 8px; }
.file-sub { color: var(--text-mute); font-size: .85rem; }

/* ---------- Interop ---------- */
.pill {
  display: flex; flex-direction: column; gap: 6px; text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 18px; box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), border-color .25s;
}
.pill:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }
.pill strong { font-size: 1.05rem; }
.pill span { color: var(--text-soft); font-size: .88rem; }
.note {
  margin: 28px auto 0; max-width: 760px; text-align: center; font-size: .9rem;
  color: var(--text-mute); border: 1px dashed var(--border); border-radius: 12px; padding: 16px 20px;
}

/* ---------- Tech ---------- */
.tech-item {
  display: flex; flex-direction: column; gap: 4px; padding: 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.tech-k { font-weight: 700; font-size: 1.1rem; color: var(--brand); }
.tech-v { color: var(--text-soft); font-size: .9rem; }

/* ---------- Downloads ---------- */
.downloads-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 300px)); justify-content: center; }
.dl-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 22px; box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.dl-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }
.dl-os-icon { color: var(--text); margin-bottom: 14px; }
.dl-card h3 { margin-bottom: 4px; }
.dl-arch { color: var(--text-mute); font-size: .85rem; margin-bottom: 18px; }
.dl-card .btn { width: 100%; }
.dl-soon {
  width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; font-weight: 600; font-size: .95rem;
  background: var(--surface-2); color: var(--text-mute); border: 1px dashed var(--border);
  cursor: default;
}
.dl-soon::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); opacity: .6; }
.dl-meta { margin-top: 12px; font-size: .78rem; color: var(--text-mute); min-height: 1.2em; }
.dl-sha {
  margin-top: 14px; width: 100%; border-top: 1px solid var(--border); padding-top: 14px;
  display: flex; flex-direction: column; gap: 6px; text-align: left;
}
.dl-sha-head { display: flex; align-items: center; justify-content: space-between; }
.dl-sha-label { font-size: .72rem; font-weight: 700; letter-spacing: .08em; color: var(--text-mute); text-transform: uppercase; }
.dl-copy {
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-soft);
  border-radius: 7px; padding: 3px 9px; font-size: .72rem; font-weight: 600; cursor: pointer;
  transition: color .2s, border-color .2s, background-color .2s;
}
.dl-copy:hover { color: var(--brand); border-color: var(--brand); }
.dl-copy.copied { color: #fff; background: var(--brand); border-color: var(--brand); }
.dl-sha code {
  display: block; font-family: var(--mono); font-size: .72rem; line-height: 1.5;
  color: var(--text-soft); word-break: break-all; background: var(--surface-2);
  border-radius: 7px; padding: 8px 10px;
}

/* ---------- CTA / code ---------- */
.cta-panel {
  text-align: center; max-width: 720px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  padding: clamp(32px, 6vw, 56px); box-shadow: var(--shadow);
}
.cta-panel h2 { margin-bottom: 12px; }
.cta-panel > p { color: var(--text-soft); margin-bottom: 26px; }
.code-block {
  text-align: left; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px 22px; overflow-x: auto; margin: 0 0 18px;
  font-family: var(--mono); font-size: .88rem; line-height: 1.7; color: var(--text);
}
.code-block code { color: inherit; }
.req { font-size: .85rem; color: var(--text-mute); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0; background: var(--bg-alt); }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.footer-tag { color: var(--text-soft); max-width: 480px; }
.footer-copy { color: var(--text-mute); font-size: .85rem; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .interop-grid, .tech-grid, .downloads-grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .split-visual { order: -1; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .features-grid { grid-template-columns: 1fr; }
  .interop-grid, .tech-grid, .downloads-grid { grid-template-columns: 1fr; }
  .hero-cta .btn { width: 100%; }
}
