/* Cove landing page */

:root {
  --bg: #14181b;
  --panel: #181d20;
  --panel-deep: #161a1d;
  --border: #262d33;
  --border-2: #2c3339;
  --teal: #5ec9c0;
  --teal-soft: #7ee0d5;
  --teal-bg: #1e2b2b;
  --text: #c8ccd0;
  --bright: #e8ecef;
  --heading: #f2f5f6;
  --muted: #9aa2a8;
  --dim: #8b939a;
  --faint: #5a626a;
  /* editor mock (Catppuccin-ish, matches Cove's cove-dark theme) */
  --m-bg: #1e1e2e;
  --m-border: #313244;
  --m-text: #cdd6f4;
  --m-dim: #7f838e;
  --m-faint: #6c7086;
  --m-blue: #61afef;
  --m-dir: #60afd7;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  min-height: 100vh;
  overflow-x: hidden;
}

::selection { background: rgba(94, 201, 192, 0.28); }

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

@keyframes coveBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

.container { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

/* ---- buttons / shared ---- */

.btn-primary {
  background: var(--teal);
  color: #0d1214;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 8px;
}

.btn-outline {
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 8px;
  border: 1px solid var(--border-2);
}

.logo-mark {
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--teal);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  font-weight: 800;
  font-size: 15px;
}

/* ---- nav ---- */

.nav {
  padding-top: 22px;
  padding-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo .name { font-weight: 700; font-size: 16px; letter-spacing: 0.5px; color: var(--bright); }

.nav-links { display: flex; align-items: center; gap: 26px; font-size: 13px; }
.nav-links a { color: var(--muted); }
.nav-links a.nav-github {
  color: var(--text);
  border: 1px solid var(--border-2);
  padding: 7px 14px;
  border-radius: 7px;
}

/* ---- hero ---- */

.hero { padding: 70px 28px 30px; text-align: center; }

.hero h1 {
  font-size: clamp(38px, 6.4vw, 76px);
  line-height: 1.04;
  margin: 0 0 26px;
  font-weight: 800;
  letter-spacing: -1.5px;
  color: var(--heading);
}

.hero h1 .accent { color: var(--teal); }

.hero-sub {
  max-width: 600px;
  margin: 0 auto 40px;
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.6;
  color: var(--muted);
  font-weight: 400;
}

.install-box {
  max-width: 440px;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #1a1f23;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  padding: 14px 16px;
  text-align: left;
}

.install-box .prompt { color: var(--teal); font-weight: 700; }
.install-box code { flex: 1; font-size: 14px; color: var(--bright); }

.install-box button {
  background: #20272c;
  border: 1px solid #333c42;
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  padding: 6px 11px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.install-box button.copied { background: var(--teal-bg); color: var(--teal); }

.hero-ctas { display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap; }

/* ---- editor mock ---- */

.mock-section { margin-top: 44px; }

.mock {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--m-border);
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.85);
  background: var(--m-bg);
  font-size: 12px;
  cursor: pointer;
}

.mock-tabbar {
  display: flex;
  background: #2c3244;
  border-bottom: 1px solid var(--m-border);
  overflow: hidden;
  white-space: nowrap;
}

.mock-tab {
  padding: 8px 15px;
  border-right: 1px solid var(--m-border);
  color: var(--m-dim);
  font-style: italic;
}

.mock-tab .x { color: var(--m-faint); font-style: normal; }
.mock-tab.active { background: var(--m-text); color: var(--m-bg); }
.mock-tab.active .x { color: var(--m-bg); }

/* fixed height: the buffers hold more lines than fit, so they overflow
   (and the simulated scroll has somewhere to go) */
.mock-grid { display: grid; grid-template-columns: 210px 1fr; height: 580px; }

.mock-side {
  background: var(--m-bg);
  border-right: 1px solid var(--m-border);
  display: flex;
  flex-direction: column;
  line-height: 1.85;
}

.mock-tree { flex: 1; padding: 10px 0; }
.mock-tree div { padding: 1px 14px; }
.mock-tree .head { padding-bottom: 6px; color: var(--m-text); font-weight: 700; }
.mock-tree .dir { color: var(--m-dir); }
.mock-tree .file { color: var(--m-text); font-style: italic; }
.mock-tree .active { background: var(--m-border); font-style: normal; }
.mock-tree .file.mod { color: #e5c07b; }
.mock-tree .in1 { padding-left: 28px; }
.mock-tree .in2 { padding-left: 42px; }

/* git panel (swaps in for the file tree during the walkthrough's commit
   phases, mirroring Cove's Ctrl+G panel) */
.mock-git { flex: 1; padding: 10px 0; display: none; }
.mock-git.open { display: block; }
.mock-git .g-head { padding: 1px 14px 6px; color: var(--m-text); font-weight: 700; }
.mock-git .g-sec { padding: 1px 14px; color: var(--m-dim); font-weight: 700; }
.mock-git .g-row { padding: 1px 14px; color: var(--m-text); }
.mock-git .g-row.sel { background: var(--m-border); }
.mock-git .g-row .g-m { color: #e5c07b; }
.mock-git .g-row.dim { color: var(--m-dim); }

/* segmented Files/Git control, matching Cove's sideSwitcher: active half
   is an inverted block (like the active tab), inactive half dim on the
   tab-bar tint; inset from the sidebar edges with a spacer row below */
.side-switch { display: grid; grid-template-columns: 1fr 1fr; margin: 8px 14px 14px; }
.side-switch div { text-align: center; padding: 4px 0; color: var(--m-dim); background: #2c3244; }
.side-switch .on { color: var(--m-bg); background: var(--m-text); font-weight: 700; }

.mock-editor { display: flex; flex-direction: column; position: relative; min-width: 0; min-height: 0; }

.mock-panes { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr; overflow: hidden; }

.pane { padding: 10px 0; line-height: 1.72; overflow: hidden; }
.pane.right { display: none; }
.mock-panes.split { grid-template-columns: 1fr 1fr; }
.mock-panes.split .pane.left { border-right: 1px solid var(--m-border); }
.mock-panes.split .pane.right { display: block; }

.scrollbody { will-change: transform; }

.code-line { display: flex; white-space: pre; }
.code-line .lc { color: var(--m-text); font-style: italic; }
.code-line .gsign { flex: none; width: 10px; padding-left: 4px; color: #e5c07b; }
.code-line .ln {
  color: #545862;
  width: 40px;
  text-align: right;
  padding-right: 12px;
  flex: none;
  user-select: none;
}
.code-line .lc { flex: 1; }

/* terminal panel */

.mock-term { display: none; border-top: 1px solid var(--m-border); background: var(--m-bg); }
.mock-term.open { display: block; }

.mock-term-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px 12px;
  border-bottom: 1px solid var(--m-border);
  color: var(--m-dim);
}

.mock-term-bar .label { font-style: italic; margin-right: 8px; color: var(--m-text); }
.mock-term-bar .chip { padding: 1px 8px; background: var(--m-text); color: var(--m-bg); border-radius: 4px; }
.mock-term-bar .plus { padding: 1px 7px; color: #7a8090; }

.mock-term-body { padding: 11px 12px; min-height: 118px; }
.mock-term-head { display: flex; justify-content: space-between; align-items: center; }
.mock-term-head .path { color: var(--m-blue); }
.mock-term-head .path b { font-weight: 700; }
.mock-term-head .sep { color: var(--m-faint); }
.mock-term-head .branch { color: #c586c0; font-style: italic; }
.mock-term-head .at { color: var(--m-faint); font-style: italic; }

.mock-term-line { margin-top: 3px; white-space: pre; }
.mock-term-prompt { margin-top: 6px; color: #98c379; }
.mock-term-prompt .cmd { color: var(--m-text); font-style: normal; }

.cursor-block {
  display: inline-block;
  width: 7px;
  height: 13px;
  background: var(--m-text);
  vertical-align: middle;
  animation: coveBlink 1.1s step-end infinite;
}

.cursor-bar {
  display: inline-block;
  width: 1.5px;
  height: 12px;
  background: var(--m-text);
  vertical-align: middle;
  animation: coveBlink 1.1s step-end infinite;
}

/* palette / finder overlay */

/* fuzzy picker, matching Cove's overlay component: rounded border, bold
   title + query + block cursor on one line, up to 12 rows, matched chars
   highlighted, selected row inverted */
.mock-overlay {
  display: none;
  position: absolute;
  top: 44px;
  left: 50%;
  transform: translateX(-50%);
  width: min(620px, 56%);
  background: var(--m-bg);
  border: 1px solid #5f5faf;
  border-radius: 6px;
  box-shadow: 0 26px 70px -14px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  z-index: 5;
  padding: 4px 0;
}

.mock-overlay.open { display: block; }

.mock-overlay-head { padding: 3px 14px; color: var(--m-text); }
.mock-overlay-head .title { font-weight: 700; }
.mock-overlay-head .gap { display: inline-block; width: 2ch; }

.ov-item {
  display: flex;
  justify-content: space-between;
  padding: 2px 14px;
  color: var(--m-text);
}

.ov-item .key { color: var(--m-dim); }
.ov-item.sel { background: var(--m-text); color: var(--m-bg); }
.ov-item.sel .key { color: var(--m-bg); }
.ov-item .fz { color: #ff87d7; font-weight: 700; }
.ov-item.sel .fz { color: var(--m-bg); }

/* status bar */

.mock-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 14px;
  background: var(--m-text);
  color: #4c4f69;
  font-size: 11px;
}

.mock-status .id { color: var(--m-bg); font-style: italic; }
.mock-status .plabel { color: var(--m-bg); font-weight: 700; }
.mock-status .cursor-dark {
  display: inline-block;
  width: 6px;
  height: 12px;
  background: var(--m-bg);
  vertical-align: middle;
  animation: coveBlink 1.1s step-end infinite;
}
.mock-status .row { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.mock-status .left { display: flex; gap: 14px; }
.mock-status .left .path { color: var(--m-bg); }
.mock-status .right { display: flex; gap: 16px; }
.mock-status .right .hint { color: #1e66f5; }

.mock-caption { text-align: center; color: var(--faint); font-size: 12px; margin-top: 16px; }
.mock-caption .skip { color: var(--m-dir); }

/* ---- sections ---- */

.section { margin-top: 96px; }

.section-head { text-align: center; margin-bottom: 52px; }
.section-head .kicker { color: var(--teal); font-size: 12px; letter-spacing: 2px; margin-bottom: 12px; }
.section-head h2 {
  font-size: clamp(26px, 4vw, 40px);
  margin: 0;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--heading);
}
.section-head p {
  max-width: 560px;
  margin: 14px auto 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--dim);
}

/* features */

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }

.feature-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 26px 24px;
}

.feature-card .icon {
  width: 38px;
  height: 38px;
  border: 1px solid #2c3d40;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  font-size: 16px;
  margin-bottom: 18px;
}

.feature-card h3 { font-size: 16px; margin: 0 0 9px; color: var(--bright); font-weight: 700; }
.feature-card p { font-size: 13px; line-height: 1.6; color: var(--dim); margin: 0; }
.feature-card .key {
  margin-top: 15px;
  font-size: 11.5px;
  color: var(--teal);
  background: var(--teal-bg);
  display: inline-block;
  padding: 3px 9px;
  border-radius: 5px;
}

/* languages */

.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 36px;
}

.lang-cell {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 13px 16px;
  font-size: 13px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-cell .dot { width: 7px; height: 7px; border-radius: 50%; }

.server-table { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }

.server-head, .server-row { display: grid; grid-template-columns: 1.2fr 1.4fr 1.4fr; padding: 13px 20px; }

.server-head {
  padding-top: 12px;
  padding-bottom: 12px;
  background: var(--panel-deep);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--faint);
}

.server-row { border-bottom: 1px solid #20262a; font-size: 12.5px; align-items: center; }
.server-row .lang { color: var(--bright); }
.server-row .server { color: var(--teal-soft); }
.server-row .install { color: var(--dim); }

/* install */

.install-section { max-width: 900px; }

.install-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }

.install-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 26px;
}

.install-card h3 { font-size: 15px; margin: 0 0 6px; color: var(--bright); }
.install-card p { font-size: 12.5px; color: var(--dim); margin: 0 0 18px; line-height: 1.6; }

.cmd-box {
  background: #12161850;
  border: 1px solid var(--border-2);
  border-radius: 8px;
  padding: 13px 15px;
  font-size: 13px;
  color: var(--bright);
}

.cmd-box.multi { font-size: 12.5px; line-height: 1.9; white-space: pre-wrap; }
.cmd-box .prompt { color: var(--teal); }

.install-more { text-align: center; margin-top: 36px; }
.install-more a {
  color: var(--text);
  font-size: 13px;
  border: 1px solid var(--border-2);
  padding: 11px 22px;
  border-radius: 8px;
  display: inline-block;
}

/* closing */

.closing { margin-top: 100px; }

.closing-card {
  background: linear-gradient(180deg, #1a2426, #171c1f);
  border: 1px solid #2c3d40;
  border-radius: 16px;
  padding: 60px 32px;
  text-align: center;
}

.closing-card h2 {
  font-size: clamp(24px, 3.6vw, 36px);
  margin: 0 0 16px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--heading);
}

.closing-card p {
  max-width: 500px;
  margin: 0 auto 32px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.closing-card .accent { color: var(--teal); }
.closing-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.closing-ctas .btn-primary { padding: 13px 26px; }
.closing-ctas .btn-outline { padding: 13px 26px; border-color: #37424a; }

/* footer */

.footer {
  margin-top: 64px;
  padding-top: 32px;
  padding-bottom: 56px;
  border-top: 1px solid #20262a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand .logo-mark { width: 22px; height: 22px; border-radius: 5px; font-size: 13px; }
.footer-brand span { font-size: 13px; color: var(--dim); }
.footer-links { display: flex; gap: 22px; font-size: 12.5px; }
.footer-links a { color: var(--muted); }

/* ---- mobile ---- */

@media (max-width: 560px) {
  .nav { flex-direction: column; gap: 16px; }
  .nav-links { flex-wrap: wrap; justify-content: center; gap: 16px; }
}

@media (max-width: 700px) {
  .mock-side { display: none; }
  .mock-grid { grid-template-columns: 1fr; }
  .mock-overlay { left: 14px; right: 14px; width: auto; transform: none; }
  /* status bar: drop the file path and the line-count/latency segments
     (right-side children 3 and 4) so the bar stays on one line */
  .mock-status .left .path { display: none; }
  .mock-status .right span:nth-child(3),
  .mock-status .right span:nth-child(4) { display: none; }
  /* server table: three columns don't fit — stack each row instead */
  .server-head { display: none; }
  .server-row { grid-template-columns: 1fr; gap: 3px; }
  .server-row .install { overflow-wrap: anywhere; }
}
