/* Front page: shared text edges, quiet labels, image-led project links.
   Loaded after main.css only on the front page. */
.sec-head{ position:relative; display:block; }
.sec-head .kicker{ padding-left:0; }
.sec-head .kicker::before{ display:none; }
.sec-head .ht > .lead{ max-width:48em; }
.sec-head--stack .ht-body{ max-width:58em; }
.hero .kicker{ color:var(--accent-lite); }
.hero .kicker::before{ background:var(--accent-lite); }

/* Images and captions, without an extra card frame around every project. */
#works .work-grid{ gap:48px 32px; }
#works .work-grid .c{ padding:0 0 24px; background:transparent; border:0; border-bottom:1px solid var(--line); }
#works .work-grid .c:hover{ transform:none; border-color:var(--accent); }
#works .work-thumb{ margin:0 0 20px; border:0; }
#works .work-year{ font-size:12px; font-weight:400; letter-spacing:.08em; border:0; margin:0 0 8px; padding:0; }

/* Avoid repeated nested boxes in supporting sections. */
#blog .post{ background:transparent; border:0; border-bottom:1px solid var(--line); }
#blog .post:hover{ transform:none; border-color:var(--accent); }
#blog .post .pbody{ padding:22px 0 26px; }
#about .values{ gap:0 28px; background:transparent; border:0; }
#about .values .v{ background:transparent; padding:22px 0; border-top:1px solid var(--line); }
#about .values .v h4::before{ display:none; }
#systems .principles{ gap:8px 24px; }
#systems .principles .p{ border:0; padding:0; }

@media(max-width:860px){
  .srv .row{ grid-template-columns:32px minmax(0,1fr); gap:10px 16px; }
  .srv .row .det{ grid-column:2; }
}

@media(max-width:640px){
  body.home{ --pad:20px; word-break:normal; overflow-wrap:break-word; }
  body.home section{ padding:72px 0; }
  .sec-head{ margin-bottom:32px; }
  .sec-head--stack{ margin-bottom:0; }
  .sec-head .ht{ padding-top:0; }
  .sec-head .kicker{ margin-bottom:18px; }
  .sec-head .ht > .lead{ margin-top:20px; }
  .sec-head--stack .ht-body{ margin-top:24px; }
  .h-lg,.h-md{ font-size:clamp(23px,6.1vw,29px); line-height:1.65; letter-spacing:.01em; text-wrap:wrap; }
  .sec-head h2{ text-wrap:balance; }
  .sec-head h2 br{ display:none; }
  #service .h-lg{ font-size:clamp(20px,5.4vw,24px); }
  #service .h-lg br{ display:initial; }
  .lead{ font-size:15px; line-height:1.95; }

  /* Section padding and inner padding previously accumulated in the hero. */
  body.home .hero{ padding:0; min-height:100svh; }
  .hero .wrap{ padding-top:120px; padding-bottom:88px; }
  .hero .over{ margin-bottom:24px; }
  .hero h1{ font-size:clamp(27px,7.2vw,34px); line-height:1.6; letter-spacing:0; text-wrap:wrap; }
  .hero-ending{ display:inline-block; }
  .hero .sub{ margin-top:24px; font-size:14px; line-height:1.95; }
  .hero .cta{ margin-top:30px; gap:22px; flex-direction:column; align-items:flex-start; }
  .hero .btn{ padding:14px 22px; }
  .hero .scroll{ bottom:24px; font-size:10px; }
  .statement{ text-align:left; }
  .statement h2{ font-size:clamp(22px,5.6vw,26px); letter-spacing:0; line-height:1.8; text-wrap:wrap; }
  .statement .sig{ margin-top:24px; font-size:11px; letter-spacing:.08em; }

  .srv .row,.srv .row:hover,.srv .row.flag,.srv .row.flag:hover{
    padding:24px 0; margin:0; background:transparent; gap:10px 12px; grid-template-columns:24px minmax(0,1fr);
  }
  .srv .row .no{ font-size:11px; }
  .srv .row h3{ font-size:19px; line-height:1.65; text-wrap:wrap; }
  .srv .row .det{ grid-column:1 / -1; margin-top:2px; font-size:14px; }
  .srv .row.flag h3{ color:var(--accent); }
  ul.clean li{ gap:10px; font-size:14px; }
  ul.clean li:hover{ padding-left:0; }

  #works .work-grid{ gap:36px; }
  #works .work-thumb{ margin-bottom:18px; }
  #systems .sys{ border:0; background:transparent; gap:32px; margin-top:32px; }
  #systems .sys .cell{ border-bottom:1px solid var(--dark-line); }
  #systems .sys .cell-body{ padding:22px 0 28px; }
  #systems .sys .cell h3{ font-size:21px; text-wrap:wrap; }
  #systems .sys .cell p{ font-size:14px; }
  #systems .sys .cell .badge{ border:0; padding:0; border-radius:0; }
  #blog .blog-grid{ gap:32px; margin-top:32px; }
  #about .split,#faq .split{ gap:32px; }
  #about .portrait{ max-width:280px; }
  .fstep{ padding:24px 0; }
  .fstep .fnum{ font-family:"JetBrains Mono",monospace; font-size:12px; line-height:1.8; }
  .fstep.key{ padding-left:0; padding-right:0; background:transparent; }
  .fstep.key h3{ color:var(--accent); }
  .faq .a{ padding-left:0; }
  .burger{ width:44px; height:44px; }
}

/* The opening screen works like a printed identity card: one ink colour,
   an oversized translucent brand mark, and a small personal signature. */
.hero.hero--identity{ padding:0; background:#102e30; isolation:isolate; }
.hero--identity::after{ display:none; }
.hero--identity .hero-watermark{
  position:absolute; z-index:0; right:-2%; top:20%;
  width:clamp(420px,48vw,720px); height:auto; max-width:none;
  filter:brightness(0) invert(1); opacity:.12; pointer-events:none;
  user-select:none;
}
.hero--identity .wrap{
  display:flex; flex-direction:column; justify-content:space-between;
  min-height:100svh; padding-top:132px; padding-bottom:36px;
}
.hero-edition{
  display:flex; justify-content:space-between; gap:24px;
  padding-bottom:18px; border-bottom:1px solid rgba(238,235,222,.22);
  font-family:"JetBrains Mono",monospace; font-size:10px;
  letter-spacing:.18em; text-transform:uppercase; color:#a6bbb6;
}
.hero-copy{ padding:60px 0 64px; max-width:860px; }
.hero-edition > span:last-child{ font-family:"Noto Sans JP",system-ui,sans-serif; font-size:12px; letter-spacing:.06em; text-transform:none; }
.hero--identity .over{ margin-bottom:24px; }
.hero--identity .kicker{ color:#b8ccc3; font-size:11px; letter-spacing:.18em; }
.hero--identity .kicker::before{ display:none; }
.hero--identity h1{
  font-size:clamp(38px,4.6vw,62px); line-height:1.48;
  letter-spacing:.015em; color:#f2efe4; max-width:16em;
}
body.reveal .hero--identity h1 em.mk{ color:#a8cbb5; }
.hero--identity .sub{ max-width:40em; margin-top:28px; font-size:14px; color:#c1ceca; }
.hero--identity .cta{ margin-top:32px; gap:28px; }
.hero--identity .btn.accent{ background:#ece9dd; color:#163a39; border-color:#ece9dd; border-radius:0; }
.hero--identity .btn.accent span{ margin-left:16px; font-size:19px; line-height:1; }
.hero--identity .btn.accent:hover{ background:#fffdf5; border-color:#fffdf5; }
.hero--identity .tlink{ color:#ece9dd; border-color:rgba(238,235,222,.4); font-size:13px; }
.hero-signature{
  display:flex; align-items:flex-end; justify-content:space-between; gap:24px;
  padding-top:22px; border-top:1px solid rgba(238,235,222,.22);
}
.hero-signature p{ margin:0; }
.hero-person{ display:flex; align-items:baseline; gap:18px; color:#ece9dd; }
.hero-person > span:first-child{ font-family:"Shippori Mincho",serif; font-size:18px; letter-spacing:.16em; }
.hero-person-en{ font-family:"JetBrains Mono",monospace; font-size:9px; letter-spacing:.13em; color:#a6bbb6; }
.hero-location{ text-align:right; font-size:11px; color:#c1ceca; letter-spacing:.06em; }
.hero-location > span{ display:block; margin-top:4px; font-family:"JetBrains Mono",monospace; font-size:9px; letter-spacing:.16em; color:#a6bbb6; }

/* Brand motion: reveal, a passing light, and a slow floating watermark.
   Individual translate keeps pointer movement independent of the CSS drift. */
.hero--identity .hero-watermark{
  --mark-opacity:.12;
  translate:var(--pointer-x,0px) var(--pointer-y,0px);
}
html.js .hero--identity .hero-watermark{ opacity:0; }
body.reveal .hero--identity .hero-watermark{
  animation:hero-mark-enter 1.8s cubic-bezier(.16,1,.3,1) both,
    hero-mark-float 12s ease-in-out 1.8s infinite;
}
@keyframes hero-mark-enter{
  from{ opacity:0; transform:translateY(44px) scale(1.09) rotate(-5deg); clip-path:inset(100% 0 0 0); }
  to{ opacity:var(--mark-opacity); transform:translateY(0) scale(1) rotate(0); clip-path:inset(0); }
}
@keyframes hero-mark-float{
  0%,100%{ transform:translateY(0) rotate(0); }
  50%{ transform:translateY(-16px) rotate(1.5deg); }
}
.hero--identity::before{
  content:""; position:absolute; inset:-30%; z-index:1; pointer-events:none;
  background:linear-gradient(115deg,transparent 40%,rgba(168,203,181,.06) 49%,rgba(168,203,181,.13) 50%,transparent 59%);
  opacity:0; transform:translateX(-70%);
}
body.reveal .hero--identity::before{ animation:hero-light-pass 9s ease-in-out .3s infinite; }
@keyframes hero-light-pass{
  0%,8%{ opacity:0; transform:translateX(-70%); }
  16%{ opacity:1; }
  42%{ opacity:0; transform:translateX(70%); }
  100%{ opacity:0; transform:translateX(70%); }
}
.hero-edition,.hero-signature{ position:relative; border-color:transparent; }
.hero-edition::after,.hero-signature::before{
  content:""; position:absolute; left:0; right:0; height:1px;
  background:rgba(238,235,222,.22); transform-origin:left;
}
.hero-edition::after{ bottom:0; }
.hero-signature::before{ top:0; }
body.reveal .hero-edition::after{ animation:hero-rule-in 1.2s cubic-bezier(.16,1,.3,1) both; }
body.reveal .hero-signature::before{ animation:hero-rule-in 1.2s cubic-bezier(.16,1,.3,1) .7s both; }
@keyframes hero-rule-in{ from{ transform:scaleX(0); } to{ transform:scaleX(1); } }
body.reveal .hero-edition > span{ animation:hero-detail-in 1s var(--e) .2s both; }
body.reveal .hero-signature > p{ animation:hero-detail-in 1s var(--e) 1s both; }
@keyframes hero-detail-in{ from{ opacity:0; transform:translateY(10px); } to{ opacity:1; transform:none; } }
html.js .hero--identity .hero-title .ln > span{ transition-duration:1.2s; transition-timing-function:cubic-bezier(.16,1,.3,1); }
body.reveal .hero--identity .hero-title .ln:nth-child(2) > span{ transition-delay:.48s; }
body.reveal .hero--identity .hero-title .ln:nth-child(3) > span{ transition-delay:.66s; }
.hero--identity .btn.accent span{ transition:transform .35s var(--e); }
.hero--identity .btn.accent:hover span{ transform:translate(3px,-3px); }
body.reveal .hero--identity.motion-paused .hero-watermark,
body.reveal .hero--identity.motion-paused::before{ animation-play-state:paused; }
@media(max-width:860px){ .hero--identity .hero-watermark{ --mark-opacity:.1; } }
/* Match the existing theme's owner-requested always-on entrance motion.
   Offscreen/hidden-tab animations are paused by home-motion.js. */

@media(max-width:860px){
  .hero--identity .hero-watermark{ right:-14%; top:22%; width:540px; opacity:.1; }
  .hero--identity h1{ font-size:clamp(32px,5.5vw,46px); }
}
@media(max-width:640px){
  .hero--identity .wrap{ padding-top:104px; padding-bottom:28px; }
  .hero-edition{ font-size:9px; letter-spacing:.1em; gap:12px; padding-bottom:14px; }
  .hero-edition > span:last-child{ font-size:10px; letter-spacing:.03em; }
  .hero--identity .hero-watermark{ width:300px; right:-78px; top:160px; opacity:.1; }
  .hero-copy{ padding:48px 0 40px; }
  .hero--identity .over{ margin-bottom:20px; }
  .hero--identity .kicker{ font-size:10px; }
  .hero--identity h1{ font-size:clamp(27px,7.2vw,34px); line-height:1.6; letter-spacing:0; }
  .hero--identity .sub{ margin-top:24px; font-size:13px; line-height:1.95; }
  .hero--identity .cta{ margin-top:28px; gap:22px; }
  .hero-signature{ align-items:flex-start; gap:16px; padding-top:20px; }
  .hero-person{ flex-direction:column; gap:3px; flex:none; }
  .hero-person > span:first-child{ font-size:16px; letter-spacing:.1em; }
  .hero-person-en{ font-size:8px; letter-spacing:.04em; }
  .hero-location{ font-size:10px; max-width:18em; }
  .hero-location > span{ font-size:8px; letter-spacing:.04em; }
}
