/* ==========================================================
   株式会社サンプル デモサイト 案09「リボン」
   ネイビー #1C2A4A ／ 薄紫 #CFC4E3 ／ 白・#F6F5F9・墨 #1A1D26
   ========================================================== */
:root {
  --navy: #1C2A4A;
  --navy-soft: #2C3B61;   /* ネイビーの濃淡（hover） */
  --navy-2: #4A5471;      /* 補足文字（白地でAA以上） */
  --lilac: #CFC4E3;
  --lilac-pale: #ECE7F4;  /* 薄紫の淡い面 */
  --mist: #F6F5F9;
  --ink: #1A1D26;
  --line: #DEDAE8;
  --white: #FFFFFF;

  --font: "Hiragino Sans", "Yu Gothic", YuGothic, "Meiryo", sans-serif;
  --pad: clamp(20px, 5vw, 64px);
  --maxw: 1200px;
  --gap: clamp(16px, 2.4vw, 32px);
  --radius: 6px;
  --header-h: 72px;
  --sec: clamp(88px, 11vw, 160px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--white);
  color: var(--navy);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.95;
  letter-spacing: .03em;
  line-break: strict;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }

[hidden] { display: none !important; }
.nb { display: inline-block; }
.inline-list .nb { margin-right: 1.1em; }
.inline-list .nb:last-child { margin-right: 0; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + var(--pad) * 2);
  margin-inline: auto;
  padding-inline: var(--pad);
}

:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; border-radius: 2px; }
main:focus { outline: none; }

/* ---------- スキップリンク ---------- */
.skip {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  padding: 12px 18px; background: var(--navy); color: var(--white);
  text-decoration: none; border-radius: 4px;
}
.skip:focus { top: 12px; outline-color: var(--lilac); }

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .95);
  border-bottom: 1px solid rgba(222, 218, 232, .7);
}
.header-inner {
  position: relative;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; flex: none; }
/* 本番ロゴは余白込みの viewBox（922×156）。高さ30pxで文字の高さ約19px */
.brand-logo { display: block; height: 30px; width: auto; max-width: 58vw; }

.menu-toggle { display: none; }

#site-nav ul { display: flex; align-items: center; gap: clamp(10px, 2.2vw, 36px); }
#site-nav a {
  position: relative;
  display: inline-flex; align-items: center;
  min-height: 44px; padding-inline: 4px;
  font-size: .875rem; letter-spacing: .08em; white-space: nowrap;
  text-decoration: none; color: var(--navy);
}
#site-nav li:not(.nav-contact) a::after {
  content: ""; position: absolute; left: 4px; right: 4px; bottom: 7px;
  height: 3px; border-radius: 2px; background: var(--lilac);
  transform: scaleX(0); transform-origin: left center;
  transition: transform .35s ease;
}
#site-nav li:not(.nav-contact) a:hover::after,
#site-nav a[aria-current="page"]::after { transform: scaleX(1); }
#site-nav a[aria-current="page"] { font-weight: 600; }
.nav-contact a {
  padding-inline: 22px !important;
  background: var(--navy); color: var(--white) !important;
  border-radius: 999px;
  transition: background-color .25s ease;
}
.nav-contact a:hover { background: var(--navy-soft); }
.nav-contact a[aria-current="page"] { box-shadow: 0 0 0 3px var(--lilac); }

@media (max-width: 800px) {
  :root { --header-h: 64px; }
  .brand-logo { height: 28px; }
  .menu-toggle {
    display: inline-flex; align-items: center; gap: 10px;
    min-height: 44px; min-width: 44px; padding: 0 16px;
    background: var(--white); color: var(--navy);
    border: 1px solid var(--line); border-radius: 999px;
    font: inherit; font-size: .875rem; letter-spacing: .08em;
    white-space: nowrap; cursor: pointer; flex: none;
  }
  .menu-icon { position: relative; width: 16px; height: 10px; }
  .menu-icon span {
    position: absolute; left: 0; width: 100%; height: 1.5px;
    background: currentColor; border-radius: 1px;
    transition: transform .3s ease, top .3s ease;
  }
  .menu-icon span:first-child { top: 1px; }
  .menu-icon span:last-child { top: 7.5px; }
  .site-header.is-open .menu-icon span:first-child { top: 4.25px; transform: rotate(45deg); }
  .site-header.is-open .menu-icon span:last-child { top: 4.25px; transform: rotate(-45deg); }

  #site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    visibility: hidden; opacity: 0; transform: translateY(-6px);
    transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
  }
  .site-header.is-open #site-nav {
    visibility: visible; opacity: 1; transform: none;
    transition: opacity .25s ease, transform .25s ease, visibility 0s;
  }
  #site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--pad) 28px; }
  #site-nav a {
    display: flex; min-height: 56px; padding-inline: 18px 0;
    font-size: 1rem; border-bottom: 1px solid var(--line);
  }
  #site-nav li:not(.nav-contact) a::after {
    left: 0; right: auto; top: 18px; bottom: 18px; width: 4px; height: auto;
    transform: scaleY(0); transform-origin: center;
  }
  #site-nav a[aria-current="page"]::after { transform: scaleY(1) !important; }
  .nav-contact { margin-top: 20px; }
  .nav-contact a { justify-content: center; border-bottom: 0; min-height: 52px; }
}
/* 狭い端末：ロゴとメニューボタンが1行に収まるよう少し詰める */
@media (max-width: 374px) {
  .header-inner { gap: 10px; }
  .brand-logo { height: 24px; }
  .menu-toggle { padding: 0 12px !important; gap: 8px !important; }
}

/* ---------- メイン・帯 ---------- */
main { position: relative; display: block; }
.ribbon-layer {
  position: absolute; inset: 0; z-index: 0;
  overflow: hidden; pointer-events: none;
}
.ribbon { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; }
.ribbon-path { fill: none; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.ribbon-veil { fill: none; stroke: var(--lilac); stroke-width: 16; stroke-linecap: round; opacity: .28; }
@media (max-width: 900px) {
  .ribbon-path { stroke-width: 2.5; }
  .ribbon-veil { stroke-width: 8; }
}
main > section { position: relative; z-index: 1; }

/* ---------- 文字 ---------- */
.eyebrow {
  margin-bottom: 18px;
  font-size: .8125rem; letter-spacing: .16em; color: var(--navy-2);
}
h1, h2, h3 { font-weight: 500; color: var(--navy); }
.hero h1 {
  font-size: clamp(1.9rem, 1rem + 2.6vw, 3.1rem);
  line-height: 1.5; letter-spacing: .08em;
}
.page-head h1 {
  font-size: clamp(1.85rem, 1.1rem + 2vw, 2.75rem);
  line-height: 1.5; letter-spacing: .1em;
}
h2 { font-size: clamp(1.4rem, 1rem + 1.3vw, 2rem); line-height: 1.6; letter-spacing: .08em; }
h3 { font-size: clamp(1.15rem, 1rem + .5vw, 1.35rem); line-height: 1.6; letter-spacing: .08em; }
.lead { font-size: 1.0625rem; line-height: 2; }
.muted, .tbd { color: var(--navy-2); }
.small { font-size: .875rem; line-height: 1.85; }

/* ---------- ボタン・リンク ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px 14px; margin-top: 36px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 30px;
  border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-size: .9375rem; font-weight: 500; letter-spacing: .08em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-soft); }
.btn-line { background: var(--white); color: var(--navy); border-color: var(--navy); }
.btn-line:hover { background: var(--lilac-pale); }
.btn[disabled] {
  background: var(--mist); color: var(--navy-2);
  border: 1px dashed #B9B3C9; cursor: not-allowed;
  white-space: normal; text-align: center; line-height: 1.5; padding-block: 10px;
}

.tlink {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--navy); font-weight: 500; letter-spacing: .08em;
  text-decoration: underline; text-decoration-color: var(--lilac);
  text-decoration-thickness: 3px; text-underline-offset: 9px;
  transition: text-decoration-color .25s ease;
}
.tlink:hover { text-decoration-color: var(--navy); }

/* ---------- 写真スロット ---------- */
.img-slot {
  position: relative; z-index: 1; margin: 0;
  border-radius: var(--radius); overflow: hidden;
  background: var(--lilac-pale);
  aspect-ratio: 3 / 2;
}
.img-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.img-slot .ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--navy-2); font-size: .8125rem; letter-spacing: .12em;
  background:
    linear-gradient(var(--line), var(--line)) center / 1px 100% no-repeat,
    linear-gradient(var(--line), var(--line)) center / 100% 1px no-repeat,
    var(--lilac-pale);
}
.img-slot .ph span { padding: 4px 12px; background: var(--lilac-pale); }
.img-note {
  position: absolute; right: 10px; bottom: 10px;
  padding: 5px 9px; border-radius: 3px;
  background: rgba(26, 29, 38, .72); color: var(--white);
  font-size: .6875rem; line-height: 1.3; letter-spacing: .04em;
}
.r-hero { aspect-ratio: 4 / 3; }
.r-32 { aspect-ratio: 3 / 2; }
.r-45 { aspect-ratio: 4 / 5; }
.r-1610 { aspect-ratio: 16 / 10; }
.r-219 { aspect-ratio: 21 / 9; }

/* ---------- セクション共通 ---------- */
.sec { padding-block: var(--sec) 0; }
.sec:last-of-type { padding-bottom: var(--sec); }
.sec-head { max-width: 34em; margin-bottom: clamp(56px, 7vw, 96px); }
.sec-head p:not(.eyebrow) { margin-top: 18px; }
.more { margin-top: clamp(48px, 6vw, 80px); }

.grid12 {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap); align-items: center;
}
.grid12 > * { grid-row: 1; min-width: 0; }

/* ---------- TOP ヒーロー ---------- */
.hero { padding-block: clamp(40px, 5vw, 72px) 0; }
.hero-grid .img-slot { grid-column: 6 / -1; }
.hero-text { grid-column: 1 / span 5; padding-block: 24px; }
.hero .lead { margin-top: 28px; max-width: 24em; }

/* ---------- 左右に振れる行 ---------- */
.rows { display: grid; row-gap: clamp(88px, 10vw, 150px); }
.row .img-slot { grid-column: 1 / span 7; }
.row .row-text { grid-column: 9 / span 4; }
.row.is-alt .img-slot { grid-column: 6 / span 7; }
.row.is-alt .row-text { grid-column: 1 / span 4; }
.row-text p:not(.eyebrow):not(.tag-line) { margin-top: 18px; }
.row-text .tlink { margin-top: 20px; }

/* TOP 事業：階段状 */
.stair { display: grid; row-gap: clamp(72px, 8vw, 120px); }
.stair-item { align-items: end; }
.stair-item:nth-child(1) .img-slot { grid-column: 1 / span 5; }
.stair-item:nth-child(1) .stair-text { grid-column: 6 / span 3; }
.stair-item:nth-child(2) .img-slot { grid-column: 4 / span 5; }
.stair-item:nth-child(2) .stair-text { grid-column: 9 / span 4; }
.stair-item:nth-child(3) .img-slot { grid-column: 7 / span 5; }
.stair-item:nth-child(3) .stair-text { grid-column: 2 / span 4; }
.stair-text { padding-bottom: 8px; }
.stair-text p { margin-top: 10px; color: var(--navy-2); }

/* TOP 物件：ずらした2枚 */
.pair { display: grid; row-gap: clamp(72px, 8vw, 120px); }
.pair-item .img-slot { grid-column: 2 / span 6; }
.pair-item .pair-text { grid-column: 9 / span 3; }
.pair-item.is-alt .img-slot { grid-column: 7 / span 4; }
.pair-item.is-alt .pair-text { grid-column: 2 / span 4; }

/* ---------- 下層ページ見出し ---------- */
.page-head { padding-block: clamp(56px, 8vw, 120px) 0; }
.page-head .head-inner { max-width: 36em; }
.page-head .lead { margin-top: 24px; }

/* ---------- 物件・施工事例 ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; }
.filters button {
  min-height: 44px; padding: 0 22px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--white); color: var(--navy);
  font: inherit; font-size: .9375rem; letter-spacing: .08em; cursor: pointer;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.filters button:hover { border-color: var(--navy); }
.filters button[aria-pressed="true"] { background: var(--navy); color: var(--white); border-color: var(--navy); }
.filter-status { margin-top: 16px; font-size: .875rem; color: var(--navy-2); }

.tag-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 14px; }
.tag {
  display: inline-block; padding: 3px 12px; border-radius: 999px;
  background: var(--lilac); color: var(--navy);
  font-size: .75rem; line-height: 1.7; letter-spacing: .08em;
}
.kind { font-size: .875rem; letter-spacing: .12em; color: var(--navy-2); }

.spec {
  display: grid; grid-template-columns: max-content 1fr; gap: 12px 24px;
  margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: .9375rem; line-height: 1.7;
}
.spec dt { color: var(--navy-2); }
.spec dd { margin: 0; }

.works .row .img-slot { grid-column: 1 / span 6; }
.works .row .row-text { grid-column: 8 / span 5; }
.works .row.is-alt .img-slot { grid-column: 7 / span 6; }
.works .row.is-alt .row-text { grid-column: 1 / span 5; }

.note-block { max-width: 40em; margin-top: clamp(80px, 9vw, 130px); }
.note-block p { font-size: .9375rem; color: var(--navy-2); }

/* ---------- 会社概要 ---------- */
.info { width: 100%; border-collapse: collapse; }
.info th, .info td {
  padding: 30px 0; border-bottom: 1px solid var(--line);
  text-align: left; vertical-align: top; line-height: 1.85;
}
.info tr:first-child th, .info tr:first-child td { border-top: 1px solid var(--line); }
.info th { width: 28%; padding-right: 32px; font-weight: 500; color: var(--navy-2); font-size: .9375rem; letter-spacing: .1em; }
.info td span.nb + span.nb { margin-left: .2em; }
.company-photo { margin-bottom: clamp(72px, 9vw, 130px); }

/* ---------- サテライト ---------- */
.map-slot {
  display: grid; place-items: center; min-height: 240px; margin-top: clamp(80px, 9vw, 130px);
  background: var(--mist); border-radius: var(--radius); border: 1px solid var(--line);
  color: var(--navy-2); font-size: .9375rem; letter-spacing: .08em; text-align: center; padding: 24px;
}

/* ---------- お問い合わせ ---------- */
.channels { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--gap); }
.channel { padding: 44px 0 8px; border-top: 1px solid var(--navy); }
.channel p { margin-top: 14px; }
.channel .btn { margin-top: 28px; width: 100%; max-width: 360px; }
.hours { margin-top: clamp(80px, 9vw, 130px); max-width: 40em; }
.hours .spec { margin-top: 20px; }

/* ---------- 締めの帯（淡い面） ---------- */
.cta { margin-top: var(--sec); padding-block: clamp(80px, 9vw, 128px); background: var(--mist); }
.cta-inner { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px 48px; }
.cta p:not(.eyebrow) { margin-top: 14px; }

/* ---------- フッター ---------- */
.site-footer { background: var(--navy); color: var(--white); padding-block: 72px 32px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; }
.footer-brand .brand-logo { height: 34px; }
.footer-brand p { margin-top: 14px; font-size: .875rem; color: var(--lilac); }
.footer-nav ul { display: grid; grid-template-columns: repeat(3, auto); gap: 0 40px; }
.footer-nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: .875rem; letter-spacing: .08em; text-decoration: none; color: var(--white);
}
.footer-nav a:hover { text-decoration: underline; text-decoration-color: var(--lilac); text-underline-offset: 6px; }
.site-footer :focus-visible { outline-color: var(--lilac); }
.footer-note {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px;
  margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(207, 196, 227, .3);
  font-size: .75rem; line-height: 1.8; color: var(--lilac);
}

.noscript { padding-block: 80px; }

/* ---------- 1カラム（900px以下） ---------- */
@media (max-width: 900px) {
  .grid12 { display: flex; flex-direction: column; align-items: stretch; gap: 28px; }
  .grid12 > .img-slot { width: 100%; }
  .hero-text { padding-block: 0; }
  .stair-text, .pair-text { padding-bottom: 0; }
  .r-45 { aspect-ratio: 1 / 1; }
  .r-219 { aspect-ratio: 16 / 9; }
  .channels { grid-template-columns: 1fr; gap: 40px; }
  .footer-nav ul { grid-template-columns: repeat(2, auto); gap: 0 32px; }
}
@media (max-width: 600px) {
  :root { --sec: 88px; }
  body { line-height: 1.9; }
  .lead { font-size: 1rem; }
  .actions .btn { flex: 1 1 100%; }
  .info th, .info td { display: block; width: 100%; padding: 0; border: 0; }
  .info tr { display: block; padding: 20px 0; border-bottom: 1px solid var(--line); }
  .info tr:first-child { border-top: 1px solid var(--line); }
  .info tr:first-child th, .info tr:first-child td { border-top: 0; }
  .info th { margin-bottom: 4px; font-size: .8125rem; }
  .spec { grid-template-columns: 1fr; gap: 0; }
  .spec dd + dt { margin-top: 12px; }
  .channel .btn { max-width: none; }
  .cta-inner .btn { width: 100%; }
  .footer-nav ul { grid-template-columns: 1fr 1fr; gap: 0 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ─── モバイルメニュー：閉じる／HOME（TATEURI 必須・メニューを開いている間だけ表示） ─── */
.mobile-nav-extra { display: none; }
html.tt-nav-open #site-nav .mobile-nav-extra {
  position: relative; z-index: 5; display: flex; flex: 0 0 auto; align-self: stretch; align-items: center; justify-content: space-between; gap: 16px;
  box-sizing: border-box; width: 100%; margin: 0 0 14px; padding: 0 0 10px; border-bottom: 1px solid rgba(128, 128, 128, .35);
}
html.tt-nav-open #site-nav a.mobile-nav-home,
html.tt-nav-open #site-nav button.mobile-nav-close {
  display: inline-flex; align-items: center; gap: 8px; width: auto; min-height: 44px; margin: 0; padding: 0 2px;
  font: inherit; font-size: 14px; line-height: 1; letter-spacing: .12em; color: inherit; text-decoration: none;
  background: none; border: 0; border-radius: 0; box-shadow: none; opacity: 1; transform: none; cursor: pointer;
}
html.tt-nav-open #site-nav a.mobile-nav-home { font-weight: 700; letter-spacing: .2em; box-shadow: inset 0 -3px 0 var(--navy); }
html.tt-nav-open #site-nav a.mobile-nav-home::before, html.tt-nav-open #site-nav a.mobile-nav-home::after,
html.tt-nav-open #site-nav button.mobile-nav-close::before, html.tt-nav-open #site-nav button.mobile-nav-close::after { content: none; display: none; }
html.tt-nav-open #site-nav button.mobile-nav-close svg { width: 14px; height: 14px; flex: 0 0 auto; }

/* メニューを開いている間、デモバーが画面に見えていれば一時的に外す（各案のメニュー位置は元のまま） */
html.tt-bar-hide #demo-bar { display: none; }

/* ─── 横スクロール防止（TATEURI 規則。sticky を壊さないよう hidden ではなく clip） ─── */
html, body { overflow-x: clip; }

/* 語が長くなった分の補正（801〜960px はナビの間隔と字間を詰める） */
@media (min-width: 801px) and (max-width: 960px) { #site-nav ul { gap: 8px; } #site-nav a { letter-spacing: .02em; } }

/* ─── DEMO BAR（TATEURI 共通・通常フローに置く） ─── */
#demo-bar { position: relative; z-index: 1200; background: #101215; border-bottom: 1px solid rgba(255, 255, 255, .12); padding: 7px 16px; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.demo-bar-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; font-size: 12px; line-height: 1.5; letter-spacing: .02em; color: rgba(255, 255, 255, .55); }
.demo-badge { font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; background: rgba(200, 168, 92, .18); color: #C8A85C; padding: 3px 10px; flex-shrink: 0; }
.demo-link { display: inline-block; padding: 4px 0; color: #C8A85C; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.demo-copy { color: rgba(255, 255, 255, .3); font-size: 11px; }
@media (max-width: 640px) { .demo-copy { display: none; } }
