/* Umbra Labs publisher site (umbralabs.app).
   One stylesheet for the home page, the app pages and the legal pages.
   Light, monochrome, wide on desktop, single column on phones. */

:root {
  --bg: #ffffff;
  --soft: #f5f5f2;
  --ink: #111214;
  --ink-2: #5d6168;
  --line: #e6e6e1;
  --radius: 20px;
  --pad: clamp(20px, 5vw, 48px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--pad); }
.narrow { max-width: 820px; }
section[id], div[id] { scroll-margin-top: 84px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; font-size: 18px; letter-spacing: -0.01em; white-space: nowrap; }
.brand img { width: 34px; height: 34px; }
.site-header nav { display: flex; gap: clamp(16px, 3vw, 34px); font-size: 15.5px; color: var(--ink-2); }
.site-header nav a { text-decoration: none; padding: 8px 0; }
.site-header nav a:hover { color: var(--ink); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 26px; border-radius: 999px; background: var(--ink); color: #fff; border: 1px solid var(--ink); text-decoration: none; font-weight: 600; font-size: 16px; }
.btn:hover { background: #2a2c30; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); background: transparent; }
.btn.off { background: var(--soft); color: var(--ink-2); border-color: var(--line); cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* ---------- shared type ---------- */
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.section { padding: clamp(56px, 9vw, 104px) 0 0; }
.section-head { max-width: 640px; margin-bottom: clamp(24px, 4vw, 40px); }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.12; letter-spacing: -0.025em; font-weight: 650; margin-top: 10px; }
.section-head p { color: var(--ink-2); margin-top: 12px; font-size: 18px; }

/* ---------- home ---------- */
.hero { padding: clamp(48px, 9vw, 112px) 0 clamp(36px, 6vw, 64px); text-align: center; }
.hero h1 { font-size: clamp(38px, 7vw, 76px); line-height: 1.03; letter-spacing: -0.04em; font-weight: 650; max-width: 14ch; margin: 16px auto 0; }
.hero p.lead { max-width: 600px; margin: 22px auto 0; font-size: clamp(17px, 2vw, 20px); color: var(--ink-2); }
.hero .actions { justify-content: center; }
.banner { border-radius: clamp(18px, 3vw, 32px); overflow: hidden; background: var(--soft); }
.banner img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }

.apps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.app { display: flex; gap: 20px; align-items: flex-start; padding: clamp(20px, 3vw, 30px); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
a.app:hover { border-color: var(--ink); }
.app > img { width: 72px; height: 72px; border-radius: 18px; flex: none; }
.app > div { flex: 1; min-width: 0; }
.app h3 { font-size: 21px; letter-spacing: -0.015em; font-weight: 650; }
.app p { color: var(--ink-2); font-size: 16px; line-height: 1.55; margin-top: 4px; }
.app .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 14px; font-size: 13.5px; color: var(--ink-2); }
.pill { display: inline-block; padding: 3px 11px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.app .more { margin-left: auto; font-weight: 600; font-size: 14.5px; color: var(--ink); white-space: nowrap; }

.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.value { background: var(--soft); border-radius: var(--radius); padding: clamp(22px, 3vw, 30px); }
.value h3 { font-size: 19px; letter-spacing: -0.01em; font-weight: 650; }
.value p { color: var(--ink-2); font-size: 16px; margin-top: 8px; }

.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 3vw, 30px); }
.card.soft { background: var(--soft); border-color: transparent; }
.card h3 { font-size: 19px; letter-spacing: -0.01em; font-weight: 650; margin-bottom: 10px; }
.card p { color: var(--ink-2); font-size: 16px; margin-bottom: 12px; }
.card p:last-child { margin-bottom: 0; }
.card a { color: var(--ink); }
.facts { margin: 0; display: grid; gap: 12px; }
.facts div { display: grid; grid-template-columns: 84px 1fr; gap: 12px; font-size: 16px; }
.facts dt { color: var(--ink-2); font-size: 14px; padding-top: 2px; }
.facts dd { margin: 0; }

/* ---------- app page ---------- */
.app-hero { padding: clamp(40px, 7vw, 84px) 0 0; max-width: 780px; }
.app-hero .id { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.app-hero .id img { width: 84px; height: 84px; border-radius: 21px; flex: none; }
.app-hero h1 { font-size: clamp(32px, 5.4vw, 56px); line-height: 1.06; letter-spacing: -0.035em; font-weight: 650; }
.app-hero .by { color: var(--ink-2); font-size: 15.5px; margin-top: 6px; }
.app-hero p.lead { font-size: clamp(17px, 2vw, 20px); color: var(--ink-2); }
.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: clamp(36px, 6vw, 60px); }
.shots img { width: 100%; border-radius: 18px; border: 1px solid var(--line); background: var(--soft); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 0; margin: 0; list-style: none; }
.features li { border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; }
.features b { display: block; font-weight: 650; letter-spacing: -0.005em; }
.features span { display: block; color: var(--ink-2); font-size: 15.5px; line-height: 1.55; margin-top: 4px; }
.note { color: var(--ink-2); font-size: 15.5px; margin-top: 18px; }
.price { display: grid; grid-template-columns: 1fr auto; gap: clamp(20px, 4vw, 48px); align-items: center; }
.price .amount { font-size: clamp(36px, 5vw, 48px); font-weight: 650; letter-spacing: -0.03em; line-height: 1; white-space: nowrap; text-align: right; }
.price .amount small { display: block; font-size: 13.5px; font-weight: 400; letter-spacing: 0; line-height: 1.45; color: var(--ink-2); margin-top: 10px; white-space: normal; max-width: 220px; margin-left: auto; }

/* ---------- document pages ---------- */
.doc { padding: clamp(40px, 7vw, 76px) 0 0; }
.doc h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 650; }
.doc .date { color: var(--ink-2); margin: 10px 0 30px; }
.doc h2 { font-size: 21px; letter-spacing: -0.01em; font-weight: 650; margin: 38px 0 10px; }
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 14px; padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc a { color: var(--ink); }
.box { background: var(--soft); border-radius: var(--radius); padding: 22px 26px; }
.box b { font-weight: 650; }
.box ul { margin: 10px 0 0; }
table { width: 100%; border-collapse: collapse; font-size: 16px; margin: 0 0 14px; }
th, td { text-align: left; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; }
.box table { margin: 0; }
.box tr:last-child th, .box tr:last-child td { border-bottom: 0; }

/* ---------- footer ---------- */
.site-footer { margin-top: clamp(64px, 10vw, 120px); background: var(--soft); }
.foot { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; padding-top: clamp(40px, 6vw, 64px); padding-bottom: 32px; }
.foot .brand { font-size: 17px; }
.foot .brand img { mix-blend-mode: multiply; }
.foot .tagline { color: var(--ink-2); font-size: 15px; margin-top: 12px; max-width: 280px; }
.foot h4 { margin: 0 0 12px; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15.5px; }
.foot ul a { text-decoration: none; }
.foot ul a:hover { text-decoration: underline; }
.foot ul span { color: var(--ink-2); }
.legal { border-top: 1px solid var(--line); padding-top: 20px; padding-bottom: 36px; color: var(--ink-2); font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between; }

/* ---------- tablets ---------- */
@media (max-width: 960px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .values { grid-template-columns: 1fr; }
  .foot { grid-template-columns: 1fr 1fr 1fr; }
  .foot .about-col { grid-column: 1 / -1; }
}

/* ---------- phones ---------- */
@media (max-width: 720px) {
  body { font-size: 16.5px; }
  .bar { height: 60px; }
  .brand { font-size: 17px; }
  .brand img { width: 30px; height: 30px; }
  .site-header nav { font-size: 15px; gap: 18px; }
  .hero { text-align: left; }
  .hero h1 { margin-left: 0; margin-right: 0; max-width: none; }
  .hero p.lead { margin-left: 0; margin-right: 0; }
  .hero .actions { justify-content: flex-start; }
  .actions .btn { flex: 1 1 100%; }
  .banner img { aspect-ratio: 16 / 9; }
  .apps, .split, .features { grid-template-columns: 1fr; }
  .app { gap: 16px; }
  .app > img { width: 60px; height: 60px; border-radius: 15px; }
  .app-hero .id img { width: 68px; height: 68px; border-radius: 17px; }
  /* screenshots become a swipeable row */
  .shots { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin-left: calc(var(--pad) * -1); margin-right: calc(var(--pad) * -1); padding: 0 var(--pad) 6px; scrollbar-width: none; }
  .shots::-webkit-scrollbar { display: none; }
  .shots img { flex: none; width: 72%; scroll-snap-align: center; }
  .price { grid-template-columns: 1fr; }
  .price .amount { text-align: left; }
  .price .amount small { margin-left: 0; max-width: none; }
  /* tables read as stacked rows */
  table.stack, table.stack tbody, table.stack tr, table.stack td, table.stack th { display: block; }
  table.stack tr.head { display: none; }
  table.stack tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  table.stack td, table.stack th { border: 0; padding: 2px 0; }
  table.stack td[data-label]::before { content: attr(data-label); display: block; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; margin-top: 6px; }
  .box tr:last-child { border-bottom: 0; }
  .foot { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .legal { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
