/* ClipDesigner site: dark technical studio, ClipDesigner blue on charcoal. System fonts only (no third-party requests). */
:root {
  --bg: #0d1013;
  --bg-2: #11151a;
  --panel: #161b21;
  --panel-2: #1b2128;
  --line: #242c34;
  --line-2: #313b45;
  --fg: #e8edf1;
  --muted: #a0abb6;
  --dim: #6d7985;
  --blue: #2a9be0;
  --blue-hi: #5cb8f0;
  --blue-deep: #13527a;
  --amber: #e9a640;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", ui-monospace, "SF Mono", Consolas, Menlo, monospace;
  --radius: 14px;
  --header: 60px;
  --gutter-l: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 16px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-hi); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--blue-hi); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--blue); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }

.wrap { max-width: 1180px; margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.topbar-inner {
  height: var(--header);
  max-width: 1180px; margin: 0 auto;
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
  display: flex; align-items: center; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); font-family: var(--display); font-weight: 650; font-size: 18px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.mark { width: 28px; height: 28px; }
.mark-frame { color: var(--blue); }
.mark-pen { fill: var(--fg); }
.mark-tip { fill: var(--blue); }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
  font: 12px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); padding: 9px 10px; border-radius: 6px;
}
.nav a:hover { color: var(--fg); background: var(--panel); text-decoration: none; }
.nav-gh { border-left: 1px solid var(--line); border-radius: 0 6px 6px 0 !important; margin-left: 6px; padding-left: 16px !important; }

.menu { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 13px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.06em;
  padding: 15px 20px; border-radius: 10px; border: 1px solid transparent;
  transition: background .15s, border-color .15s, color .15s;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hi); color: #071521; }
.btn-ghost { border-color: var(--line-2); color: var(--fg); background: var(--bg-2); }
.btn-ghost:hover { border-color: var(--blue); }
.btn-sm { padding: 10px 14px; font-size: 12px; }

/* ---------- Section index (desktop) ---------- */
.index {
  position: fixed; right: 0; top: calc(var(--header) + 24px); bottom: 24px; z-index: 10;
  width: 150px; display: none;
  border-left: 1px solid var(--line);
  background-image: repeating-linear-gradient(to bottom, var(--line-2) 0 1px, transparent 1px 48px);
  background-size: 8px 100%; background-repeat: no-repeat;
}
.index ol { list-style: none; margin: 0; padding: 4px 0 0 22px; display: grid; gap: 14px; }
.index a { font: 11px/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--dim); position: relative; display: block; }
.index a::before { content: ""; position: absolute; left: -23px; top: 50%; width: 0; height: 1px; background: var(--blue); transition: width .2s; }
.index a.active { color: var(--fg); }
.index a.active::before { width: 16px; }
.index a:hover { color: var(--fg); text-decoration: none; }
@media (min-width: 1380px) { .index { display: block; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: 72px 56px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 78% 30%, color-mix(in srgb, var(--blue) 18%, transparent), transparent 70%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 64px;
  mask-image: linear-gradient(to bottom, #000 40%, transparent);
  opacity: .55;
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 13fr); gap: 48px; align-items: center; }
.eyebrow, .kicker, .spec, .card-num, .tags, .who-label, .p-num, .dl-badge, .dl-meta, .footer-head, .footer-base, .trust, .beta-title {
  font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.1em;
}
.eyebrow { font-size: 12px; color: var(--blue-hi); margin-bottom: 20px; }
.hero h1 { font-size: clamp(40px, 5.6vw, 72px); line-height: 1.02; font-weight: 700; }
.accent { color: var(--blue); }
.lede { margin-top: 22px; font-size: 18px; color: var(--muted); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.spec { margin-top: 18px; font-size: 11px; color: var(--dim); }
.spec-link { margin-top: 6px; font-size: 14px; }

.hero-shot { position: relative; margin: 0; padding: 18px; }
.hero-shot img {
  border-radius: 10px; border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.02);
}
.viewfinder i { position: absolute; width: 34px; height: 34px; border: 3px solid var(--blue); }
.viewfinder i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 8px; }
.viewfinder i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 8px; }
.viewfinder i:nth-child(3) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 8px; }
.viewfinder i:nth-child(4) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 8px; }

.trust {
  list-style: none; margin: 48px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  font-size: 11px; color: var(--muted);
}
.trust li { padding: 16px 12px; text-align: center; }
.trust li + li { border-left: 1px solid var(--line); }
.rename-note { margin-top: 18px; font-size: 14px; color: var(--dim); text-align: center; }
.rename-note strong { color: var(--muted); font-weight: 600; }

/* ---------- Sections ---------- */
.section { padding-block: 104px; border-top: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 52px; }
.kicker { font-size: 12px; color: var(--dim); margin-bottom: 18px; }
.kicker span { color: var(--blue-hi); }
.section h2, .closer h2 { font-size: clamp(32px, 4.2vw, 52px); line-height: 1.05; font-weight: 700; }
.section-lede { margin-top: 20px; font-size: 17px; color: var(--muted); max-width: 40em; }

/* ---------- Toolkit cards ---------- */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card { background: var(--bg-2); display: flex; flex-direction: column; min-width: 0; }
.card img { aspect-ratio: 3 / 2; object-fit: cover; object-position: top left; border-bottom: 1px solid var(--line); background: var(--panel); }
.card-body { padding: 26px 28px 30px; display: flex; flex-direction: column; gap: 12px; }
.card-num { font-size: 11px; color: var(--dim); }
.card-num span { display: inline-block; min-width: 2.4em; padding: 3px 6px; margin-right: 8px; border-radius: 4px; background: var(--blue-deep); color: #fff; text-align: center; }
.card h3 { font-size: 24px; font-weight: 650; }
.card p { color: var(--muted); }
.tags { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 10.5px; }
.tags li { padding: 5px 8px; border-radius: 4px; border: 1px solid var(--line-2); color: var(--muted); }
.tags .tag-status { border-color: color-mix(in srgb, var(--amber) 55%, transparent); color: var(--amber); }
.card-wide { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.card-wide img { border-bottom: 0; border-right: 1px solid var(--line); aspect-ratio: 20 / 13; height: 100%; }
.card-wide .card-body { justify-content: center; padding: 36px; }

/* ---------- Who it's for ---------- */
.who { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.who-col { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; min-width: 0; }
.who-power { border-color: color-mix(in srgb, var(--blue) 55%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, var(--blue) 9%, var(--bg-2)), var(--bg-2) 40%); }
.who-label { font-size: 12px; color: var(--fg); padding-bottom: 18px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.who-power .who-label { color: var(--blue-hi); }
.who dl { margin: 0; }
.who dt { font: 600 11px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--dim); margin-top: 22px; }
.who dd { margin: 10px 0 0; color: var(--muted); }
.who dd ul { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; }
.who dd li::marker { color: var(--blue); }

/* ---------- Principles ---------- */
.principles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.principles li { padding: 30px 28px 34px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.p-num { display: block; font-size: 12px; color: var(--blue-hi); margin-bottom: 26px; }
.principles h3 { font-size: 21px; font-weight: 650; margin-bottom: 10px; }
.principles p { color: var(--muted); }

/* ---------- Downloads ---------- */
.downloads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.dl { display: flex; flex-direction: column; gap: 10px; padding: 28px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--bg-2); color: var(--fg); min-width: 0; transition: border-color .15s, transform .15s; }
.dl:hover { text-decoration: none; border-color: var(--blue); transform: translateY(-2px); }
.dl-main { border-color: color-mix(in srgb, var(--blue) 60%, var(--line)); background: linear-gradient(160deg, color-mix(in srgb, var(--blue) 14%, var(--bg-2)), var(--bg-2) 60%); }
.dl-badge { align-self: flex-start; font-size: 10.5px; padding: 5px 8px; border-radius: 4px; background: var(--blue); color: #fff; }
.dl-badge-quiet { background: transparent; border: 1px solid var(--line-2); color: var(--muted); }
.dl-title { font: 650 26px/1.15 var(--display); letter-spacing: -0.02em; }
.dl-desc { color: var(--muted); }
.dl-meta { font-size: 11px; color: var(--dim); overflow-wrap: anywhere; margin-top: auto; padding-top: 8px; }
.dl-links { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 15px; }
.dl-links a::after { content: " ↗"; color: var(--dim); }

.beta { margin-top: 44px; padding: 26px 28px; border-radius: var(--radius); border: 1px dashed var(--line-2); background: var(--bg); }
.beta-title { font-size: 12px; color: var(--amber); margin-bottom: 14px; }
.beta ul { margin: 0; padding-left: 1.1em; display: grid; gap: 8px; color: var(--muted); }
.beta-more { margin-top: 16px; font-size: 15px; color: var(--dim); }

/* ---------- Closer ---------- */
.closer { padding-block: 110px; border-top: 1px solid var(--line); background: radial-gradient(50% 80% at 50% 100%, color-mix(in srgb, var(--blue) 16%, transparent), transparent 70%); }
.closer-inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.closer p:not(.kicker) { margin-top: 16px; color: var(--muted); font-size: 17px; }
.cta-center { justify-content: center; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); padding-block: 56px 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 32px; padding-bottom: 48px; }
.footer-brand p { margin-top: 14px; color: var(--muted); max-width: 26em; font-size: 15px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.footer-col a { color: var(--muted); }
.footer-col a:hover { color: var(--fg); }
.footer-head { font-size: 11px; color: var(--dim); margin-bottom: 4px; }
.footer-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-block: 20px; border-top: 1px solid var(--line); font-size: 11px; color: var(--dim); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .hero { padding-block: 48px 40px; }
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-wide { grid-template-columns: minmax(0, 1fr); }
  .card-wide img { border-right: 0; border-bottom: 1px solid var(--line); height: auto; aspect-ratio: 3 / 2; }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .menu {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 6px;
    margin-left: 4px; width: 42px; height: 42px; padding: 0 11px;
    background: var(--panel); border: 1px solid var(--line-2); border-radius: 8px; cursor: pointer;
  }
  .menu span { display: block; height: 2px; background: var(--fg); border-radius: 2px; transition: transform .2s; }
  .menu[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .topbar-cta { margin-left: auto; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; margin: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter-r) 16px var(--gutter-l);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 4px; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 13px; }
  .nav-gh { border-left: 0; margin-left: 0; padding-left: 4px !important; border-radius: 0 !important; }
  .cards, .who, .downloads { grid-template-columns: minmax(0, 1fr); }
  .section { padding-block: 72px; }
  .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust li:nth-child(3) { border-left: 0; }
  .trust li:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .principles { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-body, .who-col, .dl, .beta { padding: 22px; }
  .hero-shot { padding: 12px; }
  .viewfinder i { width: 24px; height: 24px; border-width: 2px; }
  .btn { width: 100%; justify-content: center; }
  .topbar-cta { width: auto; }
  .brand span { font-size: 17px; }
}
