/* DeckTerm site. Colors are the app's DeckTerm theme: background, foreground, accent,
   and the two surface steps the app mixes 7% and 14% toward the foreground. */

@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/JetBrainsMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/JetBrainsMono-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #000000;
  --fg: #e6e6e6;
  --accent: #3ce882;
  --surface: #101010;
  --raised: #202020;
  --line: #2b2b2b;
  --muted: #a0a0a0;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1.0625rem/1.6 var(--sans);
  overflow-wrap: break-word;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--mono); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.35rem); }
h3 { font-size: 1.0625rem; letter-spacing: -0.01em; }
p, ul, ol, dl { margin: 0; }

code, kbd, pre { font-family: var(--mono); font-size: 0.92em; }
code { background: var(--raised); padding: 0.1em 0.35em; border-radius: 5px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

kbd {
  display: inline-block;
  min-width: 2.1em;
  padding: 0.18em 0.5em;
  background: var(--raised);
  border: 1px solid #333;
  border-bottom-width: 2px;
  border-radius: 7px;
  color: var(--fg);
  font-size: 0.85em;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
}

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

.skip { position: absolute; left: 1rem; top: -4rem; background: var(--fg); color: var(--bg); padding: 0.5rem 0.9rem; border-radius: 8px; z-index: 2; }
.skip:focus { top: 1rem; }

/* Header: the app's >_ mark, drawn the way the app draws it. */
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.25rem; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--fg); text-decoration: none; font: 700 1.05rem var(--mono); letter-spacing: -0.01em; }
.mark { display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 0.5rem; background: var(--raised); color: var(--accent); font: 700 0.85rem var(--mono); letter-spacing: -0.04em; }
.site-header nav a { color: var(--fg); text-decoration: none; font-size: 0.95rem; }
.site-header nav a:hover { color: var(--accent); }
.site-header nav ul { list-style: none; padding: 0; display: flex; gap: 1.5rem; }

/* Hero */
.hero { padding-block: clamp(2.5rem, 7vw, 6rem) clamp(3rem, 7vw, 5rem); }
.hero h1 { font-size: clamp(2.3rem, 1.2rem + 5.2vw, 5.4rem); letter-spacing: -0.045em; line-height: 1.02; text-wrap: balance; }
@media (min-width: 56rem) { .hero h1 .line { white-space: nowrap; } }
.cursor { display: inline-block; width: 0.52em; height: 0.82em; margin-left: 0.08em; vertical-align: -0.04em; background: var(--accent); animation: blink 1.1s steps(1, end) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.lede { margin-top: 1.5rem; max-width: 34rem; font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem); line-height: 1.5; color: #cfcfcf; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin-top: 2rem; }
.soon { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.7rem 1.2rem; border-radius: 999px; background: var(--raised); font: 700 0.95rem var(--mono); }
.dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--accent); flex: none; }
.req { margin-top: 1rem; color: var(--muted); font-size: 0.95rem; }

/* A landscape iPhone: the screenshot inside a thin bezel. */
.phone { margin: clamp(2.5rem, 6vw, 4.5rem) 0 0; padding: clamp(5px, 0.9vw, 12px); background: #0b0b0b; border: 1px solid var(--line); border-radius: clamp(18px, 4.2vw, 56px); }
.phone img { width: 100%; aspect-ratio: 2200 / 1012; object-fit: cover; border-radius: clamp(13px, 3.3vw, 45px); }
figcaption { margin-top: 0.9rem; color: var(--muted); font-size: 0.95rem; }

/* Sections */
.section { padding-block: clamp(3rem, 6vw, 5rem); }
.section-head { max-width: 40rem; }
.section-head p { margin-top: 1rem; color: #cfcfcf; }

.decks { display: grid; gap: 1.5rem; margin-top: clamp(2rem, 5vw, 3.5rem); }
@media (min-width: 46rem) { .decks { grid-template-columns: 1fr 1fr; } }
.decks figure { margin: 0; }
.decks img { width: 100%; aspect-ratio: 3 / 2; border-radius: 16px; background: var(--surface); }

/* Shortcut table */
.keys { width: 100%; margin-top: 2rem; border-collapse: collapse; }
.keys th, .keys td { padding: 0.7rem 0; text-align: left; vertical-align: baseline; border-top: 1px solid var(--line); }
.keys th { font-weight: 400; white-space: nowrap; padding-right: 1.25rem; width: 1%; }
.keys tr:last-child th, .keys tr:last-child td { border-bottom: 1px solid var(--line); }

/* Three points under the decks */
.trio { display: grid; gap: 2rem; margin-top: clamp(2rem, 5vw, 3rem); list-style: none; padding: 0; }
@media (min-width: 52rem) { .trio { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem; } }
.trio p { margin-top: 0.5rem; color: #cfcfcf; }
.more { margin-top: 1.5rem; }

/* Legal and support pages */
.prose { max-width: 44rem; padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(4rem, 9vw, 6rem); }
.prose h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); letter-spacing: -0.035em; }
.prose .meta { margin-top: 0.75rem; color: var(--muted); }
.prose h2 { font-size: 1.35rem; margin-top: 2.75rem; scroll-margin-top: 1rem; }
.prose h3 { margin-top: 2rem; scroll-margin-top: 1rem; }
.prose p, .prose ul, .prose ol { margin-top: 0.9rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li + li { margin-top: 0.4rem; }
.prose .intro { font-size: 1.15rem; color: #cfcfcf; margin-top: 1.25rem; }
.contact { margin-top: 2rem; padding: 1.25rem 1.4rem; background: var(--surface); border-radius: 14px; }
.contact p { margin: 0; }
.contact p + p { margin-top: 0.4rem; color: #cfcfcf; }
.toc { columns: 2 12rem; column-gap: 2rem; }
.toc li { break-inside: avoid; }
.license pre { margin-top: 1rem; padding: 1rem 1.1rem; background: var(--surface); border-radius: 12px; font-size: 0.78rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; color: #d0d0d0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 2.5rem 3rem; font-size: 0.95rem; }
.site-footer ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; }
.site-footer a { color: var(--fg); }
.site-footer a:hover { color: var(--accent); }
.site-footer .small { margin-top: 1.5rem; color: var(--muted); font-size: 0.875rem; }
.site-footer .small + .small { margin-top: 0.35rem; }

@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; }
  * { scroll-behavior: auto !important; }
}

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
