/* ==========================================================================
   JotLine — marketing site
   Dark, calm, glassmorphism. System fonts only, no external dependencies.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg: #0c0d10;
  --bg-soft: #12141a;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef0f4;
  --text-dim: #a4a9b4;
  --text-faint: #6d7280;
  --green: #7fd79b;
  --green-soft: rgba(127, 215, 155, 0.12);
  --blue: #8ab0ff;
  --blue-soft: rgba(138, 176, 255, 0.12);
  --amber: #f0bd6e;
  --amber-soft: rgba(240, 189, 110, 0.12);
  --red: #e58a8a;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --maxw: 1140px;
  --shadow-card: 0 24px 60px -24px rgba(0, 0, 0, 0.65), 0 2px 10px rgba(0, 0, 0, 0.35);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Ambient background glows */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(55rem 38rem at 12% -8%, rgba(127, 215, 155, 0.075), transparent 62%),
    radial-gradient(48rem 34rem at 92% 6%, rgba(138, 176, 255, 0.065), transparent 62%),
    radial-gradient(52rem 42rem at 50% 112%, rgba(240, 189, 110, 0.05), transparent 62%);
  pointer-events: none;
}

/* Faint grain for depth (inline data URI, no network) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.5;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
code { font-family: var(--mono); font-size: 0.92em; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.skip-link:focus { left: 0; color: var(--text); }

::selection { background: rgba(138, 176, 255, 0.28); color: #fff; }

/* ---------- Shared pieces ---------- */
.menu-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  background: rgba(10, 11, 14, 0.85);
  border: 1px solid var(--border-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 6px 18px -8px rgba(0, 0, 0, 0.7);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.menu-chip img { width: 20px; height: 20px; object-fit: contain; }

.hotkey { display: inline-flex; align-items: center; gap: 6px; }
.hotkey.big { gap: 8px; }

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.9em;
  height: 2em;
  padding: 0 0.55em;
  border-radius: 7px;
  background: linear-gradient(180deg, #262a33, #1a1d24);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom-width: 2px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: #d9dde5;
}

.eyebrow {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 12px;
}

.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.section-sub { margin-top: 14px; color: var(--text-dim); font-size: 17px; }

.hl-green { color: var(--green); font-weight: 600; }
.hl-blue { color: var(--blue); font-weight: 600; }
.hl-amber { color: var(--amber); font-weight: 600; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
  background: rgba(12, 13, 16, 0.72);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid var(--border);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0 -100vw;
  z-index: -1;
  background: rgba(12, 13, 16, 0.72);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid var(--border);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.site-nav { display: flex; gap: 22px; margin-left: 8px; }
.site-nav a { color: var(--text-dim); font-size: 14.5px; font-weight: 500; transition: color 0.2s; }
.site-nav a:hover { color: var(--text); }
.header-hotkey { margin-left: auto; }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 72px 24px 96px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(52px, 7vw, 84px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.95;
  background: linear-gradient(180deg, #ffffff, #c9cdd6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .tagline {
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.55;
  color: var(--text-dim);
  max-width: 30em;
}
.hero .tagline em { color: var(--text); font-style: normal; font-weight: 600; }
.hero-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cta-note { color: var(--text-faint); font-size: 14px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 9px; }
.hero-facts li {
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
}

/* Hero window */
.hero-window {
  position: relative;
  margin: 0;
  max-width: 400px;
  width: 100%;
  justify-self: center;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}
.hero-window::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.22), transparent 30%, transparent 70%, rgba(255, 255, 255, 0.08));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.035);
  border-bottom: 1px solid var(--border);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }
.window-title {
  margin-left: 10px;
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.window-shot { width: 100%; height: auto; }

/* ---------- Features ---------- */
.features {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 24px 96px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 44px -22px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1), border-color 0.35s, box-shadow 0.35s;
}
.card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.75);
}

/* Cursor spotlight (driven by script.js) */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.06), transparent 60%);
}
.card:hover::before { opacity: 1; }

/* Accent hairline per card */
.card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  opacity: 0.55;
  z-index: 2;
}
.accent-green::after { background: linear-gradient(90deg, transparent, var(--green), transparent); }
.accent-blue::after { background: linear-gradient(90deg, transparent, var(--blue), transparent); }
.accent-amber::after { background: linear-gradient(90deg, transparent, var(--amber), transparent); }

.shot {
  margin: 0;
  padding: 14px 14px 0;
}
.shot img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #0a0b0e;
  box-shadow: 0 14px 34px -18px rgba(0, 0, 0, 0.7);
}

/* Side-by-side theme comparison (light & dark screenshots) */
.shot-duo {
  margin: 0;
  padding: 14px 14px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.shot-duo img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #0a0b0e;
  box-shadow: 0 14px 34px -18px rgba(0, 0, 0, 0.7);
}

.card-body { padding: 18px 22px 24px; }
.card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.card p { font-size: 14.5px; color: var(--text-dim); line-height: 1.6; }
.card p em { color: var(--text); font-style: normal; }

/* ---------- Mock tiles (features without a screenshot) ---------- */
.mock {
  margin: 14px 14px 0;
  min-height: 300px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.045), transparent 60%),
    rgba(8, 9, 12, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 26px 18px;
  text-align: center;
}
.mock-icon { color: var(--green); filter: drop-shadow(0 0 18px rgba(127, 215, 155, 0.35)); }

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--border-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.chip-label {
  font-family: var(--font);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--green-soft);
  color: var(--green);
}
.mock-blue .chip-label { background: var(--blue-soft); color: var(--blue); }
.mock-path {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-faint);
  word-break: break-all;
}

.transfer { display: flex; align-items: center; gap: 14px; }
.transfer-arrows { font-size: 22px; color: var(--text-faint); }

.lang-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 280px; }
.lang-chips li {
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s;
}
.lang-chips li:hover { color: var(--green); border-color: rgba(127, 215, 155, 0.35); }

.mock-hotkey .hotkey kbd { font-size: 15px; min-width: 2.2em; height: 2.3em; }

/* ---------- How it works ---------- */
.how {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 24px 110px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  counter-reset: step;
}
.step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 34px 26px 30px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 44px -22px rgba(0, 0, 0, 0.6);
}
.step-num {
  position: absolute;
  top: 18px;
  left: 20px;
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.16);
}
.step h3 { font-size: 18px; font-weight: 700; }
.step p { font-size: 14.5px; color: var(--text-dim); max-width: 26em; }

.step-visual {
  width: 100%;
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-composer {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 300px;
  padding: 13px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 24px -12px rgba(0, 0, 0, 0.6);
}
.mini-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  background: var(--blue-soft);
  border: 1px solid rgba(138, 176, 255, 0.25);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.mini-text { font-size: 14px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-caret {
  width: 2px;
  height: 16px;
  border-radius: 1px;
  background: var(--green);
  animation: caret 1.1s steps(2, start) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.mini-saved {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(127, 215, 155, 0.1);
  border: 1px solid rgba(127, 215, 155, 0.3);
  color: var(--green);
  font-size: 14px;
  font-weight: 600;
}
.check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green);
  color: #0c0d10;
  font-size: 13px;
  font-weight: 800;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(9, 10, 13, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 44px 24px 24px;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: 32px; height: 32px; border-radius: 8px; }
.footer-brand strong { display: block; font-size: 15px; }
.footer-brand span { display: block; font-size: 12.5px; color: var(--text-faint); }
.footer-nav { display: flex; gap: 20px; }
.footer-nav a { font-size: 14px; color: var(--text-dim); transition: color 0.2s; }
.footer-nav a:hover { color: var(--text); }
.footer-chip { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.footer-note {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px 34px;
  font-size: 12.5px;
  color: var(--text-faint);
}

/* ---------- Reveal on scroll ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.6, 0.3, 1), transform 0.7s cubic-bezier(0.2, 0.6, 0.3, 1);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}
.js .reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---------- Download CTA & contact ---------- */
.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-shadow: 0 10px 28px -14px rgba(0, 0, 0, 0.6);
}
.download-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.20), rgba(255, 255, 255, 0.10));
  box-shadow: 0 14px 34px -14px rgba(0, 0, 0, 0.7);
}
.download-btn:active { transform: translateY(0); }
.download-btn .dl-icon { flex: none; }
.download-btn .dl-meta {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-dim);
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  padding-left: 9px;
}
.footer-mail {
  font-size: 13.5px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-mail:hover { color: var(--text); text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding-top: 56px; }
  .hero-copy { align-items: center; text-align: center; }
  .hero .tagline { margin: 0 auto; }
  .hero-cta, .hero-facts { justify-content: center; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
}

@media (max-width: 700px) {
  .site-header { gap: 14px; padding: 12px 18px; }
  .site-nav { gap: 14px; }
  .header-hotkey { display: none; }
  .hero { padding: 48px 18px 72px; }
  .features, .how { padding-left: 18px; padding-right: 18px; }
  .feature-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 18px; }
  .footer-chip { margin-left: 0; align-items: flex-start; }
  .mock { min-height: 240px; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: 52px; }
  .transfer { flex-direction: column; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
  .js .reveal { opacity: 1; transform: none; }
  .card:hover { transform: none; }
}

/* Anchor offset under sticky header */
section[id], footer[id] { scroll-margin-top: 84px; }
