/* Pastebook landing page.
   Idea: a shelf of things you copied, standing on a ledge. Cool paper, navy ink, carbon-copy blue;
   highlighter yellow marks the one selected thing. The vault section is the only dark band. */

@font-face {
  font-family: "Funnel Display";
  src: url("assets/fonts/funnel-display-latin.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Funnel Sans";
  src: url("assets/fonts/funnel-sans-latin.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: #EEF1F5;
  --paper-2: #E2E7EE;
  --sheet: #FBFCFD;
  --ink: #17213A;
  --ink-2: #4A5570;
  --rule: #C8D0DC;
  --carbon: #2E47C9;
  --carbon-ink: #FFFFFF;
  --hi: #F2DF4E;
  --tape: rgba(178, 216, 200, 0.78);
  --shelf: #DDE3EC;
  --ledge: #B9C3D2;
  --ledge-face: #A7B2C4;
  --vault: #141B2D;
  --vault-ink: #E4E9F3;
  --vault-2: #A6B1CB;
  --vault-rule: #2A3450;
  --focus: #17213A;

  --tint-a: #4C6FFF;
  --tint-b: #3FA37A;
  --tint-c: #D9962A;
  --tint-d: #8A5CF0;
  --tint-e: #E0607E;
  --pin-a: #E0607E;
  --pin-b: #3FA37A;

  --display: "Funnel Display", ui-sans-serif, system-ui, sans-serif;
  --text: "Funnel Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0F1420;
    --paper-2: #161D2C;
    --sheet: #1C2436;
    --ink: #E4E9F3;
    --ink-2: #A3AEC6;
    --rule: #2A3450;
    --carbon: #93A6FF;
    --carbon-ink: #0F1420;
    --hi: #E8D84A;
    --tape: rgba(140, 196, 172, 0.30);
    --shelf: #161D2C;
    --ledge: #263049;
    --ledge-face: #1D2539;
    --vault: #080B13;
    --vault-rule: #222B42;
    --focus: #E4E9F3;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "kern", "liga";
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; text-wrap: balance; }
p { margin: 0; }
code { font-family: var(--mono); font-size: 0.88em; }
kbd {
  display: inline-block;
  min-width: 1.5em;
  padding: 0 0.32em;
  margin: 0 0.06em;
  font: 600 0.82em/1.5 var(--text);
  text-align: center;
  color: var(--ink);
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  border-radius: 5px;
  vertical-align: 0.08em;
}
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 20; padding: 8px 14px; background: var(--sheet); border-radius: 8px; }
.skip:focus { left: 8px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 60%, transparent);
}
.top-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.2rem/1 var(--display); }
.brand img { border-radius: 8px; }
.top nav { margin-left: auto; }
.top nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.top nav a { display: block; padding: 6px 12px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-weight: 500; }
.top nav a:hover { color: var(--ink); background: var(--paper-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  background: var(--carbon); color: var(--carbon-ink);
  border-radius: 12px;
  font: 600 1.0625rem/1 var(--text);
  text-decoration: none;
  transition: background-color 120ms ease;
}
.btn:hover { background: color-mix(in srgb, var(--carbon) 86%, var(--ink)); }
.btn-small { min-height: 38px; padding: 0 16px; font-size: 0.95rem; border-radius: 10px; }
.btn-quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--rule); }
.btn-quiet:hover { background: var(--paper-2); }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Hero */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 96px); }
.hero h1 {
  font-size: clamp(2.75rem, 7.4vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  max-width: 11ch;
  font-weight: 750;
}
.lede { margin-top: 24px; font-size: clamp(1.2rem, 1.9vw, 1.45rem); line-height: 1.45; color: var(--ink-2); max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 36px; }
.cmd {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 48px; max-width: 100%;
  padding: 4px 4px 4px 16px;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 12px;
}
.cmd code { white-space: nowrap; overflow-x: auto; scrollbar-width: none; color: var(--ink); }
.cmd code::-webkit-scrollbar { display: none; }
.copy {
  flex: none; min-height: 38px; padding: 0 14px;
  border: 0; border-radius: 9px;
  background: var(--paper-2); color: var(--ink);
  font: 600 0.9rem/1 var(--text); cursor: pointer;
}
.copy:hover { background: var(--rule); }
.copy[data-copied] { background: var(--hi); color: #17213A; }
@media (min-width: 1000px) {
  .hero-copy { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 0 clamp(40px, 5vw, 80px); align-items: end; }
  .hero h1 { max-width: none; }
  .hero-side .lede { margin-top: 0; }
  .hero-side .hero-actions { margin-top: 28px; }
  .hero-side .cmd code { font-size: 0.8rem; }
}
/* Before the release: no download link, a plain "not out yet" note instead */
.soon-tag {
  display: inline-block; padding: 3px 10px; margin-right: 6px;
  border-radius: 999px; background: var(--hi); color: #17213A;
  font: 700 0.82rem/1.3 var(--text); letter-spacing: 0.01em; vertical-align: 0.1em;
}
.soon { margin-top: 32px; max-width: 40ch; font-size: 1.05rem; line-height: 1.5; color: var(--ink); }
.hero-side .soon { margin-top: 28px; }
.soon-block {
  margin-top: clamp(28px, 4vw, 40px); max-width: 44rem;
  padding: 24px 28px;
  background: var(--sheet); border: 1px solid var(--rule); border-radius: 16px;
}
.soon-block p + p { margin-top: 12px; font-size: 1.1rem; line-height: 1.5; color: var(--ink-2); }
.facts { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 28px 0 0; padding: 0; }
.facts li { padding: 4px 12px; border: 1px solid var(--rule); border-radius: 999px; font-size: 0.9rem; color: var(--ink-2); }

/* The shelf illustration */
.shelf {
  margin: clamp(40px, 5vw, 64px) auto 0;
  width: calc(100% - 2 * var(--gutter));
  max-width: 1360px;
}
.shelf-bar { display: flex; align-items: center; gap: 12px; padding: 0 4px 14px; }
.shelf-search {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 12px; min-width: 180px;
  background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px;
  color: var(--ink-2); font-size: 0.92rem;
}
.shelf-tabs { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; overflow: hidden; }
.shelf-tabs li {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  padding: 6px 12px; border-radius: 9px;
  color: var(--ink-2); font-size: 0.92rem; font-weight: 500;
}
.shelf-tabs li.is-current { background: var(--ink); color: var(--paper); }
.shelf-tabs i { width: 8px; height: 8px; border-radius: 50%; background: var(--dot); }
.dot-a { --dot: var(--pin-a); }
.dot-b { --dot: var(--pin-b); }
.rec {
  margin-left: auto; flex: none;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 8px;
  border: 1px solid var(--rule); border-radius: 999px;
  background: var(--sheet); color: var(--ink);
  font: 600 0.92rem/1 var(--text); cursor: pointer;
}
.rec-track { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--tint-b); transition: background-color 160ms ease; }
.rec-knob { position: absolute; top: 2px; left: 16px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(15, 20, 32, 0.3); transition: left 160ms ease; }
.rec[aria-checked="false"] .rec-track { background: var(--ledge-face); }
.rec[aria-checked="false"] .rec-knob { left: 2px; }

.shelf-rail {
  position: relative;
  padding: 22px 22px 0;
  background: var(--shelf);
  border-radius: 22px 22px 6px 6px;
  overflow: hidden;
  /* the ledge the slips stand on */
  box-shadow: inset 0 -18px 0 var(--ledge), inset 0 -22px 0 var(--ledge-face);
}
.shelf-rail::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 120px;
  background: linear-gradient(to right, transparent, var(--shelf) 85%);
  pointer-events: none;
}
.slips { display: flex; gap: 14px; list-style: none; margin: 0; padding: 0 0 22px; transition: filter 240ms ease, opacity 240ms ease; }
.slip {
  flex: none; width: 196px; height: 232px;
  display: flex; flex-direction: column;
  background: var(--sheet);
  border-radius: 12px;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--ledge-face) 70%, transparent), 0 10px 18px -12px rgba(15, 20, 32, 0.35);
  overflow: hidden;
  font-size: 0.86rem; line-height: 1.4;
}
.tint-a { --tint: var(--tint-a); }
.tint-b { --tint: var(--tint-b); }
.tint-c { --tint: var(--tint-c); }
.tint-d { --tint: var(--tint-d); }
.tint-e { --tint: var(--tint-e); }
.slip header {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  padding: 9px 12px;
  background: color-mix(in srgb, var(--tint) 20%, var(--sheet));
  border-bottom: 1px solid color-mix(in srgb, var(--tint) 30%, var(--sheet));
}
.slip header span { font-weight: 700; color: var(--ink); }
.slip header time { font-size: 0.78rem; color: var(--ink-2); }
.slip > p, .slip > pre, .slip > div { flex: 1; margin: 12px; }
.slip > p { color: var(--ink); font-size: 0.95rem; line-height: 1.38; }
.slip footer { padding: 8px 12px 10px; font-size: 0.78rem; color: var(--ink-2); }
.slip pre { font: 0.8rem/1.5 var(--mono); color: var(--ink); white-space: pre-wrap; }
.slip-link b { display: block; font-weight: 600; font-size: 0.82rem; color: var(--ink-2); margin-bottom: 4px; }
.slip-swatch { border-radius: 8px; background: #2E47C9; }
.slip-image {
  border-radius: 8px;
  background:
    radial-gradient(circle at 72% 30%, #F6E7A6 0 12%, transparent 13%),
    linear-gradient(160deg, transparent 55%, #5E7B6A 56%),
    linear-gradient(200deg, transparent 48%, #7F9C88 49%),
    linear-gradient(#A9C6E4, #D8E5F1);
}
.slip-file { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 10px; color: var(--ink-2); word-break: break-word; }
.slip-file svg { color: var(--ink-2); }
.slip.is-selected { outline: 3px solid var(--hi); outline-offset: 2px; }

.shelf.is-paused .slips { filter: grayscale(1); opacity: 0.42; }
.paused-note {
  position: absolute; left: 50%; top: 46%;
  transform: translate(-50%, -50%) rotate(-3deg);
  padding: 10px 18px;
  border: 2px solid var(--ink); border-radius: 10px;
  background: var(--sheet); color: var(--ink);
  font: 700 1.05rem/1.3 var(--display);
  text-align: center; white-space: nowrap;
  z-index: 2;
}
.paused-note[hidden] { display: none; }
.shelf figcaption { margin-top: 14px; padding: 0 4px; font-size: 0.88rem; color: var(--ink-2); }

@media (prefers-reduced-motion: no-preference) {
  .slip-new { animation: slip-arrives 700ms cubic-bezier(0.2, 0.8, 0.2, 1) 500ms both; }
  @keyframes slip-arrives {
    from { margin-left: -210px; opacity: 0; transform: translateY(-36px) rotate(-5deg); }
    60% { opacity: 1; }
    to { margin-left: 0; opacity: 1; transform: none; }
  }
}

/* Section headings */
.features h2, .privacy h2, .install h2, .faq h2 {
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
}

/* Features */
.features { padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 104px); }
.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(40px, 6vw, 72px) 0;
  border-top: 1px solid var(--rule);
}
.features h2 + .feature { margin-top: clamp(28px, 4vw, 48px); }
.feature:nth-of-type(even) .feature-text { order: 2; }
.feature h3 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.12; letter-spacing: -0.015em; max-width: 18ch; }
.feature-summary { margin-top: 16px; font-size: 1.12rem; color: var(--ink); max-width: 46ch; }
.feature ul { list-style: none; margin: 20px 0 0; padding: 0; max-width: 46ch; }
.feature li { position: relative; padding-left: 22px; margin-top: 10px; color: var(--ink-2); }
.feature li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 10px; height: 12px; border-radius: 2px;
  background: var(--carbon); opacity: 0.85;
}

.screen { margin: 0; }
.screen img { border-radius: 14px; box-shadow: 0 24px 48px -28px rgba(15, 20, 32, 0.5); }

/* A feature with no screenshot yet: title on the left, the detail on the right. */
.feature-plain { display: block; padding: clamp(32px, 4.5vw, 52px) 0; }
.feature-plain .feature-text {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 0 clamp(28px, 5vw, 72px);
  align-items: start;
}
.feature-plain h3 { grid-column: 1; grid-row: 1 / span 2; max-width: 16ch; }
.feature-plain .feature-summary { grid-column: 2; margin-top: 0; max-width: 54ch; }
.feature-plain ul { grid-column: 2; max-width: 54ch; }

/* Privacy (the vault band) */
.privacy {
  --focus: var(--vault-ink);
  background: var(--vault); color: var(--vault-ink);
  padding: clamp(64px, 10vw, 128px) 0;
}
.privacy-head { max-width: 40rem; }
@media (prefers-color-scheme: dark) {
  .privacy { border-block: 1px solid var(--vault-rule); }
}
.privacy-lock { color: var(--hi); margin-bottom: 24px; }
.privacy-head p { margin-top: 18px; font-size: 1.2rem; line-height: 1.5; color: var(--vault-2); }
.privacy-list {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 0 clamp(24px, 4vw, 56px);
  list-style: none; margin: clamp(40px, 6vw, 64px) 0 0; padding: 0;
}
.privacy-list li { padding: 24px 0 28px; border-top: 1px solid var(--vault-rule); }
.privacy-list h3 { font-size: 1.25rem; line-height: 1.25; }
.privacy-list p { margin-top: 8px; color: var(--vault-2); }

/* Install */
.install { padding: clamp(64px, 10vw, 120px) 0 clamp(48px, 7vw, 88px); }
.install-meta { margin-top: 14px; font-size: 1.15rem; color: var(--ink-2); }
.install-ways {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-top: clamp(32px, 5vw, 56px);
  border-top: 1px solid var(--rule);
}
.way { padding: 32px 0 8px; min-width: 0; }
.way + .way { padding-left: clamp(24px, 4vw, 56px); border-left: 1px solid var(--rule); margin-left: clamp(24px, 4vw, 56px); }
.way h3 { font-size: 1.45rem; line-height: 1.2; }
.way p { margin-top: 12px; color: var(--ink-2); }
.way .btn { margin-top: 24px; }
.steps { counter-reset: step; list-style: none; margin: 18px 0 0; padding: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 40px; margin-top: 14px; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0.05em;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: var(--paper);
  font: 700 0.85rem/1 var(--display);
}
.filename { font-weight: 600; overflow-wrap: anywhere; }
.cmd-block { display: flex; margin-top: 18px; padding-top: 8px; padding-bottom: 8px; }
.cmd-block code { flex: 1; white-space: normal; overflow-wrap: anywhere; }
.muted { font-size: 0.95rem; }
.muted code { overflow-wrap: anywhere; }

.perm-title { margin-top: clamp(64px, 9vw, 104px); font-size: clamp(1.6rem, 2.8vw, 2.2rem); letter-spacing: -0.015em; line-height: 1.12; }
.perm-intro { margin-top: 12px; color: var(--ink-2); max-width: 52ch; }
.perms { margin: 28px 0 0; }
.perm {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 8px clamp(24px, 4vw, 56px);
  padding: 22px 0;
  border-top: 1px solid var(--rule);
}
.perm:last-child { border-bottom: 1px solid var(--rule); }
.perm dt { font: 700 1.2rem/1.3 var(--display); }
.perm dd { margin: 0; max-width: 60ch; }
.perm-when { font-weight: 600; }
.perm dd p + p { margin-top: 4px; color: var(--ink-2); }

/* FAQ */
.faq { padding: clamp(48px, 7vw, 88px) 0 clamp(72px, 10vw, 128px); }
.faq-inner { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 24px clamp(24px, 4vw, 56px); align-items: start; }
.faq-list { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 0;
  font: 600 1.15rem/1.35 var(--display);
  cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 14px; height: 14px;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 14px 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2px 14px no-repeat;
  transition: transform 160ms ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 20px; max-width: 60ch; color: var(--ink-2); }
.faq details code { overflow-wrap: anywhere; }

/* Footer */
.foot { border-top: 1px solid var(--rule); padding: 28px 0 40px; color: var(--ink-2); font-size: 0.92rem; }
.foot-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; }
.foot-brand { display: flex; align-items: center; gap: 10px; }
.foot-brand img { border-radius: 6px; }

/* Narrow screens */
@media (max-width: 860px) {
  .feature { grid-template-columns: minmax(0, 1fr); }
  .feature:nth-of-type(even) .feature-text { order: 0; }
  .feature-plain .feature-text { display: block; }
  .feature-plain .feature-summary { margin-top: 16px; }
  .install-ways { grid-template-columns: minmax(0, 1fr); }
  .way + .way { padding-left: 0; margin-left: 0; border-left: 0; border-top: 1px solid var(--rule); margin-top: 32px; }
  .perm { grid-template-columns: minmax(0, 1fr); }
  .faq-inner { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .top nav { display: none; }
  .top .btn-small { margin-left: auto; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .cmd { width: 100%; }
  .cmd code { flex: 1; min-width: 0; white-space: normal; overflow-wrap: anywhere; font-size: 0.82rem; }
  .cmd { padding-top: 8px; padding-bottom: 8px; }
  .shelf-search { min-width: 0; }
  .shelf-search, .shelf-tabs li:not(.is-current):not(.tab-lock) { display: none; }
  .shelf-rail { padding: 16px 16px 0; border-radius: 18px 18px 6px 6px; }
  .slip { width: 168px; height: 212px; }
  .paused-note { white-space: normal; width: 80%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}
