:root {
  --bg: #F6F7FB;
  --surface: #FFFFFF;
  --sunk: #F1F3F8;
  --ink: #111827;
  --muted: #6B7280;
  --line: #E6E8EF;
  --accent: #4F46E5;
  --accent-soft: #EEF0FF;
  --shadow: 0 1px 2px rgba(17,24,39,.04), 0 2px 8px rgba(17,24,39,.05);
  --radius: 14px;
  --max: 1040px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
}
a { color: inherit; }
img { max-width: 100%; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo { font-weight: 700; letter-spacing: -0.01em; text-decoration: none; font-size: 18px; }
.logo span { color: var(--accent); }
.nav { display: flex; gap: 22px; }
.nav a { text-decoration: none; color: var(--muted); font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* Hero */
.hero { padding: 88px 0 56px; }
.eyebrow {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em;
  color: var(--accent); text-transform: uppercase; margin: 0 0 16px;
}
h1 {
  font-size: clamp(36px, 6vw, 60px); line-height: 1.05; letter-spacing: -0.025em; font-weight: 700;
  margin: 0 0 22px; max-width: 16ch;
}
.lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 60ch; margin: 0 0 32px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  box-shadow: var(--shadow);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 15px;
  text-decoration: none; border: 1px solid var(--line); background: var(--surface);
}
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn:hover { transform: translateY(-1px); }

/* Sections */
section { padding: 48px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
h2 { font-size: 26px; letter-spacing: -0.025em; font-weight: 700; margin: 0; }
.section-head a { color: var(--muted); font-size: 15px; text-decoration: none; }
.section-head a:hover { color: var(--ink); }

/* Principles */
.principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.principle { border-top: 2px solid var(--accent); padding-top: 14px; }
.principle h3 { font-size: 16px; margin: 0 0 6px; }
.principle p { margin: 0; color: var(--muted); font-size: 15px; }

/* Build cards */
.builds { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow);
}
.card-top { display: flex; justify-content: space-between; align-items: center; }
.num { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.status {
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}
.status.soon { background: transparent; border: 1px dashed var(--line); color: var(--muted); }
.card h3 { font-size: 22px; letter-spacing: -0.01em; margin: 0; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.tags li { font-size: 12px; border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; color: var(--muted); }
.card-links { display: flex; gap: 16px; margin-top: auto; padding-top: 8px; }
.card-links a { font-weight: 600; font-size: 15px; text-decoration: none; color: var(--accent); }
.card-links a:hover { text-decoration: underline; }
.card-links a.secondary { color: var(--muted); font-weight: 500; }
.card.ghost { background: transparent; border-style: dashed; box-shadow: none; }

/* About strip */
.about { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; align-items: start; }
.about p { margin: 0 0 14px; color: var(--muted); }
.about p strong { color: var(--ink); }

/* Simple page */
.page-head { padding: 64px 0 24px; }
.page-head h1 { font-size: clamp(32px, 5vw, 46px); }

/* Notice */
.notice {
  display: flex; gap: 10px; align-items: center;
  background: var(--accent-soft); color: var(--accent);
  border-radius: 10px; padding: 12px 16px; font-size: 15px; font-weight: 500;
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

@media (max-width: 820px) {
  .principles { grid-template-columns: 1fr 1fr; }
  .about { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .hero { padding: 56px 0 32px; }
  .principles { grid-template-columns: 1fr; }
  .nav { gap: 16px; }
  .builds { grid-template-columns: 1fr; }
}

.section-sub { color: var(--muted); margin: -12px 0 22px; max-width: 60ch; font-size: 16px; }
.page-head .notice { margin-top: 8px; }

/* ---------- Porchlight (uses its own brand look) ---------- */
.pl {
  --pl-bg: #F7F2EA; --pl-ink: #2A211C; --pl-muted: #6E5B50; --pl-accent: #B34A32; --pl-soft: #FBE9DF; --pl-line: #E8DCD0;
  --pl-serif: "Young Serif", Georgia, "Times New Roman", serif;
}
.pl-feature {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: 1fr 1.25fr; gap: 0; overflow: hidden;
  background: var(--pl-bg); border: 1px solid var(--pl-line); border-radius: var(--radius); box-shadow: var(--shadow);
  color: var(--pl-ink);
}
.pl-feature .pl-copy { padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.pl-logo { height: 34px; width: auto; display: block; }
.pl-logo-lg { height: 52px; margin-bottom: 18px; }
.pl-brand { display: flex; align-items: center; gap: 10px; }
.pl-brand img { width: 30px; height: auto; }
.pl-brand span { font-family: var(--pl-serif); font-size: 28px; font-weight: 600; letter-spacing: -0.01em; }
.pl-tagline { font-family: var(--pl-serif); font-size: 22px; line-height: 1.25; margin: 0; color: var(--pl-ink); }
.pl-feature p.pl-desc { margin: 0; color: var(--pl-muted); font-size: 15px; }
.pl-feature .tags li { border-color: var(--pl-line); color: var(--pl-muted); background: #fff8; }
.pl-feature .status { background: var(--pl-soft); color: var(--pl-accent); }
.pl-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 6px; }
.pl-btn { display: inline-flex; padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 15px; text-decoration: none; }
.pl-btn.solid { background: var(--pl-accent); color: #fff; }
.pl-btn.ghost { border: 1px solid var(--pl-line); color: var(--pl-ink); background: #fff; }
.pl-feature .pl-shot { background: #F7F3EA; display: flex; align-items: center; justify-content: center; }
.pl-feature .pl-shot img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* Case study page */
body.pl-page { background: var(--pl-bg); color: var(--pl-ink); }
body.pl-page .site-header { border-color: var(--pl-line); }
body.pl-page .nav a, body.pl-page .site-footer, body.pl-page .site-footer a { color: var(--pl-muted); }
body.pl-page .logo span { color: var(--pl-accent); }
body.pl-page .site-footer { border-color: var(--pl-line); }
.pl-hero { padding: 64px 0 24px; }
.pl-hero .eyebrow { color: var(--pl-accent); }
.pl-hero h1 { font-family: var(--pl-serif); font-weight: 400; max-width: 21ch; }
.pl-hero .lede { color: var(--pl-muted); }
.pl-cover { border-radius: 18px; overflow: hidden; border: 1px solid var(--pl-line); margin-top: 32px; }
.pl-cover img { display: block; width: 100%; height: auto; }
.pl-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 32px 0 0; }
.pl-facts div { border-top: 2px solid var(--pl-accent); padding-top: 10px; }
.pl-facts dt { font-size: 13px; color: var(--pl-muted); text-transform: uppercase; letter-spacing: .05em; }
.pl-facts dd { margin: 4px 0 0; font-weight: 600; }
.pl-section { padding: 40px 0; }
.pl-section h2 { font-family: var(--pl-serif); font-weight: 400; font-size: 30px; margin-bottom: 14px; }
.pl-section p { color: var(--pl-muted); max-width: 66ch; }
.pl-section p strong { color: var(--pl-ink); }
.pl-features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.pl-features div { background: #fff; border: 1px solid var(--pl-line); border-radius: 14px; padding: 20px; }
.pl-features h3 { font-family: var(--pl-serif); font-weight: 400; font-size: 19px; margin: 0 0 6px; }
.pl-features p { margin: 0; font-size: 15px; }
.pl-gallery { display: flex; gap: 16px; overflow-x: auto; padding: 4px 4px 16px; scroll-snap-type: x mandatory; }
.pl-gallery figure { flex: 0 0 220px; margin: 0; scroll-snap-align: start; }
.pl-gallery img { width: 100%; border-radius: 22px; border: 1px solid var(--pl-line); display: block; box-shadow: 0 6px 20px rgba(43,29,23,.08); }
.pl-gallery figcaption { font-size: 13px; color: var(--pl-muted); margin-top: 8px; }
.pl-stack { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 32px; padding: 0; list-style: none; margin: 0; }
.pl-stack li { color: var(--pl-muted); font-size: 15px; }
.pl-stack li strong { color: var(--pl-ink); }
.pl-cta { background: #fff; border: 1px solid var(--pl-line); border-radius: 18px; padding: 32px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.pl-cta h2 { font-family: var(--pl-serif); font-weight: 400; margin: 0; font-size: 26px; }

@media (max-width: 820px) {
  .pl-feature { grid-template-columns: 1fr; }
  .pl-feature .pl-shot { order: -1; }
  .pl-facts { grid-template-columns: 1fr 1fr; }
  .pl-features, .pl-stack { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .pl-feature .pl-copy { padding: 22px; }
  .pl-gallery figure { flex-basis: 180px; }
  .pl-cta { padding: 22px; }
}

/* ================= v2 motion ================= */
/* Fade up on scroll. Only hidden when JS is running, so nothing disappears without it. */
.js [data-reveal] {
  opacity: 0; transform: translateY(14px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js [data-reveal].in { opacity: 1; transform: none; }

/* Cards lift a touch on hover */
.card, .pl-feature { transition: box-shadow .25s ease, transform .25s ease; }
.card:hover { box-shadow: 0 2px 4px rgba(17,24,39,.05), 0 12px 28px rgba(17,24,39,.08); }

/* Porchlight: the light comes on */
.pl-feature { position: relative; isolation: isolate; }
.pl-bulb { position: relative; display: inline-block; }
.pl-bulb::after {
  content: ""; position: absolute; left: -6px; top: 50%; width: 42px; height: 42px; margin-top: -23px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,184,92,.55), rgba(255,184,92,0) 68%);
  opacity: 0; z-index: -1; pointer-events: none;
}
.pl-feature.lit .pl-bulb::after { animation: plFlicker 1.6s ease forwards .35s; }
@keyframes plFlicker {
  0% { opacity: 0; } 12% { opacity: .9; } 18% { opacity: .2; } 28% { opacity: 1; } 34% { opacity: .55; } 100% { opacity: 1; }
}

/* Pacing Desk mini demo */
.pd-mini {
  background: var(--sunk); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  display: grid; gap: 10px; font-size: 13px;
}
.pd-head { display: flex; justify-content: space-between; color: var(--muted); font-family: var(--mono); font-size: 11.5px; }
.pd-key { display: inline-flex; align-items: center; gap: 6px; }
.pd-key i { width: 2px; height: 11px; background: var(--ink); border-radius: 1px; display: inline-block; }
.pd-row { display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; align-items: center; }
.pd-name { color: var(--ink); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-flag {
  font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; color: var(--muted); background: #fff;
  border: 1px solid var(--line); transition: background .3s, color .3s, border-color .3s;
}
.pd-track { grid-column: 1 / -1; position: relative; height: 6px; border-radius: 999px; background: #E3E6EE; }
.pd-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 999px; background: var(--accent); transition: width 1.4s cubic-bezier(.3,.7,.2,1); }
.pd-mark { position: absolute; top: -3px; width: 2px; height: 12px; border-radius: 1px; background: var(--ink); left: var(--exp, 60%); }
.pd-row.done[data-tone="over"] .pd-flag { background: #FEF2F2; color: #B91C1C; border-color: #FECACA; }
.pd-row.done[data-tone="over"] .pd-fill { background: #EF4444; }
.pd-row.done[data-tone="ok"] .pd-flag { background: #ECFDF5; color: #047857; border-color: #A7F3D0; }
.pd-row.done[data-tone="ok"] .pd-fill { background: #10B981; }
.pd-row.done[data-tone="under"] .pd-flag { background: #FFFBEB; color: #B45309; border-color: #FDE68A; }
.pd-row.done[data-tone="under"] .pd-fill { background: #F59E0B; }


@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .pd-fill { transition: none; }
  .pl-feature.lit .pl-bulb::after { animation: none; opacity: 1; }
}

/* ================= v2 warm palette ================= */
:root {
  --bg: #F7F5F0;
  --surface: #FFFFFF;
  --sunk: #F1EEE7;
  --ink: #1C1B18;
  --muted: #6B665C;
  --line: #E6E1D7;
  --accent: #4F46E5;
  --accent-soft: #EEF0FF;
  --shadow: 0 1px 2px rgba(28,27,24,.04), 0 2px 8px rgba(28,27,24,.05);
}
.btn.primary { background: var(--ink); border-color: var(--ink); }
.btn { transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { box-shadow: 0 2px 4px rgba(28,27,24,.05), 0 12px 28px rgba(28,27,24,.08); }
.pd-track { background: #E4DFD4; }
.site-header { background: var(--bg); }

/* Hero: hand-drawn underline that draws in */
.mark { position: relative; display: inline-block; white-space: nowrap; }
.mark svg { position: absolute; left: -2%; bottom: -0.12em; width: 104%; height: .32em; overflow: visible; }
.mark path { fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 320; stroke-dashoffset: 320; }
.js .in .mark path { transition: stroke-dashoffset 1s cubic-bezier(.5,0,.2,1) .55s; stroke-dashoffset: 0; }
html:not(.js) .mark path { stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) { .mark path { stroke-dashoffset: 0 !important; transition: none !important; } }

/* ---------- Check-in Coach (uses its own brand look) ---------- */
.cc-feature {
  grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1.25fr; overflow: hidden;
  background: #0A1628; color: #E8F1FF; border: 1px solid #1f2c44; border-radius: var(--radius); box-shadow: var(--shadow);
}
.cc-copy { padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.cc-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; }
.cc-icon { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: #fff; padding: 3px; }
.cc-icon img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cc-status { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: rgba(0,180,216,.12); color: #48CAE4; border: 1px solid rgba(0,180,216,.35); }
.cc-tagline { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.cc-desc { margin: 0; color: #93A3BC; font-size: 15px; }
.cc-feature .tags li { border-color: #2a3955; color: #93A3BC; }
.cc-btn { display: inline-flex; padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 15px; text-decoration: none; background: #06D6A0; color: #0A1628; }
.cc-btn:hover { filter: brightness(1.05); }
.cc-shot { display: flex; align-items: center; justify-content: center; background: #0A1628; padding: 16px; border-left: 1px solid #1f2c44; }
.cc-shot img { width: 100%; height: auto; display: block; }
@media (max-width: 820px) {
  .cc-feature { grid-template-columns: 1fr; }
  .cc-shot { order: -1; border-left: 0; border-bottom: 1px solid #1f2c44; }
}
@media (max-width: 520px) { .cc-copy { padding: 22px; } }

/* ================= v3 interactivity ================= */
.card { transition: box-shadow .25s ease, transform .25s ease; }
.card:hover { transform: translateY(-3px); }

/* Porchlight: phones fan out */
.pl-phones { position: relative; min-height: 340px; overflow: hidden; }
.pl-phones .ph {
  position: absolute; left: 50%; top: 50%; width: 31%; max-width: 170px; height: auto; border-radius: 18px;
  border: 1px solid var(--pl-line); box-shadow: 0 10px 30px rgba(43,29,23,.14);
  transform: translate(-50%,-50%); transition: transform .7s cubic-bezier(.2,.8,.2,1), box-shadow .3s;
}
.pl-phones .ph2 { z-index: 3; }
.pl-phones .ph1 { z-index: 2; transform: translate(-58%,-49%) rotate(-4deg); }
.pl-phones .ph3 { z-index: 1; transform: translate(-42%,-49%) rotate(4deg); }
.pl-feature.lit .ph1 { transform: translate(-128%,-46%) rotate(-6deg); }
.pl-feature.lit .ph3 { transform: translate(28%,-46%) rotate(6deg); }
.pl-feature.lit .ph2 { transform: translate(-50%,-52%); }
.pl-feature.lit:hover .ph1 { transform: translate(-140%,-48%) rotate(-8deg); }
.pl-feature.lit:hover .ph3 { transform: translate(40%,-48%) rotate(8deg); }
.pl-feature.lit:hover .ph2 { transform: translate(-50%,-56%) scale(1.03); box-shadow: 0 16px 40px rgba(43,29,23,.2); }
.pl-feature:hover .pl-bulb::after { opacity: 1; transform: scale(1.35); transition: transform .4s ease; }

/* Check-in Coach live demo */
.cc-demo { flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 28px 24px; position: relative; min-height: 340px; gap: 0; }
.cc-eyebrow { margin: 0; font-family: var(--mono); font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: #6b7a94; }
.cc-focus { margin: 6px 0 18px; font-size: 17px; font-weight: 500; color: #E8F1FF; }
.cc-timer { margin: 2px 0 14px; font-family: var(--mono); font-size: clamp(48px, 8vw, 72px); line-height: 1; color: #00B4D8; font-variant-numeric: tabular-nums; text-shadow: 0 0 24px rgba(0,180,216,.35); }
.cc-actions { display: flex; gap: 10px; justify-content: center; }
.cc-a { font: 600 14px/1 var(--font); padding: 10px 16px; border-radius: 10px; cursor: pointer; border: 1px solid #2a3955; background: #14213d; color: #E8F1FF; }
.cc-a.teal { background: rgba(6,214,160,.12); border-color: rgba(6,214,160,.45); color: #06D6A0; }
.cc-a:hover { filter: brightness(1.15); }
.cc-log { list-style: none; margin: 16px 0 0; padding: 0; width: 100%; max-width: 340px; text-align: left; display: grid; gap: 6px; }
.cc-log li { display: flex; gap: 12px; font-size: 13.5px; color: #c9d6ea; animation: moreIn .4s ease; }
.cc-log time { font-family: var(--mono); color: #F4A261; flex: 0 0 auto; }
.cc-note { margin: 14px 0 0; font-size: 12px; color: #6b7a94; }
.cc-modal { position: absolute; inset: 0; margin: auto; width: min(340px, 88%); height: max-content; background: #14213d; border: 1px solid #2a3955; border-radius: 14px; padding: 18px; display: grid; gap: 10px; text-align: left; box-shadow: 0 20px 50px rgba(0,0,0,.5); animation: ccPop .35s cubic-bezier(.2,.8,.2,1); z-index: 5; }
.cc-modal[hidden] { display: none; }
.cc-q { font-size: 16px; font-weight: 600; color: #E8F1FF; }
.cc-modal input { font: 15px var(--font); padding: 10px 12px; border-radius: 10px; border: 1px solid #2a3955; background: #1a2942; color: #E8F1FF; outline: none; }
.cc-modal input:focus { border-color: #00B4D8; box-shadow: 0 0 0 3px rgba(0,180,216,.2); }
.cc-modal .cc-actions { justify-content: flex-end; }
.cc-demo.ding .cc-timer { animation: ccDing .6s ease; }
@keyframes ccPop { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes ccDing { 0%,100% { transform: none; } 30% { transform: scale(1.06); } }

/* About timeline: clean year rows */
.tl { list-style: none; margin: 0 0 22px; padding: 0; border-top: 1px solid var(--line); }
.tl li { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: baseline; padding: 14px 10px; margin: 0 -10px; border-bottom: 1px solid var(--line); border-radius: 8px; transition: background .2s ease; }
.tl li:hover { background: var(--surface); }
.tl-yr { font-weight: 700; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.tl li p { margin: 0 !important; }
.tl li.tl-now { background: var(--accent-soft); border-bottom-color: transparent; margin-top: 8px; }
.tl li.tl-now .tl-yr { color: var(--accent); }
.tl li.tl-now p { color: var(--ink) !important; }
.js .tl li { opacity: 0; transform: translateY(8px); transition: opacity .5s ease, transform .5s ease, background .2s ease; transition-delay: calc(var(--d) * 1ms), calc(var(--d) * 1ms), 0s; }
[data-tl].in .tl li { opacity: 1; transform: none; }

@media (max-width: 820px) {
  .pl-phones { min-height: 320px; }
  .pl-phones .ph { width: 30%; }
}
@media (prefers-reduced-motion: reduce) {
  .pl-phones .ph, .tl li, .card { transition: none !important; }
  .cc-modal, .cc-log li { animation: none; }
}
.cc-demo > :not(.cc-modal) { transition: opacity .3s ease, filter .3s ease; }
.cc-demo.asking > :not(.cc-modal) { opacity: .15; filter: blur(2px); }
@media (max-width: 520px) {
  .pl-phones { min-height: 300px; }
  .pl-phones .ph { width: 27%; border-radius: 12px; }
  .pl-feature.lit .ph1, .pl-feature.lit:hover .ph1 { transform: translate(-118%,-46%) rotate(-6deg); }
  .pl-feature.lit .ph3, .pl-feature.lit:hover .ph3 { transform: translate(18%,-46%) rotate(6deg); }
}
.pl-feature .pl-phones .ph { width: 31%; max-width: 148px; height: auto; object-fit: initial; }
@media (max-width: 520px) { .pl-feature .pl-phones .ph { width: 27%; } }

/* ---------- Business Valuation Tool ---------- */
.bv-feature { grid-column: 1 / -1; display: grid; grid-template-columns: 1.1fr 1fr; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: box-shadow .25s ease, transform .25s ease; }
.bv-feature:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(28,27,24,.05), 0 12px 28px rgba(28,27,24,.08); }
.bv-shot { display: block; background: #0f172a; overflow: hidden; }
.bv-shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.bv-feature:hover .bv-shot img { transform: scale(1.04); }
.bv-copy { padding: 32px; display: flex; flex-direction: column; gap: 12px; }
.bv-name { font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.bv-tagline { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
.bv-desc { margin: 0; color: var(--muted); font-size: 15px; }
.bv-copy .card-links { margin-top: auto; padding-top: 6px; }
.bv-copy .card-links a { font-weight: 600; font-size: 15px; text-decoration: none; color: var(--accent); }
.bv-copy .card-links a:hover { text-decoration: underline; }
@media (max-width: 820px) { .bv-feature { grid-template-columns: 1fr; } .bv-shot { aspect-ratio: 16 / 10; } }
@media (max-width: 520px) { .bv-copy { padding: 22px; } }

/* ================= Compact projects (Nov 20) ================= */
#projects .builds { gap: 16px; }
.pl-feature, .cc-feature, .bv-feature { grid-template-columns: 1.35fr 1fr; }
.bv-feature { grid-template-columns: 1fr 1.35fr; }
.pl-feature .pl-copy, .cc-copy, .bv-copy { padding: 24px 26px; gap: 10px; }
.pl-tagline, .cc-tagline, .bv-tagline { font-size: 19px; }
.pl-feature p.pl-desc, .cc-desc, .bv-desc { font-size: 14.5px; line-height: 1.55; }
.pl-logo { height: 28px; }
.pl-btn, .cc-btn { padding: 8px 16px; font-size: 14px; }
.pl-links { padding-top: 2px; }
.pl-phones, .pl-feature .pl-phones { min-height: 270px; }
.pl-feature .pl-phones .ph { max-width: 118px; border-radius: 14px; }
.cc-demo { min-height: 270px; padding: 18px 16px; }
.cc-focus { margin: 4px 0 10px; font-size: 15px; }
.cc-timer { font-size: clamp(40px, 5vw, 52px); margin: 2px 0 10px; }
.cc-a { padding: 8px 13px; font-size: 13px; }
.cc-log { margin-top: 10px; }
.cc-note { margin-top: 10px; font-size: 11.5px; }
.bv-shot img { object-position: top center; }
@media (max-width: 820px) {
  .pl-feature, .cc-feature, .bv-feature { grid-template-columns: 1fr; }
  .pl-phones, .pl-feature .pl-phones { min-height: 220px; }
  .pl-feature .pl-phones .ph { max-width: 96px; }
  .cc-demo { min-height: 230px; }
  .bv-shot { aspect-ratio: 16 / 8; }
}
@media (max-width: 520px) {
  .pl-feature .pl-copy, .cc-copy, .bv-copy { padding: 18px; }
  #projects .tags { display: none; }
}
@media (min-width: 821px) {
  .bv-shot { position: relative; }
  .bv-shot img { position: absolute; inset: 0; }
}

/* ================= Spec Desk mini demo ================= */
.sd-mini { background: var(--sunk); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; gap: 16px; align-items: center; }
.sd-phone { position: relative; flex: 0 0 auto; width: 104px; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: #2B2A4A; box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--line); touch-action: none; user-select: none; -webkit-user-select: none; }
.sd-art { position: absolute; inset: 0; background: linear-gradient(180deg, #C7C3F5 0%, #F3D9C4 62%, #E9B99A 100%); }
.sd-sun { position: absolute; width: 34%; aspect-ratio: 1; border-radius: 50%; background: #FFF4E6; left: 58%; top: 30%; opacity: .9; }
.sd-hill { position: absolute; left: -20%; right: -20%; bottom: -18%; height: 46%; border-radius: 50% 50% 0 0; background: #8E86E6; opacity: .55; }
.sd-zones { position: absolute; inset: 0; pointer-events: none; }
.sd-z { position: absolute; background: rgba(28,27,24,.16); outline: 1px dashed rgba(255,255,255,.75); outline-offset: -1px; transition: background .25s ease, top .4s ease, bottom .4s ease, height .4s ease, width .4s ease; }
.sd-z.hit { background: rgba(220,38,38,.38); }
.sd-z[data-z="top"] { left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 4px; padding: 0 7px; }
.sd-z[data-z="bottom"] { left: 0; right: 0; bottom: 0; display: grid; align-content: end; gap: 3px; padding: 0 7px 8px; }
.sd-z[data-z="left"] { left: 0; }
.sd-z[data-z="right"], .sd-z[data-z="rail"] { right: 0; }
.sd-z[data-z="rail"] { display: grid; align-content: center; justify-items: center; gap: 5px; background: rgba(28,27,24,.2); }
.sd-z[data-z="rail"] i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.85); }
.sd-av { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.85); flex: 0 0 auto; }
.sd-ln { display: block; height: 3px; width: 60%; border-radius: 2px; background: rgba(255,255,255,.8); }
.sd-ln.short { width: 40%; }
.sd-cta { display: block; height: 9px; width: 70%; border-radius: 3px; background: rgba(255,255,255,.9); margin-top: 2px; }
.sd-text { position: absolute; left: 0; top: 0; width: 64%; padding: 4px 6px; border-radius: 6px; background: #fff; color: var(--ink); font-size: 9px; line-height: 1.15; font-weight: 600; text-align: center; cursor: grab; z-index: 3;
  box-shadow: 0 2px 6px rgba(28,27,24,.18); outline: none; will-change: transform; }
.sd-text b { display: block; font-size: 12px; font-weight: 800; letter-spacing: -0.02em; color: var(--accent); }
.sd-text:focus-visible { box-shadow: 0 0 0 2px var(--accent), 0 2px 6px rgba(28,27,24,.18); }
.sd-text.dragging { cursor: grabbing; box-shadow: 0 6px 16px rgba(28,27,24,.25); }
.sd-text.bad { box-shadow: 0 0 0 2px #EF4444, 0 2px 6px rgba(28,27,24,.18); }
.sd-side { display: grid; gap: 8px; min-width: 0; align-content: center; justify-items: start; }
.sd-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.sd-chip { font: 600 11.5px/1 var(--font); padding: 5px 9px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer; }
.sd-chip.on { background: var(--accent-soft); color: var(--accent); border-color: #D9DCFB; }
.sd-flag { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; color: var(--muted); background: #fff; border: 1px solid var(--line); transition: background .3s, color .3s, border-color .3s; }
.sd-flag.ok { background: #ECFDF5; color: #047857; border-color: #A7F3D0; }
.sd-flag.bad { background: #FEF2F2; color: #B91C1C; border-color: #FECACA; }
.sd-why { margin: 0 !important; font-size: 12.5px !important; line-height: 1.4; color: var(--ink) !important; min-height: 2.8em; }
.sd-hint { margin: 0 !important; font-size: 11.5px !important; color: var(--muted); font-family: var(--mono); }
@media (prefers-reduced-motion: reduce) { .sd-z { transition: none; } }

/* ================= Full-screen shaker scene ================= */
.shake-scene { display: none; padding: 0; }
.js.shake-on .shake-scene { display: block; height: 175vh; position: relative; margin: -24px 0 -38vh; }
.js.shake-on #projects { position: relative; z-index: 3; }
#tools { padding-bottom: 24px; }
.shake-pin { position: sticky; top: 0; height: 100vh; overflow: hidden; display: grid; place-items: start center; padding-top: 3vh; }
.shake-bottle { width: min(36vh, 54vw); aspect-ratio: 2 / 3; will-change: transform; transform-origin: 50% 57%; }
.shake-bottle svg { width: 100%; height: 100%; overflow: visible; display: block; }
.shake-bottle svg * { stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.shake-bottle .sh-fill { fill: var(--bg); }
.shake-bottle .sh-thin { stroke-width: 1.6; opacity: .7; fill: none; }
.shake-bottle #shSpout { stroke: none; }
.mini-tok { position: absolute; left: 0; top: 0; width: 170px; height: 108px; border-radius: 12px; overflow: hidden; opacity: 0; transform-origin: 50% 20%; box-shadow: 0 8px 22px rgba(28,27,24,.16); pointer-events: none; will-change: transform, opacity; }
.mini-tok span { position: absolute; left: 10px; bottom: 8px; font-size: 12px; font-weight: 600; }
.mt-pl { background: #F7F2EA; border: 1px solid #E8DCD0; }
.mt-pl img { position: absolute; right: 12px; top: 10px; width: 52px; border-radius: 7px; border: 1px solid #E8DCD0; }
.mt-pl span { font-family: "Young Serif", Georgia, serif; font-weight: 400; color: #2A211C; font-size: 14px; }
.mt-cc { background: #0A1628; border: 1px solid #1f2c44; display: grid; place-items: center; }
.mt-cc b { font-family: var(--mono); font-size: 30px; font-weight: 400; color: #00B4D8; margin-top: -14px; }
.mt-cc span { color: #E8F1FF; }
.mt-bv { background: #0f172a; }
.mt-bv img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.js.pour-armed .pour-item { opacity: 0; transform-origin: 50% 0; }
.js.pour-armed .pour-item.in { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .js.shake-on .shake-scene { display: none; } }
/* Safe Zones demo: make "drag me" obvious */
.sd-text { outline: 1.5px dashed var(--accent); outline-offset: 2px; }
.sd-text.bad { outline-color: #EF4444; }
.sd-card.used .sd-text { outline-color: transparent; }
.sd-pill { position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); display: inline-flex; align-items: center; gap: 3px; white-space: nowrap;
  background: var(--accent); color: #fff; font-size: 8.5px; font-weight: 700; letter-spacing: .01em; padding: 2px 6px 2px 5px; border-radius: 999px; box-shadow: 0 2px 6px rgba(79,70,229,.35); pointer-events: none; transition: opacity .3s ease; animation: sdBob 1.6s ease-in-out infinite; }
.sd-pill::after { content: ""; position: absolute; left: 50%; top: 100%; margin-left: -3px; border: 3px solid transparent; border-top-color: var(--accent); }
.sd-card.used .sd-pill { opacity: 0; animation: none; }
@keyframes sdBob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -2px); } }
.sd-text.nudge { animation: sdNudge 1s ease-in-out; }
@keyframes sdNudge { 0%,100% { translate: 0 0; } 20% { translate: 6px -3px; } 40% { translate: -4px 2px; } 60% { translate: 4px -2px; } 80% { translate: -2px 1px; } }
.sd-hint { display: inline-flex; align-items: center; gap: 5px; color: var(--accent) !important; font-family: var(--font) !important; font-weight: 600; font-size: 12px !important; }
.sd-card.used .sd-hint { color: var(--muted) !important; font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .sd-pill, .sd-text.nudge { animation: none; } }

/* ===== Past work (Nov 21) ===== */
#work { padding-top: 24px; }
.pw-list { display: grid; gap: 22px; }
.pw-entry { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: grid; grid-template-columns: 1fr; }
.pw-gallery { display: grid; grid-template-columns: 1.55fr 1fr; grid-template-rows: 1fr 1fr; gap: 4px; aspect-ratio: 2.3 / 1; }
.pw-img { all: unset; display: block; overflow: hidden; cursor: zoom-in; position: relative; background: var(--sunk); }
.pw-img:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.pw-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.pw-img:hover img { transform: scale(1.03); }
.pw-main { grid-row: 1 / 3; }
.pw-main img { object-position: 50% 40%; }
.pw-copy { padding: 22px 26px 24px; display: grid; grid-template-columns: 1fr 1.4fr; column-gap: 32px; row-gap: 8px; align-items: start; }
.pw-copy .card-top { grid-column: 1; }
.pw-name { font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.pw-kind { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--sunk); border-radius: 999px; padding: 3px 10px; }
.pw-tagline { grid-column: 1; margin: 0; font-size: 17px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.pw-desc { grid-column: 2; grid-row: 1 / 4; margin: 0; color: var(--muted); font-size: 15px; }
.pw-copy .tags { grid-column: 1; margin-top: 4px; }
.pw-copy .card-top { justify-content: flex-start; gap: 10px; }
@media (max-width: 820px) {
  .pw-gallery { aspect-ratio: auto; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; }
  .pw-main { grid-row: auto; grid-column: 1 / -1; aspect-ratio: 3 / 2; }
  .pw-side { aspect-ratio: 3 / 2; }
  .pw-copy { grid-template-columns: 1fr; padding: 20px; }
  .pw-desc { grid-column: 1; grid-row: auto; }
}
.pw-lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(247,245,240,.96); display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.pw-lightbox[hidden] { display: none; }
.pw-lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 12px 40px rgba(28,27,24,.18); }
.pw-close { position: absolute; top: 14px; right: 16px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 24px; line-height: 1; color: var(--ink); cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .pw-img img { transition: none; } }
.nav a, .logo { white-space: nowrap; }
@media (max-width: 520px) {
  .nav { gap: 13px; }
  .nav a { font-size: 14px; }
  .nav a[href*="linkedin"] { display: none; }
}

/* Past work: video entry */
.pw-video { background: #000; aspect-ratio: 16 / 9; }
.pw-video video { width: 100%; height: 100%; display: block; object-fit: cover; }
.pw-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding-top: 4px; }
.pw-strip .pw-img { aspect-ratio: 4 / 3; }
@media (max-width: 820px) { .pw-strip { grid-template-columns: 1fr 1fr; } }

/* Past work: phone screenshots */
.pw-phones { display: flex; justify-content: center; gap: clamp(12px, 3vw, 36px); padding: 32px 20px; background: var(--sunk); }
.pw-phone { width: clamp(90px, 22%, 200px); padding: 8px; border-radius: 22px; background: #1C1B18; box-shadow: 0 10px 24px rgba(28,27,24,.18); }
.pw-phone img { border-radius: 4px; height: auto; aspect-ratio: 2 / 3; }
.pw-phone:hover img { transform: none; }
.pw-phone { transition: transform .3s ease; }
.pw-phone:hover { transform: translateY(-4px); }
@media (max-width: 520px) { .pw-phones { padding: 22px 12px; gap: 8px; } .pw-phone { width: 31%; padding: 5px; border-radius: 14px; } }
@media (prefers-reduced-motion: reduce) { .pw-phone { transition: none; } }

/* Past work: Pictoro band */
.pw-band { background: #2D3039; display: flex; align-items: center; justify-content: center; gap: clamp(10px, 2.5vw, 28px); padding: 28px 20px; }
.pw-band-phones { display: flex; gap: clamp(8px, 1.6vw, 18px); }
.pw-illus { width: clamp(120px, 20%, 210px); flex: none; background: transparent; border-radius: 10px; }
.pw-illus img { aspect-ratio: 1; }
.pw-phone.pw-tall { width: clamp(80px, 12vw, 132px); padding: 5px; border-radius: 16px; background: #15161A; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 10px 24px rgba(0,0,0,.3); }
.pw-phone.pw-tall img { aspect-ratio: 640 / 1136; border-radius: 10px; }
@media (max-width: 820px) {
  .pw-band { flex-wrap: wrap; padding: 22px 12px; }
  .pw-band-phones { order: 3; width: 100%; justify-content: center; }
  .pw-illus { width: 44%; }
  .pw-phone.pw-tall { width: 30%; max-width: 140px; }
}
.pw-logo { display: inline-flex; background: #F26F59; border-radius: 10px; padding: 3px 10px; }
.pw-logo img { display: block; height: 40px; width: auto; }

/* Past work: Star Blasters */
.sb-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 34px 20px 28px; text-decoration: none; color: #fff;
  background: radial-gradient(ellipse at 20% 30%, rgba(99,72,190,.35), transparent 55%), radial-gradient(ellipse at 85% 70%, rgba(40,110,200,.28), transparent 55%),
  radial-gradient(1px 1px at 12% 22%, #fff, transparent), radial-gradient(1px 1px at 33% 78%, #fff, transparent), radial-gradient(1px 1px at 58% 14%, #fff, transparent),
  radial-gradient(1px 1px at 76% 42%, #fff, transparent), radial-gradient(1px 1px at 91% 18%, #fff, transparent), radial-gradient(1px 1px at 47% 61%, rgba(255,255,255,.7), transparent),
  radial-gradient(1px 1px at 6% 66%, rgba(255,255,255,.7), transparent), radial-gradient(1px 1px at 68% 88%, rgba(255,255,255,.7), transparent), #0B0B1E; }
.sb-ships { display: flex; align-items: center; justify-content: center; gap: clamp(4px, 2vw, 26px); width: 100%; }
.sb-ships img { width: clamp(56px, 13%, 130px); height: auto; filter: drop-shadow(0 8px 14px rgba(0,0,0,.5)); transition: transform .4s ease; }
.sb-ships img.sb-lead { width: clamp(72px, 17%, 170px); }
.sb-ships img:nth-child(odd) { transform: translateY(8px); }
.sb-stage:hover .sb-ships img { transform: translateY(-6px); }
.sb-stage:hover .sb-ships img:nth-child(odd) { transform: translateY(2px); }
.sb-play { font-weight: 600; font-size: 15px; padding: 9px 18px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); transition: background .2s ease; }
.sb-stage:hover .sb-play { background: rgba(255,255,255,.18); }
.sb-stage:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.pw-sb .pw-desc a { color: var(--accent); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .sb-ships img { transition: none; } }
