/* Teijboku — shared styles */
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/schibsted-grotesk-400.woff2) format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/schibsted-grotesk-500.woff2) format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 700; font-display: swap; src: url(/assets/fonts/schibsted-grotesk-700.woff2) format("woff2"); }
@font-face { font-family: "Zen Old Mincho"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/zen-old-mincho-400.woff2) format("woff2"); }

:root {
  --paper: #F1F3EC;
  --paper-deep: #E3E8DA;
  --line: #CBD3BF;
  --forest: #183428;
  --forest-2: #24473A;
  --moss: #3C5A4B;
  --stone: #5E685A;
  --mist: #B9C4B3;
  --shiso: #7A3E73;
  --sprout: #A7C957;
  --measure: 36rem;
  --sans: "Schibsted Grotesk", system-ui, sans-serif;
  --mincho: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --ease: cubic-bezier(.2,.7,.1,1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--forest);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Washi grain */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100;
  opacity: .07; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .09 0 0 0 0 .2 0 0 0 0 .16 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { color: var(--shiso); }
:focus-visible { outline: 2px solid var(--shiso); outline-offset: 3px; border-radius: 2px; }
.wrap { max-width: 76rem; margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2.5rem); }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 200; background: var(--forest); color: var(--paper); padding: .6rem 1rem; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; padding: 1.4rem 0;
  border-bottom: 1px solid transparent;
  transition: padding .4s var(--ease), background-color .4s, border-color .4s, backdrop-filter .4s;
}
.site-header.static { position: sticky; }
.site-header.scrolled {
  padding: .7rem 0;
  background: rgba(241, 243, 236, .82);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom-color: var(--line);
}
section[id], main[id] { scroll-margin-top: 5rem; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.125rem; text-decoration: none; letter-spacing: -.01em; }
.brand .mark { width: 38px; height: 38px; margin: -6px 0 -4px; }
.mark .lf { transform-box: view-box; transform-origin: 32px 53px; transition: transform .7s var(--ease); }
.mark .o.l { fill: var(--sprout); }
.mark .o.r { fill: var(--shiso); }
.mark .i.l { fill: currentColor; }
.mark .i.r { fill: var(--moss); }
.mark .rib { fill: none; stroke: var(--paper); stroke-width: .9; stroke-linecap: round; opacity: .4; }
.brand:hover { color: var(--forest); }
.brand:hover .mark .o.l { transform: rotate(-8deg); }
.brand:hover .mark .o.r { transform: rotate(8deg); }
.brand:hover .mark .i.l { transform: rotate(-3deg); }
.brand:hover .mark .i.r { transform: rotate(3deg); }
.nav-wrap { display: flex; align-items: center; gap: 2rem; }
.site-nav { display: flex; gap: 1.75rem; font-size: .95rem; }
.site-nav a { text-decoration: none; position: relative; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease); }
.site-nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.lang { display: flex; border: 1px solid var(--forest); border-radius: 999px; padding: 2px; font-size: .8rem; font-weight: 500; }
.lang a, .lang span { padding: .2rem .6rem; border-radius: 999px; text-decoration: none; line-height: 1.3; }
.lang span { background: var(--forest); color: var(--paper); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; overflow: hidden; isolation: isolate; }
.hero-inner { flex: 1; width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-top: clamp(7rem, 16vh, 10rem); padding-bottom: 2rem; align-items: start; position: relative; z-index: 2; }
.hero h1 {
  font-weight: 500;
  font-size: clamp(2.75rem, 7.6vw, 6.75rem);
  line-height: .98;
  letter-spacing: -.045em;
  margin: 0 0 2rem;
}
.hero h1 .ln { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.hero h1 .ln > span { display: inline-block; }
.hero h1 .soft { color: var(--moss); font-family: var(--mincho); font-weight: 400; letter-spacing: -.02em; }
.lede { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.5; max-width: 31rem; margin: 0 0 2.25rem; color: var(--stone); }
.kanji-col { display: flex; gap: .75rem; align-items: flex-start; }
.kanji {
  display: flex; flex-direction: column;
  font-family: var(--mincho);
  font-weight: 900;
  font-size: clamp(5rem, min(11vw, 19vh), 10rem);
  line-height: .95;
  margin: 0;
  color: var(--forest);
}
.kanji span { display: block; }
.kanji-cap { writing-mode: vertical-rl; font-size: .85rem; letter-spacing: .04em; color: var(--stone); margin-top: .75rem; }
.kanji-cap em { font-style: normal; font-family: var(--mincho); color: var(--forest); }
.ground { position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--forest); z-index: 3; transform-origin: left; }
#shrub { position: absolute; z-index: 1; bottom: 0; right: max(-4rem, calc((100vw - 76rem) / 2 - 4rem)); width: min(50vw, 680px); height: min(68svh, 640px); overflow: visible; pointer-events: none; }
#shrub path { fill: none; stroke: var(--forest); stroke-linecap: round; }
#shrub path.leaf { stroke: none; }
#shrub .leaf { transform-box: fill-box; transform-origin: 50% 100%; }

.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  background: var(--forest); color: var(--paper);
  padding: 1rem 1.5rem; border-radius: 999px;
  font-weight: 500; text-decoration: none; font-size: 1rem;
  position: relative; overflow: hidden; isolation: isolate;
}
.btn::before { content: ""; position: absolute; inset: 0; background: var(--shiso); transform: translateY(101%); transition: transform .45s var(--ease); z-index: -1; border-radius: inherit; }
.btn:hover { color: var(--paper); }
.btn:hover::before { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 1rem 1.75rem; align-items: center; }
.btn-row .quiet { font-size: .98rem; }
.scroll-hint { position: absolute; left: clamp(1.25rem, 4vw, 2.5rem); bottom: 1.25rem; z-index: 3; font-size: .8rem; color: var(--stone); display: flex; align-items: center; gap: .5rem; }
.scroll-hint i { width: 1px; height: 28px; background: var(--stone); display: block; transform-origin: top; }

/* ---------- Load choreography ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .ground { transform: scaleX(0); animation: draw-x 1.1s var(--ease) .1s forwards; }
  .js .kanji span { clip-path: inset(0 0 100% 0); animation: brush 1.1s cubic-bezier(.6,0,.2,1) forwards; }
  .js .kanji span:nth-child(1) { animation-delay: .35s; }
  .js .kanji span:nth-child(2) { animation-delay: .85s; }
  .js .kanji-cap { opacity: 0; animation: fade .8s ease 1.9s forwards; }
  .js .hero h1 .ln > span { transform: translateY(110%); animation: rise 1s var(--ease) forwards; }
  .js .hero h1 .ln:nth-child(1) > span { animation-delay: .9s; }
  .js .hero h1 .ln:nth-child(2) > span { animation-delay: 1.02s; }
  .js .hero h1 .ln:nth-child(3) > span { animation-delay: 1.14s; }
  .js .lede, .js .hero .btn-row { opacity: 0; transform: translateY(14px); animation: up .9s var(--ease) forwards; }
  .js .lede { animation-delay: 1.45s; }
  .js .hero .btn-row { animation-delay: 1.6s; }
  .js .site-header.is-home { opacity: 0; animation: fade .8s ease 1.8s forwards; }
  .js .scroll-hint { opacity: 0; animation: fade .8s ease 3s forwards; }
  .js .is-home .brand .lf { animation: unfurl .8s var(--ease) backwards; }
  .js .is-home .brand .i.l { animation-delay: 2.1s; }
  .js .is-home .brand .i.r { animation-delay: 2.2s; }
  .js .is-home .brand .o.l { animation-delay: 2.32s; }
  .js .is-home .brand .o.r { animation-delay: 2.42s; }
  @keyframes unfurl { from { transform: scale(0) rotate(-20deg); } }
  .scroll-hint i { animation: hint 2.2s ease-in-out 3.2s infinite; }
  @keyframes draw-x { to { transform: scaleX(1); } }
  @keyframes brush { to { clip-path: inset(0 0 0 0); } }
  @keyframes rise { to { transform: translateY(0); } }
  @keyframes up { to { opacity: 1; transform: none; } }
  @keyframes fade { to { opacity: 1; } }
  @keyframes hint { 0% { transform: scaleY(0); } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
}

/* ---------- Sections ---------- */
section.block { padding: clamp(5rem, 10vw, 8rem) 0; }
h2 {
  font-weight: 500; font-size: clamp(2rem, 4.2vw, 3.25rem);
  line-height: 1.05; letter-spacing: -.035em; margin: 0 0 1.25rem; max-width: 16ch;
}
.intro { max-width: var(--measure); color: var(--stone); margin: 0; font-size: 1.1rem; }
.split { display: grid; grid-template-columns: 1fr 1.35fr; gap: 3rem 6rem; align-items: start; }
.sticky { position: sticky; top: 3rem; }
.side-kanji { font-family: var(--mincho); font-size: 1rem; color: var(--moss); margin: 0 0 1rem; display: block; }

/* Services */
.services { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.services li { position: relative; padding: 1.4rem 0; border-bottom: 1px solid var(--line); transition: padding-left .5s var(--ease); }
.services h3 { margin: 0; font-weight: 500; font-size: clamp(1.2rem, 2vw, 1.5rem); letter-spacing: -.02em; line-height: 1.25; }
.services p { margin: .3rem 0 0; color: var(--stone); font-size: 1rem; }
.services li::before {
  content: ""; position: absolute; left: 0; top: 1.95rem; width: 14px; height: 14px;
  background: var(--sprout); border-radius: 0 100% 0 100%; transform: scale(0) rotate(-45deg); transition: transform .45s var(--ease);
}
.services li:hover { padding-left: 2rem; }
.services li:hover::before { transform: scale(1) rotate(0deg); }

/* Approach */
.approach { background: var(--forest); color: var(--paper); position: relative; overflow: hidden; }
.approach .intro { color: var(--mist); }
.approach .side-kanji { color: var(--sprout); }
.approach-bg { position: absolute; right: -2rem; top: 50%; transform: translateY(-50%); font-family: var(--mincho); font-weight: 900; font-size: clamp(14rem, 34vw, 30rem); line-height: 1; color: var(--forest-2); writing-mode: vertical-rl; pointer-events: none; user-select: none; }
.stem { list-style: none; margin: 4.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; z-index: 1; }
.stem::before, .stem::after { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 2px; }
.stem::before { background: var(--moss); }
.stem::after { background: var(--sprout); transform-origin: left; transform: scaleX(0); transition: transform 2.2s var(--ease); }
.stem.in::after { transform: scaleX(1); }
.stem li { position: relative; padding: 3rem 1.75rem 0 0; }
.stem li::before {
  content: ""; position: absolute; top: 3px; left: 0; width: 18px; height: 18px; border-radius: 50%;
  background: var(--forest); border: 2px solid var(--moss); transition: border-color .4s, background .4s, transform .5s var(--ease);
}
.stem.in li::before { border-color: var(--sprout); }
.stem.in li:last-child::before { background: var(--sprout); transform: scale(1.25); }
.stem.in li:nth-child(1)::before { transition-delay: .1s; }
.stem.in li:nth-child(2)::before { transition-delay: .65s; }
.stem.in li:nth-child(3)::before { transition-delay: 1.2s; }
.stem.in li:nth-child(4)::before { transition-delay: 1.75s; }
.stem .step { font-size: .95rem; font-weight: 500; color: var(--sprout); display: block; margin-bottom: .6rem; line-height: 1; }
.stem h3 { font-weight: 500; font-size: clamp(1.5rem, 2.4vw, 2rem); letter-spacing: -.03em; margin: 0 0 .6rem; }
.stem p { margin: 0; color: var(--mist); font-size: 1rem; max-width: 17rem; }
.loop-note { margin: 3rem 0 0; color: var(--mist); font-size: .98rem; display: flex; align-items: center; gap: .75rem; position: relative; z-index: 1; }
.loop-note svg { width: 22px; height: 22px; flex: none; }

/* About */
.about p { max-width: var(--measure); margin: 0 0 1.1rem; font-size: 1.1rem; }
.about .big { font-size: clamp(1.4rem, 2.4vw, 1.85rem); line-height: 1.35; letter-spacing: -.02em; font-weight: 400; margin-bottom: 1.75rem; }
.fields { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.75rem 0 0; padding: 0; list-style: none; }
.fields li { border: 1px solid var(--forest); border-radius: 999px; padding: .35rem 1rem; font-size: .92rem; }

/* Work */
.work { border-top: 1px solid var(--line); }
.work-head { display: grid; grid-template-columns: 1fr 1.35fr; gap: 2rem 6rem; align-items: end; margin-bottom: 3.5rem; }
.work-head h2 { margin: 0; }
.apps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.apps > li > a {
  display: grid; grid-template-rows: auto 1fr auto; gap: 1.5rem; height: 100%;
  padding: clamp(1.5rem, 3vw, 2.5rem); text-decoration: none;
  background: #fff9; border: 1px solid var(--line); border-radius: 22px;
  transition: transform .5s var(--ease), border-color .3s, background .3s;
}
.apps > li > a:hover { transform: translateY(-6px); border-color: var(--forest); background: #fff; color: inherit; }
.app-mark { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 6px 18px -8px #18342866; transition: transform .6s var(--ease); }
.apps > li > a:hover .app-mark { transform: rotate(-6deg) scale(1.06); }
.app-body h3 { margin: 0 0 .6rem; font-weight: 500; font-size: clamp(1.6rem, 2.6vw, 2.2rem); letter-spacing: -.035em; line-height: 1.1; }
.app-body p { margin: 0; color: var(--stone); max-width: 32rem; }
.tags { list-style: none; margin: 1.25rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.tags li { font-size: .82rem; padding: .25rem .75rem; border-radius: 999px; background: var(--paper-deep); }
.app-link { font-weight: 500; display: inline-flex; align-items: center; gap: .5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.app-link::after { content: ""; width: 10px; height: 10px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .4s var(--ease); }
.apps > li > a:hover .app-link { color: var(--shiso); }
.apps > li > a:hover .app-link::after { transform: translateX(4px) rotate(45deg); }

/* Coffee */
.coffee { background: var(--paper-deep); position: relative; overflow: hidden; }
.coffee h2 { font-size: clamp(2.75rem, 7vw, 5.5rem); max-width: 11ch; line-height: .98; letter-spacing: -.045em; }
.cup { width: 72px; height: 72px; margin-bottom: 1.5rem; }
.cup path { fill: none; stroke: var(--forest); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cup .steam { stroke: var(--moss); }
@media (prefers-reduced-motion: no-preference) {
  .cup .steam { stroke-dasharray: 28; animation: steam 3.2s ease-in-out infinite; }
  .cup .steam:nth-of-type(2) { animation-delay: .6s; }
  .cup .steam:nth-of-type(3) { animation-delay: 1.2s; }
  @keyframes steam { 0% { stroke-dashoffset: 28; opacity: 0; } 30% { opacity: 1; } 70% { opacity: 1; } 100% { stroke-dashoffset: -28; opacity: 0; } }
}
/* Contact form */
.contact-form {
  position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 28px;
  padding: clamp(1.5rem, 3.2vw, 2.5rem); box-shadow: 0 30px 60px -40px rgba(24,52,40,.45);
}
.contact-form .field { position: relative; margin: 0 0 1.4rem; }
.contact-form label { display: block; font-size: .9rem; color: var(--stone); margin-bottom: .35rem; }
.contact-form input, .contact-form textarea {
  width: 100%; font: inherit; font-size: 1.15rem; color: var(--forest); background: transparent;
  border: 0; border-bottom: 1.5px solid var(--line); border-radius: 0; padding: .45rem 0 .6rem; outline: none;
  transition: border-color .3s;
}
.contact-form textarea { resize: vertical; min-height: 6.5rem; line-height: 1.5; }
.contact-form .field::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--sprout);
  transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease);
}
.contact-form .field:focus-within::after { transform: scaleX(1); }
.contact-form .field:focus-within label { color: var(--forest); }
.contact-form input.code { font-size: clamp(1.8rem, 5vw, 2.4rem); letter-spacing: .45em; font-variant-numeric: tabular-nums; font-weight: 500; }
.contact-form input.code::placeholder { color: var(--line); }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile-slot { height: 0; overflow: hidden; transition: height .4s var(--ease); }
.cf-turnstile-slot.show { height: 72px; margin-bottom: 1rem; }
.cf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.5rem; margin-top: 1.9rem; }
.cf-actions .btn { border: 0; cursor: pointer; font-family: inherit; }
.cf-actions .btn:disabled { cursor: progress; opacity: .75; }
.cf-hint { margin: 0; flex: 1 1 14rem; font-size: .92rem; color: var(--stone); line-height: 1.45; }
.cf-lead { margin: 0 0 1.6rem; font-size: 1.1rem; }
.cf-lead strong { font-weight: 500; overflow-wrap: anywhere; }
.contact-form .link { background: none; border: 0; padding: 0; font: inherit; font-size: .98rem; color: var(--forest); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.contact-form .link:hover { color: var(--shiso); }
.cf-error { margin: 0; font-size: .95rem; color: var(--shiso); max-height: 0; overflow: hidden; transition: max-height .4s var(--ease), margin .4s var(--ease); }
.cf-error.on { max-height: 6rem; margin-top: 1.1rem; }
.cf-done { text-align: left; padding: .5rem 0; outline: none; }
.cf-done .mark { width: 76px; height: 76px; color: var(--forest); margin-bottom: .75rem; }
.cf-done h3 { font-weight: 500; font-size: clamp(1.8rem, 3.4vw, 2.4rem); letter-spacing: -.03em; margin: 0 0 .5rem; }
.cf-done p { margin: 0 0 1.5rem; color: var(--stone); }
.or { margin: 2.75rem 0 .5rem; font-size: .92rem; color: var(--stone); }
@media (prefers-reduced-motion: no-preference) {
  .cf-step.enter { animation: cfIn .6s var(--ease) both; }
  @keyframes cfIn { from { opacity: 0; transform: translateY(14px); } }
  .cf-done.enter .lf { animation: unfurl .9s var(--ease) backwards; }
  .cf-done.enter .lf.o.l { animation-delay: .25s; }
  .cf-done.enter .lf.o.r { animation-delay: .35s; }
  .cf-done.enter .lf.i.r { animation-delay: .12s; }
  .contact-form[aria-busy="true"] .btn::before { transform: translateY(0); animation: cfBusy 1.2s ease-in-out infinite alternate; }
  @keyframes cfBusy { from { opacity: .35; } to { opacity: 1; } }
}

.contact-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.contact-list li a { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding .45s var(--ease); }
.contact-list li a span { color: var(--stone); font-size: .95rem; }
.contact-list li a strong { font-weight: 500; font-size: clamp(1.05rem, 1.6vw, 1.3rem); letter-spacing: -.01em; }
.contact-list li a:hover { padding-left: .75rem; padding-right: .75rem; }
.contact-list li a:hover strong { color: var(--shiso); }

/* Footer */
footer { padding: 2.5rem 0 2rem; overflow: hidden; }
footer .foot { border-top: 0; padding-top: 0; }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .75rem 2rem; font-size: .875rem; color: var(--stone); border-top: 1px solid var(--line); padding-top: 1.25rem; }
.foot nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }

/* ---------- Plain pages (privacy, 404) ---------- */
.page { padding: clamp(3rem, 8vw, 6rem) 0 clamp(4rem, 8vw, 7rem); }
.page .side-kanji { margin-bottom: 1.25rem; }
.page h1 { font-weight: 500; font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1; letter-spacing: -.045em; margin: 0 0 1.5rem; }
.prose { max-width: 42rem; }
.prose h2 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); max-width: none; margin: 2.75rem 0 .75rem; letter-spacing: -.025em; }
.prose p, .prose li { color: var(--forest); }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }
.prose .meta { color: var(--stone); font-size: .95rem; }
.lost { min-height: 72svh; display: grid; grid-template-columns: auto 1fr; gap: 2rem 4rem; align-items: center; }
.big404 { font-weight: 500; font-size: clamp(6rem, 18vw, 13rem); letter-spacing: -.06em; line-height: .85; margin: 0; color: var(--sprout); }
.lost p { color: var(--stone); font-size: 1.15rem; max-width: 30rem; margin: 0 0 2rem; }

/* Reveal on scroll (user-triggered) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform 1s var(--ease); }
  .js .reveal.in { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) and (min-width: 901px) { .apps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 2.5rem; }
  .sticky { position: static; }
  .stem { grid-template-columns: 1fr 1fr; row-gap: 3rem; }
  .stem::before, .stem::after { display: none; }
  .work-head { grid-template-columns: 1fr; }
  .apps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .site-nav { display: none; }
  .hero-inner { grid-template-columns: 1fr; padding-top: 6.5rem; }
  .hero h1 { max-width: calc(100% - 4rem); font-size: clamp(2.4rem, 11vw, 3.4rem); }
  .kanji-col { position: absolute; right: 1.25rem; top: 6.25rem; }
  .hero .kanji { font-size: 3.4rem; }
  .kanji-cap { display: none; }
  #shrub { right: -18vw; width: 100vw; height: 36svh; }
  .scroll-hint { display: none; }
  .stem { grid-template-columns: 1fr; }
  .approach-bg { opacity: .6; }
  .lost { grid-template-columns: 1fr; }
}
/* ---------- Scroll effects ---------- */
/* Reading progress along the bottom of the sticky header */
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--sprout); transform-origin: left; transform: scaleX(var(--sc, 0));
  opacity: 0; transition: opacity .4s;
}
.site-header.scrolled::after { opacity: 1; }

@media (prefers-reduced-motion: no-preference) {
  /* Hero: text drifts up and fades, the shrub sinks and grows as you leave */
  .js .hero-inner { transform: translate3d(0, calc(var(--hp, 0) * -120px), 0); opacity: calc(1 - var(--hp, 0) * 1.5); }
  .js #shrub { transform: translate3d(0, calc(var(--hp, 0) * 70px), 0) scale(calc(1 + var(--hp, 0) * .1)); transform-origin: 50% 100%; }
  .js .ground { opacity: calc(1 - var(--hp, 0) * .6); }

  /* Headings rise word by word from behind a mask */
  h2.by-word .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
  h2.by-word .w > span { display: inline-block; transform: translateY(108%); transition: transform 1.05s var(--ease); transition-delay: calc(var(--i) * 60ms); }
  h2.by-word.in .w > span { transform: none; }

  /* Services: each row draws its line, then the text slides in */
  .js .services li { border-bottom-color: transparent; }
  .js .services li::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--line);
    transform: scaleX(0); transform-origin: left; transition: transform 1.3s var(--ease);
  }
  .js .services li.in::after { transform: scaleX(1); }
  .js .services li h3, .js .services li p { opacity: 0; transform: translateX(-20px); transition: opacity .8s ease .15s, transform 1s var(--ease) .15s; }
  .js .services li p { transition-delay: .28s; }
  .js .services li.in h3, .js .services li.in p { opacity: 1; transform: none; }

  /* Approach: the dark section unfolds to full width, the stem grows with your scroll */
  .js .approach { clip-path: inset(0 calc((1 - var(--e, 1)) * 7vw) round calc((1 - var(--e, 1)) * 64px)); }
  .js .stem::after { transform: scaleX(var(--sp, 0)); transition: none; }
  .js .stem li::before { transition-delay: 0s; }
  .js .stem li.lit::before { border-color: var(--sprout); }
  .js .stem li.lit:last-child::before { background: var(--sprout); transform: scale(1.25); }
  .js .stem li h3, .js .stem li p { opacity: .3; transform: translateY(8px); transition: opacity .6s ease, transform .7s var(--ease); }
  .js .stem li.lit h3, .js .stem li.lit p { opacity: 1; transform: none; }
  .js .loop-note svg { transform: rotate(calc(var(--sp, 0) * 360deg)); }

  /* Apps: cards land one after another */
  .js .apps li.reveal { transform: translateY(80px) rotate(1.5deg); transition: opacity .9s ease, transform 1.2s var(--ease); }
  .js .apps li.reveal:nth-child(2) { transition-delay: .12s; }
  .js .apps li.reveal:nth-child(3) { transition-delay: .24s; }
  .js .apps li.reveal.in { transform: none; }
}

/* ---------- Approach on small screens: a vertical stem with leaf cards ---------- */
@media (max-width: 900px) {
  .stem { grid-template-columns: 1fr; row-gap: 1.25rem; margin-top: 3rem; padding-left: 2.75rem; }
  .stem::before, .stem::after { display: block; left: 10px; right: auto; top: 12px; bottom: 12px; width: 2px; height: auto; }
  .stem::after { transform-origin: top; transform: scaleY(1); }
  .stem li {
    padding: 1.6rem 1.5rem 1.7rem; border-radius: 22px; isolation: isolate;
    clip-path: inset(0 0 0 -3rem round 22px);
    background: linear-gradient(150deg, rgba(167,201,87,.10), rgba(36,71,58,.55) 55%);
    border: 1px solid rgba(185,196,179,.16);
  }
  /* node on the stem */
  .stem li::before { top: 1.85rem; left: calc(-2.75rem + 2px); }
  /* leaf that sprouts from the node towards the card */
  .stem li::after {
    content: ""; position: absolute; z-index: -1; right: -1.4rem; bottom: -1.6rem; width: 9rem; height: 9rem;
    border-radius: 0 100% 0 100%; background: var(--sprout); opacity: .07; transform: rotate(-12deg);
  }
  .stem li:nth-child(2)::after { background: var(--mist); }
  .stem li:nth-child(3)::after { background: var(--shiso); opacity: .16; }
  .stem .step {
    position: absolute; top: .6rem; right: 1.1rem; margin: 0; z-index: -1;
    font-size: 5.5rem; font-weight: 700; letter-spacing: -.06em; line-height: 1;
    color: transparent; -webkit-text-stroke: 1.5px rgba(167,201,87,.35);
  }
  .stem h3 { font-size: 2rem; }
  .stem p { max-width: 22rem; }
  .stem li:last-child { background: linear-gradient(150deg, rgba(167,201,87,.24), rgba(36,71,58,.6) 60%); border-color: rgba(167,201,87,.35); }
  .loop-note { margin-left: 2.75rem; }
}
@media (max-width: 900px) and (prefers-reduced-motion: no-preference) {
  .js .stem::after { transform: scaleY(var(--sp, 0)); }
  .js .stem li {
    opacity: .28; transform: translate3d(28px, 0, 0) scale(.96);
    transition: opacity .7s ease, transform .9s var(--ease), border-color .6s;
  }
  .js .stem li.lit { opacity: 1; transform: none; }
  .js .stem li h3, .js .stem li p { opacity: 1; transform: translateY(14px); transition: transform .9s var(--ease) .08s; }
  .js .stem li p { transition-delay: .16s; }
  .js .stem li.lit h3, .js .stem li.lit p { transform: none; }
  .js .stem li::before { transform: scale(.6); }
  .js .stem li.lit::before { transform: scale(1.15); background: var(--sprout); border-color: var(--sprout); box-shadow: 0 0 0 7px rgba(167,201,87,.16); }
  .js .stem li::after { transform: rotate(-12deg) scale(calc(.35 + var(--lp, 0) * .65)) translate3d(0, calc((1 - var(--lp, 0)) * 30px), 0); transition: transform .25s linear; }
  .js .stem .step { transform: translate3d(0, calc((1 - var(--lp, 0)) * 26px), 0); opacity: calc(.3 + var(--lp, 0) * .7); }
  .js .loop-note svg { transform: rotate(calc(var(--sp, 0) * 540deg)); }
}

@media print {
  body::after, #shrub, .scroll-hint, .lang { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}
