/* Hale, hale.sebmade.com. The app's own dark world: near-black ground, #1c1c1e surfaces, Hale green, a category
   color per ledger section, SF on Apple devices. */
:root {
  --ground: #0a0b0a;
  --ground-2: #111312;
  --surface: #1c1c1e;
  --surface-2: #2a2b2d;
  --line: #2c2e2d;
  --text: #f4f6f5;
  --text-2: #b4bcb8;
  --text-3: #8a938f;
  --hale: #86c9a2;
  --hale-deep: #265c42;
  --cross: #8f8a8c;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --round: ui-rounded, "SF Pro Rounded", var(--display);
  --pad: clamp(20px, 5vw, 64px);
  --max: 1240px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--ground); color: var(--text);
  font: 17px/1.5 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: var(--hale-deep); color: #fff; }
a { color: var(--hale); text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--hale); outline-offset: 3px; border-radius: 6px; }
html { scrollbar-color: #3a3d3c var(--ground); }
::-webkit-scrollbar { width: 10px; height: 8px; }
::-webkit-scrollbar-thumb { background: #3a3d3c; border-radius: 10px; }
::-webkit-scrollbar-track { background: transparent; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

/* Bar */
.bar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 28px;
  padding: 12px var(--pad); padding-top: max(12px, env(safe-area-inset-top));
  background: rgba(10, 11, 10, .94); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 600 19px/1 var(--display); letter-spacing: -0.01em; }
.brand img { border-radius: 8px; }
.bar nav { display: flex; gap: 24px; margin-left: auto; }
.bar nav a { color: var(--text-2); text-decoration: none; font-size: 15px; }
.bar nav a:hover { color: var(--text); }
.pill { font-size: 13px; color: var(--text-2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; white-space: nowrap; }
@media (max-width: 860px) { .bar nav { display: none; } .pill { margin-left: auto; } }

/* Hero */
.hero {
  max-width: var(--max); margin: 0 auto; padding: clamp(40px, 7vw, 96px) var(--pad) 32px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 400px); gap: clamp(32px, 6vw, 96px); align-items: center;
}
.hero h1 { font-size: clamp(3.6rem, 10vw, 6rem); line-height: .95; letter-spacing: -0.04em; font-weight: 700; }
.lede { margin-top: 28px; font-size: clamp(19px, 2vw, 23px); line-height: 1.45; color: var(--text-2); max-width: 34ch; }
.lede .h, .h-badge {
  display: inline-grid; place-items: center; width: 1.25em; height: 1.25em; border-radius: 50%;
  background: var(--hale); color: #0d1f16; font: 700 .78em/1 var(--round); vertical-align: .08em;
}
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 36px; }
.play {
  display: inline-flex; align-items: center; gap: 10px; border: 0; cursor: pointer;
  background: var(--hale); color: #0b1d14; font: 600 17px/1 var(--sans); padding: 15px 22px 15px 18px; border-radius: 999px;
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .8);
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s;
}
.play svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.play:hover { transform: translateY(-1px); background: #97d4b0; }
.play:active { transform: translateY(1px); }
.quiet { font-size: 16px; text-decoration: none; }
.quiet:hover { text-decoration: underline; }
.fine { margin-top: 28px; font-size: 14px; color: var(--text-3); max-width: 44ch; }

.film { margin: 0; justify-self: center; width: 100%; max-width: 400px; }
.film-frame { position: relative; }
.film-play {
  position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border: 0; border-radius: 50%;
  background: var(--hale); color: #0b1d14; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 16px 36px -14px rgba(0, 0, 0, .9); transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}
.film-play svg { width: 34px; height: 34px; fill: currentColor; stroke: none; margin-left: 4px; }
.film-play:hover { transform: scale(1.06); }
.film.playing .film-play { display: none; }
.film video {
  display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; border-radius: 28px; background: #000;
  border: 1px solid var(--line); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .02);
}
.film figcaption { margin-top: 14px; font-size: 14px; color: var(--text-3); text-align: center; }

.tally {
  max-width: var(--max); margin: 24px auto 0; padding: 26px var(--pad) 0; display: flex; gap: 28px; flex-wrap: wrap;
  font: 600 clamp(22px, 3vw, 30px)/1.2 var(--display); letter-spacing: -0.01em; color: var(--text-2);
}
.tally a { color: inherit; text-decoration: none; }
.tally a:hover { color: var(--text); }
.tally b { font-family: var(--round); color: var(--hale); font-weight: 700; }
.tally a + a b { color: var(--cross); }

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 36px; }
  .film { max-width: 360px; }
}

/* Ledger */
.ledger { max-width: var(--max); margin: 0 auto; padding: clamp(56px, 8vw, 104px) var(--pad) 0; }
.ledger > h2, .how > h2 { font-size: clamp(2.4rem, 6vw, 4rem); letter-spacing: -0.035em; line-height: 1; font-weight: 700; }
.ledger-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(40px, 6vw, 96px); margin-top: 48px; }
.group { padding: 40px 0 44px; border-top: 1px solid var(--line); }
.group:first-child { border-top: 0; padding-top: 0; }
.group h3 { display: flex; align-items: center; gap: 12px; font-size: clamp(26px, 3vw, 32px); letter-spacing: -0.02em; font-weight: 700; color: var(--c); }
.group h3 svg { width: 30px; height: 30px; stroke-width: 1.9; }
.group .intro { margin-top: 8px; color: var(--text-2); font-size: 18px; }
.group ul, .cant-list { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 4px; }
.group li, .cant-list li {
  display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 14px; align-items: start;
  padding: 12px 14px 12px 12px; margin: 0 -14px 0 -12px; border-radius: 14px;
  transition: background-color .35s ease;
}
.group li p, .cant-list li p { color: var(--text-2); max-width: 62ch; }
.group li b, .cant-list li b { color: var(--text); font-weight: 600; }
.mark { width: 24px; height: 24px; margin-top: 1px; color: var(--c); stroke-width: 1.9; }
.group li.on { background: color-mix(in srgb, var(--c) 15%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent); }
.group li.on p { color: var(--text); }

/* Phone strips (phones and narrow screens) */
.strip {
  display: none; gap: 12px; margin: 22px calc(-1 * var(--pad)) 0; padding: 4px var(--pad) 10px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.strip img {
  flex: none; width: min(56vw, 230px); height: auto; aspect-ratio: 720 / 1565; object-fit: cover; object-position: top;
  border-radius: 26px; border: 6px solid #2b2d2c; background: #000; scroll-snap-align: start;
}

/* Sticky phone (wide screens) */
.dock { position: relative; }
.dock-inner { position: sticky; top: calc(50vh - 372px); }
.phone {
  width: 320px; aspect-ratio: 720 / 1565; padding: 10px;
  border-radius: 54px; background: linear-gradient(160deg, #3a3d3c, #232524 40%, #2e302f);
  box-shadow: 0 50px 90px -40px rgba(0, 0, 0, .95), inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.screen { position: relative; width: 100%; height: 100%; border-radius: 45px; overflow: hidden; background: #000; }
.screen img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top;
  opacity: 0; transform: scale(1.012);
  transition: opacity .32s cubic-bezier(.16, 1, .3, 1), transform .45s cubic-bezier(.16, 1, .3, 1);
}
.screen img.on { opacity: 1; transform: none; }
.dock-label { margin-top: 16px; width: 320px; text-align: center; font-size: 14px; color: var(--text-3); }
@media (prefers-reduced-motion: reduce) { .screen img { transition: none; transform: none; } }
@media (max-height: 820px) and (min-width: 1001px) { .phone, .dock-label { width: 270px; } .dock-inner { top: calc(50vh - 316px); } }

@media (max-width: 1000px) {
  .ledger-grid { grid-template-columns: minmax(0, 1fr); }
  .dock { display: none; }
  .strip { display: flex; }
  .group li.on { background: none; }
}

/* Mac window */
.desk { margin: 30px 0 0; }
.desk .window { display: flex; gap: 7px; padding: 12px 14px; background: #232524; border: 1px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0; }
.desk .window span { width: 11px; height: 11px; border-radius: 50%; background: #3d403f; }
.desk picture { display: block; }
.desk img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: cover; object-position: top; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 14px 14px; }
.desk figcaption { margin-top: 12px; font-size: 14px; color: var(--text-3); }

/* What it doesn't do */
.cant { --c: var(--cross); }
.cant-list { margin-top: 44px; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 5vw, 72px); row-gap: 10px; }
.cant-list li { margin: 0; padding: 14px 0; border-top: 1px solid var(--line); border-radius: 0; }
.cant .mark { color: var(--cross); }
@media (max-width: 860px) { .cant-list { grid-template-columns: 1fr; row-gap: 0; } }

/* How it works */
.how { max-width: var(--max); margin: 0 auto; padding: clamp(72px, 10vw, 128px) var(--pad) 0; }
.flow { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: step; }
.flow li { position: relative; padding: 0 28px 0 0; }
.flow li::after {
  content: ""; position: absolute; top: 27px; left: 64px; right: 14px; height: 1px;
  background: linear-gradient(90deg, var(--line), #3e4341);
}
.flow li:last-child::after { display: none; }
.flow svg, .flow .h-badge { display: block; width: 54px; height: 54px; padding: 13px; border-radius: 16px; background: var(--surface); color: var(--hale); border: 1px solid var(--line); }
.flow .h-badge { display: grid; padding: 0; font-size: 26px; background: var(--hale); color: #0d1f16; border: 0; border-radius: 16px; vertical-align: 0; }
.flow h3 { margin-top: 20px; font-size: 21px; letter-spacing: -0.01em; }
.flow p { margin-top: 6px; color: var(--text-2); font-size: 16px; max-width: 26ch; }
@media (max-width: 860px) {
  .flow { grid-template-columns: 1fr; gap: 28px; }
  .flow li { display: grid; grid-template-columns: 54px 1fr; column-gap: 18px; padding: 0; }
  .flow li::after { top: 62px; bottom: -22px; left: 27px; right: auto; width: 1px; height: auto; background: var(--line); }
  .flow svg, .flow .h-badge { grid-row: span 2; }
  .flow h3 { margin-top: 4px; }
}

/* Hale Facts: a nutrition label, the one white object on the page */
.facts { padding: clamp(80px, 11vw, 140px) var(--pad) 0; display: grid; place-items: center; }
.label {
  width: min(100%, 400px); background: #fff; color: #000; padding: 10px 14px 14px; border-radius: 4px;
  font: 400 16px/1.25 "Helvetica Neue", Helvetica, Arial, var(--sans);
  box-shadow: 0 40px 80px -36px rgba(0, 0, 0, .9);
  transform: rotate(-1.2deg);
}
.label h2 { font: 900 44px/1 "Helvetica Neue", Helvetica, Arial, var(--sans); letter-spacing: -0.02em; padding-bottom: 6px; border-bottom: 1px solid #000; }
.label p { display: flex; justify-content: space-between; gap: 16px; }
.label .serv { padding: 3px 0; }
.label .serv:first-of-type { padding-top: 6px; }
.label .serv span:last-child { font-weight: 800; }
.label .thick { height: 11px; background: #000; margin: 6px 0 4px; }
.label .mid { height: 5px; background: #000; margin: 4px 0 0; }
.label .small { font-size: 13px; font-weight: 800; }
.label .big { font-weight: 900; font-size: 21px; align-items: baseline; }
.label .big span:last-child { font-size: 16px; font-weight: 800; text-align: right; }
.label .row { padding: 5px 0; border-top: 1px solid #000; }
.label .row:first-of-type { border-top: 0; }
.label .row b { font-weight: 800; }
.label .row span:last-child { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: 700; }
.label .foot { display: block; font-size: 12.5px; line-height: 1.35; padding-top: 4px; }

/* Footer */
.end {
  max-width: var(--max); margin: clamp(80px, 10vw, 128px) auto 0; padding: 32px var(--pad) max(40px, env(safe-area-inset-bottom));
  display: flex; gap: 16px; align-items: center; border-top: 1px solid var(--line); color: var(--text-3); font-size: 14px;
}
.end img { border-radius: 10px; }
.end b { color: var(--text-2); }
