/*
Theme: NAKAI DOKEN
Responsive specification v5.2
------------------------------------------------------------
PC      : 1025px+
Tablet  : 600px-1024px
Mobile  : 0-599px

Typography baseline (PC / Tablet / Mobile)
Body             : 18 / 17 / 16px
Table label       : 18 / 17 / 16px, 700
Table content     : 18 / 17 / 16px, 400
Medium heading    : 28 / 25 / 22px, 700
Japanese heading  : 42 / 36 / 32px, 700
Main copy         : 48 / 40 / 34px, 700
English mega title: 80 / 64 / 48px, PC700 / Tablet700 / Mobile600
Button            : 18 / 17 / 16px, 700

IMPORTANT:
- Only the three width ranges above are used.
- No clamp() sizing.
- No version-by-version override blocks.
- Layout and typography are defined once per breakpoint.
*/


/* =========================================================
   SELF-HOSTED FONT: Noto Sans JP (100-900)
   ---------------------------------------------------------
   All static TTF files are stored manually in /assets/fonts/.
   Weight mapping: 100 Thin / 200 ExtraLight / 300 Light /
   400 Regular / 500 Medium / 600 SemiBold / 700 Bold /
   800 ExtraBold / 900 Black.
   ========================================================= */
@font-face{font-family:"Noto Sans JP Local";src:url("../fonts/NotoSansJP-Thin.ttf") format("truetype");font-style:normal;font-weight:100;font-display:swap}
@font-face{font-family:"Noto Sans JP Local";src:url("../fonts/NotoSansJP-ExtraLight.ttf") format("truetype");font-style:normal;font-weight:200;font-display:swap}
@font-face{font-family:"Noto Sans JP Local";src:url("../fonts/NotoSansJP-Light.ttf") format("truetype");font-style:normal;font-weight:300;font-display:swap}
@font-face{font-family:"Noto Sans JP Local";src:url("../fonts/NotoSansJP-Regular.ttf") format("truetype");font-style:normal;font-weight:400;font-display:swap}
@font-face{font-family:"Noto Sans JP Local";src:url("../fonts/NotoSansJP-Medium.ttf") format("truetype");font-style:normal;font-weight:500;font-display:swap}
@font-face{font-family:"Noto Sans JP Local";src:url("../fonts/NotoSansJP-SemiBold.ttf") format("truetype");font-style:normal;font-weight:600;font-display:swap}
@font-face{font-family:"Noto Sans JP Local";src:url("../fonts/NotoSansJP-Bold.ttf") format("truetype");font-style:normal;font-weight:700;font-display:swap}
@font-face{font-family:"Noto Sans JP Local";src:url("../fonts/NotoSansJP-ExtraBold.ttf") format("truetype");font-style:normal;font-weight:800;font-display:swap}
@font-face{font-family:"Noto Sans JP Local";src:url("../fonts/NotoSansJP-Black.ttf") format("truetype");font-style:normal;font-weight:900;font-display:swap}

:root{
  --ink:#111;
  --paper:#fff;
  --soft:#f2f2f2;
  --green:#16844b;
  --line:#d8d8d8;
  --header-pc:106px;
  --header-compact:76px;
  --content:1180px;
  --content-narrow:920px;
  --ease:cubic-bezier(.22,.61,.36,1);
}

/* =========================================================
   COMMON / RESET
   ========================================================= */
*{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%;min-height:100%}
body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"Helvetica Neue","Yu Gothic",YuGothic,"Hiragino Kaku Gothic ProN",Arial,sans-serif;
  font-weight:400;
  line-height:1.8;
  overflow-x:hidden;
  min-height:100%;
}
a{color:inherit;text-decoration:none}
img{display:block;max-width:100%;height:auto}
button,input,select,textarea{font:inherit}
figure,p,h1,h2,h3,h4,dl,dd{margin-top:0}
.green{color:var(--green)}
.sub-soft{background:var(--soft)}

/* =========================================================
   HEADER
   ========================================================= */
.site-header{
  position:fixed;
  z-index:1000;
  top:0;left:0;right:0;
  background:#fff;
  display:flex;
  align-items:center;
  border-bottom:1px solid rgba(0,0,0,.08);
}
/* v6.7: only JS-enabled pages slide the header from completely above.
   Keep it fully opaque throughout the movement to avoid the ghost/flash
   visible in iPhone page transitions. */
html.nakai-js .site-header{
  opacity:1;
  visibility:visible;
  transform:translate3d(0,-100%,0);
  transition:transform .66s var(--ease);
  will-change:transform;
}
html.nakai-js .site-header.header-entered{
  transform:translate3d(0,0,0);
}
.site-header-spacer{background:#fff}
.home .site-header-spacer{display:none}
.brand{display:flex;align-items:center;min-width:0}
.custom-logo{display:block;width:auto;height:auto;object-fit:contain;object-position:left center}
.brand-ja{font-weight:800}
.brand-en{letter-spacing:.16em}
.desktop-nav{margin-left:auto;display:flex;align-items:center;font-weight:700;letter-spacing:.05em}
.desktop-nav a{position:relative;white-space:nowrap}
.desktop-nav a::after{content:"";position:absolute;left:0;right:100%;bottom:-8px;height:2px;background:var(--green);transition:right .25s ease}
.header-actions{display:flex;align-self:stretch}
.header-actions a{display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700;white-space:nowrap}
.header-recruit{background:var(--green)}
.header-contact{background:#111}
.menu-btn{display:none;border:0;background:transparent;color:#111;position:relative;padding:0;cursor:pointer}
.menu-btn .menu-line{position:absolute;left:11px;width:28px;height:2px;background:#111;transition:transform .25s ease,top .25s ease,opacity .25s ease}
.menu-btn small{position:absolute;left:0;right:0;text-align:center;font-weight:600;letter-spacing:.12em}
.menu-panel{position:fixed;z-index:990;inset:0;background:rgba(0,0,0,.36);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .28s ease,visibility .28s ease}
.menu-panel-inner{position:absolute;top:0;right:0;bottom:0;background:#fff;overflow-y:auto;transform:translate3d(100%,0,0);transition:transform .34s var(--ease)}
.menu-open{overflow:hidden}
.menu-open .menu-panel{opacity:1;visibility:visible;pointer-events:auto}
.menu-open .menu-panel-inner{transform:translate3d(0,0,0)}
.mobile-menu-nav{display:block;text-align:left;font-weight:700}
.mobile-menu-nav a{display:flex;align-items:center;border-top:1px solid #ddd}
.mobile-menu-nav a:last-child{border-bottom:1px solid #ddd}
.mobile-menu-actions{display:grid}
.mobile-menu-actions a{display:flex;align-items:center;justify-content:space-between;color:#fff;font-weight:700}
.mobile-menu-recruit{background:var(--green)}
.mobile-menu-contact{background:#111}
.mobile-menu-privacy{display:block;text-align:center;color:#999;font-weight:600}
.menu-open .menu-btn{z-index:1100}
.menu-open .menu-line-1{transform:rotate(45deg)}
.menu-open .menu-line-2{opacity:0}
.menu-open .menu-line-3{transform:rotate(-45deg)}

/* =========================================================
   MOTION - ONE ENGINE FOR ALL DEVICES
   ========================================================= */
.title-rise,.slide-left,.slide-right,.panel-slide-left,.panel-slide-right,.copy-slide-left,.copy-rise,.hero-slide-left,.reveal{will-change:transform,opacity}
.motion-setup{opacity:0;transition:opacity .95s var(--ease),transform .95s var(--ease)}
.motion-from-left{transform:translate3d(-70px,0,0)}
.motion-from-right{transform:translate3d(70px,0,0)}
.motion-from-bottom{transform:translate3d(0,48px,0)}
.motion-in{opacity:1!important;transform:translate3d(0,0,0)!important}
.hero-slide-left.motion-setup{transition-duration:1.15s}

/* =========================================================
   HOME - COMMON STRUCTURE
   ========================================================= */
.hero{position:relative;overflow:hidden;background:#202a2d}
.hero-media{position:absolute;inset:0;background-position:center;background-size:cover;background-repeat:no-repeat;overflow:hidden}
.hero-video{position:absolute;z-index:0;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;display:block}
.hero-media::after{content:"";position:absolute;z-index:1;inset:0;background:rgba(0,0,0,.18);pointer-events:none}
.hero-copy{position:absolute;z-index:2;color:#fff}
.hero-copy-inner{transform:skewY(-7deg);transform-origin:left bottom}
.hero-copy h1{margin:0;letter-spacing:0;font-family:"Noto Sans JP Local","Noto Sans JP",-apple-system,BlinkMacSystemFont,"Helvetica Neue","Yu Gothic",YuGothic,"Hiragino Kaku Gothic ProN",Arial,sans-serif}
.hero-line{display:block}
.hero-sub{margin-bottom:0;font-family:-apple-system,BlinkMacSystemFont,"Helvetica Neue","Yu Gothic",YuGothic,"Hiragino Kaku Gothic ProN",Arial,sans-serif}

.home-block{position:relative;background:#fff;overflow:hidden}
.mega-title{margin:0;font-weight:700;line-height:.98;letter-spacing:-.02em}
.mega-title.align-right{text-align:right}
.mini-heading{display:flex;align-items:center;font-weight:700;margin-top:0}
.mini-heading>span{display:block;height:2px;background:var(--green);flex:0 0 auto}
.mini-heading.light{color:#fff}
.home-photo{background:#d9dddb center/cover no-repeat;overflow:hidden}
.home-photo.has-image>.photo-placeholder{display:none}
.photo-placeholder{height:100%;display:grid;place-items:center;color:#6d756f;font-size:12px;letter-spacing:.1em}

.message-layout{display:grid}
.message-copy{display:flex;flex-direction:column}
.message-copy-body{display:flex;flex-direction:column}
.message-copy h3{margin-top:0;letter-spacing:-.02em}
.lead-text{margin-bottom:0}

.section-cta-block,.recruit-link-block{display:flex;flex-direction:column;align-items:flex-start}
.section-cta,.recruit-cta{display:inline-flex;align-items:center;justify-content:space-between;border:2px solid currentColor;border-radius:999px;font-weight:700;line-height:1.2;transition:background .25s ease,color .25s ease,transform .25s ease}
.section-cta-arrow,.recruit-cta-arrow{margin-left:20px;font-size:1.2em;font-weight:400}
.section-en,.recruit-en{color:#999;font-weight:700;letter-spacing:.03em}
.section-cta-block-dark .section-cta{color:#fff}
.section-cta-block-dark .section-en{color:rgba(255,255,255,.5)}

.overlap-stage{position:relative}
.feature-photo{position:absolute;background-position:center;background-size:cover;background-repeat:no-repeat}
.dark-panel{position:absolute;z-index:2;background:rgba(12,12,12,.9);color:#fff;display:flex;flex-direction:column}
.dark-panel p:not(.mini-heading){margin-top:0}

.about-home{background:#f1f1f1}
.about-inner{margin:auto}
.about-images{display:grid}
.about-photo{position:relative;display:block;background:#ddd;overflow:hidden}
.about-photo-media{position:absolute;inset:0;background-position:center;background-size:cover;transition:transform .5s var(--ease)}
.about-photo.has-image>.photo-placeholder{display:none}
.about-copy-grid{display:grid}
.about-copy-grid h3{margin-top:0}
.about-copy-grid p{margin-bottom:0}

.recruit-home{position:relative;background:#b9ddc8 center/cover no-repeat;overflow:hidden}
.recruit-overlay{position:absolute;inset:0;background:rgba(210,240,220,.72)}
.recruit-inner{position:relative;z-index:2;margin:auto;display:grid}
.recruit-title{color:#fff}
.recruit-title span{color:var(--green)}

.contact-strip{background:var(--green);color:#fff;display:grid;align-items:center}
.contact-strip>span{font-weight:800;letter-spacing:.12em}
.contact-strip p{margin:0}
.contact-strip div a{font-weight:800}
.contact-arrow{border:1px solid rgba(255,255,255,.7);border-radius:999px;display:flex;align-items:center;justify-content:space-between;font-weight:700}

/* =========================================================
   SUBPAGE COMMON
   ========================================================= */
.subpage-visual{background:#ddd center/cover no-repeat}
.subpage-titlebar{background:#fff}
.subpage-title-inner{width:min(var(--content),88%);margin:auto}
.subpage-breadcrumb{display:flex;justify-content:flex-end;align-items:center;gap:16px;color:#aaa;font-weight:600}
.crumb-current{color:#111;font-weight:700}
.sub-section{width:100%;margin:0 auto}
.sub-heading{display:flex;align-items:center;flex-wrap:wrap}
.sub-heading h2{margin:0;display:flex;align-items:center;font-weight:800;letter-spacing:-.02em}
.sub-heading h2::after{content:"";display:block;height:1px;background:var(--green)}
.sub-heading span{display:block;width:100%;color:var(--green);font-weight:700;letter-spacing:.06em}
.dash-heading{display:flex;align-items:center;font-weight:700}
.dash-heading::before{content:"";display:block;height:2px;background:var(--green);flex:0 0 auto}
.long-copy p:last-child{margin-bottom:0}
.lead-large{font-weight:700;color:var(--green);white-space:pre-line}

/* ABOUT */
.about-recruit-balance .recruit-detail-inner{margin:auto}
.about-match-table{margin:0}
.about-match-table>div{position:relative;display:grid;border-bottom:1px solid var(--line)}
.about-match-table>div::after{content:"";position:absolute;left:0;bottom:-1px;height:1px;background:var(--green)}
.about-match-table dt{font-weight:700}
.history-year,.history-month{display:inline}
.about-match-table dd{margin:0;min-width:0;font-weight:400}
.about-address{display:block}
.about-contact-line{display:flex;flex-wrap:wrap}
.about-contact-line a,.about-contact-line span{white-space:nowrap}
.access-grid{display:grid;align-items:center}
.map-placeholder{background:#ddd;overflow:hidden}
.map-placeholder iframe{display:block;width:100%;height:100%;border:0}
.access-grid h3{margin-bottom:12px}
.access-grid p{margin-bottom:0}

/* PHILOSOPHY */
.message-columns{display:grid}
.message-columns h4{margin-top:0;color:var(--green);white-space:pre-line;letter-spacing:-.02em}
.philosophy-signature{display:flex;flex-direction:column}
.philosophy-company{font-weight:700}
.philosophy-person{display:flex;align-items:baseline;flex-wrap:wrap}
.philosophy-role{font-weight:700}
.philosophy-person strong{font-weight:800}
.philosophy-list{display:grid}
.philosophy-list article{display:grid;align-items:center;background:#fff}
.philosophy-photo{background:#d8d8d8 center/cover no-repeat}
.philosophy-list h3{white-space:pre-line;margin-top:0}
.philosophy-list p{margin-bottom:0}

/* BUSINESS */
.business-gallery{display:grid}
.gallery-placeholder{background:#d8d8d8 center/cover no-repeat}
.strength-list{display:grid}
.strength-list article{display:grid;align-items:center;background:#fff}
.strength-photo{background:#d8d8d8 center/cover no-repeat}
.strength-list h3{white-space:pre-line;margin-top:0}
.strength-list p{margin-bottom:0}

/* RECRUIT */
.recruit-detail-section{background:#fff}
.recruit-detail-inner{margin:auto}
.recruit-detail-heading{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}
.recruit-detail-heading h1{margin:0;font-weight:800}
.recruit-detail-heading span{color:var(--green);font-weight:700}
.recruit-jobs{display:grid}
.recruit-job{overflow:hidden}
.recruit-position-label{background:var(--green);color:#fff;text-align:center;font-weight:700}
.recruit-detail-table{margin:0}
.recruit-detail-table>div{position:relative;display:grid;border-bottom:1px solid var(--line)}
.recruit-detail-table>div::after{content:"";position:absolute;left:0;bottom:-1px;height:1px;background:var(--green)}
.recruit-detail-table dt{font-weight:700}
.recruit-detail-table dd{margin:0;min-width:0;font-weight:400}
.recruit-contact-cta{text-align:center;background:var(--soft)}
.recruit-contact-cta p{margin-top:0}
.recruit-contact-cta a{display:inline-flex;align-items:center;justify-content:space-between;background:#111;color:#fff;font-weight:700}

/* WORKS ARCHIVE */
.works-list-panel,.works-disaster-panel{width:100%}
.works-page-heading{display:flex;align-items:center;flex-wrap:wrap}
.works-page-heading h1{margin:0;font-weight:800}
.works-page-heading i{display:block;height:1px;background:var(--green)}
.works-page-heading span{width:100%;color:var(--green);font-weight:700}
.works-reference-grid{display:grid}
.work-reference-card{display:block}
.work-reference-thumb{background:#ddd;overflow:hidden;aspect-ratio:4/3;display:grid;place-items:center;color:#888;font-weight:700}
.work-reference-thumb img{width:100%;height:100%;object-fit:cover;transition:transform .45s var(--ease)}
.work-reference-card h3{margin-bottom:8px}
.work-reference-card p{margin:0;color:#666}
.works-disaster-panel{background:#fff;color:#111}
.works-disaster-inner{margin:auto}
.works-dash-title{display:flex;align-items:center;font-weight:700}
.works-dash-title>span{display:block;height:2px;background:var(--green)}
.works-disaster-copy p:last-child{margin-bottom:0}
.works-disaster-gallery{display:grid}
.works-disaster-photo{background:#e8e8e8 center/cover no-repeat;aspect-ratio:4/3;display:grid;place-items:center;color:#777}

/* WORKS SINGLE */
.works-single-reference{background:#fff}
.works-single-inner{margin:auto}
.works-single-header{border-bottom:1px solid var(--line)}
.works-single-header h1{margin-top:0;font-weight:800}
.works-single-meta{display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px;color:#666}
.works-single-main-image img{width:100%;height:auto}
.works-single-subgrid{display:grid}
.works-single-subgrid figure{margin:0}
.works-single-subgrid img{width:100%;height:100%;object-fit:cover}
.works-single-prose{margin:auto}
.works-single-back{text-align:center}
.works-single-back a{display:inline-flex;align-items:center;border:1px solid #111;border-radius:999px;font-weight:700}

/* SUSTAINABILITY */
.sustainability-page{margin:auto}
.values-grid{display:grid}
.sustainability-item{background:var(--soft);display:grid;align-items:center}
.sustainability-copy h3{margin-top:0}
.sustainability-copy p{margin-bottom:0}
.sustainability-image-wrap{display:flex;align-items:center;justify-content:center}
.sustainability-icon{max-width:100%;max-height:100%;object-fit:contain}

/* CONTACT */
.contact-page-section{background:#fff}
.contact-page-inner{margin:auto}
.contact-title h1{margin-top:0;font-weight:800}
.contact-intro-copy p{margin-bottom:4px}
.contact-phone-bar{display:flex;align-items:center;justify-content:space-between;background:var(--soft)}
.contact-company-name{font-weight:700}
.contact-phone-link{font-weight:800}
.contact-notice{padding:16px 20px;margin-bottom:24px}
.contact-notice.is-success{background:#eaf6ef;color:#126839}
.contact-notice.is-error{background:#fff0f0;color:#a31919}
.reference-contact-form{display:grid}
.contact-form-row{display:grid;border-bottom:1px solid var(--line)}
.contact-form-row>label{font-weight:700}
.contact-form-row em{color:var(--green);font-style:normal}
.contact-form-row input,.contact-form-row select,.contact-form-row textarea{width:100%;border:1px solid #ccc;background:#fff;border-radius:0;padding:13px 14px;color:#111}
.contact-form-row textarea{resize:vertical}
.contact-hp{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important;overflow:hidden!important}
.contact-anti-sales,.privacy-check{font-weight:600}
.reference-contact-form button{border:0;background:#111;color:#fff;font-weight:700;cursor:pointer}
.contact-privacy-note,.contact-security-note{color:#777}

/* GENERIC WORDPRESS PAGE */
.page-hero{background:#fff}
.page-hero>div{display:flex;gap:10px;color:#999}
.page-hero h1{font-weight:800;margin-bottom:0}
.page-content .prose{margin:auto}
.prose{line-height:1.95}
.prose h2,.prose h3,.prose h4{line-height:1.45}
.section{width:100%}

/* =========================================================
   FOOTER / MOBILE QUICK ACTIONS - COMMON
   ========================================================= */
.site-footer{background:#111;color:#fff}
.footer-inner{margin:auto;display:grid;align-items:start}
.footer-brand{font-weight:800}
.footer-company p{margin-bottom:8px;color:rgba(255,255,255,.72)}
.footer-certifications{display:flex;align-items:flex-start}
.footer-certification{background:#fff;display:flex;align-items:center;justify-content:center;overflow:hidden}
.footer-certification img{width:100%;height:100%;object-fit:contain}
.footer-inner nav{display:grid}
.footer-bottom{border-top:1px solid rgba(255,255,255,.18);display:flex;justify-content:space-between;color:rgba(255,255,255,.58)}
.floating-actions{display:none}
.floating-action{color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700}
.floating-action-recruit{background:var(--green)}
.floating-action-contact{background:#111}
.floating-action svg{display:block;flex:0 0 auto}

/* =========================================================
   PC : 1025px+
   ========================================================= */
@media (min-width:1025px){
  body{font-size:18px}

  /* Header */
  .site-header{height:var(--header-pc);padding-left:56px}
  .site-header-spacer{height:var(--header-pc)}
  .brand{width:330px}
  .custom-logo{max-width:330px;max-height:68px}
  .brand-ja{font-size:23px}
  .brand-en{font-size:10px}
  .desktop-nav{gap:38px;font-size:16px;font-weight:600}
  .header-actions{height:var(--header-pc);margin-left:34px}
  .header-actions a{padding:0 32px;font-size:18px;font-weight:600}

  /* Home hero */
  .hero{height:100vh;min-height:700px}
  .hero-copy{left:4.2%;bottom:10%}
  .hero-copy h1{font-size:90px;font-weight:900;line-height:1.08}
  .hero-sub{font-size:40px;font-weight:700;line-height:1.45;margin-top:22px}

  /* Home type */
  .mega-title{font-size:80px}
  .mini-heading{gap:18px;font-size:18px;margin-bottom:24px}
  .mini-heading>span{width:30px}
  .message-copy h3{font-size:42px;font-weight:700;line-height:1.35;margin-bottom:18px}
  .lead-text,.dark-panel p:not(.mini-heading),.about-copy-grid p,.recruit-text>p:not(.mini-heading){font-size:18px;line-height:1.9}

  /* Message */
  .message-home{padding:72px 0}
  .message-layout{grid-template-columns:48% 52%;min-height:500px;align-items:start}
  .message-photo{height:500px}
  .message-copy{height:500px;padding:0 8%}
  .message-title{margin:0 0 auto}
  .message-copy-body{justify-content:flex-end}
  .section-cta-block{margin-top:24px;gap:8px}
  .section-cta{min-width:300px;padding:17px 28px;font-size:18px}
  .section-en{font-size:14px}

  /* Business / works */
  .business-home,.works-home{padding:70px 0 88px}
  .business-home>.mega-title{padding-right:4.2%;margin-bottom:30px}
  .works-home>.mega-title{padding-left:4.2%;margin-bottom:30px}
  .overlap-stage{min-height:470px}
  .business-photo{left:20%;right:0;top:0;bottom:0}
  .works-photo{left:0;right:20%;top:0;bottom:0}
  .dark-panel{width:43%;min-height:420px;padding:62px 46px 42px}
  .business-stage .dark-panel{left:4.2%;top:24px}
  .works-stage .dark-panel{right:4.2%;top:24px;min-height:280px;padding-top:40px;padding-bottom:30px}
  .dark-panel p:not(.mini-heading){margin-bottom:24px}
  .section-cta-block-dark{margin-top:auto;gap:8px}
  .works-panel .section-cta-block-dark{margin-top:28px}

  /* About */
  .about-home{padding:92px 0}
  .about-inner{width:min(1000px,82%)}
  .about-home .mega-title{margin-bottom:34px}
  .about-images{grid-template-columns:1fr 1fr}
  .about-photo{height:300px}
  .about-copy-grid{grid-template-columns:1fr 1fr;gap:70px;padding-top:36px}
  .about-copy-grid h3{font-size:28px;font-weight:700;margin-bottom:15px}

  /* Recruit / contact */
  .recruit-home{min-height:500px}
  .recruit-inner{width:min(1000px,82%);grid-template-columns:1fr 1fr;gap:70px;padding:82px 0}
  .recruit-text h3{font-size:42px;font-weight:700;line-height:1.4;margin-bottom:28px}
  .recruit-link-block{margin-top:28px;gap:8px}
  .recruit-cta{min-width:300px;padding:17px 28px;font-size:18px}
  .recruit-en{font-size:14px}
  .contact-strip{padding:48px 5%;grid-template-columns:1fr 1.4fr 280px;gap:34px}
  .contact-strip>span{font-size:26px}
  .contact-strip div a{font-size:38px}
  .contact-arrow{padding:17px 24px;font-size:18px}

  /* Sub pages */
  .subpage-visual{height:300px}
  .subpage-titlebar{padding:28px 0 0}
  .subpage-breadcrumb{font-size:14px}
  .sub-section{padding:84px max(5%,calc((100vw - var(--content))/2))}
  .business-intro,.strength-section,.philosophy-message,.philosophy-values-section{padding-left:max(5%,calc((100vw - 900px)/2));padding-right:max(5%,calc((100vw - 900px)/2))}
  .sub-heading{margin-bottom:54px;column-gap:28px}
  .sub-heading h2{font-size:42px}
  .sub-heading h2::after{width:150px;margin-left:28px}
  .sub-heading span{font-size:16px;margin-top:4px}
  .dash-heading{font-size:28px;gap:18px;margin-bottom:38px}
  .dash-heading::before{width:40px}
  .long-copy,.message-columns p{font-size:18px;line-height:1.8}
  .strength-list p,.philosophy-list p{font-size:18px;line-height:1.62}
  .lead-large{font-size:48px;line-height:.6;margin-bottom:60px}

  /* About */
  .about-recruit-balance .recruit-detail-inner{width:600px;max-width:100%}
  .about-match-table{width:600px;max-width:100%}
  .about-match-table>div{grid-template-columns:150px minmax(0,1fr);min-height:82px}
  .about-match-table>div::after{width:150px}
  .about-match-table dt,.about-match-table dd{padding:22px 18px;font-size:18px;line-height:1.7}
  .about-contact-line{gap:4px 12px;margin-top:8px}
  .access-grid{grid-template-columns:1.35fr 1fr;gap:54px}
  .map-placeholder{height:380px}
  .access-grid h3{font-size:28px}

  /* Philosophy */
  .message-columns{grid-template-columns:300px 600px;gap:0}
  .message-columns>.long-copy{padding-left:50px}
  .message-columns h4{font-size:30px;font-weight:700;line-height:.7;margin-bottom:44px}
  .philosophy-company{font-size:18px}
  .philosophy-person{gap:18px;margin-top:8px}
  .philosophy-role{font-size:18px}
  .philosophy-person strong{font-size:32px}
  .philosophy-list{gap:42px}
  .philosophy-list article{grid-template-columns:360px 1fr;gap:54px;padding:32px}
  .philosophy-photo{height:230px}
  .philosophy-list h3{font-size:28px;line-height:.8;margin-bottom:18px}

  /* Business */
  .business-intro .long-copy{column-count:2;column-width:auto;column-gap:24px;column-fill:balance}
  .business-intro .long-copy p{break-inside:auto;margin:0 0 1.2em}
  .business-gallery{grid-template-columns:repeat(2,1fr);gap:24px;margin-top:48px}
  .gallery-placeholder{height:320px}
  .strength-list{gap:42px}
  .strength-list article{grid-template-columns:360px 1fr;gap:54px;padding:32px}
  .strength-photo{height:230px}
  .strength-list h3{font-size:28px;line-height:.8;margin-bottom:18px}

  /* Recruit */
  .recruit-detail-section{padding:82px 5%}
  .recruit-detail-inner{width:900px;max-width:100%}
  .recruit-detail-heading{padding-bottom:26px;margin-bottom:54px}
  .recruit-detail-heading h1{font-size:42px}
  .recruit-detail-heading span{font-size:16px;margin-left:auto}
  .recruit-jobs{gap:56px}
  .recruit-position-label{width:fit-content;max-width:100%;margin:0 auto;padding:18px 34px;font-size:20px}
  .recruit-detail-table>div{grid-template-columns:180px minmax(0,1fr);min-height:78px}
  .recruit-detail-table>div::after{width:180px}
  .recruit-detail-table dt,.recruit-detail-table dd{padding:20px 18px;font-size:18px;line-height:1.7}
  .recruit-contact-cta{margin-top:60px;padding:30px 42px 30px}
  .recruit-contact-cta a{min-width:0;width:auto;padding:17px 28px;font-size:18px;background:var(--green);color:#fff}

  /* Works */
  .works-list-panel{padding:82px max(5%,calc((100vw - 900px)/2)) 88px}
  .works-page-heading{column-gap:28px;margin-bottom:54px}
  .works-page-heading h1{font-size:42px}
  .works-page-heading i{width:150px}
  .works-page-heading span{font-size:16px;margin-top:4px}
  .works-reference-grid{grid-template-columns:repeat(3,1fr);gap:48px 30px}
  .work-reference-card h3{font-size:22px;margin-top:16px}
  .work-reference-card p{font-size:16px}
  .works-disaster-panel{padding:88px 0}
  .works-disaster-inner{width:900px;max-width:88%}
  .works-dash-title{font-size:28px;gap:18px;margin-bottom:30px}
  .works-dash-title>span{width:40px}
  .works-disaster-copy{font-size:18px;line-height:1.95}
  .works-disaster-sub{margin-top:62px}
  .works-disaster-gallery{grid-template-columns:repeat(3,1fr);gap:22px}

  /* Works single */
  .works-single-reference{padding:82px 0 100px}
  .works-single-inner{width:min(1000px,88%)}
  .works-single-header{padding-bottom:26px;margin-bottom:42px}
  .works-single-header h1{font-size:36px;line-height:1.45;margin-bottom:12px}
  .works-single-meta{font-size:16px}
  .works-single-main-image{margin:0 0 26px}
  .works-single-subgrid{grid-template-columns:1fr 1fr;gap:24px;margin-bottom:42px}
  .works-single-prose{font-size:18px;line-height:1.95;max-width:800px}
  .works-single-back{margin-top:54px}
  .works-single-back a{padding:15px 26px;font-size:18px}

  /* Sustainability */
  .sustainability-page{padding:82px max(5%,calc((100vw - var(--content))/2))}
  .values-grid{grid-template-columns:repeat(3,1fr);gap:24px}
  .sustainability-item{grid-template-rows:auto 190px;padding:28px;gap:24px}
  .sustainability-copy h3{font-size:28px}
  .sustainability-copy p{font-size:18px;line-height:1.85}
  .sustainability-image-wrap{height:190px}

  /* Contact */
  .contact-page-section{padding:82px 5% 100px}
  .contact-page-inner{width:800px;max-width:100%}
  .contact-title h1{font-size:42px;margin-bottom:22px}
  .contact-intro-copy{font-size:18px;line-height:1.8;margin-bottom:28px}
  .contact-phone-bar{display:grid;grid-template-columns:1fr 1fr;align-items:center;padding:22px 26px;margin-bottom:48px}
  .contact-company-name{font-size:24px;font-weight:800;padding-right:34px}
  .contact-phone-link{font-size:28px;border-left:1px solid #bbb;padding-left:34px}
  .reference-contact-form{gap:0}
  .contact-form-row{grid-template-columns:220px 1fr;gap:28px;padding:20px 0;align-items:start}
  .contact-form-row>label{font-size:18px;padding-top:10px}
  .contact-form-row input,.contact-form-row select,.contact-form-row textarea{font-size:18px}
  .contact-anti-sales,.privacy-check{font-size:16px;margin-top:24px}
  .contact-privacy-note,.contact-security-note{font-size:14px}
  .reference-contact-form button{width:300px;margin:32px auto 0;padding:18px;font-size:18px;background:var(--green);color:#fff;border-color:var(--green)}

  /* Generic page */
  .page-hero{padding:74px 5% 48px}
  .page-hero h1{font-size:42px;margin-top:20px}
  .page-content,.section{padding:72px 5%}
  .page-content .prose{max-width:900px;font-size:18px}

  /* Footer */
  .site-footer{padding:64px 5% 28px}
  .footer-inner{width:min(var(--content),100%);grid-template-columns:1.4fr auto 1fr;gap:50px}
  .footer-brand{font-size:26px;margin-bottom:20px}
  .footer-company p{font-size:16px;line-height:1.7}
  .footer-certifications{gap:20px}
  .footer-certification{width:140px;height:140px;padding:10px}
  .footer-inner nav{grid-template-columns:1fr 1fr;gap:12px 34px;font-size:16px}
  .footer-bottom{width:min(var(--content),100%);margin:54px auto 0;padding-top:20px;font-size:13px}
}

/* =========================================================
   TABLET : 600px-1024px
   ========================================================= */
@media (min-width:600px) and (max-width:1024px){
  /* Tablet layout. Real iPad scrolling is isolated in .page-scroll-shell
     by the tablet-touch rules below, so the footer is the true document end. */
  html{width:100%;min-height:100%;overflow-x:hidden;background:#fff}
  body{width:100%;min-height:100%;margin:0;font-size:17px;overflow-x:hidden;background:#fff}
  #page,.site,.site-content,main{max-width:100%;overflow-x:hidden}
  main{min-height:0}
  .site-footer{position:relative;z-index:1;overflow:hidden;margin:0}
  .menu-panel{overscroll-behavior:contain}

  /* Header */
  .site-header{height:var(--header-compact);padding:0 20px}
  .site-header-spacer{height:var(--header-compact)}
  .brand{width:min(45vw,330px);max-width:calc(100% - 64px)}
  .custom-logo{max-width:100%;max-height:56px}
  .desktop-nav,.header-actions{display:none}
  .menu-btn{display:block;margin-left:auto;width:50px;height:58px;flex:0 0 50px}
  .menu-line-1{top:17px}.menu-line-2{top:25px}.menu-line-3{top:33px}
  .menu-btn small{top:39px;font-size:9px}
  .menu-open .menu-line-1,.menu-open .menu-line-3{top:25px}
  .menu-panel-inner{width:min(62vw,430px);padding:90px 28px 36px}
  .mobile-menu-nav{font-size:16px;font-weight:600}
  .mobile-menu-nav a{min-height:60px;padding:0 4px}
  .mobile-menu-actions{gap:10px;margin-top:28px}
  .mobile-menu-actions a{min-height:60px;padding:0 20px;font-size:16px;font-weight:600}
  .mobile-menu-privacy{font-size:14px;margin-top:24px}

  /* Home hero */
  .hero{height:100svh;min-height:620px}
  .hero-copy{left:6%;right:auto;bottom:8%;max-width:68%}
  .hero-copy h1{font-size:80px;font-weight:900;line-height:1.02}
  .hero-sub{font-size:38px;font-weight:600;line-height:1.30;margin-top:16px}

  /* Home type */
  .mega-title{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:64px;font-weight:700!important;line-height:.94}
  .mini-heading{gap:14px;font-size:17px;margin-bottom:20px}
  .mini-heading>span{width:26px}
  .message-copy h3{font-size:36px;font-weight:700;line-height:1.38;margin-bottom:16px}
  .lead-text,.dark-panel p:not(.mini-heading),.about-copy-grid p,.recruit-text>p:not(.mini-heading){font-size:17px;font-weight:400;line-height:1.75}

  /* Message */
  .message-home{padding:56px 0}
  .message-layout{grid-template-columns:1fr 1fr;min-height:450px}
  .message-photo{min-height:450px}
  .message-copy{padding:0 6%;justify-content:flex-end}
  .message-title{margin:0 0 auto}
  .section-cta-block{margin-top:22px;gap:7px}
  .section-cta{min-width:260px;padding:15px 24px;font-size:17px}
  .section-en{font-size:13px}

  /* Business / works */
  .business-home,.works-home{padding:58px 0 72px}
  .business-home>.mega-title{padding-right:4%;margin-bottom:24px}
  .works-home>.mega-title{padding-left:4%;margin-bottom:24px}
  .overlap-stage{min-height:440px}
  .business-photo{left:12%;right:0;top:0;bottom:0}
  .works-photo{left:0;right:12%;top:0;bottom:0}
  .dark-panel{width:54%;min-height:380px;padding:48px 34px 34px}
  .business-stage .dark-panel{left:4%;top:28px}
  .works-stage .dark-panel{right:4%;top:28px}
  .section-cta-block-dark{margin-top:auto;gap:7px}

  /* About */
  .about-home{padding:72px 0}
  .about-inner{width:90%}
  .about-home .mega-title{margin-bottom:28px}
  .about-images{grid-template-columns:1fr 1fr}
  .about-photo{height:260px}
  .about-copy-grid{grid-template-columns:1fr 1fr;gap:44px;padding-top:30px}
  .about-copy-grid h3{font-size:25px;font-weight:700;margin-bottom:12px}

  /* Recruit / contact */
  .recruit-inner{width:90%;grid-template-columns:1fr 1fr;gap:46px;padding:70px 0}
  .recruit-text h3{font-size:36px;font-weight:700;line-height:1.4;margin-bottom:24px}
  .recruit-cta{min-width:260px;padding:15px 24px;font-size:17px}
  .recruit-link-block{margin-top:24px;gap:7px}
  .recruit-en{font-size:13px}
  .contact-strip{padding:40px 5%;grid-template-columns:1fr 1.2fr 220px;gap:24px}
  .contact-strip>span{font-size:22px}
  .contact-strip div a{font-size:30px}
  .contact-arrow{padding:15px 20px;font-size:17px}

  /* Sub pages */
  .subpage-visual{height:240px}
  .subpage-titlebar{padding:22px 0 0}
  .subpage-breadcrumb{font-size:13px}
  .sub-section{padding:68px 6%}
  .sub-heading{margin-bottom:44px;column-gap:24px}
  .sub-heading h2{font-size:36px}
  .sub-heading h2::after{width:120px;margin-left:24px}
  .sub-heading span{font-size:15px;margin-top:3px}
  .dash-heading{font-size:25px;gap:16px;margin-bottom:32px}
  .dash-heading::before{width:34px}
  .long-copy,.message-columns p{font-size:17px;font-weight:400;line-height:1.68}
  .strength-list p,.philosophy-list p{font-size:17px;font-weight:400;line-height:1.58}
  .lead-large{font-size:40px;line-height:1.45;margin-bottom:52px}

  /* About */
  .about-recruit-balance .recruit-detail-inner{width:680px;max-width:100%}
  .about-match-table{width:680px;max-width:100%}
  .about-match-table>div{grid-template-columns:150px minmax(0,1fr);min-height:76px}
  .about-match-table>div::after{width:150px}
  .about-match-table dt,.about-match-table dd{padding:19px 16px;font-size:17px;line-height:1.7}
  .about-contact-line{gap:4px 6px;margin-top:6px}
  .access-grid{grid-template-columns:1fr;gap:34px}
  .map-placeholder{height:330px}
  .access-grid h3{font-size:25px}

  /* Philosophy */
  .message-columns{grid-template-columns:1fr;gap:46px}
  .message-columns h4{font-size:36px;font-weight:700;line-height:1.00;margin-bottom:36px}
  .philosophy-company{font-size:22px}
  .philosophy-person{gap:16px;margin-top:8px}
  .philosophy-role{font-size:21px}
  .philosophy-person strong{font-size:38px}
  .philosophy-list{gap:34px}
  .philosophy-list article{grid-template-columns:280px 1fr;gap:34px;padding:26px}
  .philosophy-photo{height:210px}
  .philosophy-list h3{font-size:25px;line-height:1.04;margin-bottom:15px}

  /* Business */
  .business-gallery{grid-template-columns:1fr 1fr;gap:20px;margin-top:42px}
  .gallery-placeholder{height:270px}
  .strength-list{gap:34px}
  .strength-list article{grid-template-columns:280px 1fr;gap:34px;padding:26px}
  .strength-photo{height:210px}
  .strength-list h3{font-size:25px;line-height:1.04;margin-bottom:15px}

  /* Recruit */
  .recruit-detail-section{padding:68px 6%}
  .recruit-detail-inner{width:760px;max-width:100%}
  .recruit-detail-heading{padding-bottom:22px;margin-bottom:46px}
  .recruit-detail-heading h1{font-size:36px}
  .recruit-detail-heading span{font-size:15px}
  .recruit-jobs{gap:46px}
  .recruit-position-label{width:fit-content;max-width:100%;margin:0 auto;padding:17px 34px;font-size:19px}
  .recruit-detail-table>div{grid-template-columns:150px minmax(0,1fr);min-height:72px}
  .recruit-detail-table>div::after{width:150px}
  .recruit-detail-table dt,.recruit-detail-table dd{padding:18px 16px;font-size:17px;line-height:1.6}
  .recruit-detail-table dd{font-weight:400}
  .recruit-contact-cta{margin-top:50px;padding:36px 36px 48px}
  .recruit-contact-cta a{min-width:0;width:fit-content;justify-content:flex-start;gap:28px;padding:15px 22px;font-size:17px}

  /* Works */
  .works-list-panel{padding:68px 6% 84px}
  .works-page-heading{column-gap:24px;margin-bottom:44px}
  .works-page-heading h1{font-size:36px}
  .works-page-heading i{width:120px}
  .works-page-heading span{font-size:15px;margin-top:3px}
  .works-reference-grid{grid-template-columns:repeat(2,1fr);gap:40px 24px}
  .work-reference-card h3{font-size:21px;margin-top:14px}
  .work-reference-card p{font-size:15px}
  .works-disaster-panel{padding:72px 0}
  .works-disaster-inner{width:88%}
  .works-dash-title{font-size:25px;gap:16px;margin-bottom:28px}
  .works-dash-title>span{width:34px}
  .works-disaster-copy{font-size:17px;font-weight:400;line-height:1.68;column-count:2;column-gap:24px}
  .works-disaster-sub{margin-top:52px}
  .works-disaster-gallery{grid-template-columns:repeat(2,1fr);gap:20px}

  /* Works single */
  .works-single-reference{padding:68px 0 84px}
  .works-single-inner{width:88%}
  .works-single-header{padding-bottom:22px;margin-bottom:36px}
  .works-single-header h1{font-size:32px;line-height:1.45;margin-bottom:10px}
  .works-single-meta{font-size:15px}
  .works-single-main-image{margin:0 0 22px}
  .works-single-subgrid{grid-template-columns:1fr 1fr;gap:20px;margin-bottom:36px}
  .works-single-prose{font-size:17px;line-height:1.95;max-width:760px}
  .works-single-back{margin-top:46px}
  .works-single-back a{padding:14px 24px;font-size:17px}

  /* Sustainability */
  .sustainability-page{padding:68px 6%}
  .values-grid{grid-template-columns:1fr;gap:22px}
  .sustainability-item{grid-template-columns:1fr 240px;padding:26px;gap:30px}
  .sustainability-copy h3{font-size:25px}
  .sustainability-copy p{font-size:17px;line-height:1.85}
  .sustainability-image-wrap{height:180px}

  /* Contact */
  .contact-page-section{padding:68px 6% 84px}
  .contact-page-inner{width:800px;max-width:100%}
  .contact-title h1{font-size:36px;margin-bottom:20px}
  .contact-intro-copy{font-size:17px;line-height:1.8;margin-bottom:24px}
  .contact-phone-bar{padding:20px 22px;margin-bottom:42px}
  .contact-company-name{font-size:24px;font-weight:700}
  .contact-phone-link{font-size:26px}
  .contact-form-row{grid-template-columns:190px 1fr;gap:24px;padding:18px 0;align-items:start}
  .contact-form-row>label{font-size:17px;padding-top:10px}
  .contact-form-row input,.contact-form-row select,.contact-form-row textarea{font-size:17px}
  .contact-anti-sales,.privacy-check{font-size:15px;margin-top:22px}
  .contact-privacy-note,.contact-security-note{font-size:13px;margin-top:18px}
  .reference-contact-form button{width:260px;margin:28px auto 0;padding:16px;font-size:17px}

  /* Generic page */
  .page-hero{padding:58px 6% 40px}
  .page-hero h1{font-size:36px;margin-top:18px}
  .page-content,.section{padding:62px 6%}
  .page-content .prose{max-width:760px;font-size:17px}

  /* Footer */
  .site-footer{padding:56px 5% 28px}
  .footer-inner{width:100%;grid-template-columns:1fr auto;gap:40px}
  .footer-company{grid-column:1}
  .footer-certifications{grid-column:2;grid-row:1;gap:16px}
  .footer-inner nav{grid-column:1/-1;grid-template-columns:repeat(3,1fr);gap:12px 26px;font-size:15px;margin-top:12px}
  .footer-brand{font-size:25px;margin-bottom:18px}
  .footer-company p{font-size:15px;line-height:1.7}
  .footer-certification{width:125px;height:125px;padding:9px}
  .footer-bottom{margin-top:46px;padding-top:18px;font-size:12px}
  .site-footer{padding-bottom:max(28px,env(safe-area-inset-bottom))}
  .site-footer + .floating-actions{margin:0}

  /* Tablet annotations */
  .business-intro .long-copy{display:block!important;column-count:2!important;column-width:auto!important;column-gap:24px;column-fill:balance;font-weight:400!important;line-height:1.68}
  .business-intro .long-copy p{break-inside:auto;margin:0 0 1.2em}
  .works-disaster-panel{background:#fff;color:#111}
  .works-disaster-photo{background-color:#e8e8e8;color:#777}
  .works-disaster-copy,.strength-list p,.philosophy-list p,.message-columns .long-copy,.about-match-table dd,.recruit-detail-table dd,.business-intro .long-copy,.about-copy-grid p,.recruit-text>p:not(.mini-heading){font-weight:400!important}
  .recruit-position-label{width:fit-content;max-width:100%;margin:0 auto;padding:17px 34px}
  .recruit-contact-cta a{background:var(--green)!important;color:#fff!important}
  .reference-contact-form button{background:var(--green)!important;color:#fff!important;border-color:var(--green)!important}
  .contact-phone-bar{display:grid;grid-template-columns:1fr 1fr;align-items:center}
  .contact-company-name{padding-right:28px}
  .contact-phone-link{border-left:1px solid #bbb;padding-left:28px}
  .works-stage .dark-panel{min-height:280px;padding-top:34px;padding-bottom:26px}
  .works-panel .section-cta-block-dark{margin-top:28px}
}


/* =========================================================
   MOBILE : 0-599px
   ========================================================= */
@media (max-width:599px){
  body{font-size:16px}
  body.home,body.page-recruit{padding-bottom:calc(72px + env(safe-area-inset-bottom))}

  /* Header */
  .site-header{height:var(--header-compact);padding:0 12px}
  .site-header-spacer{height:var(--header-compact)}
  .brand{width:min(78vw,315px);max-width:calc(100% - 58px)}
  .custom-logo{max-width:100%;max-height:54px}
  .desktop-nav,.header-actions{display:none}
  .menu-btn{display:block;margin-left:auto;width:50px;height:62px;flex:0 0 50px}
  .menu-line-1{top:17px}.menu-line-2{top:25px}.menu-line-3{top:33px}
  .menu-btn small{top:40px;font-size:9px}
  .menu-open .menu-line-1,.menu-open .menu-line-3{top:25px}
  .menu-panel-inner{width:min(82vw,390px);padding:92px 20px 34px}
  .mobile-menu-nav{font-size:16px}
  .mobile-menu-nav a{min-height:58px;padding:0 4px}
  .mobile-menu-actions{gap:10px;margin-top:28px}
  .mobile-menu-actions a{min-height:58px;padding:0 20px;font-size:16px}
  .mobile-menu-privacy{font-size:13px;margin-top:24px}

  /* Home hero */
  .hero{height:100svh;min-height:600px}
  .hero-copy{left:7%;right:5%;bottom:calc(72px + env(safe-area-inset-bottom) + 36px)}
  .hero-copy h1{font-size:60px;font-weight:900;line-height:1.14}
  .hero-sub{font-size:24px;font-weight:600;line-height:1.5;margin-top:18px}

  /* Home type */
  .mega-title{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:48px;font-weight:600!important;line-height:.94;letter-spacing:-.025em}
  .mini-heading{gap:12px;font-size:16px;margin-bottom:18px}
  .mini-heading>span{width:24px}
  .message-copy h3{font-size:32px;font-weight:700;line-height:1.4;margin-bottom:16px}
  .lead-text,.dark-panel p:not(.mini-heading),.about-copy-grid p,.recruit-text>p:not(.mini-heading){font-size:16px;font-weight:400;line-height:1.75}

  /* Message - clear breathing room before MESSAGE */
  .message-home{padding:56px 0 0}
  .message-layout{display:flex;flex-direction:column;min-height:0}
  .message-copy{display:contents}
  .message-title{order:1;margin:0 22px 28px;text-align:left}
  .message-photo{order:2;width:100%;height:280px;min-height:280px;margin:0;background-position:center}
  .message-copy-body{order:3;padding:34px 22px 0;display:block}
  .section-cta-block{margin-top:24px;gap:7px}
  .section-cta{min-width:0;width:auto;max-width:100%;padding:14px 22px;font-size:16px}
  .section-en{font-size:13px}

  /* Business / works */
  .business-home,.works-home{padding:30px 0 30px}
  .business-home>.mega-title,.works-home>.mega-title{padding:0 22px;margin:0 0 20px;text-align:left}
  .overlap-stage{min-height:520px}
  .business-photo,.works-photo{top:0;bottom:auto;height:300px}
  .business-photo{left:14%;right:0}
  .works-photo{left:0;right:14%}
  .dark-panel{width:88%;min-height:310px;padding:32px 24px 34px}
  .business-stage .dark-panel{left:0;top:190px}
  .works-stage .dark-panel{right:0;top:190px}
  .dark-panel p:not(.mini-heading){margin-bottom:20px}
  .section-cta-block-dark{margin-top:22px;gap:7px}
  .section-cta-block-dark .section-cta{font-size:16px}

  /* About */
  .about-home{padding:62px 0}
  .about-inner{width:auto;margin:0 22px;display:flex;flex-direction:column}
  .about-home .mega-title{margin-bottom:20px}
  .about-label{margin-bottom:18px}
  .about-images,.about-copy-grid{display:contents}
  .about-images .about-photo:nth-child(1){order:3}
  .about-copy-grid .about-copy-card:nth-child(1){order:4}
  .about-images .about-photo:nth-child(2){order:5}
  .about-copy-grid .about-copy-card:nth-child(2){order:6}
  .about-photo{height:220px}
  .about-copy-card{padding:20px 0 34px}
  .about-copy-grid h3{font-size:22px;font-weight:700;margin-bottom:10px}

  /* Recruit / contact */
  .recruit-inner{width:auto;margin:0 22px;grid-template-columns:1fr;gap:30px;padding:62px 0}
  .recruit-text h3{font-size:32px;font-weight:700;line-height:1.38;margin-bottom:20px}
  .recruit-link-block{margin-top:24px;gap:7px}
  .recruit-cta{padding:14px 22px;font-size:16px}
  .recruit-en{font-size:13px}
  .contact-strip{padding:38px 22px;grid-template-columns:1fr;gap:18px}
  .contact-strip>span{font-size:22px}
  .contact-strip div a{font-size:28px}
  .contact-arrow{padding:14px 20px;font-size:16px}

  /* Sub pages */
  .subpage-visual{height:160px}
  .subpage-titlebar{padding:16px 22px 0}
  .subpage-title-inner{width:100%}
  .subpage-breadcrumb{font-size:12px;gap:12px}
  .sub-section{padding:58px 22px}
  .sub-heading{margin-bottom:38px;column-gap:18px}
  .sub-heading h2{font-size:32px}
  .sub-heading h2::after{width:72px;margin-left:18px}
  .sub-heading span{font-size:14px;margin-top:2px}
  .dash-heading{font-size:22px;gap:14px;margin-bottom:28px}
  .dash-heading::before{width:28px}
  .long-copy,.strength-list p,.philosophy-list p,.message-columns p{font-size:16px;font-weight:400;line-height:1.75}
  .lead-large{font-size:34px;line-height:1.45;margin-bottom:46px}

  /* About - no vertical character collapse */
  .about-recruit-balance{padding-left:22px;padding-right:22px}
  .about-recruit-balance .recruit-detail-inner{width:100%;max-width:500px;margin:auto}
  .about-match-table{width:100%;max-width:500px}
  .about-match-table>div{grid-template-columns:100px minmax(0,1fr);min-height:70px}
  .about-match-table>div::after{width:100px}
  .about-match-table dt,.about-match-table dd{padding:15px 11px;font-size:16px;line-height:1.6}
  .about-match-table dd{font-weight:400}
  .history-match-table .history-month{display:block}
  .about-match-table dd{word-break:normal;overflow-wrap:anywhere}
  .about-address{word-break:keep-all;overflow-wrap:normal}
  .about-contact-line{display:block;margin-top:8px}
  .about-contact-line a,.about-contact-line span{display:block;white-space:nowrap;margin-top:4px}
  .access-grid{grid-template-columns:1fr;gap:26px}
  .map-placeholder{height:280px}
  .access-grid h3{font-size:22px}

  /* Philosophy */
  .message-columns{grid-template-columns:1fr;gap:36px}
  .message-columns h4{font-size:32px;font-weight:700;line-height:1.06;margin-bottom:34px}
  .philosophy-signature{gap:3px}
  .philosophy-company{font-size:18px}
  .philosophy-person{gap:12px;margin-top:0}
  .philosophy-role{font-size:18px}
  .philosophy-person strong{font-size:31px}
  .philosophy-list{gap:28px}
  .philosophy-list article{grid-template-columns:1fr;gap:20px;padding:20px}
  .philosophy-photo{height:220px}
  .philosophy-list h3{font-size:22px;line-height:1.08;margin-bottom:12px}

  /* Business */
  .business-gallery{grid-template-columns:1fr;gap:18px;margin-top:36px}
  .gallery-placeholder{height:230px}
  .strength-list{gap:28px}
  .strength-list article{grid-template-columns:1fr;gap:20px;padding:20px}
  .strength-photo{height:220px}
  .strength-list h3{font-size:22px;line-height:1.08;margin-bottom:12px}

  /* Recruit */
  .recruit-detail-section{padding:58px 20px}
  .recruit-detail-inner{width:100%}
  .recruit-detail-heading{padding-bottom:20px;margin-bottom:38px}
  .recruit-detail-heading h1{font-size:32px}
  .recruit-detail-heading span{font-size:14px}
  .recruit-jobs{gap:40px}
  .recruit-position-label{width:fit-content;max-width:100%;margin:0 auto;padding:16px 30px;font-size:18px}
  .recruit-detail-table>div{grid-template-columns:112px minmax(0,1fr);min-height:68px}
  .recruit-detail-table>div::after{width:112px}
  .recruit-detail-table dt,.recruit-detail-table dd{padding:15px 10px;font-size:16px;line-height:1.6}
  .recruit-detail-table dd{font-weight:400}
  .recruit-detail-table dd{overflow-wrap:anywhere}
  .recruit-contact-cta{margin-top:42px;padding:30px 18px 44px}
  .recruit-contact-cta a{padding:14px 22px;font-size:16px}

  /* Works */
  .works-list-panel{padding:58px 22px 72px}
  .works-page-heading{column-gap:18px;margin-bottom:38px}
  .works-page-heading h1{font-size:32px}
  .works-page-heading i{width:72px}
  .works-page-heading span{font-size:14px;margin-top:2px}
  .works-reference-grid{grid-template-columns:1fr;gap:34px}
  .work-reference-card h3{font-size:20px;margin-top:13px}
  .work-reference-card p{font-size:14px}
  .works-disaster-panel{padding:62px 0}
  .works-disaster-inner{width:auto;margin:0 22px}
  .works-dash-title{font-size:22px;gap:14px;margin-bottom:24px}
  .works-dash-title>span{width:28px}
  .works-disaster-copy{font-size:16px;font-weight:400;line-height:1.75}
  .works-disaster-sub{margin-top:44px}
  .works-disaster-gallery{grid-template-columns:1fr;gap:18px}

  /* Works single */
  .works-single-reference{padding:58px 0 72px}
  .works-single-inner{width:auto;margin:0 22px}
  .works-single-header{padding-bottom:20px;margin-bottom:30px}
  .works-single-header h1{font-size:28px;line-height:1.45;margin-bottom:10px}
  .works-single-meta{font-size:14px}
  .works-single-main-image{margin:0 0 18px}
  .works-single-subgrid{grid-template-columns:1fr;gap:18px;margin-bottom:30px}
  .works-single-prose{font-size:16px;line-height:1.95}
  .works-single-back{margin-top:38px}
  .works-single-back a{padding:13px 22px;font-size:16px}

  /* Sustainability */
  .sustainability-page{padding:58px 22px}
  .values-grid{grid-template-columns:1fr;gap:20px}
  .sustainability-item{grid-template-columns:1fr;padding:22px;gap:22px}
  .sustainability-copy h3{font-size:22px}
  .sustainability-copy p{font-size:16px;line-height:1.85}
  .sustainability-image-wrap{height:190px}

  /* Contact */
  .contact-page-section{padding:58px 22px 72px}
  .contact-page-inner{width:100%}
  .contact-title h1{font-size:32px;margin-bottom:18px}
  .contact-intro-copy{font-size:16px;line-height:1.8;margin-bottom:22px}
  .contact-phone-bar{display:block;padding:18px;margin-bottom:36px}
  .contact-company-name{display:block;font-size:22px;font-weight:700;margin-bottom:6px}
  .contact-phone-link{display:block;font-size:22px}
  .contact-form-row{grid-template-columns:1fr;gap:8px;padding:16px 0}
  .contact-form-row>label{font-size:16px}
  .contact-form-row input,.contact-form-row select,.contact-form-row textarea{font-size:16px}
  .contact-anti-sales,.privacy-check{font-size:14px;margin-top:20px}
  .contact-privacy-note,.contact-security-note{font-size:12px}
  .reference-contact-form button{width:100%;margin:26px auto 0;padding:16px;font-size:16px}

  /* Generic page */
  .page-hero{padding:46px 22px 34px}
  .page-hero>div{font-size:12px}
  .page-hero h1{font-size:32px;margin-top:16px}
  .page-content,.section{padding:52px 22px}
  .page-content .prose{font-size:16px}

  /* Footer */
  .site-footer{padding:52px 22px max(28px,env(safe-area-inset-bottom))}
  body.home .site-footer,
  body.page-recruit .site-footer{padding-bottom:calc(104px + env(safe-area-inset-bottom))}
  .footer-inner{width:100%;grid-template-columns:1fr;gap:30px}
  .footer-brand{font-size:24px;margin-bottom:18px}
  .footer-company p{font-size:16px;line-height:1.7}
  .footer-certifications{gap:16px}
  .footer-certification{width:112px;height:112px;padding:8px}
  .footer-inner nav{grid-template-columns:1fr 1fr;gap:16px 28px;font-size:16px}
  .footer-bottom{margin-top:42px;padding-top:18px;font-size:13px}

  /* Mobile annotations */
  .works-disaster-panel{background:#fff;color:#111}
  .works-disaster-photo{background-color:#e8e8e8;color:#777}
  .works-disaster-copy,.strength-list p,.philosophy-list p,.message-columns .long-copy,.about-match-table dd,.recruit-detail-table dd,.business-intro .long-copy,.about-copy-grid p,.recruit-text>p:not(.mini-heading){font-weight:400!important}
  .recruit-position-label{width:fit-content;max-width:100%;margin:0 auto;padding:16px 30px}
  .recruit-contact-cta a{background:var(--green)!important;color:#fff!important}
  .reference-contact-form button{background:var(--green)!important;color:#fff!important;border-color:var(--green)!important}
  .contact-security-note{margin-top:18px}

  /* Fixed bottom buttons */
  .floating-actions{position:fixed;z-index:1200;left:0;right:0;bottom:0;display:flex;width:100%;padding-bottom:env(safe-area-inset-bottom);background:#111;box-shadow:0 -4px 18px rgba(0,0,0,.14)}
  .floating-action{flex:1 1 50%;width:50%;min-height:72px;gap:12px;padding:8px 10px;font-size:16px}
  .floating-action svg{width:25px;height:25px}
  body.page-recruit .floating-action{width:100%;flex-basis:100%}
}

/* =========================================================
   INTERACTION / HOVER (NO WIDTH BREAKPOINT)
   ========================================================= */
@media (hover:hover) and (pointer:fine){
  .desktop-nav a:hover::after{right:0}
  .section-cta:hover,.recruit-cta:hover{transform:translateY(-2px);background:#111;color:#fff}
  .section-cta-block-dark .section-cta:hover{background:#fff;color:#111}
  .about-photo:hover .about-photo-media,.work-reference-card:hover .work-reference-thumb img{transform:scale(1.035)}
}


/* =========================================================
   TOUCH TABLET / iPAD ORIENTATION + SCROLL SAFETY
   - Keeps real tablets on the tablet layout even when landscape
     CSS viewport width exceeds 1024px.
   - Does not affect desktop devices because the class is added
     only on touch tablets in header.php.
   ========================================================= */
html.tablet-touch{width:100%;background:#fff}
html.tablet-touch body{width:100%;margin:0;background:#fff}
html.tablet-touch body.menu-open{overflow:hidden}

/* Header: tablet landscape must keep the hamburger layout. */
html.tablet-touch .site-header{height:var(--header-compact);padding:0 20px}
html.tablet-touch .site-header-spacer{height:var(--header-compact)}
html.tablet-touch .brand{width:min(45vw,330px);max-width:calc(100% - 64px)}
html.tablet-touch .custom-logo{max-width:100%;max-height:56px}
html.tablet-touch .desktop-nav,
html.tablet-touch .header-actions{display:none!important}
html.tablet-touch .menu-btn{display:block!important;margin-left:auto;width:50px;height:58px;flex:0 0 50px}
html.tablet-touch .menu-line-1{top:17px}
html.tablet-touch .menu-line-2{top:25px}
html.tablet-touch .menu-line-3{top:33px}
html.tablet-touch .menu-btn small{top:39px;font-size:9px}
html.tablet-touch .menu-panel-inner{width:min(62vw,430px);padding:90px 28px 36px}
html.tablet-touch .mobile-menu-nav{font-size:16px;font-weight:600}
html.tablet-touch .mobile-menu-nav a{min-height:60px;padding:0 4px}
html.tablet-touch .mobile-menu-actions{gap:10px;margin-top:28px}
html.tablet-touch .mobile-menu-actions a{min-height:60px;padding:0 20px;font-size:16px;font-weight:600}

/* TOP hero: same tablet spec in portrait and landscape. */
html.tablet-touch .hero{height:100svh;min-height:620px}
html.tablet-touch .hero-copy{left:6%;right:auto;bottom:8%;max-width:68%}
html.tablet-touch .hero-copy h1{font-size:80px!important;font-weight:900!important;line-height:1.02!important}
html.tablet-touch .hero-sub{font-size:38px!important;font-weight:600!important;line-height:1.30!important;margin-top:16px!important}

/* TOP sections: prevent PC proportions from taking over in landscape. */
html.tablet-touch .mega-title{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif!important;font-size:64px!important;font-weight:700!important;line-height:.94;letter-spacing:-.02em}
html.tablet-touch .message-home{padding:56px 0}
html.tablet-touch .message-layout{grid-template-columns:1fr 1fr;min-height:450px}
html.tablet-touch .message-photo{min-height:450px}
html.tablet-touch .message-copy{padding:0 6%;justify-content:flex-end}
html.tablet-touch .message-copy h3{font-size:36px!important;line-height:1.38!important;margin-bottom:16px}
html.tablet-touch .business-home,html.tablet-touch .works-home{padding:58px 0 72px}
html.tablet-touch .business-home>.mega-title{padding-right:4%;margin-bottom:24px}
html.tablet-touch .works-home>.mega-title{padding-left:4%;margin-bottom:24px}
html.tablet-touch .overlap-stage{min-height:440px}
html.tablet-touch .business-photo{left:12%;right:0}
html.tablet-touch .works-photo{left:0;right:12%}
html.tablet-touch .dark-panel{width:54%;min-height:380px;padding:48px 34px 34px}
html.tablet-touch .business-stage .dark-panel{left:4%;top:28px}
html.tablet-touch .works-stage .dark-panel{right:4%;top:28px;min-height:280px;padding-top:34px;padding-bottom:26px}
html.tablet-touch .about-home{padding:72px 0}
html.tablet-touch .about-inner{width:90%}
html.tablet-touch .about-photo{height:260px}
html.tablet-touch .about-copy-grid{gap:44px;padding-top:30px}
html.tablet-touch .recruit-inner{width:90%;grid-template-columns:1fr 1fr;gap:46px;padding:70px 0}
html.tablet-touch .recruit-text h3{font-size:36px!important;line-height:1.4!important}
html.tablet-touch .contact-strip{padding:40px 5%;grid-template-columns:1fr 1.2fr 220px;gap:24px}

/* Sub pages: preserve tablet proportions in landscape. */
html.tablet-touch .subpage-visual{height:240px}
html.tablet-touch .subpage-titlebar{padding:22px 0 0}
html.tablet-touch .sub-section{padding:68px 6%}
html.tablet-touch .sub-heading h2{font-size:36px!important}
html.tablet-touch .dash-heading{font-size:25px!important}
html.tablet-touch .long-copy,html.tablet-touch .message-columns p{font-size:17px!important;line-height:1.68!important}
html.tablet-touch .message-columns{grid-template-columns:1fr;gap:46px}
html.tablet-touch .message-columns h4{font-size:36px!important;line-height:1!important;margin-bottom:36px!important}
html.tablet-touch .philosophy-list{gap:34px}
html.tablet-touch .philosophy-list article{grid-template-columns:280px 1fr;gap:34px;padding:26px}
html.tablet-touch .philosophy-list h3{font-size:25px!important;line-height:1.04!important;margin-bottom:15px!important}
html.tablet-touch .strength-list article{grid-template-columns:280px 1fr;gap:34px;padding:26px}
html.tablet-touch .strength-list h3{font-size:25px!important;line-height:1.04!important;margin-bottom:15px!important}
html.tablet-touch .recruit-detail-inner{width:760px;max-width:100%}
html.tablet-touch .contact-page-inner{width:800px;max-width:100%}

/* Footer: no synthetic height, no bottom margin, no trailing spacer. */
html.tablet-touch .site-footer{padding:56px 5% max(28px,env(safe-area-inset-bottom))}
html.tablet-touch .footer-inner{width:100%;grid-template-columns:1fr auto;gap:40px}
html.tablet-touch .footer-inner nav{grid-column:1/-1;grid-template-columns:repeat(3,1fr);gap:12px 26px;font-size:15px;margin-top:12px}
html.tablet-touch .footer-bottom{margin-top:46px;padding-top:18px;font-size:12px}
html.tablet-touch .floating-actions{display:none!important}

/* Landscape-specific tightening. */
@media (orientation:landscape){
  html.tablet-touch .hero{min-height:560px}
  html.tablet-touch .hero-copy{bottom:7%;max-width:62%}
  html.tablet-touch .hero-copy h1{font-size:72px!important}
  html.tablet-touch .hero-sub{font-size:30px!important;line-height:1.35!important;margin-top:14px!important}
  html.tablet-touch .message-copy h3{font-size:32px!important}
  html.tablet-touch .mega-title{font-size:58px!important}
  html.tablet-touch .message-layout{min-height:400px}
  html.tablet-touch .message-photo{min-height:400px}
  html.tablet-touch .business-home,html.tablet-touch .works-home{padding-top:48px;padding-bottom:60px}
  html.tablet-touch .about-home{padding:60px 0}
  html.tablet-touch .recruit-inner{padding:58px 0}
}


/* =========================================================
   v5.4 CONTACT FINAL
   PC / tablet content width 800px, centered submit area,
   compact spacing below button, dedicated sent screen.
   ========================================================= */
@media (min-width:600px){
  .contact-page-inner{width:800px;max-width:calc(100% - 64px)}
}
.contact-submit-area{display:flex;flex-direction:column;align-items:center;margin-top:30px}
.contact-submit-area .contact-security-note{text-align:center;margin:10px 0 0}
.contact-submit-area button{margin:0 auto}
.contact-complete{width:800px;max-width:100%;margin:0 auto;text-align:left;padding:54px 0 76px}
.contact-complete h1{margin:0 0 24px;font-size:32px;line-height:1.5;font-weight:800}
.contact-complete p{margin:0;font-size:18px;line-height:2}
.contact-complete-home{display:inline-flex;align-items:center;justify-content:space-between;gap:48px;min-width:230px;margin-top:44px;padding:15px 20px;border:1px solid #111;border-radius:999px;font-weight:700}
@media (min-width:1025px){
  .contact-page-section{padding-bottom:72px}
  .contact-submit-area{margin-top:28px}
}
@media (min-width:600px) and (max-width:1024px){
  .contact-page-section{padding-bottom:64px}
  .contact-submit-area{margin-top:26px}
  .contact-complete{padding:46px 0 64px}
  .contact-complete h1{font-size:30px}
}
@media (max-width:599px){
  .contact-submit-area{margin-top:24px}
  .contact-submit-area .contact-security-note{margin-top:10px}
  .contact-complete{width:100%;padding:30px 0 46px}
  .contact-complete h1{font-size:26px;line-height:1.5;margin-bottom:18px}
  .contact-complete p{font-size:16px;line-height:1.9}
  .contact-complete-home{width:100%;margin-top:34px}
}

/* =========================================================
   v5.7 FINAL OVERRIDES
   - Lower-page hero starts at viewport top before header enters
   - Hero height: PC 500 / Tablet 450 / Mobile 400
   - Business strength heading spacing + separator
   - Tablet uses native document scrolling only
   ========================================================= */

/* Business strength headings */
.strength-list h3{
  line-height:1.35!important;
  margin-bottom:22px!important;
}
.strength-list h3::after{
  content:"";
  display:block;
  width:100%;
  height:1px;
  background:#167b46;
  margin-top:18px;
}
.strength-list h3 + p{
  margin-top:0!important;
}

/* PC: 1025px+ */
@media screen and (min-width:1025px){
  body:not(.home) .site-header-spacer{
    display:none!important;
    height:0!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
  }
  body:not(.home) .subpage-visual{
    height:500px!important;
    min-height:500px!important;
    margin-top:0!important;
  }
  .strength-list h3{
    font-size:27px!important;
    line-height:1.35!important;
  }
}

/* Mobile: 0-599px */
@media screen and (max-width:599px){
  body:not(.home) .site-header-spacer{
    display:none!important;
    height:0!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
  }
  body:not(.home) .subpage-visual{
    height:400px!important;
    min-height:400px!important;
    margin-top:0!important;
  }
  body:not(.home) .subpage-visual img{
    width:100%!important;
    height:100%!important;
    object-fit:cover!important;
  }
}


/* ==================================================
   v5.8 — Business representative message anchor
   Keep the section heading visible below the fixed header.
================================================== */
#message{
  scroll-margin-top:120px;
}
@media screen and (max-width:1024px){
  #message{
    scroll-margin-top:90px;
  }
}

/* =========================================================
   v6.1 TOP CTA hover: left-to-right color inversion
   ========================================================= */
.home .section-cta,
.home .recruit-cta{
  position:relative;
  overflow:hidden;
  isolation:isolate;
  background:transparent;
  transition:color .32s ease,transform .25s ease,border-color .32s ease;
}
.home .section-cta::before,
.home .recruit-cta::before{
  content:"";
  position:absolute;
  inset:-1px;
  z-index:0;
  background:#111;
  transform:scaleX(0);
  transform-origin:left center;
  transition:transform .38s var(--ease);
  pointer-events:none;
}
.home .section-cta > *,
.home .recruit-cta > *{
  position:relative;
  z-index:1;
}
.home .section-cta-block-dark .section-cta::before{
  background:#fff;
}

@media (hover:hover) and (pointer:fine){
  .home .section-cta:hover,
  .home .recruit-cta:hover{
    transform:translateY(-2px);
    background:transparent;
    color:#fff;
  }
  .home .section-cta:hover::before,
  .home .recruit-cta:hover::before{
    transform:scaleX(1);
  }
  .home .section-cta-block-dark .section-cta:hover{
    background:transparent;
    color:#111;
  }
}

/* =========================================================
   v6.2 CONTACT CTA hover: left-to-right inversion
   TOP CONTACT "お問い合わせ" button
   ========================================================= */
.home .contact-arrow{
  position:relative;
  overflow:hidden;
  isolation:isolate;
  background:transparent;
  color:#fff;
  transition:color .32s ease,transform .25s ease,border-color .32s ease;
}
.home .contact-arrow::before{
  content:"";
  position:absolute;
  inset:-1px;
  z-index:0;
  background:#fff;
  transform:scaleX(0);
  transform-origin:left center;
  transition:transform .38s var(--ease);
  pointer-events:none;
}
.home .contact-arrow > *{
  position:relative;
  z-index:1;
}
@media (hover:hover) and (pointer:fine){
  .home .contact-arrow:hover{
    transform:translateY(-2px);
    background:transparent;
    color:var(--green);
    border-color:#fff;
  }
  .home .contact-arrow:hover::before{
    transform:scaleX(1);
  }
}

/* =========================================================
   v6.7 LOWER-PAGE REVEAL — SINGLE CLASS / SINGLE ENGINE
   ---------------------------------------------------------
   Every lower-page element that should animate carries .reveal in the
   template. CSS provides the hidden state before first paint and JS only
   adds .is-revealed once. This removes selector duplication, device-
   specific engines and the iOS reduced-motion override that was preventing
   the requested animations from appearing on the recorded device.
   ========================================================= */
html.nakai-js body:not(.home) .reveal{
  opacity:0;
  transform:translate3d(0,32px,0);
  transition:opacity .78s cubic-bezier(.22,.61,.36,1),
             transform .88s cubic-bezier(.22,.61,.36,1);
  transition-delay:var(--nakai-delay,0ms);
}
html.nakai-js body:not(.home) .reveal.is-revealed{
  opacity:1;
  transform:translate3d(0,0,0);
}

@media screen and (max-width:1024px){
  html.nakai-js body:not(.home) .reveal{
    transform:translate3d(0,26px,0);
    transition-duration:.72s,.82s;
  }
  html.nakai-js body:not(.home) .reveal.is-revealed{
    transform:translate3d(0,0,0);
  }
}

/* =========================================================
   v6.8 PAGE TRANSITION — remove the hard "snap" on navigation
   ========================================================= */
.page-transition-cover{
  position:fixed;
  z-index:2147483000;
  inset:0;
  background:#fff;
  pointer-events:none;
  opacity:0;
  visibility:hidden;
}

/* JS pages begin fully covered before the first visible paint. */
html.nakai-js .page-transition-cover{
  opacity:1;
  visibility:visible;
  transition:opacity .28s cubic-bezier(.22,.61,.36,1), visibility 0s linear .28s;
}

/* Reveal the new document smoothly. */
html.nakai-js.page-ready .page-transition-cover{
  opacity:0;
  visibility:hidden;
}

/* On an internal link click, cover the old page before navigation. */
html.nakai-js.page-leaving .page-transition-cover,
html.nakai-js.page-ready.page-leaving .page-transition-cover{
  opacity:1;
  visibility:visible;
  transition:opacity .16s ease, visibility 0s linear 0s;
}


/* =========================================================
   v7.1 — PHONE / TABLET DOCUMENT END FIX
   Keep browser document as the only scroll owner.
   Never create or paint a pseudo-element below the footer.
   ========================================================= */
@media screen and (max-width:1024px){
  html,body{width:100%;margin:0;overflow-x:hidden;background:#fff}
  html{min-height:100%;overscroll-behavior-y:none}
  body{min-height:100%}
  body.menu-open{overflow:hidden!important}
  #main{height:auto;min-height:0}
  .site-footer{position:relative;margin:0;overflow:hidden}
}

/* Tablet hero / header relationship */
@media screen and (min-width:600px) and (max-width:1024px){
  body:not(.home) .site-header-spacer{display:none!important;height:0!important;min-height:0!important;margin:0!important;padding:0!important}
  body:not(.home) .subpage-visual{height:450px!important;min-height:450px!important;margin-top:0!important}
  body:not(.home) .subpage-visual img{width:100%!important;height:100%!important;object-fit:cover!important}
}
html.tablet-touch body:not(.home) .site-header-spacer{display:none!important;height:0!important;min-height:0!important;margin:0!important;padding:0!important}
html.tablet-touch body:not(.home) .subpage-visual{height:450px!important;min-height:450px!important;margin-top:0!important}
html.tablet-touch body:not(.home) .subpage-visual img{width:100%!important;height:100%!important;object-fit:cover!important}
