/* ---------------------------------------------------------------------------
   Themes. The site uses warm paper and ink with a sunset gradient accent. Pages under
   /paisolog/ get html.theme-paisolog, which swaps in the app's own palette
   from PaisoLog's constants/theme.ts (dark brown ink on warm paper).
   ------------------------------------------------------------------------ */

:root {
  color-scheme: light dark;
  /* Light mode is a soft, warm off-white rather than bright white. */
  --bg: #f3f0e9;
  --surface: #f9f7f2;
  --surface-muted: #ebe7de;
  --border: #dfd9cd;
  --border-strong: #cdc6b8;
  --text: #1f1d1a;
  --text-2: #5d5850;
  --brand: #1f1d1a;
  --brand-soft: #e8e3d9;
  --on-brand: #f6f4ee;
  --link: #9a4521;
  --success: #3f7d4a;
  --danger: #b4443a;
  --info: #2f7383;
  --warning: #b07a24;
  --warning-soft: #f1e6cf;
  --g1: #b8475f;
  --g2: #c4572e;
  --g3: #d0912f;
  --gradient: linear-gradient(120deg, var(--g1), var(--g2) 50%, var(--g3));
  --logo-bg: var(--gradient);
  --header-bg: rgb(243 240 233 / 78%);
  --shadow: 0 1px 2px rgb(31 29 26 / 5%), 0 14px 36px -18px rgb(31 29 26 / 16%);
  --glow: 0.2;
  --radius: 20px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: var(--font);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0c0a;
    --surface: #181512;
    --surface-muted: #201c18;
    --border: #2c2722;
    --border-strong: #45403a;
    --text: #f5f1ea;
    --text-2: #aaa39b;
    --brand: #f5f1ea;
    --brand-soft: #2c2722;
    --on-brand: #0e0c0a;
    --link: #f2a679;
    --success: #6fbf7e;
    --danger: #f08070;
    --info: #6cc0cf;
    --warning: #f0b856;
    --warning-soft: #2e2414;
    --g1: #ee7d93;
    --g2: #f08a5d;
    --g3: #f5bd63;
    --header-bg: rgb(14 12 10 / 72%);
    --glow: 0.2;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 20px 48px -20px rgb(0 0 0 / 70%);
  }
}

:root.theme-paisolog {
  --bg: #fbf8f3;
  --surface: #fffdf9;
  --surface-muted: #f3ede3;
  --border: #e6dccd;
  --border-strong: #cdbfab;
  --text: #2b1d14;
  --text-2: #6f5d4e;
  --brand: #4a2f1f;
  --brand-soft: #efe6d8;
  --on-brand: #fbf8f3;
  --link: #7a4426;
  --success: #4f7942;
  --danger: #b5462f;
  --info: #3e6c78;
  --warning: #b7791f;
  --warning-soft: #f7edd9;
  --logo-bg: #4a2f1f;
  --header-bg: rgb(251 248 243 / 80%);
  --shadow: 0 1px 2px rgb(43 29 20 / 6%), 0 12px 32px -12px rgb(43 29 20 / 18%);
  --display: ui-rounded, "SF Pro Rounded", var(--font);
}

@media (prefers-color-scheme: dark) {
  :root.theme-paisolog {
    --bg: #17110d;
    --surface: #211812;
    --surface-muted: #2b2018;
    --border: #33271e;
    --border-strong: #4a3a2d;
    --text: #f3ebdd;
    --text-2: #bfae9c;
    --brand: #e2c9a6;
    --brand-soft: #33261c;
    --on-brand: #2b1d14;
    --link: #e8c597;
    --success: #8db580;
    --danger: #e07a5f;
    --info: #86b3be;
    --warning: #e0b04f;
    --warning-soft: #33281a;
    --logo-bg: #4a3a2d;
    --header-bg: rgb(23 17 13 / 80%);
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 16px 40px -16px rgb(0 0 0 / 60%);
  }
}

/* ---------------------------------------------------------------------------
   Base
   ------------------------------------------------------------------------ */

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

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.65 var(--font);
  overflow-wrap: break-word;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

img,
svg {
  display: block;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 40rem) {
  .wrap {
    padding: 0 1.5rem;
  }
}

main.wrap {
  padding-top: 3rem;
  padding-bottom: 5rem;
}

.prose {
  max-width: calc(42rem + 3rem);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
}

.skip:focus {
  top: 1rem;
}

/* ---------------------------------------------------------------------------
   Header: site nav, plus the PaisoLog bar on its pages
   ------------------------------------------------------------------------ */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  backdrop-filter: saturate(1.6) blur(16px);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 10px;
  background: var(--logo-bg);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.mainnav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.mainnav a {
  padding: 0.45rem 0.9rem;
  white-space: nowrap;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.mainnav a:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.mainnav a[aria-current] {
  background: var(--brand);
  color: var(--on-brand);
}

.mainnav .external::after {
  content: "\2197";
  margin-left: 0.2em;
  font-size: 0.8em;
  opacity: 0.6;
}

.app-bar {
  border-top: 1px solid var(--border);
}

.app-bar .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  min-height: 3.25rem;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--brand);
  font: 700 1.0625rem/1 var(--display);
  text-decoration: none;
}

.app-brand img {
  border-radius: 7px;
}

.subnav {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
}

.subnav a {
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 0.9375rem;
  text-decoration: none;
}

.subnav a:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.subnav a[aria-current="page"] {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

@media (max-width: 34rem) {
  .logo-name {
    display: none;
  }

  .mainnav {
    gap: 0;
  }

  .mainnav a {
    padding: 0.45rem 0.6rem;
  }

  .mainnav .external::after {
    display: none;
  }

  .subnav {
    margin-left: -0.8rem;
  }
}

/* ---------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------ */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text-2);
  font-size: 0.9375rem;
}

.site-footer .wrap {
  display: grid;
  gap: 2rem;
  padding-top: 3rem;
  padding-bottom: 2.5rem;
}

@media (min-width: 48rem) {
  .site-footer .wrap {
    grid-template-columns: 1fr auto;
  }
}

.footer-brand p {
  margin: 0.75rem 0 0;
}

.footer-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 4rem;
}

.footer-cols div {
  display: grid;
  align-content: start;
  gap: 0.5rem;
}

.footer-cols p {
  margin: 0 0 0.25rem;
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-cols a {
  color: var(--text-2);
  text-decoration: none;
}

.footer-cols a:hover {
  color: var(--text);
  text-decoration: underline;
}

.copyright {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
}

/* ---------------------------------------------------------------------------
   Text
   ------------------------------------------------------------------------ */

h1,
h2,
h3 {
  margin: 0;
  color: var(--brand);
  font-family: var(--display);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 {
  margin-bottom: 1rem;
  font-size: clamp(2.25rem, 1.5rem + 3vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.theme-paisolog h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.prose h1 {
  font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem);
}

h2 {
  margin: 3rem 0 0.75rem;
  font-size: 1.5rem;
  scroll-margin-top: 8rem;
}

h3 {
  margin: 2rem 0 0.5rem;
  font-size: 1.1875rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.4rem;
}

li + li {
  margin-top: 0.4rem;
}

li::marker {
  color: var(--text-2);
}

.lead {
  color: var(--text-2);
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.eyebrow {
  margin-bottom: 0.75rem;
  color: var(--link);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

code {
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: var(--surface-muted);
  font: 0.88em var(--mono);
}

strong {
  font-weight: 650;
}

/* ---------------------------------------------------------------------------
   Shared pieces
   ------------------------------------------------------------------------ */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--brand);
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.button.secondary {
  background: transparent;
  color: var(--brand);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 0.875rem;
}

.pill::before {
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--warning);
}

.toc {
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.toc p {
  margin: 0 0 0.5rem;
  color: var(--text-2);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2 14rem;
  column-gap: 1.5rem;
}

.toc li {
  margin: 0 0 0.35rem;
  break-inside: avoid;
}

.callout {
  padding: 0.9rem 1.1rem;
  border-left: 4px solid var(--warning);
  border-radius: 0 12px 12px 0;
  background: var(--warning-soft);
}

.steps {
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  min-height: 2rem;
  padding-left: 2.75rem;
  counter-increment: step;
}

.steps li + li {
  margin-top: 0.75rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.1rem;
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font: 700 0.9375rem/1 var(--display);
}

.contact-card {
  margin: 2rem 0;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.contact-card p:last-child {
  margin: 0;
  color: var(--text-2);
  font-size: 0.9375rem;
}

.contact-label {
  margin: 0 0 0.25rem;
  color: var(--text-2);
  font-size: 0.875rem;
}

.contact-email {
  font: 700 clamp(1.25rem, 1rem + 1.2vw, 1.625rem) / 1.3 var(--display);
}

.contact-email a {
  color: var(--brand);
}

.section-title {
  margin: 0 0 1.25rem;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  text-wrap: balance;
}

.block {
  margin-top: 4rem;
}

.page-head {
  max-width: 40rem;
  padding: 1.5rem 0 1rem;
}

/* ---------------------------------------------------------------------------
   Home: Hello World!
   ------------------------------------------------------------------------ */

.hello {
  position: relative;
  display: grid;
  place-items: center;
  min-height: calc(100svh - 4rem);
  padding: 4rem 1rem;
  overflow: hidden;
  isolation: isolate;
}

/* A faint dot grid that fades out towards the edges. */
.hello::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(var(--border-strong) 1px, transparent 1.5px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 50%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 55% at 50% 50%, #000 30%, transparent 75%);
}

.hello-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

.hello-bg span {
  position: absolute;
  width: 46vmax;
  height: 46vmax;
  border-radius: 50%;
  filter: blur(80px);
  opacity: var(--glow);
}

.hello-bg span:nth-child(1) {
  top: -18vmax;
  left: -10vmax;
  background: var(--g1);
}

.hello-bg span:nth-child(2) {
  right: -14vmax;
  top: 0;
  background: var(--g3);
  opacity: calc(var(--glow) * 0.7);
}

.hello-bg span:nth-child(3) {
  bottom: -26vmax;
  left: 22%;
  background: var(--g2);
  opacity: calc(var(--glow) * 0.85);
}

.hello-title {
  margin: 0;
  font-size: clamp(3rem, 1rem + 7.5vw, 8.5rem);
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.055em;
  text-align: center;
}

.hello-title span {
  padding: 0 0.04em 0.08em;
  background: linear-gradient(110deg, var(--g1), var(--g2) 30%, var(--g3) 50%, var(--g2) 70%, var(--g1));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (max-width: 34rem) {
  .hello-title {
    font-size: 15vw;
    line-height: 1;
  }
}

/* A terminal-style caret, because it's Hello World. */
.hello-title::after {
  content: "";
  display: inline-block;
  width: 0.07em;
  height: 0.78em;
  margin-left: 0.06em;
  border-radius: 0.02em;
  background: var(--g3);
  vertical-align: -0.04em;
}

/* The dog, drawn after Umang's: white with golden-tan patches, big upright
   ears, a tan face with a white muzzle and a curly white tail. dog.js sets
   data-mood from the visitor's clock. Playful: dog.js walks her around the
   bottom of the page. Sleepy: she naps belly-up in the corner, paws in the air. Without motion, both
   poses hold still. */
.dog {
  position: absolute;
  right: 1.25rem;
  bottom: 0.75rem;
  width: 140px;
  pointer-events: none;
  --dog-line: #3b2a20;
  --dog-fur: #fffdf9;
  --dog-far: #ebe4da;
  --dog-tan: #dfa463;
  --dog-tan-dark: #c78744;
}

.dog svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.dog[data-mood="playful"] .pose-sleep,
.dog[data-mood="sleepy"] .pose-walk {
  display: none;
}

.dog .o {
  stroke: var(--dog-line);
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.dog .fur {
  fill: var(--dog-fur);
}

.dog .far {
  fill: var(--dog-far);
  stroke: var(--dog-line);
  stroke-width: 1.8;
}

.dog .tan {
  fill: var(--dog-tan);
}

.dog .tan-dark {
  fill: var(--dog-tan-dark);
}

.dog .ear-inner {
  fill: #f2b5a6;
}

.dog .eye,
.dog .nose {
  fill: #1c1410;
}

.dog .shine {
  fill: #fff;
}

.dog .mouth,
.dog .lid {
  fill: none;
  stroke: #1c1410;
  stroke-width: 1.3;
  stroke-linecap: round;
}

.dog .tongue {
  fill: #ef8fa6;
  stroke: #c56479;
  stroke-width: 0.8;
}

.dog .collar {
  fill: none;
  stroke: #1f1f1f;
  stroke-width: 3.5;
  stroke-linecap: round;
}

.dog .tail-line,
.dog .tail-fill {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dog .limb-line,
.dog .limb-fill,
.dog .limb-far {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dog .limb-line {
  stroke: var(--dog-line);
  stroke-width: 9.5;
}

.dog .limb-fill {
  stroke: var(--dog-fur);
  stroke-width: 6;
}

.dog .limb-far {
  stroke: var(--dog-far);
  stroke-width: 6;
}

.dog .limb-line.thigh {
  stroke-width: 11;
}

.dog .limb-fill.thigh,
.dog .limb-far.thigh {
  stroke-width: 7.5;
}

.dog .paw-line {
  fill: var(--dog-line);
}

.dog .paw-fill {
  fill: var(--dog-fur);
}

.dog .paw-fill.far-fill {
  fill: var(--dog-far);
}

/* dog.js walks her around by moving her along the stage. */
.dog.is-walking {
  right: auto;
  left: 0;
  will-change: transform;
}

.dog .belly {
  fill: #f1cfc8;
}

.dog .tail-line {
  stroke: var(--dog-line);
  stroke-width: 10;
}

.dog .tail-fill {
  stroke: var(--dog-fur);
  stroke-width: 6.5;
}

.dog .shadow {
  fill: rgb(0 0 0 / 12%);
}

.dog .zzz text {
  fill: var(--text-2);
  font: 700 10px var(--font);
}

.dog .zzz text:nth-child(2) {
  font-size: 12px;
}

.dog .zzz text:nth-child(3) {
  font-size: 14px;
}

@media (prefers-color-scheme: dark) {
  .dog .shadow {
    fill: rgb(0 0 0 / 45%);
  }
}

.dog .paw-twitch,
.dog .zzz text {
  transform-box: view-box;
}

.paw-twitch { transform-origin: 85px 70px; }

.dog .breathe {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

@media (max-width: 34rem) {
  .dog {
    width: 104px;
  }
}

/* ---------------------------------------------------------------------------
   Apps
   ------------------------------------------------------------------------ */

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  gap: 1.25rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.app-grid li {
  margin: 0;
}

.app-tile {
  position: relative;
  display: grid;
  gap: 1.25rem;
  height: 100%;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.app-tile:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}

.app-tile img {
  border-radius: 18px;
  box-shadow: 0 6px 16px -6px rgb(0 0 0 / 30%);
}

.app-tile-body {
  display: grid;
  gap: 0.3rem;
}

.app-tile-name {
  font-size: 1.375rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.app-tile-tag {
  color: var(--text-2);
  font-size: 0.875rem;
}

.app-tile-desc {
  margin-top: 0.35rem;
  color: var(--text-2);
}

.app-tile-cta {
  color: var(--link);
  font-weight: 600;
}

.app-tile-cta::after {
  content: "\2192";
  display: inline-block;
  margin-left: 0.3em;
  transition: transform 0.2s ease;
}

.app-tile:hover .app-tile-cta::after {
  transform: translateX(3px);
}

/* A hint of PaisoLog's warm paper on its tile. */
.paisolog-tile {
  background: linear-gradient(160deg, rgb(239 230 216 / 55%), var(--surface) 55%);
}

@media (prefers-color-scheme: dark) {
  .paisolog-tile {
    background: linear-gradient(160deg, rgb(74 47 31 / 35%), var(--surface) 55%);
  }
}

/* ---------------------------------------------------------------------------
   PaisoLog landing
   ------------------------------------------------------------------------ */

.hero {
  display: grid;
  gap: 3rem;
  align-items: center;
  padding: 0 0 2rem;
}

@media (min-width: 56rem) {
  .hero {
    grid-template-columns: 1.15fr 1fr;
    gap: 4rem;
    padding-top: 1rem;
  }
}

.hero h1 {
  max-width: 14ch;
  font-size: clamp(2.25rem, 1.4rem + 3vw, 3.5rem);
}

.phone-wrap {
  padding: 1.5rem 0;
  background: radial-gradient(closest-side, var(--brand-soft), transparent);
}

/* The phone is a decorative sketch of a ledger, not a screenshot. */
.phone {
  width: min(100%, 20rem);
  margin: 0 auto;
  padding: 0.7rem;
  border-radius: 2.75rem;
  background: #2b1d14;
  box-shadow: 0 30px 60px -20px rgb(43 29 20 / 45%), inset 0 0 0 2px #4a3a2d;
  transform: rotate(2deg);
}

.screen {
  padding: 1.25rem 1.1rem 1.4rem;
  border-radius: 2.15rem;
  background: var(--bg);
  font-size: 0.875rem;
  line-height: 1.4;
}

.screen-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  color: var(--brand);
  font: 700 1.0625rem/1 var(--display);
}

.screen-top img {
  border-radius: 8px;
}

.screen-label {
  margin: 0;
  color: var(--text-2);
  font-size: 0.75rem;
}

.screen-total {
  margin: 0 0 0.9rem;
  color: var(--brand);
  font: 700 2rem/1.15 var(--display);
  letter-spacing: -0.02em;
}

.budget {
  margin-bottom: 0.9rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.budget-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.45rem;
  color: var(--text-2);
  font-size: 0.75rem;
}

.bar {
  height: 0.45rem;
  border-radius: 999px;
  background: var(--surface-muted);
  overflow: hidden;
}

.bar span {
  display: block;
  width: 62%;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transform-origin: left;
}

.ledger {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.ledger li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  padding: 0.6rem 0.8rem;
}

.ledger li + li {
  border-top: 1px solid var(--border);
}

.ledger span:nth-child(2) {
  flex: 1;
  color: var(--text);
  font-weight: 600;
}

.ledger small {
  display: block;
  color: var(--text-2);
  font-size: 0.6875rem;
  font-weight: 400;
}

.ledger b {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.ledger .out {
  color: var(--text);
}

.ledger .in {
  color: var(--success);
}

.dot {
  flex: none;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
}

.dot.food { background: var(--success); }
.dot.cafe { background: var(--warning); }
.dot.home { background: var(--info); }
.dot.pay { background: var(--brand); }
.dot.travel { background: var(--danger); }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  padding: 0;
  list-style: none;
}

.features li {
  margin: 0;
  padding: 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.features li:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.features svg {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.6rem;
  border-radius: 14px;
  background: var(--brand-soft);
  fill: none;
  stroke: var(--brand);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.features h3 {
  margin: 1rem 0 0.35rem;
}

.features p {
  margin: 0;
  color: var(--text-2);
}

/* A full-bleed brown band, like the app icon inverted. */
.band {
  margin: 5rem calc(50% - 50vw) 0;
  padding: 4rem 0;
  background: #4a2f1f;
  color: #efe6d8;
}

@media (prefers-color-scheme: dark) {
  .band {
    background: #2b2018;
  }
}

.band-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 40rem) {
  .band-inner {
    padding: 0 1.5rem;
  }
}

.band h2,
.band h3 {
  color: #fbf8f3;
}

.promises {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 2rem;
  margin: 1rem 0 2.25rem;
  padding: 0;
  list-style: none;
}

.promises li {
  margin: 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgb(239 230 216 / 25%);
}

.promises h3 {
  margin: 0 0 0.4rem;
}

.promises p {
  margin: 0;
  color: #dccbb4;
}

.button.light {
  border-color: #efe6d8;
  background: #efe6d8;
  color: #2b1d14;
}

.split {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 48rem) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.split p {
  color: var(--text-2);
}

.split .section-title {
  font-size: 1.5rem;
}

/* ---------------------------------------------------------------------------
   Motion. Gentle entrances, a drifting glow on the home page, and sections
   that rise into view where scroll-driven animation is supported. All of it
   is off when the visitor asks for reduced motion.
   ------------------------------------------------------------------------ */

@media (prefers-reduced-motion: no-preference) {
  .hello-title {
    animation: hello-in 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .hello-title span {
    animation: shimmer 8s ease-in-out infinite alternate;
  }

  .hello-title::after {
    animation: blink 1.1s steps(1) infinite;
  }

  .hello-bg span {
    animation: drift 22s ease-in-out infinite alternate;
  }

  .hello-bg span:nth-child(2) {
    animation-duration: 26s;
    animation-direction: alternate-reverse;
  }

  .hello-bg span:nth-child(3) {
    animation-duration: 30s;
  }

  .dog .breathe {
    animation: breathe 3.6s ease-in-out infinite alternate;
  }

  .dog .paw-twitch {
    animation: dream 7s ease-in-out infinite;
  }

  .dog .zzz text {
    animation: snooze 3.6s ease-out infinite both;
  }

  .dog .zzz text:nth-child(2) {
    animation-delay: 1.2s;
  }

  .dog .zzz text:nth-child(3) {
    animation-delay: 2.4s;
  }

  .page-head > *,
  .hero-text > *,
  .prose > * {
    animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .page-head > :nth-child(2),
  .hero-text > :nth-child(2),
  .prose > :nth-child(2) {
    animation-delay: 0.06s;
  }

  .page-head > :nth-child(3),
  .hero-text > :nth-child(3),
  .prose > :nth-child(3) {
    animation-delay: 0.12s;
  }

  .page-head > :nth-child(n + 4),
  .hero-text > :nth-child(n + 4),
  .prose > :nth-child(n + 4) {
    animation-delay: 0.18s;
  }

  .app-grid li {
    animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s both;
  }

  .phone {
    animation: phone-in 1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s both;
  }

  .bar span {
    animation: fill 1.2s cubic-bezier(0.2, 0.7, 0.2, 1) 0.7s both;
  }

  .ledger li {
    animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .ledger li:nth-child(1) { animation-delay: 0.5s; }
  .ledger li:nth-child(2) { animation-delay: 0.6s; }
  .ledger li:nth-child(3) { animation-delay: 0.7s; }
  .ledger li:nth-child(4) { animation-delay: 0.8s; }
  .ledger li:nth-child(5) { animation-delay: 0.9s; }

  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 40%;
    }
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@keyframes hello-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
    filter: blur(8px);
  }
}

@keyframes shimmer {
  to {
    background-position: 100% 0;
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes drift {
  to {
    transform: translate(8vmax, 6vmax) scale(1.15);
  }
}

@keyframes breathe {
  to {
    transform: scale(1.015, 1.05);
  }
}

/* Every so often a front paw twitches, as if she's dreaming. */
@keyframes dream {
  0%,
  76%,
  100% {
    transform: rotate(0);
  }
  80% {
    transform: rotate(-12deg);
  }
  84% {
    transform: rotate(4deg);
  }
  88% {
    transform: rotate(-8deg);
  }
  92% {
    transform: rotate(0);
  }
}

@keyframes snooze {
  0% {
    opacity: 0;
    transform: translate(0, 4px);
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(6px, -10px);
  }
}

@keyframes phone-in {
  from {
    opacity: 0;
    transform: translateY(28px) rotate(5deg);
  }
}

@keyframes fill {
  from {
    transform: scaleX(0);
  }
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
