/* ============================================================
   Clip That Code — CodeVault design system
   Premium developer command center
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;450;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* palette */
  --graphite: #101318;
  --carbon:   #181D24;
  --slate:    #253040;
  --slate-2:  #1E2731;
  --cyan:     #18C8FF;
  --violet:   #7C5CFF;
  --green:    #39E58C;
  --line:     #D7DEE8;
  --paper:    #F7FAFC;
  --amber:    #F5B84B;
  --red:      #FF5D6C;

  /* derived surfaces */
  --bg:        #0C0F14;
  --bg-grid:   rgba(124,92,255,0.05);
  --panel:     #161B22;
  --panel-2:   #1B212B;
  --edge:      rgba(215,222,232,0.10);
  --edge-2:    rgba(215,222,232,0.18);
  --ink:       #EAF0F7;
  --ink-soft:  #9AA7B8;
  --ink-faint: #6B7888;
  --cyan-dim:  rgba(24,200,255,0.14);
  --violet-dim:rgba(124,92,255,0.16);
  --green-dim: rgba(57,229,140,0.14);

  --radius: 10px;
  --radius-lg: 14px;
  --maxw: 1200px;
  --shadow: 0 24px 60px -24px rgba(0,0,0,0.7);
  --font-head: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; }

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

/* subtle technical grid backdrop */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 35%, transparent 80%);
}

img { max-width: 100%; display: block; }
a { color: var(--cyan); text-decoration: none; }
h1,h2,h3,h4,h5 { font-family: var(--font-head); font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; margin: 0; color: #fff; }
p { margin: 0; }
ul { margin: 0; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }
.section { padding: 96px 0; position: relative; z-index: 1; }
.section.tight { padding: 64px 0; }

.mono { font-family: var(--font-mono); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--cyan); opacity: 0.7; }

.h-display { font-size: clamp(38px, 5.2vw, 66px); letter-spacing: -0.03em; }
.h-1 { font-size: clamp(30px, 3.6vw, 46px); }
.h-2 { font-size: clamp(24px, 2.4vw, 32px); }
.lead { font-size: clamp(17px, 1.4vw, 20px); color: var(--ink-soft); line-height: 1.6; }
.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }
.center { text-align: center; }
.section-head { max-width: 720px; }
.section-head.center { margin: 0 auto; }
.section-head .h-1, .section-head .h-2 { margin: 16px 0 14px; }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, border-color .15s, box-shadow .15s, color .15s;
  white-space: nowrap;
  text-decoration: none;
  position: relative;
}
.btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.btn-primary {
  background: linear-gradient(180deg, #2ad0ff, var(--cyan));
  color: #04141c;
  box-shadow: 0 0 0 1px rgba(24,200,255,0.35), 0 10px 30px -12px rgba(24,200,255,0.6);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(24,200,255,0.55), 0 16px 34px -12px rgba(24,200,255,0.7); }
.btn-secondary { background: var(--panel-2); color: var(--ink); border-color: var(--edge-2); }
.btn-secondary:hover { border-color: var(--cyan); color: #fff; background: var(--slate-2); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--edge); }
.btn-ghost:hover { border-color: var(--cyan); color: #fff; }
.btn-violet { background: linear-gradient(180deg, #8d70ff, var(--violet)); color: #fff; box-shadow: 0 10px 30px -14px rgba(124,92,255,0.8); }
.btn-violet:hover { transform: translateY(-1px); }
.btn-sm { padding: 9px 15px; font-size: 13.5px; }
.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none; }
.btn .kbd { margin-left: 2px; }

/* keyboard chip */
.kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--edge-2);
  background: rgba(0,0,0,0.3);
  color: var(--ink-soft);
  line-height: 1.4;
}

/* chips / tags */
.tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--edge);
  color: var(--ink-soft);
  background: rgba(255,255,255,0.02);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.tag.cyan { color: var(--cyan); border-color: rgba(24,200,255,0.4); background: var(--cyan-dim); }
.tag.violet { color: #b9a6ff; border-color: rgba(124,92,255,0.4); background: var(--violet-dim); }
.tag.green { color: var(--green); border-color: rgba(57,229,140,0.4); background: var(--green-dim); }
.tag.amber { color: var(--amber); border-color: rgba(245,184,75,0.4); background: rgba(245,184,75,0.12); }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* cards */
.card {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
}
.card.clip { clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%); }
.card.hover { transition: border-color .15s, transform .15s, background .15s; }
.card.hover:hover { border-color: var(--edge-2); transform: translateY(-2px); background: var(--panel-2); }

/* dot accent */
.dot { width: 7px; height: 7px; border-radius: 2px; background: var(--cyan); display: inline-block; }

/* ---------- announcement bar ---------- */
.announce {
  background: var(--carbon);
  border-bottom: 1px solid var(--edge);
  font-size: 13px;
  color: var(--ink-soft);
  position: relative;
  z-index: 60;
}
.announce .wrap { display: flex; align-items: center; justify-content: center; gap: 14px; padding-top: 9px; padding-bottom: 9px; flex-wrap: wrap; }
.announce .dot { background: var(--green); box-shadow: 0 0 10px var(--green); }
.announce a { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--cyan); display: inline-flex; align-items: center; gap: 5px; }
.announce a:hover { text-decoration: underline; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12,15,20,0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--edge);
}
.site-header .bar { display: flex; align-items: center; gap: 22px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand svg { display: block; }
.nav-main { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav-main a {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 14.5px;
  color: var(--ink-soft);
  padding: 8px 13px;
  border-radius: 8px;
  position: relative;
  transition: color .14s, background .14s;
}
.nav-main a:hover { color: #fff; background: rgba(255,255,255,0.04); }
.nav-main a.active { color: #fff; }
.nav-main a.active::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 1px; height: 2px;
  background: var(--cyan); border-radius: 2px; box-shadow: 0 0 8px var(--cyan);
}
.header-cta { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.header-cta .worklink {
  font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 6px;
}
.header-cta .worklink:hover { color: var(--cyan); }
.nav-toggle { display: none; }

/* mobile drawer */
.mobile-menu { display: none; }
@media (max-width: 980px) {
  .nav-main, .header-cta .btn-secondary, .header-cta .worklink { display: none; }
  .nav-toggle {
    display: inline-flex; margin-left: auto; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--edge-2);
    background: var(--panel-2); color: var(--ink); cursor: pointer;
  }
  .mobile-menu {
    display: block; position: fixed; inset: 0; z-index: 80;
    background: rgba(8,10,14,0.96); backdrop-filter: blur(8px);
    padding: 22px; opacity: 0; pointer-events: none; transition: opacity .2s;
  }
  .mobile-menu.open { opacity: 1; pointer-events: auto; }
  .mobile-menu .mm-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
  .mobile-menu .mm-close { width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--edge-2); background: var(--panel-2); color: var(--ink); font-size: 22px; cursor: pointer; }
  .mobile-menu nav { display: flex; flex-direction: column; gap: 4px; }
  .mobile-menu nav a {
    font-family: var(--font-head); font-size: 20px; font-weight: 500; color: var(--ink);
    padding: 14px 12px; border-bottom: 1px solid var(--edge); display: flex; justify-content: space-between; align-items: center;
  }
  .mobile-menu .mm-cta { display: flex; flex-direction: column; gap: 12px; margin-top: 26px; }
  .mobile-menu .mm-cta .btn { width: 100%; }
}

/* ---------- code window ---------- */
.code-window {
  background: var(--graphite);
  border: 1px solid var(--edge-2);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.cw-bar { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--edge); background: var(--carbon); }
.cw-dots { display: flex; gap: 6px; }
.cw-dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.cw-dots i:nth-child(1){ background:#FF5D6C; } .cw-dots i:nth-child(2){ background:#F5B84B; } .cw-dots i:nth-child(3){ background:#39E58C; }
.cw-title { font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); margin-left: 8px; }
.cw-body { padding: 16px 18px; font-family: var(--font-mono); font-size: 13px; line-height: 1.7; overflow-x: auto; }
.cw-body .ln { color: var(--ink-faint); user-select: none; margin-right: 16px; display: inline-block; width: 14px; text-align: right; }
.t-key { color: var(--violet); } .t-fn { color: var(--cyan); } .t-str { color: var(--green); }
.t-num { color: var(--amber); } .t-com { color: var(--ink-faint); } .t-var { color: #cdd7e5; } .t-punc { color: var(--ink-soft); }

/* feature grid */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px,1fr)); gap: 14px; }
.feat {
  background: var(--panel); border: 1px solid var(--edge); border-radius: var(--radius);
  padding: 20px; transition: border-color .15s, transform .15s, background .15s;
}
.feat:hover { border-color: var(--edge-2); transform: translateY(-2px); background: var(--panel-2); }
.feat .ic { width: 38px; height: 38px; border-radius: 9px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--edge-2); background: var(--cyan-dim); margin-bottom: 14px; color: var(--cyan); }
.feat h4 { font-size: 16px; margin-bottom: 6px; color: #fff; }
.feat p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; }
.feat .idx { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); float: right; }

/* generic icon tile */
.ic-tile { width: 42px; height: 42px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--edge-2); }
.ic-cyan { background: var(--cyan-dim); color: var(--cyan); }
.ic-violet { background: var(--violet-dim); color: #b9a6ff; }
.ic-green { background: var(--green-dim); color: var(--green); }

/* stat / capability strip */
.cap-strip { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; }
.cap {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-soft);
  border: 1px solid var(--edge); border-radius: 8px; padding: 9px 14px; background: rgba(255,255,255,0.02);
  display: inline-flex; align-items: center; gap: 8px;
}
.cap svg { color: var(--cyan); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink); font-family: var(--font-head); }
.field .req { color: var(--cyan); }
.input, select.input, textarea.input {
  width: 100%; font-family: var(--font-body); font-size: 14.5px; color: var(--ink);
  background: var(--graphite); border: 1px solid var(--edge-2); border-radius: 9px;
  padding: 12px 14px; transition: border-color .14s, box-shadow .14s;
}
.input::placeholder { color: var(--ink-faint); }
.input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-dim); }
.input.bad { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255,93,108,0.15); }
select.input { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239AA7B8' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
textarea.input { resize: vertical; min-height: 120px; }
.err-msg { font-size: 12.5px; color: var(--red); font-family: var(--font-mono); display: none; }
.err-msg.show { display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px){ .form-row { grid-template-columns: 1fr; } }
.checkrow { display: flex; gap: 11px; align-items: flex-start; }
.checkrow input[type=checkbox] { width: 19px; height: 19px; margin-top: 2px; accent-color: var(--cyan); flex-shrink: 0; }
.checkrow label { font-size: 13px; color: var(--ink-soft); line-height: 1.5; font-family: var(--font-body); font-weight: 400; }

/* notice boxes */
.notice { border-radius: var(--radius); padding: 14px 16px; font-size: 13.5px; display: flex; gap: 11px; align-items: flex-start; line-height: 1.5; }
.notice svg { flex-shrink: 0; margin-top: 1px; }
.notice-info { background: var(--cyan-dim); border: 1px solid rgba(24,200,255,0.3); color: #bfeaff; }
.notice-violet { background: var(--violet-dim); border: 1px solid rgba(124,92,255,0.3); color: #d6cbff; }
.notice-warn { background: rgba(245,184,75,0.12); border: 1px solid rgba(245,184,75,0.35); color: #f3d79a; }
.notice-err { background: rgba(255,93,108,0.12); border: 1px solid rgba(255,93,108,0.4); color: #ffc2c8; }
.notice-ok { background: var(--green-dim); border: 1px solid rgba(57,229,140,0.35); color: #b6f3d3; }

/* ---------- footer ---------- */
.site-footer { background: var(--carbon); border-top: 1px solid var(--edge); padding: 64px 0 30px; position: relative; z-index: 1; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 36px; }
.footer-grid h5 { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 16px; font-weight: 600; }
.footer-grid ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-grid a, .footer-grid li { color: var(--ink-soft); font-size: 14px; }
.footer-grid a:hover { color: var(--cyan); }
.foot-brand p { font-size: 13.5px; color: var(--ink-soft); margin: 14px 0; max-width: 280px; line-height: 1.6; }
.foot-brand .domain { font-family: var(--font-mono); font-size: 13px; color: var(--cyan); }
.foot-contact { font-style: normal; font-size: 13.5px; color: var(--ink-soft); line-height: 1.8; }
.foot-contact a { color: var(--ink-soft); }
.foot-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--edge); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-faint); font-family: var(--font-mono); }
@media (max-width: 860px){ .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 520px){ .footer-grid { grid-template-columns: 1fr; } }

/* toast */
.toast-host { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--panel-2); border: 1px solid var(--edge-2); border-left: 3px solid var(--green);
  border-radius: 9px; padding: 13px 16px; font-size: 13.5px; color: var(--ink); min-width: 240px; max-width: 340px;
  box-shadow: var(--shadow); display: flex; gap: 10px; align-items: center;
  animation: toastIn .25s ease; font-family: var(--font-body);
}
.toast.err { border-left-color: var(--red); } .toast.info { border-left-color: var(--cyan); } .toast.warn { border-left-color: var(--amber); }
.toast svg { flex-shrink: 0; }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* dividers & misc */
.hr { height: 1px; background: var(--edge); border: 0; margin: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
@media (max-width: 900px){ .grid-2,.grid-3,.grid-4 { grid-template-columns: 1fr; } }
.flow > * + * { margin-top: 16px; }
.pill-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.pill-list li { display: flex; gap: 11px; align-items: flex-start; font-size: 14.5px; color: var(--ink-soft); }
.pill-list li svg { flex-shrink: 0; margin-top: 3px; color: var(--green); }

.anim-up { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.anim-up.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce){ .anim-up { opacity: 1; transform: none; } }

/* ---------- legal pages ---------- */
.legal-wrap { max-width: 860px; margin: 0 auto; }
.legal-head { padding: 56px 0 28px; border-bottom: 1px solid var(--edge); margin-bottom: 40px; }
.legal-head .updated { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-faint); margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; }
.legal-body { color: var(--ink-soft); font-size: 15.5px; line-height: 1.75; padding-bottom: 60px; }
.legal-body h2 { font-size: 21px; color: #fff; margin: 38px 0 14px; scroll-margin-top: 96px; }
.legal-body h3 { font-size: 17px; color: #fff; margin: 26px 0 10px; font-family: var(--font-head); }
.legal-body p { margin-bottom: 15px; }
.legal-body ul, .legal-body ol { padding-left: 22px; margin-bottom: 15px; }
.legal-body li { margin-bottom: 8px; }
.legal-body strong { color: var(--ink); }
.legal-body a { color: var(--cyan); }
.legal-body .lead-note { background: var(--panel); border: 1px solid var(--edge); border-left: 3px solid var(--cyan); border-radius: 10px; padding: 18px 20px; margin: 0 0 28px; color: var(--ink); font-size: 15px; }
.legal-body .company-block { background: var(--carbon); border: 1px solid var(--edge); border-radius: 10px; padding: 22px 24px; font-style: normal; line-height: 1.9; margin: 18px 0; }
.legal-toc { background: var(--panel); border: 1px solid var(--edge); border-radius: 10px; padding: 20px 22px; margin-bottom: 34px; }
.legal-toc h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 12px; }
.legal-toc ol { columns: 2; column-gap: 30px; padding-left: 18px; margin: 0; font-size: 13.5px; }
.legal-toc a { color: var(--ink-soft); } .legal-toc a:hover { color: var(--cyan); }
@media (max-width: 600px){ .legal-toc ol { columns: 1; } }
