/* iamNotepad landing page. Colors follow the app's "iam Dark" theme. */

:root {
  --bg: #111219;
  --bg-elev: #16171f;
  --surface: #16171f;
  --current-line: #1c1d27;
  --gutter-text: #50546a;
  --gutter-active: #c9cbe0;
  --comment: #8a8fa8;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.13);
  --text: #e4e5ee;
  --text-2: #a9adc4;
  --text-3: #6f748d;
  --accent: #9a8cff;
  --accent-strong: #7b6cff;
  --violet: #b79bff;
  --teal: #5ed4c8;
  --green: #9ce38b;
  --orange: #ffb86b;
  --blue: #7ab8ff;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --container: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

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

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--display);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}

.section-lead {
  text-wrap: pretty;
}

p {
  margin: 0;
}

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

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #0b0c12;
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Buttons ------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(180deg, #8f80ff, #6a59f5);
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(123, 108, 255, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 12px 30px -8px rgba(123, 108, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.btn-ghost:hover {
  border-color: rgba(154, 140, 255, 0.5);
  background: rgba(154, 140, 255, 0.08);
}

.btn-small {
  height: 36px;
  padding: 0 16px;
  font-size: 14px;
  border-radius: 10px;
}

.store-badge {
  display: inline-block;
  border-radius: 10px;
  transition: transform 0.25s var(--ease), filter 0.25s;
}

.store-badge img {
  height: 52px;
  width: auto;
}

.store-badge:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 10px 24px rgba(123, 108, 255, 0.45));
}

.text-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Navigation --------------------------------------------------------------- */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}

.nav.scrolled,
.nav.open {
  background: rgba(11, 12, 18, 0.78);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom-color: var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: var(--container);
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
}

.nav-links {
  display: flex;
  gap: 4px;
  margin-right: auto;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 15px;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.lang-switch {
  display: inline-grid;
  place-items: center;
  height: 36px;
  min-width: 44px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}

.lang-switch:hover {
  color: var(--text);
  border-color: rgba(154, 140, 255, 0.5);
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  position: relative;
}

.menu-toggle span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}

.menu-toggle span:first-child {
  top: 13px;
}

.menu-toggle span:last-child {
  top: 20px;
}

.nav.open .menu-toggle span:first-child {
  top: 16px;
  transform: rotate(45deg);
}

.nav.open .menu-toggle span:last-child {
  top: 16px;
  transform: rotate(-45deg);
}

/* Hero: the page opens as a document in iamNotepad -------------------------- */

.hero {
  padding: 132px 0 24px;
  /* the current-line band runs to the edge of the window, not beyond */
  overflow-x: clip;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

/* Every .doc-line gets a line number from a CSS counter, like the app's gutter.
   The numbers are not part of the text, so they don't end up in the heading. */
.doc {
  --gutter: 3.25rem;
  counter-reset: line;
  padding-left: var(--gutter);
}

.doc p,
.doc h1 {
  margin: 0;
}

.doc-line {
  position: relative;
  display: block;
}

.doc-line::before {
  counter-increment: line;
  content: counter(line);
  position: absolute;
  top: 0;
  bottom: 0;
  right: calc(100% + 1.25rem);
  display: flex;
  align-items: center;
  color: var(--gutter-text);
  font: 400 0.95rem/1 var(--mono);
  letter-spacing: 0;
}

.doc-line.current::before {
  color: var(--gutter-active);
}

.doc-line.current::after {
  /* current-line highlight, reaching into the gutter like in the editor */
  content: "";
  position: absolute;
  inset: 0 -100vw 0 calc(-1 * var(--gutter) - 0.75rem);
  z-index: -1;
  border-radius: 6px;
  background: var(--current-line);
}

.doc-blank {
  height: 1.7rem;
}

.doc-title {
  font-family: var(--mono);
  font-size: clamp(1.9rem, 4.1vw, 3.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.035em;
  text-wrap: nowrap;
}

.doc-title .doc-line {
  width: max-content;
  max-width: 100%;
}

.caret {
  display: inline-block;
  width: 0.09em;
  height: 0.92em;
  margin-left: 0.08em;
  vertical-align: -0.1em;
  border-radius: 2px;
  background: var(--accent);
  animation: caret 1.05s steps(1) infinite;
}

.doc .caret {
  /* takes no room, so a line doesn't reflow while the caret moves through it */
  margin-right: -0.17em;
}

/* Load moment: main.js writes the lines one after another (see writeDoc). Before the script
   runs the lines are hidden; if it never runs, they show up after three seconds anyway. */
@media (prefers-reduced-motion: no-preference) {
  .js .doc:not(.typing, .typed) .doc-line {
    visibility: hidden;
    animation: doc-show 0s 3s forwards;
  }
}

@keyframes doc-show {
  to {
    visibility: visible;
  }
}

.doc .pending {
  visibility: hidden;
}

.doc .ghost {
  opacity: 0;
}

.doc.typing .caret {
  animation: none;
}

.doc-comment {
  color: var(--comment);
  font-family: var(--mono);
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  font-style: italic;
  line-height: 1.8;
}

.doc-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.doc-cta .btn {
  height: 52px;
}

.doc-note {
  margin-top: 6px;
  color: var(--text-3);
  font-size: 14px;
  line-height: 1.7;
}

.hero-visual .window {
  box-shadow: 0 50px 120px -40px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.07);
}

/* Window chrome (shared by all editor mock-ups) ---------------------------- */

.window {
  --t-bg: #16171f;
  --t-fg: #e4e5ee;
  --t-chrome: #101117;
  --t-border: rgba(255, 255, 255, 0.06);
  --t-gutter: #50546a;
  --t-gutter-active: #c9cbe0;
  --t-line: #1f2029;
  --t-accent: #9a8cff;
  --t-kw: #b79bff;
  --t-ty: #5ed4c8;
  --t-str: #9ce38b;
  --t-num: #ffb86b;
  --t-com: #6a6f88;
  --t-fn: #7ab8ff;
  --t-cst: #ffb86b;
  --t-op: #9ea2ba;
  --t-prop: #7ab8ff;
  --t-tag: #5ed4c8;
  position: relative;
  border-radius: var(--radius);
  background: var(--t-bg);
  color: var(--t-fg);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-align: left;
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
}

.win-titlebar {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 42px;
  padding: 0 14px;
  background: var(--t-chrome);
  transition: background 0.5s var(--ease);
}

.lights {
  display: flex;
  gap: 8px;
}

.lights i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f57;
}

.lights i:nth-child(2) {
  background: #febc2e;
}

.lights i:nth-child(3) {
  background: #28c840;
}

.win-title {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  color: var(--t-fg);
}

.win-tools {
  display: flex;
  gap: 2px;
  margin-left: auto;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.win-tools svg,
.tab svg,
.status-msg svg,
.feature-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.win-tools svg {
  width: 26px;
  height: 22px;
  padding: 3px 5px;
  color: var(--t-gutter-active);
  opacity: 0.8;
}

.win-tabs {
  display: flex;
  height: 34px;
  background: var(--t-chrome);
  border-bottom: 1px solid var(--t-border);
  transition: background 0.5s var(--ease);
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border-right: 1px solid var(--t-border);
  font-family: var(--font);
  font-size: 12.5px;
  color: var(--t-fg);
  opacity: 0.6;
  white-space: nowrap;
}

.tab svg {
  width: 13px;
  height: 13px;
}

.tab.active {
  opacity: 1;
  font-weight: 600;
  background: var(--t-bg);
  box-shadow: inset 0 2px 0 var(--t-accent);
  transition: background 0.5s var(--ease);
}

.tab.active svg {
  color: var(--t-accent);
}

.dirty {
  width: 7px;
  height: 7px;
  margin-left: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
  transition: opacity 0.3s;
}

.dirty.show {
  opacity: 0.7;
}

.win-body {
  --code-size: 13.5px;
  display: flex;
  min-height: 0;
}

.gutter {
  flex: none;
  min-width: 48px;
  padding: 14px 12px 14px 8px;
  color: var(--t-gutter);
  font-family: var(--mono);
  font-size: var(--code-size, 13.5px);
  line-height: 1.7;
  text-align: right;
  user-select: none;
}

.code {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 14px 18px 14px 6px;
  font-family: var(--mono);
  font-size: var(--code-size, 13.5px);
  line-height: 1.7;
  white-space: pre;
  overflow: hidden;
  color: var(--t-fg);
}

.code code {
  font-family: inherit;
}

.win-status {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 30px;
  padding: 0 14px;
  background: var(--t-chrome);
  border-top: 1px solid var(--t-border);
  color: var(--t-gutter);
  font-family: var(--font);
  font-size: 11.5px;
  white-space: nowrap;
  transition: background 0.5s var(--ease);
}

.spacer {
  flex: 1;
}

/* Tokens: JSON (k s n c), code (kw ty …), markup (tag) */
.k,
.prop {
  color: var(--t-prop);
}

.s,
.str {
  color: var(--t-str);
}

.n,
.num {
  color: var(--t-num);
}

.c,
.cst {
  color: var(--t-cst);
}

.kw {
  color: var(--t-kw);
}

.ty {
  color: var(--t-ty);
}

.com {
  color: var(--t-com);
  font-style: italic;
}

.fn {
  color: var(--t-fn);
}

.op {
  color: var(--t-op);
}

.tag {
  color: var(--t-tag);
}

/* Editor: autoplay demo first, then a real editable JSON buffer (main.js) */
.code-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  height: calc(18 * 1.7 * var(--code-size, 13.5px) + 28px);
}

.editor .code {
  height: 100%;
}

.editor:not(.is-editing) .code-wrap {
  cursor: text;
}

.editor .gutter {
  overflow: hidden;
}

.code-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 14px 18px 14px 6px;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  color: transparent;
  caret-color: var(--t-accent);
  font-family: var(--mono);
  font-size: var(--code-size, 13.5px);
  line-height: 1.7;
  white-space: pre;
  overflow: auto;
  tab-size: 2;
}

.code-input::selection {
  background: rgba(154, 140, 255, 0.32);
  color: transparent;
}

.tool {
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: inherit;
  cursor: pointer;
}

.tool:hover {
  background: rgba(255, 255, 255, 0.08);
}

.status-hint {
  color: var(--t-gutter-active);
  opacity: 0.75;
}

.editor .status-msg {
  min-width: 0;
}

.editor [data-msg-text] {
  overflow: hidden;
  text-overflow: ellipsis;
}

.editor.is-error .status-msg {
  color: #ff7a90;
}

.editor.is-error .status-hint,
.editor.is-error [data-count] {
  display: none;
}

.editor.is-error .status-msg svg {
  display: none;
}

.editor.is-minified .code {
  white-space: pre-wrap;
  word-break: break-all;
}

.editor .caret {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  margin-left: 1px;
  vertical-align: -0.2em;
  background: var(--t-accent);
  animation: caret 1s steps(1) infinite;
}

@keyframes caret {
  50% {
    opacity: 0;
  }
}

.editor.is-formatting .ln {
  animation: line-in 0.45s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 32ms);
}

@keyframes line-in {
  from {
    opacity: 0;
    filter: blur(3px);
    transform: translateX(-8px);
  }
}

.ln {
  display: inline-block;
}

.status-msg {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--green);
  font-weight: 600;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s, transform 0.3s var(--ease);
}

.status-msg svg {
  width: 13px;
  height: 13px;
  stroke-width: 2.6;
}

.status-msg.show {
  opacity: 1;
  transform: none;
}

.keys {
  position: absolute;
  left: 50%;
  bottom: 54px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(16, 17, 23, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  font-family: var(--font);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transform: translate(-50%, 16px) scale(0.92);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  pointer-events: none;
}

.keys.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.keys kbd {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 8px;
  border-radius: 9px;
  background: linear-gradient(180deg, #2a2c3a, #1d1e28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 3px 0 #0b0c12;
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  transition: transform 0.12s, box-shadow 0.12s;
}

.keys.pressed kbd {
  transform: translateY(2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 1px 0 #0b0c12;
  color: var(--accent);
}

.keys span {
  margin-left: 6px;
  white-space: nowrap;
}

/* Sections ----------------------------------------------------------------- */

.section {
  padding: 120px 0;
  position: relative;
}

.section-head {
  max-width: 640px;
}

.section-head.center {
  margin: 0 auto;
  text-align: center;
}

.section h2 {
  font-family: var(--mono);
  font-size: clamp(1.8rem, 3.8vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.section-lead {
  margin-top: 18px;
  color: var(--text-2);
  font-size: 1.1rem;
}

.fine {
  margin-top: 18px;
  color: var(--text-3);
  font-size: 14px;
}

/* Features */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px 48px;
  margin-top: 64px;
}

.feature-icon {
  display: block;
  margin-bottom: 16px;
  color: var(--violet);
}

.feature:nth-child(5n + 2) .feature-icon {
  color: var(--green);
}

.feature:nth-child(5n + 3) .feature-icon {
  color: var(--orange);
}

.feature:nth-child(5n + 4) .feature-icon {
  color: var(--teal);
}

.feature:nth-child(5n + 5) .feature-icon {
  color: var(--blue);
}

.feature-icon svg {
  width: 28px;
  height: 28px;
}

.feature h3 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.feature p {
  margin-top: 10px;
  color: var(--text-2);
  font-size: 16px;
}

/* Speed */
.speed {
  background: linear-gradient(180deg, transparent, rgba(123, 108, 255, 0.05) 40%, transparent);
}

.speed-grid,
.themes-grid,
.np-grid,
.privacy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.metrics {
  display: grid;
  gap: 14px;
}

.metric {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
}

.metric strong {
  flex: none;
  min-width: 150px;
  font-family: var(--display);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--violet);
}

.metric small {
  margin-left: 6px;
  font-size: 1.1rem;
  letter-spacing: 0;
}

.metric > span {
  color: var(--text-2);
}

/* Themes */
.theme-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.theme-chips button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-2);
  font: 600 14px var(--font);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s var(--ease);
}

.theme-chips button:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.theme-chips button[aria-pressed="true"] {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(154, 140, 255, 0.12);
}

.theme-chips i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--chip-bg, #16171f);
  box-shadow: inset 0 0 0 4px var(--chip-bg, #16171f), inset 0 0 0 9px var(--chip-accent, #9a8cff);
  outline: 1px solid rgba(255, 255, 255, 0.15);
}

.theme-preview .win-body {
  --code-size: 14px;
}

/* Languages */
.marquee {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 980px;
  margin: 48px auto 0;
  padding: 0 24px;
}

.marquee-row {
  display: contents;
}

.marquee-row li {
  padding: 8px 16px;
  border-radius: 10px;
  background: var(--bg-elev);
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 15px;
  list-style: none;
  white-space: nowrap;
}

.marquee-row li:nth-child(4n + 1) {
  color: var(--violet);
}

.marquee-row li:nth-child(4n + 2) {
  color: var(--teal);
}

.marquee-row li:nth-child(4n + 3) {
  color: var(--blue);
}

.marquee-row li:nth-child(4n + 4) {
  color: var(--green);
}

/* Screenshots */
.shots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 56px;
}

.shot {
  margin: 0;
}

.shot:first-child {
  grid-column: 1 / -1;
}

.shot-zoom {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: none;
  cursor: zoom-in;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.45s var(--ease), box-shadow 0.45s;
}

.shot-zoom img {
  width: 100%;
  height: auto;
}

.shot-zoom:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: 0 50px 110px -30px rgba(91, 75, 245, 0.55), 0 0 0 1px rgba(154, 140, 255, 0.35);
}

.shot figcaption {
  margin-top: 14px;
  color: var(--text-3);
  font-size: 14px;
  text-align: center;
}

.lightbox {
  max-width: 94vw;
  max-height: 92vh;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  overflow: visible;
}

.lightbox::backdrop {
  background: rgba(5, 6, 10, 0.8);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.lightbox[open] {
  animation: zoom-in 0.35s var(--ease);
}

@keyframes zoom-in {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
}

.lightbox-frame img {
  max-width: 94vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.lightbox-close {
  position: absolute;
  top: -18px;
  right: -18px;
  z-index: 1;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #2a2c3a;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

/* Notepad++ checklist */
.checklist {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  padding: 16px 18px 16px 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  font-weight: 500;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  border-radius: 6px;
  background: linear-gradient(135deg, #8f80ff, #5ed4c8);
}

.checklist li::after {
  content: "";
  position: absolute;
  left: 25px;
  top: 50%;
  width: 6px;
  height: 11px;
  margin-top: -7px;
  border: solid #0b0c12;
  border-width: 0 2.4px 2.4px 0;
  transform: rotate(45deg);
}

/* Privacy */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0;
  padding: 0;
  list-style: none;
}

.pills li {
  padding: 8px 14px;
  border: 1px solid rgba(156, 227, 139, 0.3);
  border-radius: 999px;
  background: rgba(156, 227, 139, 0.08);
  color: var(--green);
  font-size: 14px;
  font-weight: 600;
}

.pills li::before {
  content: "✓ ";
}

.entitlements .code {
  padding: 18px 20px;
  font-size: 13.5px;
  white-space: pre;
  overflow-x: auto;
}

/* FAQ */
.faq-wrap {
  max-width: 860px;
}

.faq {
  display: grid;
  gap: 10px;
  margin-top: 48px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  transition: border-color 0.25s;
}

.faq-item[open] {
  border-color: rgba(154, 140, 255, 0.35);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(154, 140, 255, 0.12);
  color: var(--accent);
  font-size: 20px;
  font-weight: 500;
  transition: transform 0.3s var(--ease);
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-a {
  padding: 0 22px 20px;
  color: var(--text-2);
}

.faq-a a {
  color: var(--accent);
}

/* Final call to action */
.cta-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 860px;
  padding: 64px 32px;
  border-radius: 28px;
  text-align: center;
  background: radial-gradient(600px circle at 50% 0%, rgba(123, 108, 255, 0.25), transparent 60%), var(--bg-elev);
  box-shadow: inset 0 0 0 1px rgba(154, 140, 255, 0.25), 0 40px 120px -40px rgba(91, 75, 245, 0.5);
}

.cta-card > img {
  width: 96px;
  height: 96px;
  margin-bottom: 24px;
  filter: drop-shadow(0 14px 30px rgba(91, 75, 245, 0.5));
}

.cta-card h2 {
  max-width: 600px;
}

.cta-card > p {
  margin: 16px 0 30px;
  color: var(--text-2);
  font-size: 1.1rem;
}

.cta-note {
  margin-top: 16px;
  color: var(--text-3);
  font-size: 14px;
}

/* Footer */
.footer {
  margin-top: 40px;
  padding: 64px 0 36px;
  border-top: 1px solid var(--line);
  background: #090a0f;
  color: var(--text-2);
  font-size: 15px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

.footer-brand p {
  max-width: 340px;
  margin-top: 14px;
}

.footer nav {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer h2 {
  margin-bottom: 4px;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.footer nav a {
  text-decoration: none;
}

.footer a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: 14px;
}

/* Legal pages and 404 ------------------------------------------------------ */

.legal {
  max-width: 780px;
  padding-top: 130px;
  padding-bottom: 80px;
}

.legal .back {
  display: inline-block;
  margin-bottom: 28px;
  font-size: 15px;
}

.legal h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
}

.legal .fine {
  margin-top: 10px;
}

.legal-body {
  margin-top: 40px;
  color: var(--text-2);
}

.legal-body h2 {
  margin: 36px 0 10px;
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.legal-body p + p {
  margin-top: 12px;
}

.legal-body a {
  color: var(--accent);
}

.legal-lead {
  padding: 18px 22px;
  border: 1px solid rgba(156, 227, 139, 0.3);
  border-radius: var(--radius);
  background: rgba(156, 227, 139, 0.07);
  color: var(--text);
}

.not-found-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 100vh;
  text-align: center;
  color: var(--text-2);
}

.not-found-box img {
  filter: drop-shadow(0 14px 30px rgba(91, 75, 245, 0.5));
}

.not-found-box h1 {
  color: var(--text);
  font-size: 2.2rem;
}

.code-404 {
  font-family: var(--mono);
  font-size: 1.4rem;
}

.code-404 .kw {
  color: var(--violet);
}

.code-404 .num {
  color: var(--orange);
}

/* Responsive --------------------------------------------------------------- */

@media (max-width: 980px) {
  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 10px 16px 18px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8);
  }

  .nav.open .nav-links {
    display: flex;
  }

  .nav-links a {
    padding: 12px;
    font-size: 17px;
  }

  .menu-toggle {
    display: block;
  }

  .speed-grid,
  .themes-grid,
  .np-grid,
  .privacy-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .shots {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .container,
  .nav-inner {
    padding: 0 16px;
  }

  .nav-inner {
    gap: 12px;
  }

  .nav-actions .btn {
    display: none;
  }

  .hero {
    padding: 104px 0 64px;
  }

  .doc {
    --gutter: 2.4rem;
  }

  .doc-line::before {
    right: calc(100% + 0.85rem);
    font-size: 0.8rem;
  }

  .doc-comment {
    font-size: 0.8rem;
  }

  /* 16px keeps iOS from zooming into the text field while typing */
  .editor.is-editing .win-body {
    --code-size: 16px;
  }

  .section {
    padding: 84px 0;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .metric {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .win-tabs .tab:nth-child(3) {
    display: none;
  }

  .gutter {
    min-width: 34px;
  }

  .win-body,
  .theme-preview .win-body {
    --code-size: 10.5px;
  }

  .entitlements .code {
    font-size: 11px;
  }

  .keys {
    bottom: 44px;
    padding: 8px 10px;
  }

  .keys kbd {
    min-width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .keys span {
    display: none;
  }

  .win-status span:nth-last-child(-n + 2) {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
