/* Tidemark by Quelris. Tokens follow the company site (docs/brand.md): one ink, one accent, Pretendard, hairlines. */

@font-face {
  font-family: "Pretendard";
  src: url(/assets/pretendard-latin.5e25781d61.woff2) format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f5f5f4;
  --ink: #1c1917;
  --muted: #57534e;
  --line: #1c19171f;
  --rule: #1c1917;
  --accent: #c24100;
  --btn-bg: #1c1917;
  --btn-fg: #fbfbf9;
  --btn-hover: #c24100;
  --field: #6b665f;
  --error: #b42318;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1a18;
    --surface: #2f2e2d;
    --ink: #fbfbf9;
    --muted: #bbb7b4;
    --line: #fbfbf91f;
    --rule: #fbfbf9;
    --accent: #e25f1d;
    --btn-bg: #fbfbf9;
    --btn-fg: #1c1917;
    --btn-hover: #e25f1d;
    --field: #8c8681;
    --error: #ff9f93;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3 { font-weight: 600; text-wrap: balance; }
p, li { text-wrap: pretty; }
a { color: inherit; text-underline-offset: 2px; transition: color 200ms var(--ease); }
a:hover { color: var(--accent); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.skip { position: absolute; left: 16px; top: -64px; z-index: 2; padding: 8px 12px; background: var(--btn-bg); color: var(--btn-fg); }
.skip:focus { top: 16px; }
.draft-note { padding: 8px 24px; background: var(--surface); color: var(--muted); font-size: 14px; line-height: 20px; }

.wrap { width: 100%; max-width: 1152px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* Header and footer */
.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 64px; }
.wordmark { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; }
.wordmark:hover { color: inherit; }
.wordmark svg { display: block; width: 24px; height: 24px; }
.mark-ring { fill: currentColor; }
.mark-dot { fill: var(--accent); }
.wordmark-by { color: var(--muted); font-weight: 400; }
.nav-links { display: flex; gap: 24px; font-size: 14px; line-height: 20px; }
.nav-links a { text-decoration: none; }
.site-foot { margin-top: 64px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; line-height: 20px; }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 24px; padding-bottom: 32px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 16px; }

/* Shared rows: a narrow label column and a wide content column */
.row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 24px 32px; }
.section { padding-top: 64px; }
.section > .row:first-child { padding-top: 24px; border-top: 1px solid var(--rule); }
h2 { font-size: 24px; line-height: 32px; letter-spacing: -0.015em; }
h3 { font-size: 16px; line-height: 24px; }
.section .row > div > p, .stack p, .faq p { max-width: 65ch; }
.note { margin-top: 16px; max-width: 65ch; color: var(--muted); font-size: 14px; line-height: 20px; }
.stack { display: grid; gap: 40px; }
.stack h3 + p { color: var(--muted); }
.ruled { max-width: 72ch; }
.ruled li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.stack .ruled { margin-top: 8px; }
ol.ruled li:first-child { padding-top: 0; }

/* Hero */
.hero { padding-top: 64px; }
h1 { font-size: 60px; line-height: 1; letter-spacing: -0.035em; max-width: 1000px; }
.hero-row { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--rule); }
.price { font-size: 48px; line-height: 1; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.hero-sub { max-width: 60ch; font-size: 18px; line-height: 28px; }
.hero-cta { margin-top: 24px; }

.btn {
  display: inline-block;
  padding: 8px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 200ms var(--ease);
}
.btn:hover { background: var(--btn-hover); color: var(--btn-fg); }
.btn[aria-busy="true"] { cursor: progress; opacity: 0.7; }

/* Findings ledger */
.ledger { margin-top: 32px; border-top: 1px solid var(--line); }
.ledger a { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 4px 32px; padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.ledger-site { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.ledger-finding { max-width: 62ch; font-size: 18px; line-height: 28px; color: var(--ink); }
.ledger-date { grid-column: 2; color: var(--muted); font-size: 14px; line-height: 20px; }
.ledger a:hover .ledger-site { color: var(--accent); }

/* Qriple example */
.clip { margin-top: 24px; }
.clip video { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.clip figcaption { display: flex; justify-content: space-between; gap: 16px; margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 20px; }
.clip-toggle { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.pr-title { margin-top: 32px; }
.pr-meta { margin-top: 4px; }
.pr-files { margin-top: 12px; border-top: 1px solid var(--line); font-size: 14px; line-height: 20px; }
.pr-files li { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pr-files code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.pr-files span { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }

/* FAQ */
.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.faq p { margin-top: 4px; color: var(--muted); }

/* Form */
.form-area { max-width: 480px; }
.field + .field { margin-top: 16px; }
label { display: block; font-size: 14px; line-height: 20px; font-weight: 600; }
.hint { display: block; color: var(--muted); font-size: 14px; line-height: 20px; }
input, textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 12px;
  border: 1px solid var(--field);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
textarea { min-height: 96px; resize: vertical; }
[aria-invalid="true"] { border-color: var(--error); }
.field-error { margin-top: 4px; color: var(--error); font-size: 14px; line-height: 20px; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 16px; padding: 12px; border: 1px solid var(--error); border-radius: 8px; font-size: 14px; line-height: 20px; }
.form-status strong { display: block; color: var(--error); font-weight: 600; }
.form-actions { margin-top: 24px; }
.success h3 { font-size: 24px; line-height: 32px; }
.success p { margin-top: 8px; }
.success:focus { outline: none; }

/* Articles: teardowns, privacy, 404 */
.article { padding-top: 64px; }
.article > * { max-width: 720px; }
.article-meta { margin-top: 12px; color: var(--muted); font-size: 14px; line-height: 20px; }
.prose { overflow-wrap: anywhere; }
.prose h1 { font-size: 36px; line-height: 40px; letter-spacing: -0.025em; }
.prose h2 { margin-top: 48px; }
.prose h3 { margin-top: 32px; font-size: 18px; line-height: 28px; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose .table-wrap { margin-top: 16px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose ul { list-style: square; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 8px; }
.prose a { color: var(--accent); }
.prose a:hover { color: var(--ink); }
.prose a.btn, .prose a.btn:hover { color: var(--btn-fg); }
.prose strong { font-weight: 600; }
.prose code { padding: 1px 4px; border-radius: 4px; background: var(--surface); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }
.prose blockquote { margin-left: 0; margin-right: 0; padding: 12px 16px; background: var(--surface); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
.prose table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; line-height: 20px; overflow-wrap: normal; }
.prose th, .prose td { padding: 8px 12px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.prose thead th { border-top: 0; font-weight: 600; }
.prose td a { overflow-wrap: anywhere; }
.prose td code { white-space: nowrap; }
.article-cta { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--rule); }
.prose .article-cta h2 { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  a, .btn { transition: none; }
}

@media (max-width: 1023px) {
  h1 { font-size: 48px; }
  .faq { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 767px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .draft-note { padding: 8px 16px; }
  .nav-links { display: none; }
  .row { grid-template-columns: minmax(0, 1fr); }
  .row > div:empty { display: none; }
  .hero { padding-top: 40px; }
  h1 { font-size: 36px; line-height: 40px; letter-spacing: -0.03em; }
  .hero-row { margin-top: 32px; }
  .price { font-size: 36px; line-height: 40px; }
  .hero-cta .btn { display: block; text-align: center; }
  .ledger a { grid-template-columns: minmax(0, 1fr); }
  .ledger-date { grid-column: 1; }
  .form-area { max-width: none; }
  .form-actions .btn { width: 100%; }
  .article { padding-top: 40px; }
  .prose h1 { font-size: 30px; line-height: 36px; }
}
