:root {
  --cream: #FFF6E9;
  --tangerine: #E06A16;
  --celadon: #B7E4C7;
  --ink: #1C1410;
  /* Tree palette: the canopy outline, four leaf greens (celadon is the
     fifth, lightest), grass, fruit and bark tones. */
  --line: #1F5A45;
  --leaf-dark: #2E7D5A;
  --leaf-deep: #45996B;
  --leaf: #69BC82;
  --leaf-light: #97D79B;
  --leaf-hi: #C4EDBE;
  --grass: #CDE9BD;
  --unripe: #A9D352;
  --unripe-deep: #6E9A2A;
  --tangerine-deep: #B4500E;
  --blossom-shadow: #EDD6B4;
  --bark: #8A5A3C;
  --bark-deep: #6E442B;
  --bark-lit: #AD7A56;
  --bark-line: #53311E;
  --muted: #6B5E55;
  --rule: rgba(28, 20, 16, .14);
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0 clamp(16px, 6vw, 96px);
  background: var(--cream);
  color: var(--ink);
  font: 18px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
main, footer { position: relative; z-index: 1; }
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 96px 0 64px;
}
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Headings */
h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(64px, 11.5vw, 152px);
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: var(--tangerine);
}
h1 .studio {
  display: block;
  font-style: italic;
  font-size: 0.55em;
  letter-spacing: 0;
  color: var(--ink);
}
h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.tagline {
  margin: 0;
  max-width: 32rem;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.3;
}

/* Home: one composed screen. Copy on the left (wordmark, tagline, email),
   the tree on the right. Stacked on narrow screens. */
.home {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  grid-template-areas: "hero stage";
  align-content: center;
  align-items: start;
  column-gap: clamp(32px, 6vw, 96px);
  row-gap: 48px;
  max-width: 1200px;
  padding: clamp(32px, 6vh, 72px) 0 40px;
}
.hero { grid-area: hero; display: flex; flex-direction: column; gap: 12px; }
.hero h1 {
  font-size: clamp(44px, 5vw, 68px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--tangerine);
  white-space: nowrap;
}
.hero h1 .studio { display: inline; font-style: normal; font-size: 1em; letter-spacing: inherit; color: var(--ink); }
.hero .tagline { max-width: 24rem; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.4; }
.stage {
  grid-area: stage;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The tree. The SVG comes from _includes/tree.njk, the behavior from
   js/tree.js. 4:5 drawing, sized to the shorter side of the stage. */
.tree { position: relative; width: min(100%, 580px, calc((100vh - 240px) * .8)); width: min(100%, 580px, calc((100svh - 240px) * .8)); }
.tree > svg { display: block; width: 100%; height: auto; overflow: visible; }
/* The drawing is cel-shaded: flat tones, hard edges, light from the upper
   left. Five leaf tones run dark to hi; --line is the canopy's outline. */
.mound { fill: var(--grass); }
.mound-band { fill: var(--leaf); opacity: .55; }
.mound-lit { fill: #fff; opacity: .35; }
.cast { fill: var(--leaf-deep); opacity: .4; }
.tuft { fill: var(--leaf); }
.tuft.deep { fill: var(--leaf-deep); }
.daisy { fill: #fff; }
.daisy .eye, #daisy .eye { fill: var(--tangerine); }
.trunk { fill: var(--bark); cursor: pointer; }
.trunk-shade { fill: var(--bark-deep); pointer-events: none; }
.trunk-lit { fill: none; stroke: var(--bark-lit); stroke-width: 3; stroke-linecap: round; pointer-events: none; }
.bark { fill: none; stroke: var(--bark-line); stroke-width: 1.4; stroke-linecap: round; opacity: .7; pointer-events: none; }
.trunk-line { fill: none; stroke: var(--bark-line); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.branch { fill: var(--bark-deep); stroke: var(--bark-line); stroke-width: 1.2; stroke-linejoin: round; }
.blob.rim { fill: var(--line); }
.blob.dark { fill: var(--leaf-dark); }
.blob.deep { fill: var(--leaf-deep); }
.blob.mid { fill: var(--leaf); }
.leaf.dark { fill: var(--leaf-dark); }
.leaf.deep { fill: var(--leaf-deep); }
.leaf.mid { fill: var(--leaf); }
.leaf.light { fill: var(--leaf-light); }
.leaf.hi { fill: var(--leaf-hi); }
.leaf { stroke: var(--line); stroke-width: .55; stroke-linejoin: round; }
#lf .half, #tuft .half { stroke: none; }
.half { fill: var(--ink); opacity: .13; }
#lf .vein { fill: none; stroke: #fff; stroke-width: 1; stroke-linecap: round; opacity: .32; }
.crown, .fruits { transform-origin: 200px 354px; }
.stem { fill: none; stroke: var(--bark-line); stroke-width: 2.4; stroke-linecap: round; transform-origin: 0 0; }
.skin { stroke-width: 1.5; }
/* Live fruit is ripe and orange. In-progress fruit (.green) is smaller, green
   and not pickable. */
.ripe .skin { fill: var(--tangerine); stroke: var(--tangerine-deep); }
.ripe .shade { fill: var(--tangerine-deep); opacity: .6; }
.ripe .bounce { stroke: #FFB067; }
.green .skin { fill: var(--unripe); stroke: var(--unripe-deep); }
.green .shade { fill: var(--unripe-deep); opacity: .6; }
.green .bounce { stroke: #D4EC97; }
.fruit .bounce { fill: none; stroke-width: 1.5; stroke-linecap: round; opacity: .8; }
.fruit .shine { fill: #FFF8EA; opacity: .92; }
.fruit .pores { fill: none; stroke: var(--ink); stroke-width: 1.1; stroke-linecap: round; opacity: .16; }
.calyx { fill: var(--leaf-dark); }
.fleaf { fill: var(--leaf-light); stroke: var(--line); stroke-width: .8; stroke-linejoin: round; }
.fleaf.deep { fill: var(--leaf-deep); }
.glint { fill: #fff; transform-box: fill-box; transform-origin: center; transform: scale(0); animation: glint 4.2s ease-in-out infinite; animation-delay: calc(var(--i, 0) * .9s + 4s); pointer-events: none; }
@keyframes glint { 0%, 78%, 100% { transform: scale(0) rotate(0); } 86% { transform: scale(1) rotate(45deg); } 94% { transform: scale(0) rotate(90deg); } }
.blossom .petal { fill: #fff; }
.blossom .petal-shadow { fill: var(--blossom-shadow); }
.blossom .stamen { fill: var(--tangerine); opacity: .45; }
.blossom .eye { fill: var(--tangerine); opacity: .75; }

/* Rustle (js/wind.js). A sideways swipe on a phone rustles; a vertical one
   still scrolls the page. */
.tree > svg { touch-action: pan-y; -webkit-user-select: none; user-select: none; }

/* Growth: static unless tree.js puts .grow on the svg (first visit, or a
   click on the trunk). Ground, then trunk, branches, leaves, fruit. */
.grow .land { transform-origin: 200px 458px; animation: scaleIn .6s ease-out both; }
.grow .bole { transform-origin: 200px 456px; animation: rise .7s ease-out .3s both; }
.grow .branch { animation: scaleIn .5s ease-out both; animation-delay: calc(.85s + var(--i, 0) * .07s); }
.grow .blob, .grow .leaf { animation: scaleIn .45s cubic-bezier(.34, 1.3, .64, 1) both; animation-delay: calc(1s + var(--i, 0) * .007s); }
.grow .tuft, .grow .daisy { animation: scaleIn .4s ease-out 2.3s both; }
.grow .fruit { animation: scaleIn .4s ease-out both; animation-delay: calc(2.5s + var(--i, 0) * .1s); }
.grow .fruit.ripe { animation-name: pop; animation-duration: .5s; }
@keyframes draw { from { stroke-dasharray: 1; stroke-dashoffset: 1; } to { stroke-dasharray: 1; stroke-dashoffset: 0; } }
@keyframes rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes scaleIn { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes pop { 0% { transform: scale(0); } 65% { transform: scale(1.18); } 85% { transform: scale(.94); } 100% { transform: scale(1); } }

/* "Pick one": the words appear, then a short arrow draws itself from them
   onto the first ripe fruit and keeps poking at it, until any fruit is first
   hovered, focused or pressed. On every visit, after the growth on a first
   one. Keyframes start from hidden (fill: both), so with motion off
   everything simply shows. */
.tree { --at: .4s; }
.tree > svg.grow { --at: 3.2s; }
.pick { color: var(--tangerine); }
.pick-halo { fill: none; stroke: var(--cream); stroke-width: 8; stroke-linecap: round; }
.pick-line, .pick-head { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.pick-text { fill: currentColor; font: italic 22px var(--serif); paint-order: stroke; stroke: var(--cream); stroke-width: 6px; stroke-linejoin: round; animation: appear .4s ease-out var(--at) both; }
.pick-halo, .pick-line { animation: draw .8s ease-in-out calc(var(--at) + .35s) both; }
.pick-tip { animation: appear .15s ease-out calc(var(--at) + 1.1s) both; }
.pick-head { animation: poke 1.6s ease-in-out calc(var(--at) + 1.4s) infinite; }
.tried .pick { opacity: 0; transition: opacity .3s; animation: none; }
@keyframes poke { 50% { transform: translateX(3px); } }
@keyframes appear { from { opacity: 0; } }

/* Picking */
.fruit.ripe { cursor: grab; touch-action: none; outline: none; }
.fruit.ripe:focus-visible .skin { stroke: var(--ink); stroke-width: 2; }
.fruit .sway { transform-origin: 0 -12px; transition: transform .15s ease, filter .15s ease; }
.fruit.ripe:hover .sway { animation: sway 1.2s ease-in-out infinite; }
.fruit[data-state=pressed] .sway, .fruit[data-state=dragging] .sway { animation: none; transform: translateY(-4px); filter: drop-shadow(0 5px 4px rgba(28, 20, 16, .3)); }
.fruit[data-state=pressed], .fruit[data-state=dragging], .fruit[data-state=leaving] { cursor: grabbing; }
.fruit[data-state=leaving] { pointer-events: none; }
.fruit[data-state=leaving] .sway { animation: none; transform: translateY(-4px); filter: drop-shadow(0 5px 4px rgba(28, 20, 16, .3)); }
/* back from a pick, a new fruit grows on the stem */
.fruit.ripe.regrow .sway { animation: regrow .5s cubic-bezier(.34, 1.4, .64, 1) .35s both; }
@keyframes regrow { from { transform: scale(0); } to { transform: scale(1); } }
.fruit.wobble .sway { animation: wobble .5s ease-in-out; }
@keyframes sway { 0%, 100% { transform: translateX(-2px); } 50% { transform: translateX(2px); } }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-8deg); } 70% { transform: rotate(6deg); } }

/* A pick turns the page orange while the project loads. tree.js adds it to
   <body> on the first pick. */
.curtain {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--tangerine);
  color: var(--cream);
  font: italic clamp(32px, 8vw, 64px)/1 var(--serif);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  padding: 0 16px;
  text-align: center;
}
.curtain.on { visibility: visible; pointer-events: auto; animation: curtain .45s ease-in both; }
.curtain span { animation: appear .3s ease-out .2s both; }
@keyframes curtain { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .curtain.on, .curtain span { animation: none; opacity: 1; }
}

/* "Grab it and pull", or "Practice · in progress · not ready to pick yet" */
/* The name and one line of the fruit under the pointer, above the tree.
   Absolutely placed and faded, never displayed/hidden, so the tree never
   moves. */
.peek {
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: max-content;
  max-width: min(100vw - 32px, 26rem);
  margin: 0;
  transform: translate(-50%, 4px);
  text-align: center;
  line-height: 1.35;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s ease, transform .15s ease;
}
.peek.on { opacity: 1; transform: translate(-50%, 0); }
.peek-name { font: 28px/1.1 var(--serif); color: var(--tangerine); }
.peek-status { font-size: 13px; color: var(--muted); }
.peek-line { display: block; font-size: 15px; color: var(--muted); }

.tip {
  position: absolute;
  transform: translate(-50%, -100%);
  white-space: nowrap;
  pointer-events: none;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--cream);
  font-size: 13px;
}

@media (max-width: 899px) {
  .home {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "hero" "stage";
    align-content: start;
    row-gap: 32px;
    padding-top: 40px;
  }
  .hero h1 { white-space: normal; }
  .stage { justify-self: stretch; }
  .tree { width: min(100%, 440px); }
  /* Stacked, the tagline sits right above the tree, so the label goes inside
     the tree's box, over the sky and the top of the canopy. */
  .peek { bottom: auto; top: 0; padding: 6px 12px 8px; border-radius: 12px; background: rgba(255, 246, 233, .94); }
  .peek-name { font-size: 24px; }
  .peek-line { font-size: 14px; }
}

/* Reduced motion: the tree is always grown and still; a picked fruit
   returns without the spring (tree.js checks the same query). */
@media (prefers-reduced-motion: reduce) {
  .tree *, .tree *::before { animation: none !important; transition: none !important; }
}

/* Roster: the canonical list, always rendered. */
.projects h2 {
  margin: 0 0 6px;
  font: 500 13px/1.5 var(--sans);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.projects ul { list-style: none; margin: 0; padding: 0; max-width: 32rem; }
.projects li {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: start;
  align-items: baseline;
  column-gap: 14px;
  row-gap: 2px;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
}
.projects li:last-child { border-bottom: 1px solid var(--rule); }
.projects .project-icon { grid-row: 1 / span 2; align-self: center; width: 40px; height: 40px; border-radius: 10px; }
.projects li:has(.project-icon) { grid-template-columns: auto auto auto; }
.projects .name { font-family: var(--serif); font-size: 26px; line-height: 1.1; }
.projects .name a { color: var(--tangerine); text-decoration: none; }
.projects .name a:hover,
.projects .name a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
.projects .one-line { grid-column: 1 / -1; margin: 0; font-size: 16px; color: var(--muted); }
.projects li:has(.project-icon) .one-line { grid-column: 2 / -1; }

/* Status: a dot in the fruit's color, then the plain word. */
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
  color: var(--muted);
}
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--tangerine); }
.status[data-status=in-progress]::before { background: var(--unripe); }
.status[data-status=coming-soon]::before { background: #fff; box-shadow: inset 0 0 0 1.5px var(--blossom-shadow); }

/* The email, the one way to reach the studio */
.contact {
  margin: 12px 0 0;
  font-size: 17px;
  line-height: 1.5;
}
.contact a {
  color: var(--tangerine);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}
.contact a:hover,
.contact a:focus-visible { text-decoration-color: var(--celadon); }

/* Project pages */
.project { max-width: 44rem; gap: 36px; }
.crumb { font-size: 15px; }
.crumb a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}
.crumb a::before { content: "← "; color: var(--tangerine); }
.crumb a:hover,
.crumb a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.project-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.project-head .project-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
}
.project-head h1 {
  font-size: clamp(56px, 9vw, 104px);
}
.one-line {
  margin: 0;
  max-width: 32rem;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.3;
}
.prose { display: flex; flex-direction: column; gap: 12px; }
.prose h2 { margin-top: 24px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose ul { margin: 0; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 4px 0; }
.project-status p { margin: 16px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.shipped { font-size: 16px; }
.links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
}
.links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--celadon);
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}
.links a:hover,
.links a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.screenshots ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 0;
  padding: 0;
}
.screenshots .phone {
  width: min(100%, 260px);
  padding: 12px;
  border: 2px solid var(--celadon);
  border-radius: 36px;
  background: var(--cream);
}
.screenshots img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 24px;
}

/* Footer */
footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 0 28px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
  color: var(--muted);
}
footer .heart {
  color: var(--tangerine);
  font-size: 1.1em;
  line-height: 1;
}

@media (max-width: 480px) {
  main { gap: 22px; padding: 64px 0 40px; }
  .projects .name { font-size: 24px; }
  footer { font-size: 14px; }
}
