@charset "UTF-8";
/* ==========================================================
   株式会社エスジー (sgyk.jp) 共通スタイル
   HTML と CSS だけで動きます（JavaScript は使いません）
   目次: 1.基本 2.ヘッダー/メニュー 3.ヒーロー 4.共通パーツ
         5.ABOUT 6.SOLUTION 7.WORKS 8.リスト/タブ 9.CONTACT
         10.ACCESS/フッター 11.下層ページ 12.動き 13.スマホ
   ========================================================== */

/* ---------- 1. 基本 ---------- */
:root {
  --bg: #e9e9e9;
  --ink: #2b2b2b;
  --ink-soft: #6f6f6f;
  --line: #cfcfcf;
  --dark: #262626;
  --white: #fff;
  --accent: #b3955a;          /* ロゴのゴールド */
  --en: "Roboto", "Helvetica Neue", Arial, sans-serif;
  --jp: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --script: "Mrs Saint Delafield", "Snell Roundhand", cursive;
  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--en), var(--jp);
  font-size: 15px;
  line-height: 2;
  letter-spacing: .04em;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, dl, dd { margin: 0; padding: 0; }
ul { list-style: none; }
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(72px, 11vw, 150px) 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- 2. ヘッダー / メニュー ---------- */
.header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 110px 22px var(--gutter);
  color: var(--white);
}
.logo { display: flex; align-items: center; gap: 12px; font-family: var(--en); font-size: 21px; font-weight: 400; letter-spacing: .14em; line-height: 1; white-space: nowrap; }
.logo img { width: 48px; height: auto; }
.logo .logo-name { width: auto; height: 17px; }   /* 社名の文字画像（背景透過 PNG）。ロゴマークの上下中央にそろえる */
.gnav { display: flex; gap: clamp(16px, 2.4vw, 34px); font-size: 14px; font-weight: 500; letter-spacing: .08em; }
.gnav a { position: relative; padding: 6px 0; }
.gnav a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.gnav a:hover::after, .gnav a[aria-current]::after { transform: scaleX(1); transform-origin: left; }

/* 丸いメニューボタン（チェックボックスで開閉） */
.nav-toggle { position: fixed; top: 0; right: 0; opacity: 0; pointer-events: none; }
.nav-btn {
  position: fixed; top: 16px; right: 22px; z-index: 40;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--white); cursor: pointer;
  box-shadow: 0 2px 14px rgba(0,0,0,.12);
  transition: transform .3s;
}
.nav-btn:hover { transform: scale(1.08); }
.nav-btn span { position: absolute; left: 17px; width: 24px; height: 1px; background: var(--ink); transition: transform .4s, top .4s; }
.nav-btn span:nth-child(1) { top: 26px; }
.nav-btn span:nth-child(2) { top: 32px; }
.nav-toggle:checked ~ .nav-btn span:nth-child(1) { top: 29px; transform: rotate(45deg); }
.nav-toggle:checked ~ .nav-btn span:nth-child(2) { top: 29px; transform: rotate(-45deg); }
.nav-toggle:focus-visible ~ .nav-btn { outline: 2px solid var(--accent); outline-offset: 3px; }

.drawer {
  position: fixed; inset: 0; z-index: 30;
  background: rgba(30,30,30,.97); color: var(--white);
  display: flex; flex-direction: column; justify-content: center;
  padding: 90px var(--gutter) 40px;
  clip-path: circle(0 at calc(100% - 51px) 45px);
  visibility: hidden;
  transition: clip-path .7s cubic-bezier(.7,0,.2,1), visibility 0s .7s;
  overflow-y: auto;
}
.nav-toggle:checked ~ .drawer { clip-path: circle(150vmax at calc(100% - 51px) 45px); visibility: visible; transition: clip-path .7s cubic-bezier(.7,0,.2,1), visibility 0s; }
.drawer ul { max-width: var(--wrap); margin: 0 auto; width: 100%; }
.drawer li { border-bottom: 1px solid rgba(255,255,255,.14); opacity: 0; transform: translateY(24px); transition: opacity .5s, transform .5s; }
.nav-toggle:checked ~ .drawer li { opacity: 1; transform: none; }
.nav-toggle:checked ~ .drawer li:nth-child(1) { transition-delay: .25s; }
.nav-toggle:checked ~ .drawer li:nth-child(2) { transition-delay: .32s; }
.nav-toggle:checked ~ .drawer li:nth-child(3) { transition-delay: .39s; }
.nav-toggle:checked ~ .drawer li:nth-child(4) { transition-delay: .46s; }
.nav-toggle:checked ~ .drawer li:nth-child(5) { transition-delay: .53s; }
.drawer a { display: flex; align-items: baseline; gap: 20px; padding: 18px 0; font-size: clamp(26px, 5vw, 44px); font-weight: 300; letter-spacing: .06em; line-height: 1.3; transition: color .3s, padding .3s; }
.drawer a small { font-family: var(--jp); font-size: 12px; opacity: .6; letter-spacing: .1em; white-space: nowrap; }
.drawer a:hover { color: var(--accent); padding-left: 14px; }
.drawer-info { max-width: var(--wrap); margin: 34px auto 0; width: 100%; font-size: 13px; opacity: .75; line-height: 1.9; }

/* ---------- 3. ヒーロー ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 520px; background: #111 url(../images/hero-1.jpg) center / cover no-repeat; color: var(--white); overflow: hidden; }
.hero-slides, .hero-slides li { position: absolute; inset: 0; }
.hero-slides li { opacity: 0; animation: heroFade 28s linear infinite; }
.hero-slides li:nth-child(2) { animation-delay: 7s; }
.hero-slides li:nth-child(3) { animation-delay: 14s; }
.hero-slides li:nth-child(4) { animation-delay: 21s; }
.hero-slides img { width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,.38), rgba(0,0,0,.18) 40%, rgba(0,0,0,.5)); }
@keyframes heroFade {
  0%   { opacity: 0; transform: scale(1); }
  5%   { opacity: 1; }
  25%  { opacity: 1; }
  31%  { opacity: 0; transform: scale(1.12); }
  100% { opacity: 0; transform: scale(1.12); }
}
.hero-copy { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 var(--gutter); }
.hero-title { font-size: clamp(38px, 8.6vw, 112px); font-weight: 300; letter-spacing: -.01em; line-height: 1.1; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 .28em; }
.hero-title span { display: inline-block; overflow: hidden; }
.hero-title i { display: inline-block; font-style: normal; transform: translateY(110%); animation: riseUp 1.1s cubic-bezier(.2,.8,.2,1) forwards; }
.hero-title span:nth-child(2) i { animation-delay: .18s; font-size: .72em; }
.hero-title span:nth-child(3) i { animation-delay: .36s; }
.outline { color: transparent; -webkit-text-stroke: 1.5px var(--white); font-weight: 500; }
.hero-lead { margin-top: 26px; font-family: var(--jp); font-size: clamp(12px, 1.5vw, 15px); letter-spacing: .2em; opacity: 0; animation: fadeIn 1.4s .9s forwards; }
@keyframes riseUp { to { transform: none; } }
@keyframes fadeIn { to { opacity: 1; } }
.scroll-down { position: absolute; left: 26px; bottom: 0; z-index: 2; font-size: 11px; font-weight: 500; letter-spacing: .14em; writing-mode: vertical-rl; padding-bottom: 86px; }
.scroll-down::before { content: ""; position: absolute; left: 50%; bottom: 0; width: 1px; height: 70px; background: rgba(255,255,255,.45); }
.scroll-down::after { content: ""; position: absolute; left: 50%; bottom: 62px; width: 7px; height: 7px; margin-left: -3px; border-radius: 50%; background: var(--white); animation: scrollDot 2.2s cubic-bezier(.6,0,.3,1) infinite; }
@keyframes scrollDot { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(62px); opacity: 0; } }

/* ---------- 4. 共通パーツ ---------- */
.eyebrow { display: block; font-size: 13px; font-weight: 700; letter-spacing: .18em; margin-bottom: 26px; }
.eyebrow::before { content: ""; display: inline-block; width: 28px; height: 1px; background: var(--accent); vertical-align: middle; margin-right: 14px; }
.h-jp { font-family: var(--jp); font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; line-height: 1.7; letter-spacing: .08em; }
.h-en { font-size: clamp(40px, 6.4vw, 76px); font-weight: 300; line-height: 1.1; letter-spacing: 0; }
.h-en b { font-weight: 800; }
.text-jp { font-family: var(--jp); font-weight: 500; }
.text-en { font-size: 12.5px; line-height: 1.9; color: var(--ink-soft); letter-spacing: .02em; }

.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 250px; height: 56px; padding: 0 56px; border: 1px solid currentColor; font-size: 14px; font-weight: 700; letter-spacing: .1em; overflow: hidden; isolation: isolate; transition: color .45s; }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ink); transform: scaleX(0); transform-origin: right; transition: transform .45s cubic-bezier(.7,0,.2,1); }
.btn::after, .link-more::after { content: ""; position: absolute; right: 22px; top: 50%; width: 9px; height: 9px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: translateY(-50%) rotate(45deg); transition: right .3s; }
.btn:hover { color: var(--white); }
.btn:hover::before { transform: scaleX(1); transform-origin: left; }
.btn:hover::after, .link-more:hover::after { right: 14px; }
.btn--light::before { background: var(--white); }
.btn--light:hover { color: var(--ink); }
.link-more { position: relative; display: inline-block; min-width: 150px; padding: 12px 40px 12px 0; border-bottom: 1px solid currentColor; font-size: 14px; font-weight: 700; letter-spacing: .1em; }
.link-more::after { right: 6px; }

/* ---------- 5. ABOUT ---------- */
.about { position: relative; }
.about-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 90px); align-items: center; }
.collage { position: relative; aspect-ratio: 1 / .95; }
.collage img { position: absolute; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: filter .8s; }
.collage:hover img { filter: grayscale(0); }
.collage img:nth-child(1) { left: 0; top: 8%; width: 34%; height: 74%; }
.collage img:nth-child(2) { left: 34%; top: 0; width: 34%; height: 46%; }
.collage img:nth-child(3) { left: 34%; top: 46%; width: 38%; height: 48%; }
.collage img:nth-child(4) { left: 68%; top: 12%; width: 32%; height: 46%; }
.script { position: absolute; z-index: 2; left: 46%; bottom: 4%; font-family: var(--script); font-size: clamp(90px, 15vw, 210px); line-height: 1; color: var(--white); white-space: nowrap; pointer-events: none; transform: rotate(-9deg); text-shadow: 0 0 1px rgba(0,0,0,.08); }
.about-body { position: relative; z-index: 3; }
.about-body .text-jp { margin: 30px 0 22px; }
.about-body .btn { margin-top: 40px; }

/* ---------- 6. SOLUTION ---------- */
.solution { display: grid; grid-template-columns: 1fr 1fr; color: var(--white); }
.sol { position: relative; min-height: 620px; padding: clamp(60px, 8vw, 110px) clamp(24px, 6vw, 90px); display: flex; flex-direction: column; justify-content: center; overflow: hidden; background: var(--dark); isolation: isolate; }
.sol:nth-child(2) { margin-top: 70px; margin-bottom: -70px; }
.sol > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 1.6s cubic-bezier(.2,.7,.2,1); }
.sol::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(28,28,28,.8); transition: background .6s; }
.sol:hover > img { transform: scale(1.08); }
.sol:hover::before { background: rgba(28,28,28,.66); }
.sol-num { font-size: clamp(46px, 6vw, 78px); font-weight: 500; line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.85); margin-bottom: 26px; }
.sol-en { color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: .06em; }
.sol-title { position: relative; font-family: var(--jp); font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; letter-spacing: .08em; line-height: 1.6; margin-bottom: 26px; }
.sol-title::before { content: ""; position: absolute; left: -14px; top: 2px; z-index: -1; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); }
.sol .text-jp { font-size: 14.5px; }
.sol .text-en { color: rgba(255,255,255,.72); margin: 14px 0 36px; max-width: 30em; }
.sol-list { font-family: var(--jp); font-size: 13.5px; margin: 14px 0 34px; }
.sol-list li { padding-left: 1.2em; position: relative; }
.sol-list li::before { content: ""; position: absolute; left: 0; top: 1em; width: 6px; height: 1px; background: var(--accent); }
.solution + .section { padding-top: clamp(140px, 16vw, 220px); }

/* ---------- 7. WORKS ---------- */
.works-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: clamp(40px, 6vw, 70px); }
.works-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(50px, 7vw, 90px) clamp(28px, 5vw, 64px); }
.work { position: relative; padding-left: 26px; border-left: 1px solid var(--line); }
.work::before { content: ""; position: absolute; left: -1px; top: 0; width: 1px; height: 96px; background: var(--accent); }
.work-meta { position: relative; min-height: 96px; padding-bottom: 22px; font-size: 13px; line-height: 1.7; }
.work-loc { color: var(--ink-soft); text-transform: uppercase; letter-spacing: .1em; font-size: 12px; }
.work-name { font-size: 18px; font-weight: 500; letter-spacing: .04em; line-height: 1.5; padding-right: 5.2em; }
.work-cat { font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; }
.work-date { position: absolute; right: 0; top: 14px; font-size: clamp(30px, 3.6vw, 46px); font-weight: 100; line-height: 1; color: #b9b9b9; letter-spacing: 0; }
.work-img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--dark); }
.work-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.7,.2,1), filter .6s; }
.work:hover .work-img img { transform: scale(1.07); filter: brightness(1.06); }
.work-img--none { display: flex; align-items: center; justify-content: center; padding: 20px; text-align: center; color: rgba(255,255,255,.9); font-size: clamp(20px, 2.6vw, 30px); font-weight: 100; letter-spacing: .12em; line-height: 1.4; background: linear-gradient(135deg, #3a3a3a, #1f1f1f); }
.work-note { margin-top: 14px; font-size: 12.5px; line-height: 1.8; color: var(--ink-soft); }
.works-more { text-align: center; margin-top: clamp(50px, 7vw, 90px); }

/* ---------- 8. リスト / タブ（HOUSING WORKS） ---------- */
.list-head { position: relative; text-align: center; margin-bottom: 50px; }
.list-head .h-en { font-size: clamp(34px, 5vw, 56px); font-weight: 800; }
.list-head .link-more { position: absolute; right: 0; top: 50%; transform: translateY(-50%); text-align: left; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--ink); margin-bottom: 30px; }
.tabs label { height: 58px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; letter-spacing: .1em; cursor: pointer; transition: background .3s, color .3s; }
.tabs label + label { border-left: 1px solid var(--ink); }
.tabs label:hover { background: rgba(0,0,0,.06); }
.tab-radio { position: absolute; opacity: 0; pointer-events: none; }
#tab-all:checked ~ .tabs label[for="tab-all"],
#tab-rc:checked ~ .tabs label[for="tab-rc"],
#tab-wood:checked ~ .tabs label[for="tab-wood"] { background: var(--ink); color: var(--white); }
#tab-all:focus-visible ~ .tabs label[for="tab-all"],
#tab-rc:focus-visible ~ .tabs label[for="tab-rc"],
#tab-wood:focus-visible ~ .tabs label[for="tab-wood"] { outline: 2px solid var(--accent); outline-offset: 2px; }
#tab-rc:checked ~ .rows li:not([data-type="rc"]),
#tab-wood:checked ~ .rows li:not([data-type="wood"]) { display: none; }
.rows li { display: flex; align-items: center; gap: 22px; padding: 30px 0; border-bottom: 1px solid var(--line); transition: padding .3s, background .3s; animation: rowIn .5s both; }
.rows li:hover { padding-left: 12px; background: rgba(255,255,255,.35); }
@keyframes rowIn { from { opacity: 0; transform: translateY(10px); } }
.rows time { font-weight: 300; color: var(--ink-soft); min-width: 5em; }
.tag { min-width: 120px; padding: 0 10px; background: var(--ink); color: var(--white); font-family: var(--jp); font-size: 11.5px; font-weight: 700; line-height: 2; text-align: center; }
.rows strong { font-family: var(--jp); font-weight: 700; font-size: 15px; }
/* 写真つきの行（詳細ページへのリンク） */
.rows li a { flex: 1; display: flex; align-items: center; gap: 22px; }
.rows img { width: 132px; aspect-ratio: 3 / 2; object-fit: cover; }
.rows li:has(a) { padding: 18px 0; }
.rows li:has(a):hover { padding-left: 12px; }
.row-view { margin-left: auto; padding-right: 12px; font-size: 11.5px; font-weight: 700; letter-spacing: .16em; color: var(--ink-soft); white-space: nowrap; transition: color .3s; }
.rows li a:hover .row-view { color: var(--accent); }

/* ---------- 9. CONTACT ---------- */
.contact { background: var(--dark); color: var(--white); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; }
.contact-box { padding: clamp(60px, 8vw, 110px) clamp(20px, 5vw, 70px); text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.contact-box + .contact-box { border-left: 1px solid rgba(255,255,255,.16); }
.contact-box .h-en { font-size: clamp(32px, 4.4vw, 52px); margin-bottom: 18px; }
.contact-box p { font-family: var(--jp); font-size: 14px; margin-bottom: 30px; }
.tel { font-size: clamp(30px, 4.4vw, 50px); font-weight: 300; line-height: 1.2; letter-spacing: .04em; }
.tel small { font-size: .42em; font-weight: 500; margin-right: .5em; letter-spacing: .14em; }
.fax { font-size: 15px; opacity: .75; margin-top: 6px; letter-spacing: .1em; }
.mail-link { margin-top: 18px; font-size: 15px; border-bottom: 1px solid rgba(255,255,255,.4); transition: color .3s, border-color .3s; }
.mail-link:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- 10. ACCESS / フッター ---------- */
.access-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(28px, 5vw, 70px); align-items: stretch; }
.access-info address { font-style: normal; font-family: var(--jp); margin: 26px 0; }
.access-info img { width: 100%; max-width: 280px; aspect-ratio: 3 / 4; object-fit: cover; object-position: center; filter: grayscale(1); margin-top: 26px; }
.map { min-height: 380px; background: #ddd; }
.map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; filter: grayscale(1); transition: filter .6s; }
.map:hover iframe { filter: none; }
.footer { background: #1c1c1c; color: rgba(255,255,255,.8); padding: 56px 0 30px; font-size: 13px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer .logo { color: var(--white); margin-bottom: 18px; }
.footer address { font-style: normal; font-family: var(--jp); line-height: 1.9; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 10px 30px; align-content: flex-start; font-weight: 500; letter-spacing: .1em; }
.footer-nav a:hover, .footer address a:hover { color: var(--accent); }
.copyright { display: block; padding-top: 26px; font-size: 11.5px; letter-spacing: .1em; opacity: .6; }

/* ---------- 11. 下層ページ ---------- */
.page-hero { position: relative; height: 56vh; min-height: 340px; background: #111; color: var(--white); overflow: hidden; display: flex; align-items: flex-end; }
.page-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: slowZoom 14s ease-out both; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,.4), rgba(0,0,0,.55)); }
@keyframes slowZoom { from { transform: scale(1.14); } }
.page-hero .wrap { position: relative; z-index: 2; padding-bottom: clamp(36px, 6vw, 70px); }
.page-title { font-size: clamp(44px, 9vw, 104px); font-weight: 300; line-height: 1.05; overflow: hidden; }
.page-title i { display: inline-block; font-style: normal; transform: translateY(110%); animation: riseUp 1.1s .1s cubic-bezier(.2,.8,.2,1) forwards; }
.page-sub { font-family: var(--jp); font-size: 13px; letter-spacing: .24em; margin-top: 8px; opacity: 0; animation: fadeIn 1.2s .7s forwards; }
.crumbs { font-size: 12px; letter-spacing: .1em; color: var(--ink-soft); padding-top: 22px; }
.crumbs a:hover { color: var(--accent); }

.profile { border-top: 1px solid var(--ink); }
.profile > div { display: grid; grid-template-columns: 200px 1fr; gap: 20px; padding: 26px 0; border-bottom: 1px solid var(--line); font-family: var(--jp); }
.profile dt { font-weight: 700; }
.two-col { display: grid; grid-template-columns: 300px 1fr; gap: clamp(28px, 6vw, 90px); }
.greeting p { font-family: var(--jp); font-weight: 500; margin-bottom: 1.6em; }
.greeting .sign { text-align: right; margin-top: 40px; }
.lead-big { font-family: var(--jp); font-size: clamp(18px, 2.2vw, 24px); font-weight: 700; line-height: 2; text-align: center; }
.anchor-nav { display: flex; flex-wrap: wrap; gap: 14px 40px; margin-top: 30px; }

/* ---------- 12. 動き（スクロールで現れる） ----------
   対応ブラウザだけで動き、非対応の場合は最初から表示されます */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal { animation: revealUp linear both; animation-timeline: view(); animation-range: entry 0% entry 38%; }
    .reveal-left { animation: revealLeft linear both; animation-timeline: view(); animation-range: entry 0% entry 45%; }
    .reveal-img { animation: revealClip linear both; animation-timeline: view(); animation-range: entry 5% entry 55%; }
    .script { animation: scriptDrift linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
  }
}
@keyframes revealUp { from { opacity: 0; transform: translateY(60px); } }
@keyframes revealLeft { from { opacity: 0; transform: translateX(-50px); } }
@keyframes revealClip { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
@keyframes scriptDrift { from { transform: rotate(-9deg) translateX(12%); } to { transform: rotate(-9deg) translateX(-12%); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01s !important; animation-iteration-count: 1 !important; transition-duration: .01s !important; }
  .hero-slides li:first-child { opacity: 1; animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- 13. スマホ / タブレット ---------- */
@media (max-width: 960px) {
  .gnav { display: none; }
  .header { padding: 18px 90px 18px var(--gutter); }
  .about-grid, .access-grid, .two-col { grid-template-columns: 1fr; }
  .collage { max-width: 560px; }
  .solution { grid-template-columns: 1fr; }
  .sol { min-height: 0; }
  .sol:nth-child(2) { margin: 0; }
  .solution + .section { padding-top: clamp(72px, 11vw, 150px); }
}
@media (max-width: 680px) {
  body { font-size: 14.5px; line-height: 1.9; }
  .logo { font-size: 17px; gap: 10px; }
  .logo img { width: 40px; }
  .logo .logo-name { width: auto; height: 14px; }
  .nav-btn { top: 12px; right: 14px; width: 52px; height: 52px; }
  .nav-btn span { left: 14px; }
  .nav-btn span:nth-child(1) { top: 23px; }
  .nav-btn span:nth-child(2) { top: 29px; }
  .nav-toggle:checked ~ .nav-btn span:nth-child(1), .nav-toggle:checked ~ .nav-btn span:nth-child(2) { top: 26px; }
  .drawer { clip-path: circle(0 at calc(100% - 40px) 38px); }
  .nav-toggle:checked ~ .drawer { clip-path: circle(150vmax at calc(100% - 40px) 38px); }
  .scroll-down { left: 12px; }
  .drawer a { font-size: 24px; gap: 14px; flex-wrap: wrap; }
  .drawer a small { font-size: 11px; }
  .outline { -webkit-text-stroke-width: 1px; }
  .works-grid { grid-template-columns: 1fr; }
  .works-head { flex-direction: column; align-items: flex-start; }
  .work { padding-left: 18px; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-box + .contact-box { border-left: 0; border-top: 1px solid rgba(255,255,255,.16); }
  .btn { min-width: 0; width: 100%; max-width: 320px; }
  .list-head { text-align: left; }
  .list-head .link-more { position: relative; top: auto; transform: none; margin-top: 16px; }
  .h-jp { font-size: 20px; letter-spacing: .04em; }
  .rows li { flex-wrap: wrap; gap: 8px 14px; padding: 22px 0; }
  .rows strong { width: 100%; }
  .tag { min-width: 84px; }
  .rows li a { display: grid; grid-template-columns: 104px auto 1fr; gap: 6px 14px; }
  .rows img { width: 104px; grid-row: 1 / 3; }
  .rows li a time { min-width: 0; }
  .rows li a .tag { justify-self: start; }
  .rows li a strong { grid-column: 2 / -1; width: auto; }
  .row-view { display: none; }
  .profile > div { grid-template-columns: 1fr; gap: 4px; padding: 20px 0; }
  .lead-big { text-align: left; }
  .lead-big br { display: none; }
  .map, .map iframe { min-height: 300px; }
  .page-hero { height: 44vh; }
}

/* ---------- 14. 物件の詳細ページ（works/*.html） ---------- */
a.work { display: block; }
.work-view { position: relative; display: inline-block; margin-top: 12px; padding: 4px 34px 4px 0; font-size: 12px; font-weight: 700; letter-spacing: .14em; }
.work-view::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(.35); transform-origin: left; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.work-view::after { content: ""; position: absolute; right: 8px; top: 50%; width: 7px; height: 7px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: translateY(-50%) rotate(45deg); transition: right .3s; }
a.work:hover .work-view::before { transform: scaleX(1); }
a.work:hover .work-view::after { right: 2px; }
a.work:hover .work-name { color: var(--accent); }
.work-name { transition: color .3s; }

.page-hero--work { height: 78vh; min-height: 380px; }
.page-hero--work::after { background: linear-gradient(rgba(0,0,0,.42), rgba(0,0,0,0) 32%); }
.wrap--narrow { max-width: calc(880px + var(--gutter) * 2); }
.work-detail { padding-top: clamp(40px, 6vw, 80px); }
.detail-head { text-align: center; margin-bottom: clamp(36px, 5vw, 60px); }
.detail-title { font-size: clamp(28px, 4.6vw, 52px); font-weight: 300; line-height: 1.3; letter-spacing: .04em; }
.detail-loc { margin-top: 10px; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }
.pills li { padding: 2px 22px; border-radius: 99px; background: var(--white); font-size: 12.5px; letter-spacing: .08em; }
.spec > div { grid-template-columns: 160px 1fr; padding: 20px 0; font-family: var(--en), var(--jp); font-size: 14px; }
.spec dt { position: relative; }
.spec dt::before { content: ""; position: absolute; left: 0; top: -21px; width: 100%; height: 1px; background: var(--ink); }
.spec { border-top-color: var(--line); }
.spec dd { text-transform: none; }
.gallery { max-width: 1000px; margin: clamp(50px, 8vw, 100px) auto 0; padding: 0 var(--gutter); display: grid; gap: clamp(20px, 4vw, 48px); }
.gallery figure { margin: 0; overflow: hidden; background: #ddd; }
.gallery img { width: 100%; transition: transform 1.4s cubic-bezier(.2,.7,.2,1); }
.gallery figure:hover img { transform: scale(1.04); }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin-top: clamp(60px, 9vw, 120px); padding-top: 34px; border-top: 1px solid var(--line); }
.pager a { transition: color .3s; }
.pager a:hover { color: var(--accent); }
.pager small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .2em; color: var(--ink-soft); }
.pager-prev span, .pager-next span { font-size: 15px; font-weight: 500; line-height: 1.5; }
.pager-next { text-align: right; }
.pager-list { padding: 12px 26px; border: 1px solid currentColor; font-size: 12.5px; font-weight: 700; letter-spacing: .14em; white-space: nowrap; }
@media (max-width: 680px) {
  .page-hero--work { height: 52vh; }
  .spec > div { grid-template-columns: 1fr; padding: 16px 0; }
  .spec dt::before { top: -17px; width: 90px; }
  .gallery { padding: 0; gap: 12px; }
  .pager { grid-template-columns: 1fr 1fr; }
  .pager-list { grid-column: 1 / -1; grid-row: 2; text-align: center; }
  .pager-prev span, .pager-next span { font-size: 13px; }
}

/* ---------- 15. 下層ページの写真切り替え（about.html: 3枚 × 6秒 = 18秒周期） ---------- */
.page-hero--slides { background: #111 url(../images/bashamichi-1.jpg) center / cover no-repeat; }
.hero-slides--3 li { animation: heroFade3 18s linear infinite; }
.hero-slides--3 li:nth-child(2) { animation-delay: 6s; }
.hero-slides--3 li:nth-child(3) { animation-delay: 12s; }
@keyframes heroFade3 {
  0%   { opacity: 0; transform: scale(1); }
  7%   { opacity: 1; }
  33%  { opacity: 1; }
  41%  { opacity: 0; transform: scale(1.1); }
  100% { opacity: 0; transform: scale(1.1); }
}
