/* Wisefix, concept site. The workshop: a plywood wall, a pegboard with work photos on hooks, a tape measure, and a job sheet you fill in. */
@font-face { font-family: "Archivo"; src: url(../fonts/archivo-var.woff2) format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }

:root {
  --graphite: #1f1d1a;
  --graphite-2: #2a2723;
  --bone: #f2efe8;
  --bone-dim: #ddd6c9;
  --ply: #e6d2ab;
  --ply-ink: #231d14;
  --ply-muted: #5b4c37;
  --paper: #fbf9f4;
  --pencil: #57524a;
  --tape: #f3c234;
  --tape-ink: #1f1d1a;
  --clamp: #c8452c;
  --err: #a8261c;
  --board: #6b4f33;
  --board-2: #4a3522;
  --holes: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Ccircle cx='14' cy='14' r='3.6' fill='%233a2a1b'/%3E%3C/svg%3E");
  /* plywood grain made from noise, only a background texture */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='900'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.003 0.09' numOctaves='3' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.55  0 0 0 0 0.38  0 0 0 0 0.18  0 0 0 0.22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23w)'/%3E%3C/svg%3E");
  --m: clamp(20px, 5vw, 80px);
  --gap: clamp(14px, 1.8vw, 28px);
  --r: 4px;
  --step-small: 0.875rem;
  --step-body: clamp(1.0625rem, 1.02rem + 0.2vw, 1.1875rem);
  --step-lead: clamp(1.1875rem, 1.05rem + 0.6vw, 1.5rem);
  --step-head: clamp(2.4rem, 1.5rem + 3.4vw, 4.5rem);
  --step-display: clamp(3.2rem, 1.2rem + 6.8vw, 8.5rem);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--ply) var(--grain) 0 0 / 900px 900px; color: var(--ply-ink); font: 400 var(--step-body)/1.55 "Archivo", system-ui, sans-serif; font-stretch: 100%; -webkit-tap-highlight-color: transparent; }
html:lang(zh-CN) body { font-family: "Archivo", "PingFang SC", "Microsoft YaHei", sans-serif; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 4px; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--graphite); outline-offset: 3px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--tape); color: var(--tape-ink); padding: 10px 16px; z-index: 20; }
.skip:focus { top: 12px; }

/* ---------- notice and bar ---------- */
.notice { margin: 0; padding: 8px var(--m); font-size: var(--step-small); background: var(--ply-ink); color: #e9dfcc; }
.notice a { color: var(--tape); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px var(--m); }
.mark { display: flex; align-items: baseline; gap: 10px; text-decoration: none; font-weight: 850; font-stretch: 70%; font-size: 1.75rem; letter-spacing: 0.01em; text-transform: uppercase; line-height: 1; }
.mark span { font-weight: 500; font-stretch: 100%; font-size: var(--step-small); text-transform: none; color: var(--ply-muted); letter-spacing: 0; }
.bar-right { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 32px); }
.bar nav { display: flex; gap: clamp(16px, 2.2vw, 30px); font-size: 1rem; font-weight: 600; }
.bar nav a { text-decoration: none; padding: 6px 0; }
.bar nav a:hover { text-decoration: underline; }
.lang { display: inline-flex; background: #d6bf95; border-radius: 999px; padding: 3px; }
.lang button { min-width: 48px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px; background: none; cursor: pointer; font-size: 0.9375rem; color: var(--ply-ink); white-space: nowrap; }
.lang button[aria-pressed="true"] { background: var(--graphite); color: var(--tape); }

/* ---------- hero: copy on the left, a pegboard with work photos hung on hooks on the right ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(28px, 4vw, 64px); align-items: center; padding: clamp(12px, 3vh, 40px) var(--m) clamp(48px, 8vh, 88px); }
.where { margin: 14px 0 0; font-weight: 700; }
h1 { margin: 0; font-weight: 850; font-stretch: 68%; font-size: clamp(2.8rem, 0.9rem + 4.4vw, 5.6rem); line-height: 0.9; letter-spacing: -0.005em; text-transform: uppercase; max-width: 12em; }
html:lang(zh-CN) h1 { font-stretch: 100%; text-transform: none; letter-spacing: 0; line-height: 1.12; font-size: clamp(2.6rem, 1rem + 3.8vw, 4.6rem); max-width: 10em; }
.hero .lead { margin: 20px 0 0; max-width: 40ch; text-wrap: pretty; font-size: var(--step-lead); line-height: 1.45; color: var(--ply-muted); }
.hero-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-btns .btn { min-height: 56px; padding: 8px 26px; font-size: 1.0625rem; }
.how { display: flex; flex-wrap: wrap; gap: 8px 0; margin: 28px 0 0; padding: 0; list-style: none; font-weight: 700; }
.how li { display: inline-flex; align-items: center; }
.how li + li::before { content: "→"; margin: 0 12px; color: var(--ply-muted); font-weight: 400; }

/* the pegboard: a brown board with rows of holes; each photo is a paper tag on a hook */
.board { border-radius: 10px; padding: 36px clamp(16px, 2.2vw, 30px) 44px; background: var(--board) var(--holes) 0 0 / 28px 28px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px clamp(12px, 1.5vw, 20px); align-items: start; }
.tag, .shot { position: relative; margin: 0; background: var(--paper); color: var(--ply-ink); padding: 18px 10px 12px; border-radius: 4px; transform: rotate(var(--r, 0deg)); transition: transform .3s var(--ease); }
.tag::before, .shot::before { content: ""; position: absolute; top: -16px; left: 50%; width: 14px; height: 24px; margin-left: -7px; border-radius: 7px 7px 2px 2px; background: #bdb8ae; }
.tag::after, .shot::after { content: ""; position: absolute; top: 3px; left: 50%; width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%; background: var(--board-2); }
.tag img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 2px; }
.tag figcaption { margin-top: 8px; font-size: 0.9375rem; line-height: 1.35; }
.board .tag:nth-child(1) { --r: -2deg; } .board .tag:nth-child(2) { --r: 1.5deg; margin-top: 40px; } .board .tag:nth-child(3) { --r: -1deg; margin-top: 12px; }
.tag:hover, .shot:hover { transform: rotate(0deg) scale(1.02); }
.board-note { margin: 10px 0 0; font-size: 0.9375rem; color: var(--ply-muted); }

/* ---------- services: tags hanging from a rail ---------- */
.svc { padding: 0 var(--m) clamp(56px, 9vh, 104px); }
.svc-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(20px, 4vw, 64px); align-items: end; margin-bottom: clamp(22px, 3vw, 34px); }
.svc-head p { margin: 0; color: var(--ply-muted); }
.rail { position: relative; padding-top: 24px; }
.rail::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10px; border-radius: 5px; background: #8e8a82; }
.chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.chip { position: relative; display: grid; gap: 4px; align-content: start; text-align: left; min-height: 124px; padding: 30px 20px 18px; border: 0; border-radius: 6px; background: var(--paper); color: var(--ply-ink); cursor: pointer; transform-origin: 28px -20px; transition: transform .2s var(--ease), background-color .2s; }
.chip::before { content: ""; position: absolute; top: -24px; left: 27px; width: 3px; height: 30px; background: #8e8a82; }
.chip::after { content: ""; position: absolute; top: 10px; left: 22px; width: 13px; height: 13px; border-radius: 50%; background: var(--ply); }
.chip b { font-weight: 750; font-stretch: 85%; font-size: 1.1875rem; line-height: 1.2; }
html:lang(zh-CN) .chip b { font-stretch: 100%; }
.chip span { font-size: 1rem; line-height: 1.35; color: var(--ply-muted); }
.chip:hover { transform: rotate(-1.2deg); background: #fff; }
.chip:active { transform: rotate(-1.2deg) scale(.98); }
.chip[aria-pressed="true"] { background: var(--tape); }
.chip[aria-pressed="true"] span { color: #3d3420; }

/* ---------- the job sheet ---------- */
.job { background: rgba(251, 249, 244, .32); color: var(--ply-ink); padding: clamp(48px, 8vh, 96px) var(--m) clamp(64px, 10vh, 120px); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(24px, 4vw, 64px); align-items: start; }
.job-head { grid-column: 1 / -1; margin-bottom: clamp(24px, 4vw, 44px); }
h2 { margin: 0; font-weight: 850; font-stretch: 70%; font-size: var(--step-head); line-height: 0.95; text-transform: uppercase; }
html:lang(zh-CN) h2 { font-stretch: 100%; text-transform: none; line-height: 1.15; }
.job-head p { margin: 14px 0 0; max-width: 52ch; }
.form { display: grid; gap: 24px; margin: 0; }
.field { display: grid; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.f-label { margin: 0; padding: 0; font-weight: 700; font-size: 1rem; }
.req { font-weight: 600; font-size: var(--step-small); color: #8e2a17; margin-left: 6px; }
.opt, .hint { font-weight: 400; color: var(--ply-muted); }
.hint { margin: 0; font-size: 1rem; }
.err { margin: 0; font-size: 0.9375rem; font-weight: 600; color: var(--err); }
.form-note { margin: 0; padding: 12px 14px; background: var(--paper); border-radius: var(--r); font-size: 0.9375rem; }
.field input:not([type=checkbox]):not([type=radio]):not([type=range]), .field textarea, .msg textarea { width: 100%; min-height: 52px; padding: 12px 14px; border: 2px solid transparent; border-radius: var(--r); background: var(--paper); color: var(--ink, #1f1d1a); }
.field textarea { resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #8a7f6c; }
.field [aria-invalid="true"] { border-color: var(--err) !important; }
.field input:focus-visible, .field textarea:focus-visible, .msg textarea:focus-visible { outline: 3px solid var(--graphite); outline-offset: 1px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.pill span { display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px; border-radius: 999px; background: var(--paper); font-weight: 600; font-size: 1rem; transition: background-color .2s, color .2s; }
.pill input:checked + span { background: var(--graphite); color: var(--tape); }
.pill input:focus-visible + span { outline: 3px solid var(--graphite); outline-offset: 3px; }
fieldset[aria-invalid="true"] .pills { outline: 2px solid var(--err); outline-offset: 6px; border-radius: 8px; }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-weight: 600; }
.check input { width: 22px; height: 22px; accent-color: var(--graphite); margin: 0; }
.two { grid-template-columns: 1fr 1fr; gap: 16px; }
.two label { display: grid; gap: 8px; }
.date-row { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; }
.date-row input { width: auto !important; }

/* the tape measure: a range input whose track is a yellow tape with centimetre marks */
.tapes { display: grid; gap: 10px; }
.tape-row { display: grid; grid-template-columns: 4.5em minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.dim { font-weight: 700; }
.read { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.field .tape-row .read input[inputmode]:not([type=range]) { width: 4.4em; min-height: 44px; padding: 6px 8px; text-align: right; font-variant-numeric: tabular-nums; }
.tape { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; margin: 0; background: transparent; cursor: ew-resize; }
.tape::-webkit-slider-runnable-track { height: 30px; border-radius: 3px; background: var(--tape) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='30'%3E%3Cpath d='M0 0v12M5 0v6M10 0v9M15 0v6' stroke='%231f1d1a' stroke-width='1.2'/%3E%3C/svg%3E") repeat-x left top / 20px 30px; }
.tape::-moz-range-track { height: 30px; border-radius: 3px; background: var(--tape) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='30'%3E%3Cpath d='M0 0v12M5 0v6M10 0v9M15 0v6' stroke='%231f1d1a' stroke-width='1.2'/%3E%3C/svg%3E") repeat-x left top / 20px 30px; }
.tape::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 42px; margin-top: -6px; border-radius: 3px; background: var(--graphite); border: 3px solid #8d8a84; }
.tape::-moz-range-thumb { width: 12px; height: 38px; border-radius: 3px; background: var(--graphite); border: 3px solid #8d8a84; }
.tape:disabled { opacity: .45; cursor: not-allowed; }
.size.is-unsure .read input { opacity: .45; }

.out { position: sticky; top: 18px; display: grid; gap: 18px; }
.docket { background: var(--paper); color: var(--ply-ink); border-radius: 2px; padding: 26px 24px 18px; position: relative; }
.docket::before { content: ""; position: absolute; left: 0; right: 0; top: -9px; height: 18px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Ccircle cx='9' cy='9' r='5' fill='%23e6d2ab'/%3E%3C/svg%3E") repeat-x 0 0 / 18px 18px; }
.docket-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.docket-head h3 { margin: 0; font-weight: 850; font-stretch: 72%; font-size: 1.5rem; text-transform: uppercase; }
html:lang(zh-CN) .docket-head h3 { text-transform: none; font-stretch: 100%; }
.stamp { margin: 0; padding: 4px 10px; border: 2px solid var(--clamp); color: var(--clamp); font-weight: 700; font-size: var(--step-small); transform: rotate(-4deg); white-space: nowrap; }
.docket dl, #docket { margin: 0; display: grid; gap: 0; }
.d-row { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; padding: 9px 10px; margin: 0 -10px; border-radius: 2px; }
.d-row:nth-child(odd) { background: #f4efe4; }
.d-row dt { font-weight: 700; font-size: 0.9375rem; color: var(--ply-muted); }
.d-row dd { margin: 0; overflow-wrap: anywhere; }
.is-empty { color: #74695a; font-style: italic; }
.msg { display: grid; gap: 8px; }
.msg textarea { min-height: 220px; font-size: 0.9875rem; line-height: 1.5; resize: vertical; }
.edited { margin: 0; font-size: 0.9375rem; }
.text-btn { background: none; border: 0; padding: 4px 0; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; font-weight: 600; }
.zh-copy { display: grid; gap: 8px; }
.zh-copy pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 0.9375rem/1.6 "PingFang SC", "Microsoft YaHei", sans-serif; background: #efe3c8; padding: 12px 14px; border-radius: var(--r); }
.send { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 8px 24px; border: 0; border-radius: 999px; background: var(--graphite); color: var(--tape); font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .18s var(--ease); }
.btn:active { transform: scale(.97); }
.btn.alt { background: var(--paper); color: var(--graphite); }
.fine { margin: 0; font-size: 1rem; color: var(--ply-muted); max-width: 60ch; }
.fine.done { color: var(--ply-ink); font-weight: 600; }
.fine.bad { color: var(--err); font-weight: 600; }

/* ---------- on the bench ---------- */
.work { padding: clamp(56px, 9vh, 104px) var(--m); background: var(--board) var(--holes) 0 0 / 28px 28px; color: var(--paper); }
.work :focus-visible { outline-color: var(--tape); }
.work-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(20px, 4vw, 64px); align-items: end; margin-bottom: clamp(30px, 4vw, 48px); }
.work-head p { margin: 0; color: #eadfc8; max-width: 56ch; }
.work-head a { color: var(--tape); }
.shots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 34px var(--gap); align-items: start; }
.shot img { width: 100%; border-radius: 2px; background: #e9e2d4; }
.shot:nth-child(5n+1) { --r: -1.5deg; } .shot:nth-child(5n+2) { --r: 1deg; margin-top: 36px; } .shot:nth-child(5n+3) { --r: -0.5deg; } .shot:nth-child(5n+4) { --r: 1.5deg; margin-top: 36px; } .shot:nth-child(5n) { --r: -1deg; }
.shot figcaption { margin-top: 10px; font-size: 1rem; line-height: 1.4; }

/* ---------- footer: a strip of tape ---------- */
.foot { background: var(--tape); color: var(--tape-ink); padding: clamp(36px, 6vh, 64px) var(--m) 36px; overflow: hidden; }
.foot-mark { margin: 36px 0 0 -0.02em; font-weight: 900; font-stretch: 62%; font-size: clamp(5rem, 22vw, 20rem); line-height: 0.78; text-transform: uppercase; }
.foot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.foot-grid p { margin: 0; }
.foot-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-weight: 600; }
.foot-links a { display: inline-block; padding: 4px 0; }
.foot-note { font-size: 0.9375rem; }

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; translate: 0 24px; } to { opacity: 1; translate: 0 0; } }
@keyframes hang { from { opacity: 0; translate: 0 -26px; rotate: 7deg; } 60% { rotate: -2deg; } to { opacity: 1; translate: 0 0; rotate: 0deg; } }
.hero-copy > * { animation: rise .8s var(--ease) both; }
.hero-copy > :nth-child(2) { animation-delay: .06s; } .hero-copy > :nth-child(3) { animation-delay: .12s; } .hero-copy > :nth-child(4) { animation-delay: .16s; } .hero-copy > :nth-child(5) { animation-delay: .2s; }
.hero-board { animation: rise .8s .1s var(--ease) both; }
.board .tag { animation: hang 1s .35s var(--ease) both; }
.board .tag:nth-child(2) { animation-delay: .5s; } .board .tag:nth-child(3) { animation-delay: .65s; }
.js .reveal { opacity: 0; translate: 0 24px; transition: opacity .7s var(--ease), translate .7s var(--ease), transform .3s var(--ease); }
.js .reveal.in { opacity: 1; translate: 0 0; }
#docket .flash { animation: flash .6s var(--ease); }
@keyframes flash { from { background: #fbe9a6; } }

/* ---------- tablet ---------- */
@media (max-width: 1199px) {
  /* headline across the top, then the copy on the left and the pegboard on the right, so the board stays in the first screen */
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 0; align-items: start; }
  .hero-copy { display: contents; }
  .hero h1, html:lang(zh-CN) .hero h1 { grid-column: 1 / -1; max-width: none; }
  .hero .lead, .where, .hero-btns, .how { grid-column: 1; }
  .hero-board { grid-column: 2; grid-row: 2 / span 4; margin-top: 24px; }
}
@media (max-width: 900px) {
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 30px 14px 34px; }
  .board .tag:nth-child(3) { display: none; }
  .board .tag:nth-child(2) { margin-top: 24px; }
}
@media (max-width: 1100px) {
  .svc-head { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .job { grid-template-columns: minmax(0, 1fr); }
  .out { position: static; margin-top: 40px; }
  .shots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shot:nth-child(n) { margin-top: 0; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-note { grid-column: 1 / -1; }
}
/* ---------- phone ---------- */
@media (max-width: 700px) {
  .bar nav { display: none; }
  .mark span { display: none; }
  h1 { font-size: 11.2vw; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-board { grid-column: 1; grid-row: auto; margin-top: 36px; }
  .chips { gap: 12px; }
  .chip { min-height: 112px; padding: 28px 12px 14px; }
  .chip::before { left: 21px; } .chip::after { left: 16px; }
  .chip b { font-size: 1.0625rem; }
  .chip span { font-size: 0.875rem; }
  .two { grid-template-columns: 1fr; }
  .tape-row { grid-template-columns: 3.6em minmax(0, 1fr) auto; gap: 8px; }
  .work-head { grid-template-columns: 1fr; }
  .shots { grid-template-columns: 1fr 1fr; gap: 30px 14px; }
  .shot:nth-child(even) { margin-top: 24px; }
  .foot-grid { grid-template-columns: 1fr; }
  .d-row { grid-template-columns: 6em 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; translate: 0 0; }
}
