/* Aperture — aperture.omniciency.com
   Palette: paper white / graphite ink, one accent = the capture-selection blue. */
:root {
  --bg: #fbfbfa;
  --bg-2: #f2f2f0;
  --ink: #131417;
  --ink-2: #4b4e56;
  --muted: #7a7d86;
  --line: #e4e4e0;
  --line-2: #cfcfca;
  --accent: #2f6df6;
  --accent-ink: #ffffff;
  --dim: rgba(19, 20, 23, 0.06);
  --key-bg: #ffffff;
  --key-shadow: 0 1px 0 #d6d6d1, inset 0 -1px 0 #ecece8;
  --radius: 10px;
  --w: 1040px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Inter, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1012;
    --bg-2: #17181b;
    --ink: #f1f1ee;
    --ink-2: #b7b9c0;
    --muted: #82858e;
    --line: #24262b;
    --line-2: #34373d;
    --accent: #4f86ff;
    --dim: rgba(255, 255, 255, 0.05);
    --key-bg: #1d1f23;
    --key-shadow: 0 1px 0 #000, inset 0 -1px 0 #2a2d33;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--w); margin: 0 auto; padding: 0 24px; }

/* Nav */
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; }
.brand svg { width: 22px; height: 22px; }
.nav-links { display: flex; gap: 22px; align-items: center; font-size: 14px; color: var(--ink-2); }
.nav-links .btn { padding: 7px 14px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-weight: 600; font-size: 15px; border: 0; cursor: pointer;
  transition: transform .12s ease, background .12s ease;
}
.btn:hover { color: var(--bg); transform: translateY(-1px); background: var(--accent); }
.btn.secondary { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.secondary:hover { background: var(--dim); color: var(--ink); }
.btn.google { background: var(--key-bg); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); width: 100%; justify-content: center; }
.btn.google:hover { background: var(--dim); }
.btn svg { width: 18px; height: 18px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* Hero: headline inside a capture selection */
.hero { padding: 72px 0 40px; }
.selection {
  position: relative; display: inline-block; padding: 34px 40px 30px;
  border: 1.5px dashed var(--accent); border-radius: 2px; max-width: 100%;
  animation: draw .7s cubic-bezier(.2,.7,.2,1) both;
}
.selection .handle {
  position: absolute; width: 9px; height: 9px; background: var(--bg); border: 1.5px solid var(--accent); border-radius: 2px;
}
.selection .h-tl { top: -5px; left: -5px; } .selection .h-tr { top: -5px; right: -5px; }
.selection .h-bl { bottom: -5px; left: -5px; } .selection .h-br { bottom: -5px; right: -5px; }
.selection .h-t { top: -5px; left: calc(50% - 4px); } .selection .h-b { bottom: -5px; left: calc(50% - 4px); }
.selection .h-l { top: calc(50% - 4px); left: -5px; } .selection .h-r { top: calc(50% - 4px); right: -5px; }
.selection .dim {
  position: absolute; right: -2px; bottom: -30px; font: 12px/1 var(--mono); color: var(--accent);
  background: var(--bg); padding: 4px 6px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--line);
}
@keyframes draw {
  from { clip-path: inset(-12px 100% 100% -12px); opacity: 0; }
  to { clip-path: inset(-12px -12px -44px -12px); opacity: 1; }
}
.selection h1 {
  margin: 0; font-size: clamp(38px, 6.4vw, 72px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 700;
  animation: rise .5s .45s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.hero p.lede { max-width: 560px; font-size: 19px; color: var(--ink-2); margin: 40px 0 26px; }
.cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cta .meta { font-size: 13px; color: var(--muted); }
.cta .meta code { font-family: var(--mono); font-size: 12px; }
.intel-note { margin-top: 12px; font-size: 13px; color: var(--muted); display: none; }
.intel-note.show { display: block; }
@media (prefers-reduced-motion: reduce) { .selection, .selection h1 { animation: none; } }

/* Sections */
.section { padding: 56px 0; border-top: 1px solid var(--line); }
.section h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; margin: 0 0 24px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.grid3 h3 { margin: 0 0 12px; font-size: 20px; letter-spacing: -0.02em; }
.grid3 ul { list-style: none; margin: 0; padding: 0; color: var(--ink-2); font-size: 15px; }
.grid3 li { padding: 7px 0; border-top: 1px solid var(--line); }
.grid3 li:first-child { border-top: 0; }
@media (max-width: 760px) { .grid3 { grid-template-columns: 1fr; gap: 28px; } }

/* Shortcut table */
.keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px 32px; }
.keys .row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
kbd {
  display: inline-block; min-width: 24px; text-align: center; padding: 2px 6px; margin-left: 3px;
  font: 12px/1.4 var(--mono); color: var(--ink); background: var(--key-bg); border-radius: 5px; box-shadow: var(--key-shadow), inset 0 0 0 1px var(--line);
}
.hint { font-size: 14px; color: var(--muted); margin-top: 22px; }

/* How to open (unnotarized) */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps > div { background: var(--bg-2); border-radius: var(--radius); padding: 20px 20px 18px; font-size: 15px; color: var(--ink-2); }
.steps > div::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--bg); font: 600 12px var(--mono); margin-bottom: 12px; }
.steps strong { color: var(--ink); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* FAQ */
.faq details { border-top: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--ink-2); margin: 10px 0 0; max-width: 680px; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 28px 0 48px; font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* Access card (download gate) */
.card-page { min-height: calc(100vh - 64px); display: grid; place-items: start center; padding: 56px 24px; }
.card { width: 100%; max-width: 420px; background: var(--key-bg); border-radius: 16px; box-shadow: 0 1px 0 var(--line), 0 20px 60px -30px rgba(0,0,0,.35); padding: 28px; }
.card h1 { font-size: 22px; letter-spacing: -0.02em; margin: 0 0 6px; }
.card p.sub { margin: 0 0 20px; color: var(--ink-2); font-size: 15px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; margin: 20px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.field { display: flex; gap: 8px; }
.field input { flex: 1; min-width: 0; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); font: 15px var(--sans); }
.field input.code { font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.field .btn { padding: 11px 16px; border-radius: 10px; }
label.lbl { display: block; font-size: 13px; color: var(--ink-2); margin: 0 0 8px; }
.msg { margin-top: 10px; font-size: 13px; color: var(--muted); min-height: 18px; }
.msg.err { color: #d0362f; } .msg.ok { color: #1f8f4a; }
.small { font-size: 13px; color: var(--muted); }
.ready { text-align: left; }
.ready .btn { width: 100%; justify-content: center; margin: 14px 0 6px; }
.notes { margin-top: 20px; font-size: 14px; color: var(--ink-2); }
.notes ol { padding-left: 18px; margin: 8px 0 0; }
.notes li { margin: 4px 0; }

/* Changelog */
.log article { border-top: 1px solid var(--line); padding: 28px 0; display: grid; grid-template-columns: 180px 1fr; gap: 24px; }
.log .v { font-family: var(--mono); font-size: 14px; }
.log .v .d { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.log .v .tag { display: inline-block; margin-top: 8px; font-size: 11px; padding: 2px 7px; border-radius: 4px; background: var(--dim); color: var(--ink-2); }
.log h2, .log h3 { font-size: 18px; margin: 0 0 8px; letter-spacing: -0.01em; }
.log ul { padding-left: 18px; color: var(--ink-2); margin: 8px 0; }
.log li { margin: 4px 0; }
.log code { font-family: var(--mono); font-size: 13px; background: var(--dim); padding: 1px 5px; border-radius: 4px; }
@media (max-width: 640px) { .log article { grid-template-columns: 1fr; gap: 8px; } }

/* Admin */
.admin { padding: 32px 0 80px; }
.admin h1 { font-size: 22px; margin: 0 0 24px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 32px; }
.tile { background: var(--bg-2); border-radius: 12px; padding: 16px; }
.tile .n { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.tile .l { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.admin h2 { font-size: 15px; margin: 32px 0 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
td.mono, .mono { font-family: var(--mono); font-size: 13px; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 48px; }
.spark span { flex: 1; background: var(--accent); opacity: .85; border-radius: 2px 2px 0 0; min-height: 2px; }
.row-actions { display: flex; gap: 8px; align-items: center; margin: 12px 0; }
.row-actions input { width: 90px; }
.used { color: var(--muted); text-decoration: line-through; }
.tabs { display: flex; gap: 16px; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.tabs a.on { color: var(--ink); font-weight: 600; }
.copyall { font-size: 13px; }
