/* Company page signature (31 Oct 2026). Two pieces, both drawn by company.js:
   1. The name: "doorward" in very large type rearranges and collapses into "Durward" while the arch mark draws
      itself beside it. Without JS, and under reduced motion, this is the static final state: the mark and "Durward".
   2. Where it goes: a route with three stations (Now, Next, Later). A glass tile travels along it as the page
      scrolls; each station lights when the tile reaches it (Now in ink, "Building"; Next and Later in gold, "Planned")
      and its sentence appears. Wide screens: a horizontal route, pinned while it draws. Phones: a vertical route.
   Only transform and opacity move. Colour keeps its meaning: ink is being built, gold is planned. */

/* ---------------------------------------------------------------- 1. the name ---------------------------------- */
.nm{margin-top:clamp(56px,9vh,110px);display:flex;flex-direction:column;align-items:flex-start;gap:20px}
.nm-art{--fs:clamp(58px,14.2vw,236px);display:flex;align-items:baseline;gap:calc(var(--fs) * .15);font-size:var(--fs);max-width:100%;user-select:none;-webkit-user-select:none}
/* the logo's own mark (brand/logo.svg): the D with the arched door cut out, one cap height tall */
.nm-mark{flex:none;width:.7em;height:.725em;overflow:visible}
.nm-mark .mk-fill{fill:var(--ink)}
.nm-mark .mk-pen{fill:none;stroke:var(--ink);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;opacity:0}
.nm-word{display:grid;margin:0;line-height:.8;padding-bottom:.02em;white-space:nowrap;color:var(--ink)}
.nm-from,.nm-to{grid-area:1/1;display:flex;align-items:baseline}
.nm-from span,.nm-to span{display:block;will-change:transform,opacity}
/* the old word: lowercase, light and wide */
.nm-from{font-weight:400;font-stretch:100%;letter-spacing:-.025em;visibility:hidden}
/* the name: the brand's display cut */
.nm-to{font-weight:650;font-stretch:84%;letter-spacing:-.045em}
/* armed (JS, motion allowed): both words wait unseen and the mark is undrawn until the piece plays */
.nm.armed .nm-from{visibility:visible}
.nm.armed .nm-from span,.nm.armed .nm-to span,.nm.armed .mk-fill{opacity:0}
.nm.armed .mk-pen{opacity:1;stroke-dasharray:1 1;stroke-dashoffset:1}
.nm.armed .nm-art{cursor:pointer}
.nm-play{display:inline-flex;align-items:center;gap:8px;height:36px;padding:0 14px 0 10px;border:1.5px solid rgba(15,23,34,.22);border-radius:10px;background:transparent;
  font-family:var(--mono);font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--text-2);cursor:pointer;opacity:0;transition:opacity .5s var(--calm),border-color .3s var(--calm),color .3s var(--calm)}
.nm-play svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.nm-play:hover{border-color:var(--ink);color:var(--ink)}
.nm.done .nm-play,.nm-play:focus-visible{opacity:1}
@media (max-width:600px){.nm{gap:14px}.nm-art{--fs:clamp(50px,16.4vw,96px)}}

/* ---------------------------------------------------------------- 2. the route ---------------------------------- */
.road .sec-head{margin-bottom:clamp(40px,7vh,76px)}
.route{position:relative;--gap:clamp(24px,3.4vw,56px);--n:34px;--h:calc(var(--n) / 2)}
.stns{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--gap)}
.stn{position:relative;padding-top:calc(var(--n) + 30px)}
.stn .h3{margin:16px 0 10px;font-size:clamp(24px,2.15vw,34px)}
.stn p{color:var(--text-2);font-size:clamp(16px,1.2vw,19px);line-height:1.55;max-width:24em}
.stn-node{position:absolute;left:0;top:0;width:var(--n);height:var(--n);border-radius:50%;background:var(--page);box-shadow:inset 0 0 0 2px rgba(15,23,34,.3);
  transition:background-color .5s var(--calm),box-shadow .5s var(--calm),transform .6s var(--ease)}
.stn-node::after{content:"";position:absolute;inset:calc(var(--n) * .32);border-radius:50%;background:var(--cream);opacity:0;transition:opacity .4s var(--calm)}
.stn .tag{transition:opacity .5s var(--calm),transform .6s var(--ease)}
.stn p{transition:opacity .7s var(--calm),transform .8s var(--ease)}
/* lit: Now in ink, Next and Later in gold (the default, complete state) */
.stn[data-k=now] .stn-node{background:var(--ink);box-shadow:inset 0 0 0 2px var(--ink),0 0 0 7px rgba(15,23,34,.09)}
.stn[data-k=next] .stn-node,.stn[data-k=later] .stn-node{background:var(--gold);box-shadow:inset 0 0 0 2px #B98A30,0 0 0 7px rgba(217,164,65,.2)}
.stn .stn-node::after{opacity:1}
/* the line: a dashed track, a solid gold road drawn over it (ink where it leaves Now), and the glass tile */
.route-line{position:absolute;left:0;right:0;top:var(--h);height:0;pointer-events:none}
.route-track{position:absolute;left:var(--h);right:0;top:-1px;height:2px;
  background:repeating-linear-gradient(90deg,rgba(15,23,34,.28) 0 8px,transparent 8px 16px);
  -webkit-mask-image:linear-gradient(90deg,#000 80%,transparent);mask-image:linear-gradient(90deg,#000 80%,transparent)}
.route-fill{position:absolute;left:var(--h);top:-2.5px;height:5px;width:var(--span,calc((200% + 2 * var(--gap)) / 3));border-radius:3px;background:linear-gradient(90deg,var(--ink) 0,var(--ink) 18px,var(--gold) 80px);
  transform-origin:0 50%;transform:scaleX(1)}
.route-tile{position:absolute;left:var(--h);top:0;width:56px;height:40px;margin:-20px 0 0 -28px;border-radius:10px;z-index:2;display:grid;place-items:center;
  background:var(--tile);box-shadow:var(--tile-edge),0 16px 26px -12px rgba(15,23,34,.38);-webkit-backdrop-filter:blur(6px) saturate(1.3);backdrop-filter:blur(6px) saturate(1.3);will-change:transform}
.route-tile svg{width:17px;height:18px;fill:var(--ink);opacity:.86}
/* armed (JS, motion allowed): stations wait dark and the sentences are hidden until the tile reaches them */
.road.armed .stn:not(.on) .stn-node{background:var(--page);box-shadow:inset 0 0 0 2px rgba(15,23,34,.3)}
.road.armed .stn:not(.on) .stn-node::after{opacity:0}
.road.armed .stn:not(.on) .tag{opacity:0;transform:translateY(6px)}
.road.armed .stn:not(.on) p{opacity:0;transform:translateY(14px)}
.road.armed .route-fill{transform:scaleX(0)}

/* wide and tall enough: the route pins while it draws */
@media (min-width:900px) and (min-height:700px){
  .road{padding-block:0;height:250vh}
  .road-pin{position:sticky;top:0;height:100vh;display:flex;align-items:center;padding-top:var(--nav)}
  .road-in{width:min(var(--wrap),100% - 2*var(--gut))}
}

/* phones and narrow windows: a vertical route down the left */
@media (max-width:899px){
  .route{--n:30px}
  .stns{grid-template-columns:1fr;gap:clamp(40px,7vh,64px)}
  .stn{padding-top:0;padding-left:calc(var(--n) + 22px);min-height:var(--n)}
  .stn .h3{margin:12px 0 8px;font-size:clamp(22px,6vw,28px)}
  .route-line{top:0;bottom:0;left:var(--h);right:auto;width:0;height:auto}
  .route-track{left:-1px;right:auto;top:var(--h);bottom:0;width:2px;height:auto;
    background:repeating-linear-gradient(180deg,rgba(15,23,34,.28) 0 8px,transparent 8px 16px);
    -webkit-mask-image:linear-gradient(180deg,#000 80%,transparent);mask-image:linear-gradient(180deg,#000 80%,transparent)}
  .route-fill{left:-2.5px;top:var(--h);bottom:0;width:5px;height:var(--span,auto);background:linear-gradient(180deg,var(--ink) 0,var(--ink) 18px,var(--gold) 80px);transform-origin:50% 0;transform:scaleY(1)}
  .road.armed .route-fill{transform:scaleY(0)}
  .route-tile{left:0;top:var(--h);width:40px;height:30px;margin:-15px 0 0 -20px;border-radius:8px}
  .route-tile svg{width:13px;height:14px}
}

@media (prefers-reduced-motion:reduce){
  .road{height:auto;padding-block:clamp(90px,13vh,170px)}
  .road-pin{position:relative;height:auto;padding-top:0}
  .stn-node,.stn .tag,.stn p,.nm-play{transition:none}
}

/* v13 (31 Oct 2026): no cards and no drop shadows; the work stands on the canvas, divided by hairlines */
.route-tile{box-shadow:0 0 0 1px rgba(15,23,34,.16)}
.nm-play{opacity:1}
.route-tile{background:var(--card);border-radius:4px}
.stn[data-k=now] .stn-node{box-shadow:inset 0 0 0 2px var(--ink)}
.stn[data-k=next] .stn-node,.stn[data-k=later] .stn-node{box-shadow:inset 0 0 0 2px #B98A30}
