/* davidb.app: one stylesheet, two themes (the warm light studio pages and the dark Video Delay pages). */
:root {
  --paper: #f6f4ef;
  --card: #ffffff;
  --ink: #16150f;
  --muted: #5f5b52;
  --line: #e4e0d6;
  --accent: #16150f;
  --focus: #f5610f;
  --radius: 22px;
  --max: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
.wrap { width: min(var(--max), 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 12px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; z-index: 10; }
.skip:focus { left: 12px; }

/* Header and footer */
.site-header { padding: 22px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.wordmark { font: 800 20px/1 var(--rounded); letter-spacing: -0.02em; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.wordmark .mark { width: 30px; height: 30px; border-radius: 8px; background: var(--ink); color: var(--paper); display: grid; place-items: center; }
.wordmark .mark svg { width: 26px; height: 26px; }
.wordmark .tld { color: var(--muted); font-weight: 700; }
.site-nav { display: flex; gap: 22px; font-size: 15px; font-weight: 600; }
.site-nav a { text-decoration: none; color: var(--muted); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-footer { border-top: 1px solid var(--line); margin-top: 96px; padding: 32px 0 48px; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* Home: intro */
.intro { padding: 56px 0 48px; }
.kicker { font: 700 13px/1 var(--rounded); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.intro h1 { font-size: clamp(40px, 7vw, 76px); font-weight: 800; letter-spacing: -0.035em; max-width: 14ch; }
.intro .lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 40em; margin-top: 22px; }
.intro .facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; padding: 0; list-style: none; }
.intro .facts li { font-size: 14px; font-weight: 600; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }

/* Home: featured Video Delay */
.feature { display: grid; grid-template-columns: 1fr 1.15fr; background: #0e0e10; color: #fff7e6; border-radius: 28px; overflow: hidden; margin-bottom: 72px; text-decoration: none; }
.feature .copy { padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.feature .badge { align-self: flex-start; font: 800 12px/1 var(--rounded); letter-spacing: 0.08em; text-transform: uppercase; color: #0e0e10; background: linear-gradient(135deg, #ff9e28, #f5610f); padding: 7px 12px; border-radius: 999px; }
.feature .title { display: flex; align-items: center; gap: 14px; }
.feature .title img { width: 56px; height: 56px; border-radius: 13px; }
.feature h2 { font-size: clamp(30px, 4vw, 42px); font-weight: 800; }
.feature p { color: rgba(255, 247, 230, 0.72); font-size: 18px; max-width: 30em; }
.feature .more { font-weight: 700; color: #ff9e28; }
.feature:hover .more { text-decoration: underline; }
.feature .art { min-height: 280px; }
.feature .art img { width: 100%; height: 100%; object-fit: cover; }

/* Home: app groups */
.group { margin-top: 64px; }
.group h2 { font-size: 26px; font-weight: 800; margin-bottom: 20px; display: flex; align-items: baseline; gap: 12px; }
.group h2 .count { font: 700 14px/1 var(--rounded); color: var(--muted); }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.app { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: start; }
.app img { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06); }
.app h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.app p { color: var(--muted); font-size: 15px; line-height: 1.5; margin-top: 4px; }
.app .links { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-top: 14px; font-size: 14px; font-weight: 600; }
.app .store { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border-radius: 999px; background: var(--ink); color: var(--paper); text-decoration: none; }
.app .store:hover { background: #33312a; }
.app .soon { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 1px dashed #b9b3a5; color: var(--muted); }
.web-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.web-list a { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center; padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px; text-decoration: none; background: var(--card); }
.web-list img { width: 44px; height: 44px; border-radius: 11px; }
.web-list strong { display: block; }
.web-list small { display: block; color: var(--muted); font-size: 14px; line-height: 1.45; margin-top: 2px; }
.help { margin-top: 80px; padding: 36px; border-radius: 28px; background: var(--card); border: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.help h2 { font-size: 26px; font-weight: 800; }
.help p { color: var(--muted); margin-top: 6px; max-width: 38em; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 700; text-decoration: none; }

/* Document pages (privacy, support, terms) */
.doc { width: min(760px, 100% - 40px); margin: 32px auto 0; }
.doc .crumbs { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.doc .crumbs a { text-decoration: none; }
.doc .crumbs a:hover { text-decoration: underline; }
.doc h1 { font-size: clamp(34px, 5vw, 48px); font-weight: 800; }
.doc .updated { color: var(--muted); font-size: 15px; margin-top: 10px; }
.doc h2 { font-size: 22px; font-weight: 750; margin: 40px 0 10px; }
.doc p, .doc li { color: #3a372f; }
.doc p + p { margin-top: 14px; }
.doc ul { padding-left: 22px; margin: 10px 0 0; }
.doc li + li { margin-top: 6px; }
.doc .callout { margin-top: 28px; padding: 20px 22px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.doc details { border-top: 1px solid var(--line); padding: 16px 0; }
.doc details:last-of-type { border-bottom: 1px solid var(--line); }
.doc summary { cursor: pointer; font-weight: 700; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.doc summary::after { content: "+"; font: 400 24px/1 var(--rounded); color: var(--muted); }
.doc details[open] summary::after { content: "−"; }
.doc summary::-webkit-details-marker { display: none; }
.doc details p { margin-top: 10px; }

/* 404 */
.notfound { text-align: center; padding: 96px 0 24px; }
.notfound h1 { font-size: clamp(40px, 6vw, 64px); font-weight: 800; }
.notfound p { color: var(--muted); margin: 16px auto 28px; max-width: 30em; }

/* ---------- Video Delay theme ---------- */
.theme-vd { --paper: #0e0e10; --card: #18181b; --ink: #fff7e6; --muted: rgba(255, 247, 230, 0.66); --line: rgba(255, 247, 230, 0.12); --orange: #ff9e28; --ember: #f5610f; color-scheme: dark; }
.theme-vd .wordmark .mark { background: linear-gradient(135deg, var(--orange), var(--ember)); color: #0e0e10; }
.theme-vd .doc p, .theme-vd .doc li { color: rgba(255, 247, 230, 0.82); }
.theme-vd .doc a { color: var(--orange); }
.theme-vd .button { background: linear-gradient(135deg, var(--orange), var(--ember)); color: #0e0e10; }

.vd-hero { position: relative; min-height: min(86vh, 760px); display: grid; align-items: end; overflow: hidden; border-radius: 0 0 32px 32px; }
.vd-hero picture, .vd-hero picture img { position: absolute; inset: 0; width: 100%; height: 100%; }
.vd-hero picture img { object-fit: cover; object-position: 62% center; }
.vd-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14, 14, 16, 0.94) 0%, rgba(14, 14, 16, 0.72) 38%, rgba(14, 14, 16, 0) 70%), linear-gradient(0deg, rgba(14, 14, 16, 0.9) 0%, rgba(14, 14, 16, 0) 40%); }
.vd-hero .wrap { position: relative; z-index: 1; padding: 120px 0 64px; }
.vd-hero .appline { display: flex; align-items: center; gap: 12px; font: 800 15px/1 var(--rounded); letter-spacing: 0.04em; text-transform: uppercase; color: var(--orange); }
.vd-hero .appline img { width: 44px; height: 44px; border-radius: 11px; }
.vd-hero h1 { font-size: clamp(46px, 8vw, 92px); font-weight: 850; letter-spacing: -0.04em; margin-top: 20px; max-width: 9ch; }
.vd-hero .lede { font-size: clamp(18px, 2.2vw, 22px); color: rgba(255, 247, 230, 0.82); max-width: 32em; margin-top: 20px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-top: 30px; }
.store-soon { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 12px 22px; border-radius: 999px; background: #fff7e6; color: #0e0e10; font-weight: 800; }
.store-soon svg { width: 18px; height: 18px; }
.cta-row .note { color: rgba(255, 247, 230, 0.7); font-size: 15px; font-weight: 600; }
.site-header.over { position: absolute; top: 0; left: 0; right: 0; z-index: 2; }
.theme-vd .site-nav a { color: rgba(255, 247, 230, 0.72); }
.theme-vd .site-nav a:hover, .theme-vd .site-nav a[aria-current="page"] { color: #fff7e6; }

.vd-section { margin-top: 96px; }
.vd-section > h2 { font-size: clamp(30px, 4.4vw, 48px); font-weight: 800; letter-spacing: -0.03em; max-width: 18ch; }
.vd-section > .sub { color: var(--muted); font-size: 19px; margin-top: 12px; max-width: 36em; }
.steps { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, var(--orange), var(--ember)); color: #0e0e10; font: 850 20px/1 var(--rounded); margin-bottom: 18px; }
.steps h3 { font-size: 21px; font-weight: 750; }
.steps p { color: var(--muted); margin-top: 8px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
.features article { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.features .num { font: 850 34px/1 var(--rounded); letter-spacing: -0.02em; background: linear-gradient(135deg, var(--orange), var(--ember)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.features h3 { font-size: 19px; font-weight: 750; margin-top: 14px; }
.features p { color: var(--muted); margin-top: 8px; font-size: 16px; }
.sports { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; padding: 0; list-style: none; }
.sports li { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: 15px; }
.faq { margin-top: 28px; max-width: 820px; }
.faq details { border-top: 1px solid var(--line); padding: 18px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 700; font-size: 19px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; font: 400 26px/1 var(--rounded); color: var(--orange); }
.faq details[open] summary::after { content: "−"; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { color: var(--muted); margin-top: 10px; max-width: 44em; }
.closing { margin-top: 96px; padding: clamp(28px, 5vw, 56px); border-radius: 32px; background: radial-gradient(120% 140% at 100% 0%, rgba(245, 97, 15, 0.35), rgba(245, 97, 15, 0) 60%), var(--card); border: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.closing h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; letter-spacing: -0.03em; }
.closing p { color: var(--muted); margin-top: 10px; }

@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; }
  .feature .art { order: -1; min-height: 0; aspect-ratio: 16 / 9; }
  .steps, .features { grid-template-columns: 1fr; }
  .closing { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .site-nav { gap: 14px; font-size: 14px; }
  .site-nav .optional { display: none; }
  .intro { padding-top: 32px; }
  .grid, .web-list { grid-template-columns: 1fr; }
  .vd-hero { min-height: 0; align-items: stretch; border-radius: 0; }
  .vd-hero picture { position: relative; display: block; aspect-ratio: 3 / 2; }
  .vd-hero picture img { position: absolute; }
  .vd-hero::after { background: linear-gradient(0deg, rgba(14, 14, 16, 1) 0%, rgba(14, 14, 16, 0) 30%); top: 0; bottom: auto; height: calc(100vw * 2 / 3); }
  .vd-hero .wrap { padding: 8px 0 24px; }
  .site-header.over { position: relative; background: var(--paper); }
  .help { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .site-header, .site-footer, .website-analytics { display: none !important; } body { background: #fff; color: #000; } }
