/* thecodediff.com - design v2.
   Dark, cinematic, gradient-accented: the Linear/Raycast school, tuned to
   CodeDiff's icon palette (teal to violet). No frameworks, no trackers. */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --bg: #0a0b0f;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-2: #101216;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #e8eaed;
  --muted: #9aa1a9;
  --subtle: #6b7280;
  --teal: #2dd4bf;
  --violet: #8b5cf6;
  --grad: linear-gradient(120deg, #2dd4bf, #8b5cf6);
  --success: #4ec9b0;
  --warning: #dcdcaa;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(700px 400px at 18% -5%, rgba(45, 212, 191, 0.08), transparent 70%),
    radial-gradient(900px 500px at 85% -10%, rgba(139, 92, 246, 0.10), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: #5eead4; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---- header ---- */
header {
  position: sticky; top: 0; z-index: 10;
  /* faint diagonal etch lines over the glass bar */
  background:
    repeating-linear-gradient(55deg, rgba(255, 255, 255, 0.028) 0 1.2px, transparent 1.2px 3.4px),
    rgba(10, 11, 15, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 26px; height: 60px; }
.nav .brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); font-weight: 700; font-size: 17px;
  letter-spacing: -0.02em; margin-right: auto;
}
.nav .brand img {
  width: 28px; height: 28px;
  /* full color, etched: the hatch strokes without the grayscale */
  -webkit-mask-image: repeating-linear-gradient(55deg, rgba(0, 0, 0, 1) 0 1px, transparent 1px 2.6px);
  mask-image: repeating-linear-gradient(55deg, rgba(0, 0, 0, 1) 0 1px, transparent 1px 2.6px);
}
/* the wordmark two-tone: usable anywhere "CodeDiff" appears as text */
.brand-diff { color: var(--teal); }
@supports (-webkit-background-clip: text) {
  .brand-diff {
    background: var(--grad);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}
.nav a.navlink { color: var(--muted); font-size: 14px; font-weight: 500; transition: color 120ms; }
.nav a.navlink:hover { color: var(--text); }

/* ---- engraved dragon watermark ----
   Laser-etched-stone look (see the granite reference): the logo rendered as
   a soft, pale-gray dusting on the dark surface. Fixed to the viewport,
   dead center, never moves on scroll. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: url("../assets/icon.png") center calc(50% + 90px) / 1040px no-repeat;
  filter: grayscale(1) brightness(2.1) contrast(0.82) blur(0.4px);
  opacity: 0.09;
  pointer-events: none;
  /* two mask layers, intersected: fine diagonal hatch strokes (the
     engraving lines) inside a radial vignette */
  -webkit-mask-image:
    repeating-linear-gradient(55deg, rgba(0, 0, 0, 1) 0 1.2px, transparent 1.2px 3.4px),
    radial-gradient(closest-side at 50% calc(50% + 90px), rgba(0, 0, 0, 1) 55%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    repeating-linear-gradient(55deg, rgba(0, 0, 0, 1) 0 1.2px, transparent 1.2px 3.4px),
    radial-gradient(closest-side at 50% calc(50% + 90px), rgba(0, 0, 0, 1) 55%, transparent 100%);
  mask-composite: intersect;
}

/* ---- hero ---- */
.hero { text-align: center; padding: 108px 0 40px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface);
  color: var(--muted); font-size: 13px; font-weight: 500;
  padding: 5px 14px; margin-bottom: 28px;
}
.badge .pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal); box-shadow: 0 0 10px var(--teal);
}
.badge a { color: var(--text); }
.hero h1 {
  font-size: clamp(40px, 6.4vw, 66px);
  line-height: 1.04; font-weight: 700; letter-spacing: -0.035em;
  max-width: 820px; margin: 0 auto 22px;
}
.hero h1 .accent {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero p.sub {
  color: var(--muted); font-size: 18.5px; line-height: 1.55;
  max-width: 560px; margin: 0 auto 34px;
}
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 10px;
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 120ms, box-shadow 120ms, background 120ms, border-color 120ms;
}
.btn-primary {
  background: #f2f3f5; color: #0a0b0f;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 8px 30px rgba(139, 92, 246, 0.18);
}
.btn-primary:hover { background: #fff; color: #0a0b0f; transform: translateY(-1px); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.28); color: var(--text); }
.btn-download {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 28px; text-align: left; line-height: 1.25;
}
.btn-download .dl-sub {
  display: block; font-size: 11.5px; font-weight: 500;
  color: rgba(10, 11, 15, 0.55);
}
.price-line { margin-top: 20px; color: var(--subtle); font-size: 14px; }
.price-line strong { color: var(--muted); font-weight: 600; }

/* ---- hero screenshot ---- */
.hero-shot { position: relative; padding: 26px 0 40px; }
.hero-shot::before {
  content: ""; position: absolute; inset: 10% 18%;
  background: radial-gradient(closest-side, rgba(139, 92, 246, 0.22), rgba(45, 212, 191, 0.10), transparent);
  filter: blur(60px); z-index: 0;
}
.hero-shot .shot { position: relative; z-index: 1; }

/* screenshot frame */
.shot {
  background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box,
    linear-gradient(140deg, rgba(45, 212, 191, 0.35), rgba(255, 255, 255, 0.08) 40%, rgba(139, 92, 246, 0.35)) border-box;
  border: 1px solid transparent; border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}
.shot .bar {
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--line);
  padding: 9px 14px; display: flex; align-items: center; gap: 6px;
}
.shot .dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); }
.shot .bar span { color: var(--subtle); font-size: 12px; margin-left: 8px; font-family: var(--mono); }
.shot .body {
  aspect-ratio: 16 / 9.4; display: flex; align-items: center; justify-content: center;
  color: var(--subtle); font-size: 13px; font-family: var(--mono);
  background:
    radial-gradient(500px 260px at 50% 0%, rgba(139, 92, 246, 0.06), transparent),
    var(--surface-2);
}
.shot img { display: block; width: 100%; height: auto; cursor: zoom-in; }

/* ---- lightbox ---- */
.lightbox {
  position: fixed; inset: 0; z-index: 50; display: none;
  background: rgba(5, 6, 9, 0.93);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: auto;
}
.lightbox.open { display: flex; align-items: center; justify-content: center; padding: 4vh 4vw; }
.lightbox img {
  max-width: 92vw; max-height: 92vh; width: auto; height: auto; margin: auto;
  cursor: zoom-in; border-radius: 10px;
  border: 1px solid var(--line-strong);
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.7);
}
.lightbox.zoomed { align-items: flex-start; justify-content: flex-start; padding: 0; }
.lightbox.zoomed img { max-width: none; max-height: none; cursor: zoom-out; border-radius: 0; border: none; }
.lightbox-close {
  position: fixed; top: 14px; right: 18px; z-index: 51;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line-strong);
  color: var(--text); font-size: 22px; line-height: 1; cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.16); }
.shot-label {
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--muted); margin: 0 0 12px 2px;
}

/* two-up screenshot row */
.shot-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.shot-row h3 {
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--muted); margin: 0 0 12px 2px;
}

/* ---- sections ---- */
section { padding: 88px 0; }
h2.section-title {
  font-size: 32px; font-weight: 700; letter-spacing: -0.03em;
  text-align: center; margin-bottom: 44px;
}

/* bento feature grid */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.grid .cell {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px 20px; font-size: 14.5px;
  transition: transform 140ms, border-color 140ms, background 140ms;
}
.grid .cell:hover {
  transform: translateY(-2px);
  border-color: rgba(45, 212, 191, 0.35);
  background: rgba(255, 255, 255, 0.05);
}
.grid .cell strong { font-weight: 600; letter-spacing: -0.01em; }
.grid .cell em {
  font-style: normal; font-size: 11px; font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  margin-left: 6px; text-transform: uppercase; letter-spacing: 0.06em;
}

/* pricing */
.pricing-box {
  max-width: 520px; margin: 0 auto; text-align: center;
  background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box,
    linear-gradient(140deg, rgba(45, 212, 191, 0.45), rgba(255, 255, 255, 0.06) 45%, rgba(139, 92, 246, 0.45)) border-box;
  border: 1px solid transparent; border-radius: 18px;
  padding: 44px 40px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}
.pricing-box .price {
  font-size: 54px; font-weight: 700; letter-spacing: -0.04em;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.pricing-box .price small {
  font-size: 16px; color: var(--muted); font-weight: 500;
  -webkit-text-fill-color: var(--muted);
}
.pricing-box ul { list-style: none; margin: 26px 0; font-size: 15px; color: var(--muted); }
.pricing-box li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.pricing-box li:last-child { border-bottom: none; }
.pricing-box li::before { content: "✓  "; color: var(--teal); }
.enterprise-line { margin-top: 20px; color: var(--subtle); font-size: 13px; }

/* ---- footer ---- */
footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 48px; font-size: 13.5px; color: var(--subtle);
}
.footer-grid { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-grid a { color: var(--muted); margin-right: 18px; font-weight: 500; }
.footer-grid a:hover { color: var(--text); }

/* ---- release notes page ---- */
.notes-page { max-width: 760px; margin: 0 auto; padding: 72px 24px; }
.notes-page h1 { font-size: 38px; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 8px; }
.notes-page .page-sub { color: var(--muted); margin-bottom: 48px; }
.release { border-top: 1px solid var(--line); padding: 40px 0; }
.release h2 { font-size: 24px; font-weight: 650; letter-spacing: -0.02em; }
.release .date { color: var(--subtle); font-size: 13.5px; margin-bottom: 18px; display: block; }
.release h3 {
  font-size: 12px; text-transform: uppercase; letter-spacing: 1.2px;
  font-weight: 700; margin: 22px 0 8px;
}
.release h3.cat-new { color: var(--teal); }
.release h3.cat-improved { color: var(--violet); }
.release h3.cat-fixed { color: var(--warning); }
.release ul { margin-left: 20px; color: var(--muted); font-size: 15px; }
.release li { margin-bottom: 7px; }

/* language pills (About) */
.langs {
  list-style: none; display: flex; flex-wrap: wrap; gap: 10px;
  margin: 4px 0 12px !important; padding: 0;
}
.langs li {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 14px 6px 8px;
  font-size: 14px; color: var(--text) !important; margin: 0 !important;
}
.langs img {
  width: 20px; height: auto; border-radius: 3px; display: block;
}

/* generic subpage prose */
.prose { max-width: 720px; margin: 0 auto; padding: 72px 24px; }
.prose h1 { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 24px; }
.prose h2 { font-size: 20px; font-weight: 650; letter-spacing: -0.02em; margin: 32px 0 10px; }
.prose p, .prose li { color: var(--muted); font-size: 15.5px; margin-bottom: 12px; }
.prose ul { margin-left: 20px; }

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .shot-row { grid-template-columns: 1fr; }
  .hero { padding-top: 72px; }
  .nav { gap: 15px; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .nav { flex-wrap: wrap; height: auto; padding: 10px 0; row-gap: 6px; }
  .nav a.navlink { font-size: 13px; }
  body::before { background-size: 640px; opacity: 0.07; }
  .pricing-box { padding: 32px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  html { scroll-behavior: auto; }
}
