/* 株式会社隼 — v4, pages: company (co-), partners (pt-), download (dl-deck / dl-sheet), plan (pl-), contact. Loaded after base-v4.css.
   Figures are written against --sp (base-v4.js, [data-sp]): 0 → 1 while the block crosses the screen; motion off / no script = 1 = finished.
   --k on a part = how far that part is in (0..1), from its own start point on --sp. */

/* ---------- company: hero facts ---------- */
.phero .facts{max-width:880px;border-color:var(--line2)}
.phero .facts div{border-color:var(--line2)}
.phero .facts dt{color:var(--mu)}

/* ---------- company: the symbol dives into place while the statement lights up ---------- */
.co-story>.wrap{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,4fr);gap:clamp(32px,5vw,88px);align-items:center}
/* each phrase is its own line (15 characters at most in Japanese): the size follows the column so no line breaks in the middle of a phrase */
.co-story .kit-stmt{margin-top:16px;font-size:clamp(18px,calc(3.9vw - 4px),46px)}
.co-story .kit-stmt span{display:block}
.co-story-note{margin-top:clamp(24px,3vw,40px);max-width:32em;color:var(--mu);line-height:1.9}
.co-dive{--t:clamp(0,calc((.5 - var(--sp))*2.6),1);justify-self:center}
.co-dive img{width:clamp(140px,20vw,280px);height:auto;opacity:calc(1 - var(--t)*.8);transform:translate(calc(var(--t)*-42%),calc(var(--t)*-52%)) rotate(calc(var(--t)*-16deg)) scale(calc(1 - var(--t)*.25));will-change:transform}

/* ---------- company: history as a time axis (2023 → 2026), the two periods grow along it ---------- */
.co-time{margin-bottom:clamp(56px,7vw,112px)}
.co-time-fig{margin:20px 0 4px}
.co-time-years{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));font-family:"Geist",sans-serif;font-size:14px;font-weight:500;color:var(--mu)}
.co-time-years span{padding:0 0 8px 10px;border-left:1px solid var(--line3)}
.co-time-bars{position:relative;height:60px;border-radius:16px;background:var(--s0)}
.co-time-bars i{position:absolute;top:9px;bottom:9px;display:flex;align-items:center;padding:0 14px;border-radius:10px;font-style:normal;font-family:var(--jp);font-size:13px;font-weight:700;white-space:nowrap;overflow:hidden;clip-path:inset(0 calc((1 - var(--k))*100%) 0 0 round 10px)}
.co-time-bars .a{--k:clamp(0,calc((var(--sp) - .08)*5),1);left:4.2%;width:81.2%;background:var(--tx);color:var(--bg)}   /* 2023.3 – 2026.6 on a 2023.0 – 2027.0 axis */
.co-time-bars .b{--k:clamp(0,calc((var(--sp) - .28)*8),1);left:85.6%;right:0;background:var(--ac-ink);color:var(--bg)} /* 2026.6 – */
.co-time .hist{margin-top:clamp(20px,2.4vw,32px)}

/* ---------- company: who you talk to, phase by phase. Two lanes on one axis (the five phases): layered subcontracting
   (the contact changes, the builders sit two layers down; every hand-over gets a mark) and 隼 (one bar from first talk to maintenance).
   One clock (--T, from the scroll position) runs both lanes, as in approach's .ap-race ---------- */
.co-org{--T:calc(clamp(0,calc((var(--sp) - .1)*2.7),1)*1.1);margin:0 0 clamp(8px,1vw,16px)}
.co-org-in{position:relative;padding:clamp(24px,3.4vw,56px);border-radius:28px;background:var(--fig-bg);box-shadow:var(--fig-shadow);overflow:hidden}
.co-org-ax{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));margin:0 0 clamp(8px,1vw,14px) clamp(190px,21vw,300px);font-size:12px;color:var(--mu)}
.co-org-ax span{padding-left:8px;border-left:1px solid var(--line2)}
.co-lane{display:grid;grid-template-columns:clamp(190px,21vw,300px) minmax(0,1fr);align-items:center;padding:clamp(18px,2.2vw,30px) 0;border-top:1px solid var(--line2)}
.co-lane-h{padding-right:24px}
.co-lane-h b{display:block;font-family:var(--jp);font-size:clamp(18px,1.9vw,26px);line-height:1.3;letter-spacing:-.02em}
.co-lane.me .co-lane-h b{font-size:clamp(26px,3vw,44px);font-weight:900}
.co-lane-t{--row:42px;--head:26px;position:relative;height:calc(var(--rows)*var(--row) + var(--head))}
.co-lane-t::after{content:"";position:absolute;top:-6px;bottom:-6px;left:calc(min(var(--T),1)*100%);width:1px;background:var(--ac-ink);opacity:clamp(0,calc((1.04 - var(--T))*30),1)}
/* a bar = one party, from --x for --w of the axis, on row --r (0 = whoever the customer talks to) */
.co-seg{--k:clamp(0,calc((var(--T) - var(--x))/var(--w)),1);position:absolute;left:calc(var(--x)*100% + 1px);width:calc(var(--w)*100% - 2px);top:calc(var(--r,0)*var(--row) + var(--head));height:36px;display:flex;align-items:center;gap:10px;padding:0 14px;border-radius:10px;background:rgba(var(--fg-rgb),.12);font-style:normal;font-size:12px;font-weight:700;color:var(--tx2);white-space:nowrap;overflow:hidden;clip-path:inset(0 calc((1 - var(--k))*100%) 0 0 round 10px)}
.co-seg small{font-size:11px;font-weight:400;color:var(--mu)}
.co-seg.me{height:46px;background:var(--me-bar);color:#fff;font-size:13px}
.co-seg.with{top:calc(46px + 6px + var(--head));background:none;border:1px solid rgba(var(--ac-rgb),.6);color:var(--tx)}
.co-faces{display:flex;flex:none;padding-left:8px}
.co-faces img{width:28px;height:28px;margin-left:-8px;border-radius:50%;border:2px solid #2546E8;background:var(--s2);image-rendering:pixelated}
/* a hand-over: where the work passes to someone else (to the next contact, or one layer down) */
.co-hand{position:absolute;left:calc(var(--x)*100% - 9px);top:calc(var(--r,0)*var(--row) + var(--head) + var(--dy,9px));width:18px;height:18px;border-radius:50%;background:var(--tx);box-shadow:0 0 0 3px var(--bg);opacity:clamp(0,calc((var(--T) - var(--x))*30),1);transform:scale(clamp(.4,calc((var(--T) - var(--x))*30),1))}
.co-hand::before{content:"";position:absolute;inset:0;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9h7M9.5 6l3 3-3 3' fill='none' stroke='%2307090F' stroke-width='1.8'/%3E%3C/svg%3E") center/100% no-repeat}
.co-hand.dn{--dy:30px}
.co-hand.dn::before{transform:rotate(90deg)}
.co-sum{position:absolute;right:0;top:0;font-size:12px;font-weight:700;color:var(--tx2);opacity:clamp(0,calc((var(--T) - .8)*8),1)}
.co-lane.me .co-sum{color:var(--ac-ink)}
.co-far{position:absolute;left:0;top:calc(2*var(--row) + var(--head));height:36px;display:flex;align-items:center;font-size:12px;color:var(--mu);opacity:clamp(0,calc((var(--T) - .62)*12),1)}
.co-org figcaption{margin-top:14px;font-size:12px;color:var(--mu)}
.co-team-note{margin-top:20px;color:var(--mu);font-size:14px}
.v3-sheet .member{transition:transform .5s var(--ease),box-shadow .5s var(--ease)}
.v3-sheet .member:hover{box-shadow:0 30px 60px -36px rgba(var(--ac-rgb),.55)}

/* ---------- company: industries drift past ---------- */

/* ---------- partners: who talks and contracts with whom, phase by phase (hero, dark). Three lanes on one axis (six phases):
   the customer meets 貴社 at every phase (stems), 貴社 holds the contact and the contract throughout, 隼 sits under 貴社 for the
   phases it is given (all but the proposal, or the build alone). No stem ever joins the customer and 隼. Plays once on load, in about 1.8s ---------- */
.pt-rel{margin:0}
.pt-rel-fig{padding:clamp(20px,2.2vw,32px);border:1px solid var(--line2);border-radius:28px;background:radial-gradient(70% 90% at 92% 0,rgba(46,74,214,.34),transparent 70%),rgba(var(--fg-rgb),.03)}
.pt-ax,.pt-lane{display:grid;grid-template-columns:clamp(72px,7vw,96px) minmax(0,1fr)}
.pt-ax{margin-bottom:10px;font-size:12px;color:var(--mu)}
.pt-ax span{grid-column:2;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));text-align:center}
.pt-ax i{font-style:normal}
.pt-lane{align-items:start}
.pt-lane>b{font-family:var(--jp);font-size:clamp(15px,1.4vw,19px);line-height:1.3;letter-spacing:-.02em}
.pt-lane>b small{display:block;margin-top:4px;font-family:var(--sans);font-size:11px;font-weight:400;letter-spacing:0;color:var(--mu)}
.pt-lane>b img{display:inline-block;width:18px;height:18px;margin-right:6px;vertical-align:-2px}
.pt-lane.me>b{padding-top:30px;font-size:clamp(20px,2vw,28px);font-weight:900}
.pt-t{position:relative}
.pt-t>*{margin-left:calc(var(--x)*100%);width:calc(var(--w)*100%);font-style:normal;animation:pt-grow .7s var(--ease) both;animation-delay:var(--d)}
/* meetings: one stem per phase, down to the bar below. .top also draws the customer's own line and a dot per meeting */
.pt-meet{--stem:linear-gradient(90deg,transparent calc(50% - 1px),rgba(var(--ac-rgb),.75) 0,rgba(var(--ac-rgb),.75) calc(50% + 1px),transparent 0) 0 0/calc(100%/var(--n)) 100%;display:block;height:30px;background:var(--stem)}
.pt-meet.top{height:38px;background:radial-gradient(circle at 50% 5px,var(--tx) 4px,transparent 4.6px) 0 0/calc(100%/var(--n)) 100%,linear-gradient(var(--line3),var(--line3)) 0 5px/100% 1px no-repeat,var(--stem)}
.pt-bar{height:40px;display:flex;align-items:center;padding:0 14px;border-radius:10px;background:rgba(var(--fg-rgb),.14);font-size:12px;font-weight:700;color:var(--tx);white-space:nowrap}
.pt-bar.me{background:var(--me-bar);box-shadow:var(--me-glow);color:#fff}
.pt-bar.solo{position:relative;margin-top:8px;padding:0;overflow:visible}
.pt-bar.solo span{position:absolute;left:calc(100% + 10px);font-weight:400;color:var(--tx2)}
.pt-no{display:flex;align-items:center;gap:10px;margin-top:clamp(16px,1.8vw,24px);padding-top:clamp(14px,1.6vw,20px);border-top:1px dashed var(--line3);font-size:13px;font-weight:700;color:var(--tx2)}
.pt-no::before{content:"×";flex:none;display:grid;place-items:center;width:22px;height:22px;border:1px solid var(--line3);border-radius:50%;font-family:"Geist",sans-serif;font-size:14px;font-weight:500;line-height:1;color:var(--tx)}
@keyframes pt-grow{from{clip-path:inset(-60px 100% -60px 0)}to{clip-path:inset(-60px -200px -60px 0)}}
html.paused .pt-t>*{animation:none}

/* ---------- partners: four steps, lit one after another as the bar reaches them ---------- */
.pt-flow{--f:clamp(0,calc((var(--sp) - .12)*3.2),1)}
.pt-flow-bar{position:relative;height:4px;margin-bottom:20px;border-radius:2px;background:var(--line2);overflow:hidden}
.pt-flow-bar::after{content:"";position:absolute;inset:0;background:var(--ac-ink);transform-origin:left;transform:scaleX(var(--f))}
.pt-flow .flow li{opacity:clamp(.35,calc(var(--f)*4 - var(--i) + .35),1);transform:translateY(calc((1 - clamp(0,calc(var(--f)*4 - var(--i)),1))*10px))}
.pt-flow+.h-sub{margin:clamp(56px,7vw,96px) 0 20px}
.v3-sheet .pcard{transition:transform .5s var(--ease),box-shadow .5s var(--ease)}
.v3-sheet .pcard:hover{box-shadow:0 30px 60px -36px rgba(var(--ac-rgb),.55)}

/* ---------- download: the deck. Cover on top, the five chapters behind it; a chapter rises when its line in the list is pointed at ---------- */
.dl-deck{position:relative;max-width:640px;aspect-ratio:16/10.4;margin-top:clamp(32px,4vw,48px)}
.dl-sheet{--lift:0;position:absolute;left:0;bottom:0;width:66%;aspect-ratio:16/9;display:flex;flex-direction:column;justify-content:flex-end;padding:4.5%;border:1px solid var(--line2);border-radius:12px;background:var(--s2);box-shadow:0 30px 60px -30px #000;transform-origin:10% 100%;
  transform:translate(calc(var(--n)*10.2%),calc(var(--n)*-4% - var(--lift)*46%)) rotate(calc(var(--n)*1.6deg));transition:transform .6s var(--ease);animation:dl-fan 1.1s var(--ease) both;animation-delay:calc(var(--n)*.08s)}
@keyframes dl-fan{from{transform:none}}
.dl-sheet>span{position:absolute;right:3.5%;top:7%;font-family:"Geist",sans-serif;font-size:13px;font-weight:500;color:var(--ac-ink)}
.dl-sheet>b{font-family:var(--jp);font-size:clamp(13px,1.5vw,19px);line-height:1.4;text-align:right}
.dl-sheet.s0{--n:0;justify-content:flex-start;background:radial-gradient(120% 90% at 85% 0,rgba(var(--ac-rgb),.22),transparent 55%),linear-gradient(160deg,var(--s2),var(--s0))}
.dl-sheet.s1{--n:1}.dl-sheet.s2{--n:2}.dl-sheet.s3{--n:3}.dl-sheet.s4{--n:4}.dl-sheet.s5{--n:5}
.dl-deck:hover .dl-sheet:not(.s0){--lift:.12}
.dl-grid:has(.dl-list li:nth-child(1):hover) .s1,.dl-grid:has(.dl-list li:nth-child(2):hover) .s2,.dl-grid:has(.dl-list li:nth-child(3):hover) .s3,.dl-grid:has(.dl-list li:nth-child(4):hover) .s4,.dl-grid:has(.dl-list li:nth-child(5):hover) .s5{--lift:1}
.dl-list li{transition:padding-left .3s var(--ease)}
.dl-list li:hover{padding-left:10px}
.dl-list li:hover h3{color:var(--ac-ink)}
html.paused .dl-sheet{animation:none}

/* ---------- contact: the form is a sheet of questions, one per ruled line: what is asked on the left, the answer written on a
   line on the right. No card, no boxes. Who will talk sits in the hero; what happens next and the questions get their own sections ---------- */
.ct-rep .mono{font-size:12px;color:var(--mu)}
.ct-rep .rep-n{margin-top:10px;font-size:clamp(28px,3vw,44px);font-weight:900;letter-spacing:-.02em;line-height:1.2}
.ct-rep p:last-child{margin-top:14px;max-width:26em;font-size:15px;line-height:1.85;color:var(--tx2)}
.ct-sheet{max-width:1040px}
.v3-sheet .ct-form{--q:33.333%;display:block;padding:0;border:0;border-radius:0;background:none}
.ct-form h2{font-size:clamp(28px,3.2vw,46px);font-weight:900;letter-spacing:-.03em;line-height:1.25}
.ct-form>.hint:first-of-type{margin:12px 0 clamp(20px,2.6vw,36px)}
/* a line of the sheet */
.ct-form>div,.ct-form>fieldset{padding:clamp(18px,2.2vw,28px) 0;border-top:1px solid var(--line2)}
.ct-form>div{display:grid;grid-template-columns:var(--q) minmax(0,1fr)}
.ct-form label,.ct-form legend{margin:0;padding:10px 24px 0 0;font-family:var(--jp);font-size:clamp(16px,1.4vw,19px);font-weight:700;line-height:1.5;color:var(--tx)}
.ct-form>div>label{grid-column:1;grid-row:1/span 3}
.ct-form>div>:not(label){grid-column:2}
/* the line being written on: its name turns blue as well as the rule under the field */
.ct-form>div:focus-within>label,.ct-form>fieldset:focus-within>legend{color:var(--ac-ink)}
.ct-form label small,.ct-form legend small{display:block;margin:2px 0 0;font-family:var(--sans);font-size:12px;font-weight:400;color:var(--mu)}
.ct-form legend{float:left;width:var(--q)}
.ct-form fieldset>div{margin-left:var(--q)}
.ct-form .chips label{padding:0;font-family:inherit;font-size:inherit;font-weight:400}
.ct-form input[type=text],.ct-form input[type=email],.ct-form textarea{min-height:52px;padding:10px 0;border:0;border-bottom:1.5px solid var(--line-field);border-radius:0;background:none;font-size:clamp(17px,1.5vw,20px)}
.ct-form textarea{min-height:104px}
.ct-form input:focus,.ct-form textarea:focus{border-bottom-color:var(--ac-ink);box-shadow:0 2.5px 0 var(--ac-ink)}
.ct-form [aria-invalid=true]:focus{box-shadow:0 2.5px 0 var(--err)}
.ct-form .btn-ac{margin:clamp(24px,3vw,40px) 0 0 var(--q);min-height:64px;padding:0 clamp(28px,3vw,44px);font-size:17px}
.ct-form .form-foot{margin:14px 0 0 var(--q);text-align:left}
.ct-sheet .form-ok{border:0;border-radius:0;padding:0;background:none}
.ct-sheet .form-ok h2{font-size:clamp(28px,3.2vw,46px);font-weight:900;letter-spacing:-.03em;line-height:1.25}
/* what happens after sending: three steps side by side, numbered large */
.ct-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(20px,3vw,48px)}
.ct-steps li{padding:20px 0 0;border-top:2px solid var(--tx)}
.ct-steps b{display:block;font-family:"Geist",sans-serif;font-weight:500;font-size:clamp(40px,4.4vw,68px);line-height:1;letter-spacing:-.04em;color:var(--tx)}
.ct-steps h3{margin-top:clamp(16px,2vw,28px);font-family:var(--jp);font-size:clamp(19px,1.8vw,26px);line-height:1.4;letter-spacing:-.02em}
.ct-steps p{margin-top:8px;font-size:15px;line-height:1.85;color:var(--tx2)}
.ct-dl{margin-top:4px}

/* ---------- plan: the four questions and where they lead; co-v4.js marks the current one ---------- */
.pl-steps{display:grid;gap:8px}
.pl-steps li{display:flex;align-items:center;gap:14px;padding:12px 16px;border:1px solid var(--line2);border-radius:14px;font-family:var(--jp);font-size:15px;font-weight:700;color:var(--mu);transition:background .4s var(--ease),color .4s var(--ease),border-color .4s var(--ease),transform .4s var(--ease)}
.pl-steps span{flex:none;display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:rgba(var(--fg-rgb),.1);font-family:"Geist",sans-serif;font-size:13px;font-weight:500;transition:background .4s var(--ease),color .4s var(--ease)}
.pl-steps li.done{color:var(--tx)}
.pl-steps li.done span{background:var(--ac-ink);color:var(--bg)}
.pl-steps li.on{border-color:transparent;background:var(--tx);color:var(--bg);transform:translateX(-10px)}
.pl-steps li.on span{background:var(--bg);color:var(--tx)}

@media (max-width:900px){
  .co-story>.wrap{grid-template-columns:minmax(0,1fr)}
  .co-story .kit-stmt{font-size:clamp(18px,5.6vw,40px)}
  .v3-sheet .ct-form{--q:0%}
  .ct-form>div{grid-template-columns:minmax(0,1fr)}
  .ct-form>div>label,.ct-form>div>:not(label){grid-column:1;grid-row:auto}
  .ct-form label,.ct-form legend{padding:0 0 6px}
  .ct-form legend{float:none;width:auto}
  .ct-form .btn-ac{width:100%}
  .ct-steps{grid-template-columns:minmax(0,1fr)}
  .co-dive{order:-1;justify-self:start}
  .co-dive img{width:120px}
  .co-org-ax{margin-left:0}
  .co-lane{grid-template-columns:minmax(0,1fr);gap:18px}
  .co-seg{padding:0 0 0 12px;font-size:11px}
  .co-seg small{display:none}
  .co-far{font-size:11px}
  .co-faces img:nth-child(n+4){display:none}
  .co-time-bars .a{font-size:11px}
  .co-time-bars .b{padding:0 6px}
  .dl-deck{max-width:none}
  .pl-steps li.on{transform:none}
}
@media (max-width:360px){
  .co-org-in{padding-inline:10px}
  .co-seg{padding-left:10px;font-size:10px}
  .co-seg.me{font-size:11px}
  .pt-bar{padding:0 6px;font-size:11px}
}
@media (prefers-reduced-motion:reduce){.pt-t>*,.dl-sheet{animation:none}.dl-sheet,.pl-steps li{transition:none}}
