/* tenonry.net v3 — the page is a drawing sheet: ink on paper, one isometric joint (the TENONRY mark), figures on walnut, experience as growth rings.
   Content is complete without JS; site.js only adds motion. */
:root {
  --paper: #efe8dc; --paper-2: #e7decf; --paper-3: #dcd0bc;
  --ink: #1b1611; --ink-2: #4a3f36; --ink-3: #6e6154; --line: rgba(27, 22, 17, .14); --line-2: rgba(27, 22, 17, .3);
  --shu: #b4321f; --shu-d: #97281a;
  --walnut: #2a1e16; --cream: #f0e5d1; --cream-2: rgba(240, 229, 209, .68); --cream-3: rgba(240, 229, 209, .42); --cline: rgba(240, 229, 209, .2);
  --serif: "Noto Serif TC", "Source Han Serif TC", "Songti TC", "PMingLiU", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --num: "Fraunces", "Noto Serif TC", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --gut: clamp(20px, 4vw, 48px);
  --wrap: 1180px;
  --sheet: 1520px;
  --paper-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .33 0 0 0 0 .23 0 0 0 0 .13 .6 0 0 0 -.22'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; overflow-x: hidden;
  background: var(--paper) var(--paper-grain);
  color: var(--ink); font: 400 16px/1.75 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; }
::selection { background: rgba(180, 50, 31, .22); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 200; padding: 8px 14px; background: var(--ink); color: var(--paper); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: calc(var(--wrap) + 2 * var(--gut)); margin: 0 auto; padding: 0 var(--gut); }

/* ---------------------------------------------------------------- header */
.top { position: fixed; inset: 0 0 auto; z-index: 60; transition: background-color .3s, box-shadow .3s; }
.top.solid { background: rgba(239, 232, 220, .92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 1px 0 var(--line); }
.top-in { max-width: calc(var(--sheet) + 28px + 2 * var(--gut)); height: 64px; margin: 0 auto; padding: 0 var(--gut); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo { display: block; width: 26px; height: 26px; }
.brand b { font: 500 13px/1 var(--mono); letter-spacing: .34em; }
.nav { display: flex; gap: clamp(16px, 3vw, 38px); }
.nav a { position: relative; display: flex; align-items: baseline; gap: 6px; padding: 8px 0; color: var(--ink-2); text-decoration: none; font: 600 15px/1 var(--serif); letter-spacing: .1em; }
.nav a i { font: 400 10px/1 var(--mono); font-style: normal; color: var(--ink-3); letter-spacing: .04em; }
.nav a::after { content: ""; position: absolute; left: 0; right: .1em; bottom: 1px; height: 1.5px; background: var(--shu); transform: scaleX(0); transform-origin: left; transition: transform .3s; }
.nav a:hover::after, .nav a:focus-visible::after { transform: scaleX(1); }

/* ---------------------------------------------------------------- hero: a drawing sheet */
.hero { display: flex; min-height: 100vh; min-height: 100svh; padding: 86px calc(var(--gut) + 14px) calc(var(--gut) * .6 + 14px); }
.sheet {
  position: relative; flex: 1; display: flex; flex-direction: column; width: 100%; max-width: var(--sheet); margin: 0 auto;
  border: 1.5px solid var(--ink); padding: clamp(28px, 3.4vw, 50px); padding-bottom: calc(clamp(28px, 3.4vw, 50px) + 70px);
}
.sheet::before { content: ""; position: absolute; inset: -14px; border: 1px solid var(--line-2); pointer-events: none; }
.zones > div { position: absolute; display: flex; font: 400 9px/1 var(--mono); color: var(--ink-3); letter-spacing: .1em; }
.zt, .zb { left: 0; right: 0; height: 14px; }
.zt { top: -14.5px; } .zb { bottom: -14.5px; }
.zl, .zr { top: 0; bottom: 0; width: 14px; flex-direction: column; }
.zl { left: -14.5px; } .zr { right: -14.5px; }
.zones span { flex: 1; display: flex; align-items: center; justify-content: center; }
.zt span + span, .zb span + span { border-left: 1px solid var(--line-2); }
.zl span + span, .zr span + span { border-top: 1px solid var(--line-2); }

.hero-grid { flex: 1; display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.25fr); align-items: center; gap: clamp(24px, 4vw, 64px); }
.namecol { display: flex; flex-direction: column; align-items: center; }
.vname { margin: 0; line-height: 0; }
.vname svg { display: block; width: clamp(80px, min(9.2vw, 14.5vh), 148px); height: auto; fill: var(--ink); }

.intro .en { margin: 0 0 16px; font: italic 400 clamp(18px, 1.55vw, 22px)/1 var(--num); color: var(--ink-2); letter-spacing: .01em; }
.motto { margin: 0; font: 900 clamp(40px, 4.6vw, 74px)/1.22 var(--serif); letter-spacing: .04em; }
.motto span { display: block; white-space: nowrap; }
.motto em { font-style: normal; color: var(--shu); }
.lede { max-width: 25em; margin: 24px 0 0; font: 400 clamp(15px, 1.2vw, 17.5px)/1.95 var(--sans); color: var(--ink-2); }

.joint { position: relative; margin: 0; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.joint-svg { display: block; width: 100%; height: auto; max-height: calc(100svh - 330px); overflow: visible; }
.joint:focus-visible { outline: 1.5px dashed var(--shu); outline-offset: 8px; }
.joint.seated .joint-svg { animation: thud .26s ease-out; }
@keyframes thud { 30% { transform: translateY(2px); } }
.joint figcaption { display: flex; justify-content: flex-end; gap: 12px; margin-top: 6px; font: 400 11px/1.4 var(--mono); letter-spacing: .08em; color: var(--ink-3); }
.replay { transition: color .2s; }
.joint:hover .replay { color: var(--shu); }

.tblock { position: absolute; right: -1.5px; bottom: -1.5px; margin: 0; display: grid; grid-template-columns: repeat(3, auto); border: 1.5px solid var(--ink); background: var(--paper) var(--paper-grain); }
.tblock > div { padding: 10px 18px 11px; border-left: 1px solid var(--ink); }
.tblock > div:first-child { border-left: 0; }
.tblock dt { font: 500 10.5px/1 var(--mono); letter-spacing: .3em; color: var(--ink-3); }
.tblock dd { margin: 7px 0 0; font: 700 15px/1.3 var(--serif); white-space: nowrap; }
.tblock dd small { display: block; margin-top: 3px; font: 400 12px/1.35 var(--sans); color: var(--ink-3); }
.tblock a { text-decoration: none; font: 500 14.5px/1.3 var(--mono); border-bottom: 1px solid var(--shu); }
.tblock a:hover { color: var(--shu); }

/* ---------------------------------------------------------------- sections */
.sec { position: relative; padding: clamp(96px, 11vw, 150px) 0; }
.sec-head { margin-bottom: clamp(36px, 5vw, 60px); }
.eyebrow { display: flex; align-items: center; gap: 14px; margin: 0 0 22px; font: 500 11.5px/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--ink-3); }
.eyebrow .no { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border: 1.2px solid var(--ink); border-radius: 50%; color: var(--ink); letter-spacing: 0; }
.eyebrow .zh { font: 700 15px/1 var(--serif); letter-spacing: .3em; color: var(--ink); }
.eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.sec-head h2 { margin: 0; font: 900 clamp(32px, 4.3vw, 58px)/1.22 var(--serif); letter-spacing: .04em; }

.js .rv { opacity: 0; transform: translateY(16px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.js .rv.in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- 01 member schedule */
.sched-head, .row { display: grid; grid-template-columns: 56px minmax(0, 1fr) 240px 176px; column-gap: clamp(16px, 2.4vw, 32px); align-items: center; }
.sched-head { padding: 0 0 12px; border-bottom: 1.5px solid var(--ink); font: 500 11px/1 var(--mono); letter-spacing: .26em; color: var(--ink-3); }
.sched { list-style: none; margin: 0; padding: 0; }
.row { position: relative; padding: 26px 0; border-bottom: 1px solid var(--line-2); }
.row::before { content: ""; position: absolute; inset: 0 calc(var(--gut) * -.5); z-index: -1; background: var(--paper-2); opacity: 0; transition: opacity .25s; }
.row:hover::before { opacity: 1; }
.code { justify-self: start; padding: 7px 8px; border: 1px solid var(--ink); font: 500 12.5px/1 var(--mono); letter-spacing: .06em; transition: background-color .25s, color .25s, border-color .25s; }
.row:hover .code { background: var(--shu); border-color: var(--shu); color: var(--paper); }
.what h3 { margin: 0; font: 700 clamp(20px, 1.9vw, 25px)/1.35 var(--serif); letter-spacing: .03em; }
.what h3 a { text-decoration: none; background: linear-gradient(var(--shu), var(--shu)) 0 100% / 0 1.5px no-repeat; transition: background-size .35s; }
.row:hover .what h3 a, .what h3 a:focus-visible { background-size: 100% 1.5px; }
.what .x { margin: 5px 0 0; font: 500 14.5px/1.5 var(--sans); letter-spacing: .04em; color: var(--ink-2); }
.what .x i { margin: 0 .45em; font: 300 17px/1 var(--num); font-style: normal; color: var(--shu); }
.what .d { margin: 6px 0 0; font-size: 14px; line-height: 1.7; color: var(--ink-3); }
.fig { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; }
.fig b { font: 400 clamp(34px, 3.3vw, 46px)/1 var(--num); letter-spacing: -.01em; font-variant-numeric: lining-nums; }
.fig span { font: 700 15px/1 var(--serif); }
.fig small { flex-basis: 100%; margin-top: 8px; font: 400 13px/1.45 var(--sans); color: var(--ink-3); }
.go { margin: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.go a { display: inline-flex; align-items: center; gap: 8px; padding-bottom: 3px; border-bottom: 1px solid var(--line-2); text-decoration: none; font: 500 14px/1.2 var(--sans); transition: color .2s, border-color .2s; }
.go a span { font-family: var(--mono); transition: transform .25s; }
.go a:hover, .go a:focus-visible { color: var(--shu); border-color: var(--shu); }
.go a:hover span { transform: translate(2px, -2px); }
.sched-total { display: flex; justify-content: flex-end; align-items: baseline; gap: 10px; margin: 22px 0 0; font: 500 14px/1 var(--sans); color: var(--ink-2); }
.sched-total b { padding-bottom: 4px; border-bottom: 3px double var(--ink); font: 400 32px/1 var(--num); color: var(--ink); }

/* ---------------------------------------------------------------- walnut sections */
.walnut { position: relative; z-index: 1; background: var(--walnut) url(/assets/walnut.svg?v=3) center top / 1200px 320px; color: var(--cream); }
.walnut .eyebrow { color: var(--cream-3); }
.walnut .eyebrow .no { border-color: var(--cream-2); color: var(--cream); }
.walnut .eyebrow .zh { color: var(--cream); }
.walnut .eyebrow::after { background: var(--cline); }

/* ---------------------------------------------------------------- 02 measurements */
.dims { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(28px, 4vw, 56px); }
.dim { padding: 30px 0 44px; border-top: 1px solid var(--cline); }
.dim .tag { margin: 0; font: 500 12px/1.4 var(--mono); letter-spacing: .12em; color: var(--cream-2); }
.dim .val { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; margin: 16px 0 22px; white-space: nowrap; color: var(--cream); }
.dim .val b { font: 300 clamp(52px, 5.4vw, 78px)/1 var(--num); letter-spacing: -.02em; }
.dim .val i { font: 400 clamp(22px, 2.2vw, 30px)/1 var(--num); font-style: normal; color: var(--cream-2); }
.dim .val small { align-self: flex-start; margin-top: 10px; font: 400 clamp(16px, 1.5vw, 20px)/1 var(--num); color: var(--cream-2); }
.dim .val .arr { margin: 0 4px; font: 300 clamp(24px, 2.4vw, 32px)/1 var(--num); color: #e2654e; }
.dim .val .zhnum { font: 700 clamp(44px, 4.4vw, 62px)/1 var(--serif); letter-spacing: .02em; }
.dim .cap { margin: 0; max-width: 24em; font: 400 14px/1.75 var(--sans); color: var(--cream-2); }
.viz { margin: 0 0 20px; }
.ratio { display: grid; gap: 12px; padding-top: 14px; }
.bar { position: relative; display: block; width: var(--w); min-width: 3px; height: 12px; border-left: 1px solid var(--cream-2); border-right: 1px solid var(--cream-2); }
.bar::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--cream-2); }
.bar em { position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%); font: 400 11px/1 var(--mono); font-style: normal; letter-spacing: .06em; color: var(--cream-3); white-space: nowrap; }
.ratio .bar:first-child em { left: 0; top: -13px; transform: none; }
.ratio .bar + .bar { border-color: #e2654e; }
.ratio .bar + .bar::before { background: #e2654e; }
.ratio .bar + .bar em { color: #eb8b78; }
.span { padding-top: 14px; }
.span .bar::before { background: linear-gradient(90deg, var(--cream-2) calc(50% - 26px), transparent 0 calc(50% + 26px), var(--cream-2) 0); }
.span .bar em { left: 50%; transform: translate(-50%, -50%); }
.gauge { position: relative; height: 16px; margin-top: 14px; margin-bottom: 38px; border-right: 1px solid var(--cream-3);
  background: repeating-linear-gradient(90deg, var(--cream-3) 0 1px, transparent 1px 10%) 0 100% / 100% 8px no-repeat, linear-gradient(var(--cream-3), var(--cream-3)) 0 100% / 100% 1px no-repeat; }
.gauge .fill { position: absolute; left: 0; bottom: -1px; width: var(--v); height: 3px; background: #e2654e; }
.gauge .fill::after { content: ""; position: absolute; right: -5px; bottom: 9px; border: 5px solid transparent; border-top: 7px solid #e2654e; }
.gauge .lo, .gauge .hi { position: absolute; top: calc(100% + 8px); font: 400 10px/1 var(--mono); color: var(--cream-3); }
.gauge .lo { left: 0; transform: translateX(-50%); }
.gauge .hi { right: 0; transform: translateX(50%); }
.js .dim .bar, .js .dim .fill { transition: width 1.2s cubic-bezier(.2, .7, .2, 1) .25s; }
.js .dim:not(.in) .bar, .js .dim:not(.in) .fill { width: 0; }
.js .dim .bar + .bar { transition-delay: .7s; }

/* ---------------------------------------------------------------- 03 growth rings */
.rings { padding-top: clamp(120px, 13vw, 176px); }
.rings-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.disk { position: sticky; top: 104px; margin: 0; }
.disk svg { display: block; width: 100%; height: auto; overflow: visible; }
.disk .yr { transition: fill .35s; }
.disk .yr.on { fill: rgba(180, 50, 31, .2); }
.yl text { font: 500 11px/1 var(--mono); letter-spacing: .04em; text-anchor: middle; fill: var(--ink-2); paint-order: stroke; stroke: rgba(239, 232, 220, .9); stroke-width: 3.2px; stroke-linejoin: round; }
.yl .now { font-weight: 500; fill: var(--shu); }
.growth { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.growth li { position: relative; padding: 22px 0 24px 30px; border-bottom: 1px solid var(--line-2); transition: background-color .25s; }
.growth li::before { content: ""; position: absolute; left: 2px; top: 29px; width: 11px; height: 11px; border: 1.5px solid var(--ink-3); border-radius: 50%; transition: border-color .25s, background-color .25s; }
.growth li:first-child::before { border-color: var(--shu); background: var(--shu); }
.growth li.on::before { border-color: var(--shu); }
.growth time { display: block; font: 500 12px/1.5 var(--mono); letter-spacing: .05em; color: var(--ink-3); transition: color .25s; }
.growth li.on time { color: var(--shu); }
.growth h3 { margin: 6px 0 0; font: 700 21px/1.4 var(--serif); letter-spacing: .03em; }
.growth .org { margin: 3px 0 0; font: 500 15px/1.55 var(--sans); color: var(--ink-2); }
.growth .d { margin: 8px 0 0; font-size: 14.5px; line-height: 1.75; color: var(--ink-3); }

/* ---------------------------------------------------------------- 04 contact */
.contact { padding: clamp(110px, 12vw, 160px) 0 0; }
.contact h2 { margin: 0; font: 900 clamp(32px, 4.8vw, 66px)/1.32 var(--serif); letter-spacing: .04em; }
.mail { display: inline-flex; align-items: center; gap: 14px; margin-top: 40px; padding-bottom: 6px; border-bottom: 1.5px solid #e2654e; color: var(--cream); text-decoration: none; font: 300 clamp(24px, 3.4vw, 46px)/1.2 var(--num); overflow-wrap: anywhere; }
.mail span { font: 400 .6em/1 var(--mono); transition: transform .3s; }
.mail:hover span, .mail:focus-visible span { transform: translate(4px, -4px); }
.topics { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 28px 0 0; padding: 0; list-style: none; font: 400 14px/1.6 var(--sans); letter-spacing: .06em; color: var(--cream-2); }
.topics li { display: flex; align-items: center; gap: 9px; }
.topics li::before { content: ""; width: 5px; height: 5px; background: #e2654e; }
.foot { margin-top: clamp(90px, 11vw, 140px); padding: 22px 0 26px; border-top: 1px solid var(--cline); }
.foot-in { display: flex; justify-content: space-between; align-items: center; gap: 16px; font: 400 12px/1 var(--mono); letter-spacing: .08em; color: var(--cream-2); }
.sign { display: flex; align-items: center; gap: 12px; letter-spacing: .32em; }
.sign svg { width: 22px; height: 22px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .sheet { padding-bottom: clamp(28px, 3.4vw, 50px); }
  .hero-grid { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "name draw" "intro intro"; row-gap: 20px; }
  .namecol { grid-area: name; } .joint { grid-area: draw; } .intro { grid-area: intro; }
  .joint-svg { max-height: none; }
  .tblock { position: static; margin: 28px -1px -1px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tblock > div:nth-child(3) { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--ink); }
  .tblock dd { white-space: normal; }
}
@media (max-width: 1000px) {
  .sched-head { display: none; }
  .row { grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "code what fig" "code what go"; row-gap: 14px; align-items: start; }
  .code { grid-area: code; } .what { grid-area: what; } .fig { grid-area: fig; justify-self: end; text-align: right; } .go { grid-area: go; justify-self: end; align-items: flex-end; }
  .fig { justify-content: flex-end; }
  .dims { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rings-grid { grid-template-columns: 1fr; }
  .disk { position: relative; top: 0; max-width: 460px; }
}
@media (max-width: 640px) {
  .top-in { height: 56px; }
  .nav a { font-size: 14px; letter-spacing: .06em; }
  .nav a i { display: none; }
  .brand b { font-size: 11.5px; letter-spacing: .26em; }
  .hero { padding: 66px 12px 12px; }
  .sheet { padding: 20px 16px 16px; }
  .sheet::before, .zones { display: none; }
  .hero-grid { column-gap: 10px; }
  .vname svg { width: clamp(62px, 18vw, 76px); }
  .joint figcaption { font-size: 10px; }
  .motto { font-size: clamp(36px, 10.5vw, 44px); }
  .lede { margin-top: 16px; }
  .tblock > div { padding: 10px 12px; }
  .tblock { grid-template-columns: 1fr; }
  .tblock > div { border-left: 0; }
  .tblock > div + div { border-top: 1px solid var(--ink); }
  .row { grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "code what what" ". fig go"; padding: 22px 0; }
  .fig { justify-self: start; text-align: left; justify-content: flex-start; align-self: end; }
  .go { align-self: end; }
  .dims { grid-template-columns: 1fr; }
  .sec-head h2 { font-size: min(7.4vw, 30px); }
  .contact h2 { font-size: min(6.8vw, 28px); }
  .foot-in { flex-direction: column; align-items: flex-start; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .js .dim .bar, .js .dim .fill { transition: none; }
  .joint.seated .joint-svg { animation: none; }
}
