/* =========================================================
   株式会社こもれび（デモサイト） — style.css
   ========================================================= */

:root {
  --paper: #f3f6f2;
  --surface: #ffffff;
  --ink: #1d3436;
  --ink-soft: #586b68;
  --leaf: #3f7a68;
  --leaf-deep: #24524a;
  --sun: #e9b949;
  --line: #d5ded8;

  --font-serif: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-sans: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif;

  --header-h: 76px;
  --container: 1120px;
  --ease: cubic-bezier(.22, .61, .36, 1);

  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #15201f;
    --surface: #1c2a29;
    --ink: #e6eeea;
    --ink-soft: #a6b7b2;
    --leaf: #7fbba6;
    --leaf-deep: #10302b;
    --sun: #e9c260;
    --line: #2f4240;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.95;
  letter-spacing: .04em;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
p { margin: 0 0 1.2em; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: min(100% - 48px, var(--container));
  margin-inline: auto;
}
.container--narrow { max-width: 820px; }

.section { padding-block: clamp(80px, 12vw, 150px); }

/* ---------- Heading (JP + small EN, like the references) ---------- */
.heading {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  line-height: 1.6;
  letter-spacing: .08em;
  margin: 0 0 1.4em;
}
.heading__en {
  display: block;
  margin-top: .8em;
  font-family: var(--font-sans);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .12em;
  color: var(--leaf);
}
.heading__en::before {
  content: "";
  display: inline-block;
  width: 10px; height: 10px;
  margin-right: .7em;
  border-radius: 50%;
  background: var(--sun);
  vertical-align: .05em;
}
.heading--center { text-align: center; }
.heading--light { color: #fff; }
.heading--light .heading__en { color: var(--sun); }

/* ---------- Buttons / links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 1em;
  padding: 1em 1.8em 1em 2em;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-weight: 500;
  font-size: .95rem;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.btn::after {
  content: "";
  width: 8px; height: 8px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.btn:hover { background: var(--ink); color: var(--paper); }

.link {
  font-weight: 500;
  border-bottom: 1px solid var(--leaf);
  color: var(--leaf);
  padding-bottom: 2px;
}
.link:hover { border-bottom-width: 2px; }

/* ---------- Photos (images/ フォルダの画像を枠に合わせて表示) ---------- */
.ph {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  overflow: hidden;
  background: color-mix(in srgb, var(--leaf) 16%, var(--paper)); /* 読み込み中の色 */
}
.ph--tall { aspect-ratio: 4 / 5; }
.ph img,
.hero__slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================================================
   Header
   ========================================================= */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 32px;
  height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) clamp(20px, 4vw, 48px) 0;
  transition: background .35s var(--ease), box-shadow .35s var(--ease), height .35s var(--ease);
}
.header.is-scrolled {
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
  --header-h: 64px;
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo__mark { width: 36px; height: 36px; fill: var(--sun); }
.logo__mark circle:nth-child(3) { fill: var(--leaf); }
.logo__text {
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: .12em;
  line-height: 1;
}
.logo__text small {
  display: block;
  margin-top: 4px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: .65rem;
  letter-spacing: .3em;
  color: var(--ink-soft);
}

.gnav { margin-left: auto; }
.gnav ul { display: flex; gap: clamp(16px, 2vw, 32px); }
.gnav a {
  font-size: .88rem;
  font-weight: 500;
  position: relative;
  padding-block: 6px;
}
.gnav a::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -2px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--sun);
  transform: translateX(-50%) scale(0);
  transition: transform .25s var(--ease);
}
.gnav a:hover::after { transform: translateX(-50%) scale(1); }

.header__cta {
  padding: .7em 1.5em;
  border-radius: 999px;
  background: var(--leaf);
  color: #fff;
  font-size: .88rem;
  font-weight: 700;
  white-space: nowrap;
}
.header__cta:hover { background: var(--leaf-deep); }

.menu-btn {
  display: none;
  position: relative;
  width: 48px; height: 48px;
  margin-left: auto;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  cursor: pointer;
}
.menu-btn span {
  position: absolute;
  left: 15px;
  width: 18px; height: 1.5px;
  background: var(--paper);
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.menu-btn span:first-child { top: 20px; }
.menu-btn span:last-child { top: 27px; }
.menu-btn[aria-expanded="true"] span:first-child { top: 24px; transform: rotate(30deg); }
.menu-btn[aria-expanded="true"] span:last-child { top: 24px; transform: rotate(-30deg); }

/* ---------- Drawer ---------- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--leaf-deep);
  color: #fff;
  padding: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 32px) 24px 40px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s var(--ease), visibility .35s;
}
.drawer.is-open { opacity: 1; visibility: visible; }
.drawer__inner { display: grid; gap: 40px; max-width: 560px; margin-inline: auto; }
.drawer__label { font-size: .8rem; color: var(--sun); margin-bottom: .6em; }
.drawer__list a {
  display: block;
  padding: .7em 0;
  border-bottom: 1px solid rgba(255,255,255,.15);
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
}
.drawer__tel {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: .06em;
}
body.is-locked { overflow: hidden; }
body.is-locked .header { background: transparent; box-shadow: none; color: #fff; }
body.is-locked .logo__text small { color: rgba(255,255,255,.7); }
body.is-locked .menu-btn { background: #fff; }
body.is-locked .menu-btn span { background: var(--ink); }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(220px, 30%) 1fr;
  overflow: hidden;
}

.hero__slides {
  grid-column: 2;
  position: relative;
  margin: calc(var(--header-h) + 8px) 0 64px;
  border-radius: 0 0 0 160px;
  overflow: hidden;
}
.hero__slide {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}
/* 前の写真は下に残したまま、次の写真を上に重ねてフェードイン（途中で暗くならない） */
.hero__slide.is-prev { z-index: 1; opacity: 1; transition: none; }
.hero__slide.is-active { z-index: 2; opacity: 1; }
.hero__slide img {
  transform: scale(1.05);
  will-change: transform;
  backface-visibility: hidden;
}
/* ズームは JS が is-zoom を付けたときに開始（1枚目も2枚目以降も同じ動きにするため）
   フェードアウト中も is-zoom は残るので、ズームが途切れない */
.hero__slide.is-zoom img {
  transform: scale(1);
  transition: transform 8s linear;
}
.hero__slides { background: color-mix(in srgb, var(--leaf) 16%, var(--paper)); }

/* dappled sunlight canvas */
.hero__light {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 2;
  pointer-events: none;
}
/* スマホでは木漏れ日の動きを止めて、スライドショーを優先 */
@media (max-width: 820px), (pointer: coarse) {
  .hero__light { display: none; }
}

.hero__copy {
  grid-column: 1;
  grid-row: 1;
  z-index: 3;
  align-self: start;
  justify-self: center;
  margin: calc(var(--header-h) + 48px) 0 0;
  writing-mode: vertical-rl;
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: clamp(2rem, 3.4vw, 3.4rem);
  line-height: 1.5;
  letter-spacing: .16em;
  color: var(--ink);
}
.hero__copy span {
  display: block;
  opacity: 0;
  transform: translateY(-14px);
  animation: copyIn 1.4s var(--ease) forwards;
}
.hero__copy span:nth-child(2) { margin-top: 1.6em; animation-delay: .5s; }
@keyframes copyIn { to { opacity: 1; transform: none; } }

.hero__sub {
  position: absolute;
  z-index: 3;
  left: clamp(20px, 4vw, 48px);
  bottom: 64px;
  font-size: .85rem;
  color: var(--ink-soft);
}
.hero__sub p { margin: 0; }
.hero__en { margin-top: .4em !important; font-family: var(--font-serif); font-size: .8rem; }

.hero__topic {
  position: absolute;
  z-index: 3;
  right: clamp(20px, 4vw, 48px);
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: min(560px, 60vw);
  padding: 14px 24px;
  border-radius: 999px;
  background: var(--surface);
  font-size: .85rem;
  box-shadow: 0 10px 30px -18px rgba(29,52,54,.5);
}
.hero__topic-date { color: var(--ink-soft); }
.hero__topic-cat {
  padding: 0 .8em;
  border-radius: 999px;
  background: var(--sun);
  color: #1d3436;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}
.hero__topic-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero__topic:hover .hero__topic-title { text-decoration: underline; }

.hero__scroll {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 0;
  width: 1px; height: 56px;
  background: var(--line);
  overflow: hidden;
}
.hero__scroll span { position: absolute; font-size: 0; }
.hero__scroll::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--leaf);
  animation: scrollLine 2.2s var(--ease) infinite;
}
@keyframes scrollLine {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

/* =========================================================
   About
   ========================================================= */
.about__grid {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(40px, 7vw, 100px);
  align-items: center;
}
.about__body p { max-width: 34em; color: var(--ink-soft); }
.about__body .btn { margin-top: 1em; }

/* =========================================================
   Care
   ========================================================= */
.care { background: var(--surface); }
.care__list { display: grid; gap: clamp(56px, 8vw, 96px); }
.care__item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.care__item:nth-child(even) .ph { order: 2; }
.care__text h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  letter-spacing: .1em;
  margin: 0 0 .8em;
}
.care__text h3 span {
  display: block;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: .78rem;
  letter-spacing: .08em;
  color: var(--leaf);
  margin-top: .3em;
}
.care__text p { color: var(--ink-soft); max-width: 30em; }

/* =========================================================
   Approach
   ========================================================= */
.approach {
  background: var(--leaf-deep);
  color: rgba(255,255,255,.82);
  border-radius: clamp(40px, 8vw, 120px) clamp(40px, 8vw, 120px) 0 0;
  margin-top: -1px;
}
.approach__lead { max-width: 38em; margin-bottom: 64px; }
.approach__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255,255,255,.14);
  border-top: 1px solid rgba(255,255,255,.14);
  border-bottom: 1px solid rgba(255,255,255,.14);
}
.approach__col {
  background: var(--leaf-deep);
  padding: 40px clamp(20px, 3vw, 40px);
  font-size: .92rem;
}
.approach__issue {
  font-size: .88rem;
  color: rgba(255,255,255,.6);
  min-height: 3.6em;
  padding-bottom: 1.4em;
  margin-bottom: 1.4em;
  border-bottom: 1px dashed rgba(255,255,255,.25);
  position: relative;
}
.approach__issue::after {
  content: "";
  position: absolute;
  left: 0; bottom: -7px;
  width: 12px; height: 12px;
  background: var(--leaf-deep);
  border-right: 1px solid var(--sun);
  border-bottom: 1px solid var(--sun);
  transform: rotate(45deg);
}
.approach__answer {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .1em;
}

/* =========================================================
   Partners marquee
   ========================================================= */
.partners {
  background: var(--leaf-deep);
  color: #fff;
  padding: 0 0 clamp(64px, 8vw, 100px);
  overflow: hidden;
}
.partners__title {
  width: min(100% - 48px, var(--container));
  margin: 0 auto 24px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--sun);
}
.marquee { overflow: hidden; }
.marquee__track {
  display: flex;
  width: max-content;
  gap: 16px;
  animation: marquee 40s linear infinite;
}
.marquee__track li {
  padding: .9em 1.8em;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  white-space: nowrap;
  font-size: .9rem;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* =========================================================
   News
   ========================================================= */
.news__grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: clamp(32px, 6vw, 80px);
}
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab {
  padding: .4em 1.1em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: .85rem;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.tab:hover { border-color: var(--leaf); }
.tab.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.news__list { border-top: 1px solid var(--line); }
.news__list li { border-bottom: 1px solid var(--line); }
.news__list li[hidden] { display: none; }
.news__list a {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 8px 20px;
  padding: 1.6em .5em;
  transition: background .25s;
}
.news__list a:hover { background: var(--surface); }
.news__list a:hover .news__title { text-decoration: underline; text-underline-offset: 4px; }
.news__list time { font-size: .85rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.badge {
  justify-self: start;
  padding: .1em .9em;
  border: 1px solid var(--leaf);
  border-radius: 999px;
  color: var(--leaf);
  font-size: .72rem;
  font-weight: 700;
}
.news__empty { padding: 2em .5em; color: var(--ink-soft); }

/* =========================================================
   Area
   ========================================================= */
.area__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 7vw, 100px);
  align-items: center;
}
.area__grid p { color: var(--ink-soft); }
.area__chips { display: flex; flex-wrap: wrap; gap: 10px; }
.area__chips button {
  padding: .5em 1.3em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  font-size: .9rem;
}
.area__chips button.is-hover { border-color: var(--leaf); }
.area__chips button[aria-pressed="true"] { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.area__map { width: 100%; height: auto; }
.area__zone {
  fill: color-mix(in srgb, var(--leaf) 14%, var(--paper));
  stroke: var(--paper);
  stroke-width: 4;
  transition: fill .35s var(--ease);
}
.area__zone.is-active { fill: var(--sun); }
.area__office { fill: var(--leaf-deep); stroke: #fff; stroke-width: 3; }
.area__office-label { font-size: 14px; font-weight: 700; fill: var(--ink); font-family: var(--font-sans); }

/* =========================================================
   FAQ
   ========================================================= */
.faq { background: var(--surface); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item:first-child { border-top: 1px solid var(--line); }
.faq__item summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 1.5em 3em 1.5em 2.6em;
  font-weight: 700;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::before {
  content: "Q";
  position: absolute;
  left: 0;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--leaf);
}
.faq__item summary::after {
  content: "";
  position: absolute;
  right: 8px; top: 50%;
  width: 14px; height: 14px;
  background:
    linear-gradient(currentColor, currentColor) center / 14px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 14px no-repeat;
  transform: translateY(-50%);
  transition: transform .3s var(--ease);
}
.faq__item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq__answer {
  overflow: hidden;
  padding: 0 3em 1.5em 2.6em;
  color: var(--ink-soft);
}

/* =========================================================
   Contact
   ========================================================= */
.contact {
  padding-block: clamp(80px, 10vw, 130px);
  background:
    radial-gradient(circle at 12% 20%, rgba(233,185,73,.35) 0 90px, transparent 91px),
    radial-gradient(circle at 88% 85%, rgba(233,185,73,.25) 0 140px, transparent 141px),
    var(--leaf);
  color: #fff;
  text-align: center;
}
.contact__title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: .12em;
  margin: 0 0 .8em;
}
.contact__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 820px;
  margin: 48px auto 0;
}
.contact__actions a {
  display: grid;
  gap: 4px;
  padding: 32px 24px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  transition: transform .3s var(--ease);
}
.contact__actions a:hover { transform: translateY(-4px); }
.contact__actions span { font-size: .8rem; color: var(--leaf); font-weight: 700; }
.contact__actions strong { font-family: var(--font-serif); font-size: clamp(1.3rem, 2.6vw, 1.8rem); letter-spacing: .06em; }
.contact__actions small { color: var(--ink-soft); }

/* =========================================================
   Footer
   ========================================================= */
.footer { padding: 72px 0 32px; font-size: .88rem; }
.footer__grid {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 48px;
  
}
.footer address { font-style: normal; margin-top: 20px; color: var(--ink-soft); }
.footer__nav { display: flex; gap: clamp(32px, 6vw, 80px); }
.footer__nav li + li { margin-top: .6em; }
.footer__nav a:hover { color: var(--leaf); }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  color: var(--ink-soft);
}
.pagetop {
  display: inline-flex;
  align-items: center;
  gap: .6em;
}
.pagetop::before {
  content: "";
  width: 8px; height: 8px;
  border-top: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(2px);
}

/* =========================================================
   Demo badge / nav current
   ========================================================= */
.demo-badge {
  margin-left: 4px;
  padding: .15em .8em;
  border: 1px dashed var(--ink-soft);
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
}
.gnav a[aria-current="page"]::after { transform: translateX(-50%) scale(1); }
.gnav a[aria-current="page"] { color: var(--leaf); }
.drawer__list a[aria-current="page"] { color: var(--sun); }

/* =========================================================
   Sub page hero
   ========================================================= */
.page-hero {
  position: relative;
  padding: calc(var(--header-h) + clamp(56px, 9vw, 110px)) 0 clamp(48px, 7vw, 88px);
  overflow: hidden;
}
.page-hero::before,
.page-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.page-hero::before {
  width: 360px; height: 360px;
  right: -60px; top: 40px;
  background: radial-gradient(circle, rgba(233,185,73,.32), transparent 68%);
}
.page-hero::after {
  width: 180px; height: 180px;
  right: 220px; top: 200px;
  background: radial-gradient(circle, color-mix(in srgb, var(--leaf) 28%, transparent), transparent 70%);
}
.page-hero__title {
  position: relative;
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: .14em;
  line-height: 1.4;
}
.page-hero__en {
  display: block;
  margin-top: .6em;
  font-family: var(--font-sans);
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .12em;
  color: var(--leaf);
}
.breadcrumb {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: .4em;
  margin-bottom: 28px;
  font-size: .8rem;
  color: var(--ink-soft);
}
.breadcrumb li + li::before { content: "／"; margin-right: .4em; color: var(--line); }
.breadcrumb a:hover { color: var(--leaf); text-decoration: underline; }

.page-body { padding-bottom: clamp(80px, 12vw, 140px); }
.block + .block,
.creed + .block { margin-top: clamp(72px, 10vw, 120px); }
.lead {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 2.1;
  max-width: 34em;
}
.muted { color: var(--ink-soft); }

/* Local (in-page) nav */
.local-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: clamp(56px, 8vw, 88px);
}
.local-nav a {
  padding: .6em 1.4em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: .9rem;
}
.local-nav a:hover { border-color: var(--leaf); color: var(--leaf); }

/* =========================================================
   Company
   ========================================================= */
.message {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(40px, 7vw, 100px);
  align-items: start;
}
.message__sign { margin-top: 2em; text-align: right; font-family: var(--font-serif); }
.message__sign strong { font-size: 1.3rem; margin-left: .6em; letter-spacing: .2em; }
.message__body p { color: var(--ink-soft); }

.info-table { margin: 0; border-top: 1px solid var(--line); }
.info-table > div {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  padding: 1.4em .4em;
  border-bottom: 1px solid var(--line);
}
.info-table dt { font-weight: 700; color: var(--leaf); }
.info-table dd { margin: 0; }

.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 6px; top: 12px; bottom: 12px;
  width: 1px;
  background: var(--line);
}
.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 1em 0;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -28px; top: 1.55em;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--leaf);
}
.timeline li:last-child::before { background: var(--sun); border-color: var(--sun); }
.timeline time { font-family: var(--font-serif); font-weight: 700; font-size: 1.1rem; }

.offices { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.office {
  padding: 32px;
  border-radius: 12px;
  background: var(--surface);
}
.office h3 { font-family: var(--font-serif); font-size: 1.2rem; margin: 0 0 .8em; letter-spacing: .08em; }
.office p { margin: 0; font-size: .92rem; color: var(--ink-soft); }

/* =========================================================
   Business
   ========================================================= */
.biz {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
  padding-top: clamp(48px, 6vw, 72px);
  border-top: 1px solid var(--line);
}
.biz + .biz { margin-top: clamp(64px, 9vw, 104px); }
.biz .ph { position: sticky; top: calc(var(--header-h) + 24px); }
.biz h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: .1em;
  margin: 0 0 .2em;
}
.biz__en { font-size: .8rem; color: var(--leaf); margin-bottom: 1.6em; }
.biz__body > p { color: var(--ink-soft); }
.biz__sub { font-size: 1rem; margin: 2em 0 .6em; }
.dot-list li {
  position: relative;
  padding-left: 1.3em;
  margin-bottom: .4em;
}
.dot-list li::before {
  content: "";
  position: absolute;
  left: 0; top: .78em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--sun);
}
.biz__note {
  margin-top: 1.6em;
  padding: 1em 1.4em;
  border-radius: 8px;
  background: var(--surface);
  font-size: .9rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 32px 24px 28px;
  border-radius: 12px;
  background: var(--surface);
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--leaf);
  color: #fff;
  font-family: var(--font-serif);
  font-weight: 700;
}
.steps h3 { font-size: 1.05rem; margin: 0 0 .5em; }
.steps p { margin: 0; font-size: .88rem; color: var(--ink-soft); }

/* =========================================================
   Philosophy
   ========================================================= */
.creed {
  padding: clamp(56px, 9vw, 110px) 24px;
  border-radius: clamp(24px, 4vw, 48px);
  background: var(--leaf-deep);
  color: #fff;
  text-align: center;
}
.creed__label { font-size: .85rem; color: var(--sun); margin-bottom: 1.6em; }
.creed__text {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: clamp(1.8rem, 5vw, 3.4rem);
  letter-spacing: .16em;
  line-height: 1.6;
}
.creed__note { margin: 2em auto 0; max-width: 32em; color: rgba(255,255,255,.78); }

.mv { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.mv__item { padding: clamp(32px, 4vw, 48px); border-radius: 12px; background: var(--surface); }
.mv__label { font-size: .85rem; font-weight: 700; color: var(--leaf); margin-bottom: .8em; }
.mv__text { font-family: var(--font-serif); font-size: clamp(1.2rem, 1.9vw, 1.45rem); line-height: 1.8; text-wrap: balance; font-weight: 700; margin-bottom: .8em; }
.mv__item p:last-child { margin: 0; color: var(--ink-soft); font-size: .92rem; }

.values { border-top: 1px solid var(--line); }
.values li {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  padding: 2em .4em;
  border-bottom: 1px solid var(--line);
}
.values h3 { margin: 0; font-family: var(--font-serif); font-size: 1.3rem; letter-spacing: .08em; }
.values h3 span { display: block; margin-top: .4em; font-family: var(--font-sans); font-size: .78rem; font-weight: 500; color: var(--leaf); }
.values p { margin: 0; color: var(--ink-soft); }

/* =========================================================
   News page
   ========================================================= */
.news-page .tabs { margin-bottom: 32px; }
.pager { display: flex; justify-content: center; gap: 8px; margin-top: 48px; }
.pager button {
  min-width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
}
.pager button[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pager button:disabled { opacity: .4; cursor: default; }

/* =========================================================
   Contact form
   ========================================================= */
.contact-layout { display: grid; grid-template-columns: 7fr 4fr; gap: clamp(40px, 6vw, 80px); align-items: start; }
.form { display: grid; gap: 28px; }
.field { display: grid; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field > label, .field legend { font-weight: 700; font-size: .95rem; padding: 0; }
.req, .opt {
  margin-left: .6em;
  padding: .05em .7em;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  vertical-align: .1em;
}
.req { background: var(--sun); color: #1d3436; }
.opt { border: 1px solid var(--line); color: var(--ink-soft); }
.input {
  width: 100%;
  padding: .9em 1em;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
.input:focus { outline: 3px solid color-mix(in srgb, var(--leaf) 40%, transparent); border-color: var(--leaf); }
textarea.input { min-height: 180px; resize: vertical; }
.radios { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.radios label {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .55em 1.2em .55em .9em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  font-size: .9rem;
}
.radios input { accent-color: var(--leaf); }
.radios label:has(input:checked) { border-color: var(--leaf); background: color-mix(in srgb, var(--leaf) 10%, var(--surface)); }
.agree { display: flex; gap: .6em; align-items: flex-start; font-size: .92rem; }
.agree input { margin-top: .5em; accent-color: var(--leaf); }
.agree a { color: var(--leaf); text-decoration: underline; }
.field-error { margin: 0; font-size: .85rem; color: #b4432f; }
.field-error:empty { display: none; }
.input[aria-invalid="true"] { border-color: #b4432f; }
.form__submit {
  justify-self: start;
  padding: 1.1em 3em;
  border: 0;
  border-radius: 999px;
  background: var(--leaf);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.form__submit:hover { background: var(--leaf-deep); }
.form-done {
  padding: 48px 32px;
  border-radius: 12px;
  background: var(--surface);
  text-align: center;
}
.form-done h2 { font-family: var(--font-serif); margin: 0 0 .8em; letter-spacing: .1em; }
.side-box { padding: 32px; border-radius: 12px; background: var(--surface); }
.side-box + .side-box { margin-top: 20px; }
.side-box h2 { font-size: 1rem; margin: 0 0 .6em; }
.side-box .drawer__tel { color: var(--ink); font-size: 1.8rem; }
.side-box p { margin: 0; font-size: .88rem; color: var(--ink-soft); }

/* =========================================================
   Privacy (prose)
   ========================================================= */
.prose { max-width: 760px; }
.prose h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  letter-spacing: .06em;
  margin: 2.6em 0 .8em;
  padding-bottom: .5em;
  border-bottom: 1px solid var(--line);
}
.prose p, .prose li { color: var(--ink-soft); }
.prose ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.prose ol li { list-style: decimal; margin-bottom: .3em; }
.prose .dot-list { margin-bottom: 1.2em; }
.prose__date { text-align: right; margin-top: 3em; }

/* Top: company snippet */
.snippet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.snippet a {
  display: grid;
  gap: 6px;
  padding: 36px 32px;
  border-radius: 12px;
  background: var(--surface);
  transition: transform .3s var(--ease);
}
.snippet a:hover { transform: translateY(-4px); }
.snippet strong { font-family: var(--font-serif); font-size: 1.3rem; letter-spacing: .1em; }
.snippet span { font-size: .78rem; color: var(--leaf); }
.snippet p { margin: .6em 0 0; font-size: .9rem; color: var(--ink-soft); }
.news__more { margin-top: 32px; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1080px) {
  .gnav, .header__cta { display: none; }
  .menu-btn { display: block; }
}

@media (max-width: 820px) {
  :root { --header-h: 64px; }

  /* --- スマホ：写真を上に大きく、コピーは写真の下へ --- */
  .hero {
    display: flex;
    flex-direction: column;
    min-height: auto;
    padding-bottom: 32px;
  }
  .hero__slides {
    flex: none;
    height: 62svh;
    min-height: 340px;
    max-height: 560px;
    margin: calc(var(--header-h) + 4px) 0 0 16px;
    border-radius: 0 0 0 64px;
  }
  .hero__copy {
    writing-mode: horizontal-tb;
    align-self: stretch;
    margin: 28px 20px 0;
    font-size: clamp(1.7rem, 7.6vw, 2.3rem);
    letter-spacing: .1em;
    line-height: 1.55;
  }
  .hero__copy span:nth-child(2) { margin-top: 0; }
  .hero__sub {
    position: static;
    margin: 12px 20px 0;
  }
  .hero__sub:empty { display: none; }
  .hero__topic {
    position: static;
    margin: 24px 16px 0;
    max-width: none;
    padding: 12px 18px;
  }
  .hero__topic-date { display: none; }
  .hero__scroll { display: none; }

  .about__grid,
  .care__item,
  .area__grid,
  .news__grid { grid-template-columns: 1fr; }
  .care__item:nth-child(even) .ph { order: 0; }

  .approach__grid { grid-template-columns: 1fr; }
  .approach__issue { min-height: 0; }

  .news__list a { grid-template-columns: auto 1fr; }
  .news__title { grid-column: 1 / -1; }

  .contact__actions { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; gap: 16px; }
}


@media (max-width: 1080px) {
  .demo-badge { margin-right: auto; }
  .menu-btn { margin-left: 0; }
}
@media (max-width: 820px) {
  .message, .info-table > div, .timeline li, .offices, .biz, .mv, .values li,
  .contact-layout, .snippet { grid-template-columns: 1fr; }
  .info-table > div, .timeline li, .values li { gap: 4px; }
  .biz .ph { position: relative; top: auto; }
  .steps { grid-template-columns: 1fr 1fr; }
  .page-hero::before { width: 220px; height: 220px; right: -80px; }
  .page-hero::after { display: none; }
}
@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
  .demo-badge { display: none; }
  .menu-btn { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .hero__copy span { opacity: 1; transform: none; }
}