/* Vault Lock. Dark only. The window picture uses Obsidian's default dark colours. */

:root {
  --bg: #0e0e10;
  --text: #ededf0;
  --muted: #a1a1aa;
  --faint: #7b7b85;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #8a6cef;
  --accent-hover: #9a80f2;
  --accent-text: #ab98f8;

  --o-bg: #1e1e1e;
  --o-side: #262626;
  --o-border: #363636;
  --o-text: #dadada;
  --o-muted: #b3b3b3;
  --o-faint: #8a8a8a;

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

p, h1, h2, h3, ul, ol { margin: 0; }
svg { display: block; }
a { color: var(--accent-text); }
em { font-style: normal; color: var(--text); }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.center { text-align: center; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.25rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h3 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; }

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s, transform 0.15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-quiet { background: rgba(255, 255, 255, 0.07); color: var(--text); border: 1px solid var(--line); }
.btn-quiet:hover { background: rgba(255, 255, 255, 0.11); }
.btn:active { transform: translateY(1px); }

/* Hero */

.hero { padding: clamp(64px, 10vw, 112px) 0 0; }
.intro { text-align: center; }
.app-icon {
  display: block;
  margin: 0 auto 24px;
  border-radius: 18px;
  box-shadow: 0 12px 32px -10px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.04);
}
h1 {
  font-size: clamp(2.5rem, 6.5vw, 3.75rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.035em;
}
.tagline {
  max-width: 34em;
  margin: 16px auto 32px;
  text-wrap: balance;
  font-size: clamp(1.125rem, 2.2vw, 1.3125rem);
  line-height: 1.5;
  color: var(--muted);
}
.br-wide { display: none; }
@media (min-width: 640px) { .br-wide { display: inline; } }
.meta { margin-top: 16px; font-size: 0.875rem; color: var(--faint); }

/* The Obsidian window */

.win {
  max-width: 960px;
  margin: clamp(56px, 8vw, 80px) auto 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #3a3a3a;
  background: var(--o-bg);
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, 0.95), 0 30px 90px -50px rgba(138, 108, 239, 0.45);
  color: var(--o-text);
  user-select: none;
}
.win-bar {
  position: relative;
  display: flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  background: var(--o-side);
  border-bottom: 1px solid var(--o-border);
}
.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 {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--o-faint);
}
.win-body {
  position: relative;
  display: grid;
  grid-template-columns: 44px 220px 1fr;
  height: clamp(360px, 44vw, 460px);
}
.ribbon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding-top: 16px;
  background: var(--o-side);
  border-right: 1px solid var(--o-border);
}
.ribbon svg { width: 17px; height: 17px; fill: none; stroke: var(--o-faint); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side {
  background: var(--o-side);
  border-right: 1px solid var(--o-border);
  padding: 12px 8px;
}
.side-head { padding: 4px 10px 10px; font-size: 0.8125rem; font-weight: 600; color: var(--o-muted); }

.tree { list-style: none; padding: 0; font-size: 0.8125rem; color: var(--o-muted); }
.tree li {
  position: relative;
  padding: 5px 10px 5px 30px;
  border-radius: 6px;
  line-height: 1.35;
  white-space: nowrap;
}
.tree li::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.t-folder::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3C/svg%3E");
}
.t-file::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5'/%3E%3C/svg%3E");
}
.t-sub { padding-left: 50px; }
.t-sub::before { left: 29px; }
.t-on { background: rgba(255, 255, 255, 0.08); color: var(--o-text); }
.t-private { color: var(--accent-text); background: rgba(138, 108, 239, 0.14); }
.t-private::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ab98f8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3C/svg%3E");
}

.editor { display: flex; flex-direction: column; min-width: 0; }
.tabs {
  display: flex;
  gap: 2px;
  padding: 6px 10px 0;
  background: var(--o-side);
  border-bottom: 1px solid var(--o-border);
}
.tab { padding: 6px 14px 8px; font-size: 0.8125rem; color: var(--o-faint); border-radius: 7px 7px 0 0; }
.tab.on { background: var(--o-bg); color: var(--o-text); margin-bottom: -1px; border: 1px solid var(--o-border); border-bottom-color: var(--o-bg); }
.note { padding: 32px 48px; max-width: 62ch; }
.note-title { font-size: 1.625rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 16px; }
.note p, .note li { font-size: 0.9375rem; line-height: 1.7; color: var(--o-text); }
.note > p + *, .note ul + p { margin-top: 12px; }
.note ul { padding-left: 22px; }

/* The real lock screen: an opaque cover with one small box. */
.lock {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--o-bg);
  animation: lock-cycle 12s ease-in-out infinite;
}
.lock-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(300px, 84%);
  padding: 28px;
  border-radius: 12px;
  background: var(--o-side);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}
.lock-title { text-align: center; font-weight: 600; font-size: 1.0625rem; }
.lock-input {
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  background: var(--o-bg);
  border: 1px solid var(--accent);
  box-shadow: 0 0 0 2px rgba(138, 108, 239, 0.25);
}
.lock-dots { font-size: 0.5625rem; letter-spacing: 0.28em; color: var(--o-text); animation: lock-type 12s linear infinite; }
.lock-caret { width: 1.5px; height: 16px; background: var(--o-text); animation: blink 1.1s steps(1) infinite; }
.lock-btn {
  display: grid;
  place-items: center;
  height: 34px;
  margin-top: 8px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  animation: lock-press 12s ease infinite;
}

/* Locked, the passphrase is typed, unlock, a moment of work, locked again. */
@keyframes lock-cycle {
  0%, 40% { opacity: 1; }
  46%, 80% { opacity: 0; }
  86%, 100% { opacity: 1; }
}
@keyframes lock-type {
  0%, 8% { clip-path: inset(0 100% 0 0); animation-timing-function: steps(10, end); }
  30%, 80% { clip-path: inset(0 0 0 0); }
  80.01%, 100% { clip-path: inset(0 100% 0 0); }
}
@keyframes lock-press {
  0%, 33%, 39%, 100% { filter: none; transform: none; }
  36% { filter: brightness(1.2); transform: scale(0.97); }
}
@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 720px) {
  .win-body { grid-template-columns: 1fr; height: 380px; }
  .ribbon, .side { display: none; }
  .note { padding: 22px 20px; }
  .note-title { font-size: 1.25rem; }
  .note p, .note li { font-size: 0.875rem; }
}

/* Sections */

.section { padding: clamp(72px, 10vw, 112px) 0 0; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.feature svg { width: 24px; height: 24px; fill: none; stroke: var(--accent-text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 16px; }
.feature p { margin-top: 6px; color: var(--muted); font-size: 0.9375rem; }
@media (max-width: 760px) { .features { grid-template-columns: 1fr; gap: 32px; } }

.private { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: center; }
.private-text p { margin-top: 16px; color: var(--muted); font-size: 1.0625rem; max-width: 42ch; }
.private-text .small { font-size: 0.875rem; color: var(--faint); }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pane {
  padding: 12px 8px 16px;
  border-radius: 12px;
  background: var(--o-side);
  border: 1px solid var(--o-border);
}
.pane-locked { border-color: rgba(138, 108, 239, 0.45); }
.pane-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--o-border);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--o-muted);
}
.pane-locked .pane-head { color: var(--accent-text); }
.pane-head svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 860px) {
  .private { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 420px) {
  .compare { gap: 10px; }
  .pane .tree li { padding-right: 4px; }
}

/* Install */

.steps {
  list-style: none;
  margin-top: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}
.steps li {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 22px 24px;
}
.steps li + li { border-top: 1px solid var(--line); }
.num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  align-self: start;
}
.step-text p { margin-top: 2px; color: var(--muted); font-size: 0.9375rem; }
.steps .btn { height: 38px; padding: 0 18px; font-size: 0.875rem; }
.copy-row { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
code {
  font-family: var(--mono);
  font-size: 0.8125rem;
  padding: 5px 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--text);
}
.copy-btn {
  height: 30px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: 500 0.8125rem var(--font);
  cursor: pointer;
}
.copy-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.after { margin-top: 24px; text-align: center; color: var(--muted); font-size: 0.9375rem; }
@media (max-width: 600px) {
  .steps li { grid-template-columns: 28px 1fr; padding: 20px 18px; gap: 14px; }
  .steps .btn { grid-column: 2; justify-self: start; }
}

/* Footer */

.foot { margin-top: clamp(80px, 10vw, 112px); border-top: 1px solid var(--line); }
.foot-row {
  display: flex;
  justify-content: space-between;
  gap: 8px 24px;
  flex-wrap: wrap;
  padding-top: 28px;
  padding-bottom: 28px;
  font-size: 0.875rem;
  color: var(--faint);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lock, .lock-dots, .lock-btn, .lock-caret { animation: none; }
}
