/* ==========================================================
   TOKENS: calm, warm, analog. Accent colours stay well under 15% of the page.
   ========================================================== */
:root {
  --bg: #0E1310;
  --surface: #161C18;
  --surface-2: #1E2621;
  --charcoal: #232826;
  --line: #2A352D;
  --text: #EEF0E8;
  --muted: #A9B3A6;
  --green: #8DB08A;
  --moss: #3E5C45;
  --cream: #E9E4D0;

  --bg-rgb: 14, 19, 16;                 /* the hero scrim uses --bg with an alpha */
  --radius: 16px;
  --shadow: 0 8px 24px rgba(6, 9, 7, 0.28);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --nav: 56px;
  --pad: 48px;                          /* section padding, phones (44-60px) */
  --soft: 200ms ease;                   /* hover transitions */
}

@media (min-width: 48em) {
  :root { --pad: 80px; }                /* desktop (72-96px) */
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--nav);
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
}

@media (min-width: 48em) {
  body { font-size: 18px; }
}

p, figure, blockquote, ol, ul, h1, h2, h3 { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }

a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--cream); }

:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 20px;
}

@media (min-width: 48em) {
  .wrap { padding-inline: 24px; }
}

/* Film grain: tiny SVG noise, fixed, barely there */
.grain {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ==========================================================
   TYPE
   ========================================================== */
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; }

h2 {
  font-size: clamp(32px, 4.6vw, 46px);
  line-height: 1.1;
}

h3 { font-size: 20px; line-height: 1.3; }

.label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.prose { max-width: 65ch; }
.lead { max-width: 65ch; font-size: 19px; }
.caption { max-width: 65ch; color: var(--muted); }
.note { color: var(--muted); font-size: 16px; }
.fine { max-width: 65ch; color: var(--muted); }

.sec { padding-block: var(--pad); }
.sec + .sec { border-top: 1px solid var(--line); }
.sec .wrap > * + * { margin-top: 24px; }
.sec .wrap > h2 + * { margin-top: 16px; }

/* [TODO] placeholders stay visible and plain */
.todo {
  display: inline-block;
  padding: 2px 10px;
  border: 1px dashed var(--muted);
  border-radius: 8px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

/* Gentle fade-up on scroll (script.js adds .is-in). Content is visible without JS. */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 320ms ease, transform 320ms ease;
}

.js .reveal.is-in { opacity: 1; transform: none; }

/* ==========================================================
   STICKY NAV
   ========================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav);
  background: rgba(var(--bg-rgb), 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__brand {
  display: none;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  text-decoration: none;
}

.nav nav { flex: 1; }
.nav ul { display: flex; justify-content: space-between; }

.nav li a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--soft), background-color var(--soft);
}

.nav li a:hover { color: var(--text); }
.nav li a.is-active { background: var(--moss); color: var(--text); }

@media (min-width: 48em) {
  .nav__brand { display: flex; }
  .nav nav { flex: none; }
  .nav ul { gap: 6px; }
  .nav li a { padding: 0 16px; font-size: 16px; }
}

/* ==========================================================
   BUTTONS AND PILLS
   ========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid var(--green);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color var(--soft), color var(--soft), border-color var(--soft);
}

.btn:hover { background: var(--moss); border-color: var(--moss); color: var(--text); }
.btn--solid { background: var(--green); color: var(--bg); }
.btn--solid:hover { background: var(--cream); border-color: var(--cream); color: var(--bg); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 15px;
  line-height: 1.4;
}

.pill--live { background: var(--moss); border-color: var(--moss); color: var(--text); font-weight: 600; }
.pill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cream); }
.pill--quiet { background: var(--surface); color: var(--muted); }

/* ==========================================================
   1. HERO. Phones and tablets: photo above the text, fading into it.
   Desktop: photo on the right, text on the dark left. The scrim is --bg at 88% on the text side.
   ========================================================== */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(200px, 58vw, 320px) 48px;
  background: var(--bg);
}

.hero__media {
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  right: 0;
  height: clamp(280px, 80vw, 440px);
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 35%;             /* keeps the face in frame */
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(var(--bg-rgb), 0) 0%, rgba(var(--bg-rgb), 0.88) 100%);
}

.hero__text { max-width: 31rem; }
.hero__text > * + * { margin-top: 20px; }

.hero__name {
  font-size: clamp(50px, 6vw + 18px, 88px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}

.hero__tag {
  font-family: var(--serif);
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.hero__tag em { color: var(--cream); font-style: italic; }
.hero__sub { color: var(--muted); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }

@media (min-width: 64em) {
  .hero {
    display: flex;
    align-items: center;
    min-height: min(92svh, 800px);
    padding-block: var(--pad);
  }

  .hero__in { flex: 1; }
  .hero__media { inset: 0; height: auto; }

  .hero__media img {
    position: absolute;
    top: 0;
    right: 0;
    width: 68%;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 26%);
    mask-image: linear-gradient(to right, transparent 0%, #000 26%);
  }

  .hero__media::after {
    background: linear-gradient(to right,
      rgba(var(--bg-rgb), 0.88) 0%,
      rgba(var(--bg-rgb), 0.88) 44%,
      rgba(var(--bg-rgb), 0) 72%);
  }
}

/* ==========================================================
   2. ABOUT: heading left, text right (stacked on phones). Text only.
   ========================================================== */
.about {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}

.about__text > * + * { margin-top: 28px; }

@media (min-width: 48em) {
  .about { grid-template-columns: 1fr 2.4fr; gap: 40px; }
  .about__text { padding-top: 0.45em; }
}

.timeline { margin-top: 8px; border-top: 1px solid var(--line); }

.timeline li {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  line-height: 1.45;
}

.timeline .yrs { color: var(--green); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.timeline .role strong { display: block; font-weight: 600; }
.timeline .role span { color: var(--muted); font-size: 16px; }

@media (min-width: 40em) {
  .timeline li { grid-template-columns: 9.5rem 1fr; gap: 16px; }
}

/* ==========================================================
   CARDS
   ========================================================== */
.card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card > * + * { margin-top: 16px; }
.card--flagship > * + * { margin-top: 20px; }

@media (min-width: 48em) {
  .card { padding: 28px; }
}

.card .label + p { margin-top: 8px; }

/* ==========================================================
   3. HOW I THINK
   ========================================================== */
.sec--quote .wrap { text-align: center; }
.sec--quote .wrap > h2 + * { margin-top: 28px; }

.pull { max-width: 38ch; margin-inline: auto; }

.pull::before {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  margin: 0 auto 24px;
  border-radius: 2px;
  background: var(--green);
}

.pull p {
  font-family: var(--serif);
  font-size: clamp(24px, 3.4vw, 34px);
  font-style: italic;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.005em;
}

.zoom {
  max-width: min(96vw, 1100px);
  max-height: 96vh;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  overflow: auto;
}

.zoom::backdrop { background: rgba(var(--bg-rgb), 0.9); }

.zoom__close {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--green);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-align: right;
  text-transform: uppercase;
  cursor: pointer;
}

.zoom__close:hover { color: var(--cream); }

.zoom img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(96vw, 1100px);
  max-height: calc(96vh - 60px);
  margin-inline: auto;
  cursor: zoom-out;
}

/* ==========================================================
   4. BOULDER AUTO DETAIL
   ========================================================== */
.cars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.car {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.car img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; }

.card--flagship > .cars + .note { margin-top: 12px; }
.card--flagship .note { font-size: 15px; }

/* One row of screenshots. Each width follows its own aspect ratio (--ar), so the three share one height.
   Phones: the row scrolls sideways. */
.strip {
  display: flex;
  gap: 16px;
  margin-inline: -20px;
  padding: 0 20px 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.strip figure {
  flex: 0 0 calc(var(--ar) * 150px);
  scroll-snap-align: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.strip img { width: 100%; height: auto; }

@media (min-width: 48em) {
  .strip { margin-inline: 0; padding: 0; overflow: visible; }
  .strip figure { flex: var(--ar) 1 0; min-width: 0; }
}

/* ==========================================================
   5. REALTOR PIPELINE: five steps, a soft dot that loops through them on its own.
   script.js loops --p (0 to 1) on .pipe and adds .is-lit to stages.
   Phones: vertical. Desktop: left to right.
   ========================================================== */
.pipe {
  --p: 0;
  --n: 20px;
  position: relative;
  height: 14rem;
}

.pipe::before {
  content: "";
  position: absolute;
  left: calc(var(--n) / 2 - 1px);
  top: calc(var(--n) / 2);
  bottom: calc(var(--n) / 2);
  width: 2px;
  border-radius: 2px;
  background: var(--line);
}

.pipe__stage {
  position: absolute;
  left: 0;
  top: calc(var(--i) * (100% - var(--n)) / 4);
  display: flex;
  align-items: center;
  gap: 14px;
}

.pipe__node {
  position: relative;
  z-index: 1;
  display: block;
  flex: none;
  width: var(--n);
  height: var(--n);
  border: 2px solid var(--muted);
  border-radius: 50%;
  background: var(--surface);
  transition: background-color var(--soft), border-color var(--soft);
}

.pipe__label {
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--soft);
}

.pipe__n { margin-right: 6px; font-size: 14px; }

.pipe__stage.is-lit .pipe__node { background: var(--green); border-color: var(--green); }
.pipe__stage.is-lit .pipe__label { color: var(--text); }

.pipe__dot {
  position: absolute;
  left: -6px;
  top: calc(var(--p) * (100% - var(--n)) - 6px);
  z-index: 2;
  width: calc(var(--n) + 12px);
  height: calc(var(--n) + 12px);
  border-radius: 50%;
  background: rgba(141, 176, 138, 0.28);
  box-shadow: 0 0 0 1px rgba(141, 176, 138, 0.6), 0 0 14px rgba(141, 176, 138, 0.35);
  pointer-events: none;
}

@media (min-width: 48em) {
  .pipe { height: 5.5rem; container-type: inline-size; }

  .pipe::before { left: calc(var(--n) / 2); right: calc(var(--n) / 2); top: calc(var(--n) / 2 - 1px); bottom: auto; width: auto; height: 2px; }

  .pipe__stage {
    top: 0;
    left: calc(var(--i) * (100% - var(--n)) / 4);
    display: block;
    width: var(--n);
  }

  /* Labels hang under their node, capped to the gap between nodes so they wrap instead of colliding. */
  .pipe__label {
    position: absolute;
    top: calc(var(--n) + 12px);
    left: 0;
    width: max-content;
    max-width: calc((100cqw - var(--n)) / 4 - 12px);
    white-space: normal;
    line-height: 1.3;
  }

  .pipe__n { display: block; margin: 0 0 2px; }
  .pipe__stage:nth-child(5) .pipe__label { left: auto; right: 0; text-align: right; }

  .pipe__dot {
    left: calc(var(--p) * (100% - var(--n)) - 6px);
    top: -6px;
  }
}

/* ==========================================================
   6. WHOP
   ========================================================== */
.metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.metrics li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metrics li:last-child { grid-column: 1 / -1; }

.metrics b {
  color: var(--green);
  font-family: var(--serif);
  font-size: clamp(30px, 3.3vw, 38px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.metrics small { color: var(--muted); font-family: var(--sans); font-size: 16px; font-weight: 400; letter-spacing: 0; }
.metrics span { color: var(--muted); font-size: 15px; line-height: 1.4; }

@media (min-width: 64em) {
  .metrics { grid-template-columns: repeat(5, 1fr); gap: 16px; }
  .metrics li:last-child { grid-column: auto; }
}

/* Slack and Intercom boxes joined by a gently pulsing connector */
.systems { display: grid; gap: 24px; align-items: center; }
.systems > * + * { margin-top: 0; }

.link { display: flex; align-items: center; max-width: 22rem; }

.box {
  flex: none;
  min-width: 5.5rem;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}

.wire {
  position: relative;
  flex: 1;
  min-width: 2.5rem;
  height: 2px;
  background: var(--moss);
}

.wire::before {
  content: "";
  position: absolute;
  right: -1px;
  top: -5px;
  border-left: 9px solid var(--moss);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.wire::after {
  content: "";
  position: absolute;
  left: 0;
  right: 9px;
  top: 0;
  height: 2px;
  background: var(--green);
  animation: pulse 2.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 1; }
}

@media (min-width: 48em) {
  .systems { grid-template-columns: 5fr 7fr; gap: 40px; }
}

.duo { display: grid; gap: 16px; }

@media (min-width: 48em) {
  .duo { grid-template-columns: 5fr 7fr; gap: 20px; }
}

.card--incident { border-left: 3px solid var(--green); }
.card--incident .label { color: var(--green); }

/* ==========================================================
   10. TESTIMONIALS: screenshots in three labeled groups, about 300px wide, click to enlarge
   ========================================================== */
.tgroup > * + * { margin-top: 14px; }

.tgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 300px));
  gap: 16px;
  align-items: start;
}

.shot {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: var(--shadow);
  transition: border-color var(--soft), transform var(--soft);
}

.shot:hover { border-color: var(--green); transform: translateY(-2px); }
.shot img { width: 100%; height: auto; }
/* ==========================================================
   8. GALLERY: tidy grid. Titles under each piece. Videos load on click.
   ========================================================== */
.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-flow: dense;
  gap: 16px 10px;
}

@media (min-width: 48em) {
  .tiles { grid-template-columns: repeat(4, 1fr); gap: 20px 16px; }
}

.tile { display: flex; flex-direction: column; gap: 8px; }
.tile--wide { grid-column: span 2; }

.tile__box {
  position: relative;
  flex: 1;
  min-height: 0;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color var(--soft);
}

.tile--wide .tile__box { aspect-ratio: 8 / 5; }
.tile:hover .tile__box,
.tile:focus-within .tile__box { border-color: var(--green); }

.tile__box img,
.tile__box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile__box video { background: var(--bg); }

.tile__btn {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: var(--surface);
  cursor: pointer;
}

.tile__play {
  position: absolute;
  left: 12px;
  bottom: 12px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--cream);
  border-radius: 50%;
  background: rgba(var(--bg-rgb), 0.85);
  transition: background-color var(--soft);
}

.tile__play::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 12px;
  border-left: 12px solid var(--cream);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

.tile__btn:hover .tile__play { background: var(--moss); }

.tile figcaption { color: var(--muted); font-size: 15px; line-height: 1.3; }

/* ==========================================================
   9. SKILLS
   ========================================================== */
.groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 48em) {
  .groups { grid-template-columns: 1fr 1fr; gap: 20px; }
}

.group {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.group h3 { margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chips li {
  padding: 4px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 15px;
  line-height: 1.5;
}

/* ==========================================================
   11. CONTACT AND FOOTER
   ========================================================== */
.closing__line {
  max-width: 28ch;
  font-family: var(--serif);
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.closing__avail .label { margin-right: 10px; }
.closing__links { display: flex; flex-wrap: wrap; gap: 12px; }
.closing__refs { color: var(--muted); }

.foot { border-top: 1px solid var(--line); padding-block: 24px; color: var(--muted); font-size: 15px; }
.foot__in { display: flex; justify-content: space-between; gap: 16px; }

/* ==========================================================
   Reduced motion: no fades, no pulse, no hover movement. The pipeline is fully lit (script.js).
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .wire::after { animation: none; opacity: 1; }
  .shot:hover { transform: none; }
  .nav li a, .btn, .shot, .tile__box, .tile__play, .pipe__node, .pipe__label { transition: none; }
}
