/* ============================================
   VET ADVANCED TEMPLATE
   動物病院・先進医療 — ネイビー×ティール、グリッド線と数値
   直線的・角なし、細い罫線が引かれていく動き
============================================ */

:root {
  /* Color */
  --navy: #0a1828; /* ヒーロー・設備の暗い面 */
  --navy-2: #0f2238;
  --navy-3: #16304d;
  --teal: #1fb5a3; /* アクセント */
  --teal-bright: #3fd6c3;
  --teal-deep: #0e7f73;
  --paper: #f2f5f7; /* 明るいセクションの面 */
  --white: #ffffff;
  --ink: #0d1b2a;
  --muted: #5b6b7b;
  --line: #d5dde4; /* 明るい面の罫線 */
  --line-dark: rgba(255, 255, 255, 0.12); /* 暗い面の罫線 */
  --text-dark: #c6d3df; /* 暗い面の本文 */
  --amber: #e7a83a; /* ▲ */

  /* Font */
  --font-body: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  /* Shape — 角を立てる */
  --radius: 0;
  --radius-sm: 2px;

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
  --header-h: 72px;
  --grid-size: 64px;

  --ease: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  background: var(--white);
  color: var(--ink);
  line-height: 1.85;
  letter-spacing: 0.03em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

h1,
h2,
h3 {
  word-break: keep-all;
  overflow-wrap: break-word;
  font-feature-settings: "palt";
  line-height: 1.4;
}

:focus-visible {
  outline: 2px solid var(--teal-bright);
  outline-offset: 3px;
}

section[id] {
  scroll-margin-top: calc(var(--header-h) + 4px);
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 400;
  padding: 8px 16px;
  background: var(--teal);
  color: var(--navy);
}

.skip-link:focus {
  top: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  position: relative;
  padding: clamp(72px, 10vw, 128px) 0;
}

/* ---------- Buttons（角なし・細い線） ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  padding: 12px 30px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
  border-radius: var(--radius);
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease;
}

.btn::after {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  transition: width 0.3s var(--ease-out);
}

.btn:hover::after {
  width: 28px;
}

.btn--teal {
  background: var(--teal);
  color: var(--navy);
}

.btn--teal:hover {
  background: var(--teal-bright);
}

.btn--line {
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: var(--white);
}

.btn--line:hover {
  border-color: var(--teal-bright);
  color: var(--teal-bright);
}

.btn--block {
  width: 100%;
}

/* ---------- Section head（番号＋見出し＋引かれていく罫線） ---------- */
.sec-head {
  position: relative;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 18px;
  padding-bottom: 18px;
  margin-bottom: 32px;
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 900;
  letter-spacing: 0.06em;
}

.sec-head::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--line);
  transform-origin: left;
}

.sec-head::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 1;
  width: 64px;
  height: 3px;
  background: var(--teal);
}

.sec-head__no {
  font-size: 14px;
  font-weight: 500;
  color: var(--teal-deep);
}

.sec-head small {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.sec-head--dark {
  color: var(--white);
}

.sec-head--dark::after {
  background: var(--line-dark);
}

.sec-head--dark .sec-head__no {
  color: var(--teal-bright);
}

/* ---------- Header（ヒーロー上は透明、スクロール後にネイビーの面） ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  color: var(--white);
  border-bottom: 1px solid transparent;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
}

.header.is-scrolled {
  background: var(--navy);
  border-color: var(--line-dark);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
  padding: 0 var(--gutter);
  max-width: 1440px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.logo__mark svg {
  display: block;
}

.logo__text {
  display: flex;
  flex-direction: column;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: 0.1em;
}

.logo__text small {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--teal-bright);
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav__list {
  display: flex;
  align-items: center;
}

.nav__link {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 11px;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav__link span {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--teal-bright);
}

.nav__link:hover {
  color: var(--teal-bright);
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 20px;
  border: 1px solid var(--teal-bright);
  color: var(--teal-bright);
  font-size: 14px;
  font-weight: 700;
  transition:
    background-color 0.25s ease,
    color 0.25s ease;
}

.nav__cta:hover {
  background: var(--teal-bright);
  color: var(--navy);
}

.nav-toggle {
  display: none;
  position: relative;
  z-index: 120;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-dark);
}

.nav-toggle span {
  position: absolute;
  left: 13px;
  width: 22px;
  height: 1.5px;
  background: var(--white);
  transition: transform 0.3s var(--ease);
}

.nav-toggle span:nth-child(1) {
  top: 19px;
}

.nav-toggle span:nth-child(2) {
  top: 27px;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  transform: translateY(-4px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--header-h) + clamp(40px, 7vw, 96px)) 0 0;
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
}

/* グリッド線（細い罫線だけ。色のグラデーションではない） */
.hero__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-dark) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  opacity: 0.5;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: end;
}

.hero__kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-bottom: 26px;
  font-size: 14px;
  color: var(--text-dark);
}

.hero__kicker .mono {
  padding: 3px 10px;
  border: 1px solid var(--teal);
  color: var(--teal-bright);
  font-size: 14px;
}

.hero__title {
  font-size: clamp(36px, 5.6vw, 72px);
  font-weight: 900;
  line-height: 1.28;
  letter-spacing: 0.04em;
}

.hero__lead {
  max-width: 32em;
  margin-top: 28px;
  color: var(--text-dark);
  font-size: 16px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.hero__visual {
  position: relative;
}

.hero__frame {
  position: relative;
  aspect-ratio: 11 / 13;
  padding: 14px;
}

.hero__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  filter: saturate(0.85) contrast(1.05);
}



/* 四隅のトンボ */
.corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: var(--teal-bright);
  border-style: solid;
  border-width: 0;
}

.corner--tl {
  top: 0;
  left: 0;
  border-top-width: 1.5px;
  border-left-width: 1.5px;
}

.corner--tr {
  top: 0;
  right: 0;
  border-top-width: 1.5px;
  border-right-width: 1.5px;
}

.corner--bl {
  bottom: 0;
  left: 0;
  border-bottom-width: 1.5px;
  border-left-width: 1.5px;
}

.corner--br {
  bottom: 0;
  right: 0;
  border-bottom-width: 1.5px;
  border-right-width: 1.5px;
}

.hero__cap {
  margin-top: 10px;
  font-size: 12px;
  color: #8aa0b4;
}

/* 数字で見る設備・体制 */
.specs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(48px, 7vw, 88px);
  border-top: 1px solid var(--line-dark);
}

.spec {
  padding: 26px 24px 34px 0;
}

.spec + .spec {
  padding-left: 24px;
  border-left: 1px solid var(--line-dark);
}

.spec dt {
  font-size: 14px;
  color: #8aa0b4;
  line-height: 1.5;
}

.spec dd {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 8px;
}

.spec__num {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(36px, 4.6vw, 56px);
  line-height: 1;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}

.spec__unit {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--teal-bright);
}

/* ---------- 診療時間 ---------- */
.hours {
  background: var(--paper);
}

.hours__inner {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}

.now-panel {
  position: relative;
  padding: 24px 26px;
  background: var(--navy);
  color: var(--white);
}

.now-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--muted);
}

.is-open-now .now-panel::before {
  background: var(--teal-bright);
}

.now-panel__label {
  font-size: 12px;
  color: #8aa0b4;
}

.now-panel__clock {
  font-size: 44px;
  font-weight: 500;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.now-panel__state {
  margin-top: 12px;
  font-weight: 700;
  font-size: 18px;
}

.now-panel__state .dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--muted);
  vertical-align: 2px;
}

.is-open-now .now-panel__state .dot {
  background: var(--teal-bright);
}

.now-panel__sub {
  font-size: 14px;
  color: var(--text-dark);
}

.hours__notes {
  margin-top: 24px;
  border-top: 1px solid var(--line);
}

.hours__notes li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  color: var(--muted);
}

.hours__notes a {
  color: var(--teal-deep);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 曜日を縦に並べた表（スマホでもこのまま読める） */
.week {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font-size: 16px;
}

.week th,
.week td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  transition: background-color 0.3s ease;
}

.week thead th {
  background: var(--navy-2);
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.4;
}

.week thead th .mono {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: var(--teal-bright);
}

.week tbody th {
  width: 18%;
  font-weight: 700;
  font-size: 17px;
}

.week__memo {
  text-align: left !important;
  font-size: 14px;
  color: var(--muted);
}

.week thead .week__memo {
  color: var(--white);
}

/* 今日の行（JSで .is-today） */
.week tbody tr.is-today th,
.week tbody tr.is-today td {
  background: #e3f6f3;
}

.week tbody tr.is-today th {
  position: relative;
  color: var(--teal-deep);
}

.week tbody tr.is-today th::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--teal);
}

.mk {
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
}

.mk--ok {
  color: var(--teal-deep);
}

.mk--part {
  color: var(--amber);
}

.mk--off {
  color: #a9b5c0;
}

.week__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
}

.week__legend > span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.week__legend .mk {
  font-size: 15px;
}

/* ---------- 設備（暗い面） ---------- */
.equipment {
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
}

.equipment::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-dark) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  opacity: 0.35;
}

.equipment .container {
  position: relative;
}

.equipment__head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 64px;
  align-items: end;
  margin-bottom: 40px;
}

.equipment__head .sec-head {
  margin-bottom: 0;
}

.equipment__head p {
  color: var(--text-dark);
  font-size: 15px;
}

.eq {
  display: grid;
  grid-template-columns: 240px 1fr;
  border: 1px solid var(--line-dark);
}

.eq__tabs {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line-dark);
}

.eq__tab {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-height: 64px;
  padding: 18px 22px;
  text-align: left;
  font-weight: 700;
  font-size: 17px;
  color: #8aa0b4;
  border-bottom: 1px solid var(--line-dark);
  transition:
    color 0.25s ease,
    background-color 0.25s ease;
}

.eq__tab:last-child {
  border-bottom: none;
}

.eq__tab .mono {
  font-size: 12px;
  font-weight: 400;
}

.eq__tab::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--teal-bright);
  transform: scaleY(0);
  transition: transform 0.35s var(--ease-out);
}

.eq__tab:hover {
  color: var(--white);
}

.eq__tab.is-active {
  color: var(--white);
  background: var(--navy-2);
}

.eq__tab.is-active::before {
  transform: scaleY(1);
}

.eq__tab.is-active .mono {
  color: var(--teal-bright);
}

.eq__panel {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 384px;
}

/* JSが動いたときだけ選択中以外を隠す（JSなしなら全部並ぶ） */
.js-adv .eq__panel:not(.is-active) {
  display: none;
}

.js-adv .eq__panel.is-active {
  animation: panelIn 0.35s ease-out;
}

@keyframes panelIn {
  from {
    opacity: 0;
  }
}

.eq__panel + .eq__panel {
  border-top: 1px solid var(--line-dark);
}

.eq__visual {
  position: relative;
  background: var(--navy-2);
  border-right: 1px solid var(--line-dark);
  min-height: 280px;
}

.eq__visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.eq__visual--svg {
  display: grid;
  place-items: center;
  padding: 24px;
  color: #6f8aa3;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  background-color: var(--navy-2);
}

.eq__visual--svg svg {
  width: 100%;
  max-width: 360px;
  height: auto;
}

/* 線画の小さな動き（内視鏡の線が一度だけ描かれる。ループはしない） */
.svg-draw {
  stroke-dasharray: 420;
  stroke-dashoffset: 0;
  animation: draw 2.4s var(--ease) both;
}

@keyframes draw {
  from {
    stroke-dashoffset: 420;
  }
}

.eq__fig {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 1;
  padding: 2px 8px;
  background: rgba(10, 24, 40, 0.85);
  font-size: 11px;
  color: var(--teal-bright);
}

.eq__body {
  padding: clamp(24px, 3.4vw, 40px);
}

.eq__body h3 {
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 900;
  margin-bottom: 12px;
}

.eq__body > p {
  color: var(--text-dark);
  font-size: 15px;
}

.eq__spec {
  margin-top: 22px;
  border-top: 1px solid var(--line-dark);
}

.eq__spec div {
  display: grid;
  grid-template-columns: 6em 1fr;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-dark);
  font-size: 14px;
}

.eq__spec dt {
  color: #8aa0b4;
}

.eq__spec dd.mono {
  color: var(--teal-bright);
}

/* ---------- 診療科目（表のような行） ---------- */
.departments__head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 64px;
  align-items: end;
  margin-bottom: 24px;
}

.departments__head .sec-head {
  margin-bottom: 0;
}

.departments__head p {
  font-size: 15px;
  color: var(--muted);
}

.dept__row {
  display: grid;
  grid-template-columns: 64px 220px 1fr 200px;
  gap: 16px 24px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.25s ease;
}

.dept__row:not(.dept__row--label):hover {
  background: var(--paper);
}

.dept__row--label {
  padding: 10px 0;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--ink);
}

.dept__no {
  font-size: 14px;
  color: var(--teal-deep);
  padding-left: 4px;
}

.dept__row h3 {
  font-size: 18px;
  font-weight: 700;
}

.dept__row p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.75;
}

.dept__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dept__tags span {
  padding: 1px 8px;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
  background: var(--white);
}

/* 診療対象動物 */
.species {
  margin-top: clamp(56px, 8vw, 96px);
}

.species__title {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 18px;
}

.species__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--line);
}

.species__list li {
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: center;
  gap: 18px;
  padding: 16px;
}

.species__list li + li {
  border-left: 1px solid var(--line);
}

.species__list img {
  width: 112px;
  height: 112px;
  object-fit: cover;
}

.species__list strong {
  display: block;
  font-size: 18px;
}

.species__list span {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.species__note {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- 獣医師紹介 ---------- */
.doctors {
  background: var(--paper);
}

.doctors__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  grid-template-rows: repeat(3, auto);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.doc {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 18px;
  align-items: start;
  padding: 24px;
  background: var(--white);
}

.doc--lead {
  grid-row: span 3;
  grid-template-columns: 1fr;
  padding: 0;
}

.doc__photo {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.doc__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}

.doc--lead .doc__body {
  padding: 26px 28px 30px;
}

.doc__thumb {
  width: 96px;
  height: 96px;
  object-fit: cover;
}

.doc__role {
  font-size: 12px;
  color: var(--teal-deep);
}

.doc__name {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}

.doc__name span {
  margin-left: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.doc__name--sm {
  font-size: 18px;
  margin-bottom: 4px;
  letter-spacing: 0.08em;
}

.doc__body p:last-child,
.doc__msg {
  font-size: 15px;
  color: var(--muted);
}

.doc__msg {
  padding-left: 16px;
  border-left: 2px solid var(--teal);
  color: var(--ink) !important;
  line-height: 1.95;
}

.doc__data {
  margin-top: 18px;
}

.doc__data div {
  display: grid;
  grid-template-columns: 4em 1fr;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.doc__data dt {
  color: var(--muted);
}

.doc--count {
  background: var(--navy);
  color: var(--white);
}

.doc__big {
  font-size: 30px;
  color: var(--teal-bright);
  line-height: 1.2;
}

.doc__big small {
  margin-left: 2px;
  font-size: 13px;
  color: var(--text-dark);
}

.doc--count .doc__role {
  color: var(--teal-bright);
}

.doc--count p:last-child {
  color: var(--text-dark);
}

/* ---------- 初診の流れ ---------- */
.flow__inner {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.flow__side {
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

.flow__side > p {
  font-size: 15px;
  color: var(--muted);
}

.flow__photo {
  margin-top: 28px;
  aspect-ratio: 8 / 9;
  max-width: 380px;
  overflow: hidden;
}

.flow__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.timeline {
  position: relative;
  border-left: 1px solid var(--line);
  margin-top: 8px;
}

.timeline__item {
  position: relative;
  padding: 0 0 40px 40px;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 6px;
  width: 11px;
  height: 11px;
  background: var(--white);
  border: 2px solid var(--teal);
}

.timeline__item:last-child::before {
  background: var(--teal);
}

.timeline__time {
  display: inline-block;
  padding: 0 8px;
  background: var(--navy);
  color: var(--teal-bright);
  font-size: 13px;
}

.timeline__item h3 {
  margin-top: 8px;
  font-size: 20px;
  font-weight: 700;
}

.timeline__item p {
  margin-top: 4px;
  font-size: 15px;
  color: var(--muted);
}

/* ---------- 紹介診療 ---------- */
.referral {
  padding-top: 0;
}

.referral__inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
  padding-top: clamp(72px, 10vw, 128px);
  border-top: 1px solid var(--line);
}

.referral__photo {
  aspect-ratio: 9 / 7;
  overflow: hidden;
}

.referral__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.referral__body > p {
  color: var(--muted);
  font-size: 15px;
}

.referral__steps {
  margin-top: 22px;
  border-top: 1px solid var(--line);
}

.referral__steps li {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.referral__steps .mono {
  font-size: 12px;
  color: var(--teal-deep);
  padding-top: 3px;
}

.referral__fax {
  margin-top: 20px;
  padding: 12px 16px;
  background: var(--paper);
  font-size: 15px;
}

/* ---------- お知らせ ---------- */
.news {
  background: var(--paper);
}

.news__inner {
  display: grid;
  grid-template-columns: 0.6fr 1.4fr;
  gap: 24px 64px;
  align-items: start;
}

.news__list {
  border-top: 1px solid var(--ink);
}

.news__item {
  display: grid;
  grid-template-columns: 108px 64px 1fr;
  gap: 4px 16px;
  align-items: baseline;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  transition:
    background-color 0.2s ease,
    padding-left 0.3s var(--ease-out);
}

.news__item:hover {
  background: var(--white);
  padding-left: 12px;
}

.news__item time {
  font-size: 14px;
  color: var(--muted);
}

.news__cat {
  justify-self: start;
  padding: 0 8px;
  border: 1px solid var(--teal);
  color: var(--teal-deep);
  font-size: 12px;
  white-space: nowrap;
}

/* ---------- ご予約・お問い合わせ（暗い面） ---------- */
.contact {
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
}

.contact .hero__grid {
  opacity: 0.3;
}

.contact__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}

.contact__ways > p {
  color: var(--text-dark);
  font-size: 15px;
}

.call {
  display: block;
  margin-top: 28px;
  padding: 22px 24px;
  border: 1px solid var(--teal);
  transition: background-color 0.25s ease;
}

.call:hover {
  background: rgba(63, 214, 195, 0.08);
}

.call__label {
  display: block;
  font-size: 14px;
  color: var(--teal-bright);
}

.call__num {
  display: block;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.contact__links {
  margin-top: 10px;
  border-top: 1px solid var(--line-dark);
}

.ext-link {
  display: flex;
  gap: 14px;
  align-items: center;
  min-height: 56px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line-dark);
  font-weight: 700;
  font-size: 15px;
  transition: color 0.2s ease;
}

.ext-link .mono {
  color: var(--teal-bright);
  transition: transform 0.3s var(--ease-out);
}

.ext-link:hover {
  color: var(--teal-bright);
}

.ext-link:hover .mono {
  transform: translateX(4px);
}

/* フォーム */
.form {
  padding: clamp(22px, 3.4vw, 36px);
  background: var(--navy-2);
  border: 1px solid var(--line-dark);
}

.form__title {
  font-weight: 900;
  font-size: 20px;
}

.form__desc {
  margin: 4px 0 22px;
  font-size: 14px;
  color: var(--text-dark);
}

.form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}

.form__field--full {
  grid-column: 1 / -1;
}

.form label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 700;
}

.req {
  padding: 0 6px;
  border: 1px solid var(--teal);
  color: var(--teal-bright);
  font-size: 11px;
  font-weight: 500;
}

.form input,
.form select,
.form textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: var(--navy);
  color: var(--white);
  font-size: 16px;
  transition: border-color 0.2s ease;
}

.form select option {
  color: var(--ink);
  background: var(--white);
}

.form textarea {
  resize: vertical;
  line-height: 1.7;
}

.form textarea::placeholder {
  color: #6f8599;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--teal-bright);
}

.form__msg {
  min-height: 1.6em;
  margin-top: 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--teal-bright);
}

.form__msg.is-error {
  color: #f0a07a;
}

/* ---------- 夜間・緊急 ---------- */
.emergency {
  background: var(--teal-deep);
  color: var(--white);
  padding: clamp(40px, 6vw, 64px) 0;
}

.emergency__inner {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 24px 64px;
  align-items: start;
}

.emergency__title .mono {
  font-size: 12px;
  color: #b6efe7;
}

.emergency__title h2 {
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 900;
}

.emergency__body > p {
  font-size: 15px;
  color: #dff6f2;
}

.emergency__body dl {
  margin-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.emergency__body dl div {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.emergency__body dt {
  font-weight: 700;
  font-size: 15px;
}

.emergency__body dd {
  font-size: 14px;
  color: #dff6f2;
}

.emergency__body dd a {
  display: inline-block;
  padding: 4px 0;
  font-size: 22px;
  font-weight: 600;
  color: var(--white);
}

/* ---------- アクセス ---------- */
.access__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 0;
  border: 1px solid var(--line);
}

.access__photo {
  aspect-ratio: 9 / 7;
  overflow: hidden;
  border-right: 1px solid var(--line);
}

.access__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.access__dl {
  padding: 8px 28px;
}

.access__dl div {
  display: grid;
  grid-template-columns: 5em 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.access__dl div:last-child {
  border-bottom: none;
}

.access__dl dt {
  font-weight: 700;
  color: var(--muted);
}

.access__dl a {
  color: var(--teal-deep);
  font-weight: 600;
}

.access__map {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
}

.access__map iframe {
  display: block;
  width: 100%;
  height: 360px;
  border: 0;
  filter: grayscale(0.85) contrast(1.05);
}

/* ---------- Footer ---------- */
.footer {
  padding: 48px 0 28px;
  background: var(--navy);
  color: var(--text-dark);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line-dark);
}

.footer__name {
  font-weight: 900;
  font-size: 18px;
  color: var(--white);
  letter-spacing: 0.1em;
}

.footer__addr {
  font-size: 14px;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 22px;
  max-width: 560px;
  font-size: 14px;
}

.footer__nav a {
  display: inline-block;
  padding: 10px 0;
}

.footer__nav a:hover {
  color: var(--teal-bright);
}

.footer__copy {
  margin-top: 20px;
  padding: 0 var(--gutter);
  text-align: center;
  font-size: 11px;
  color: #7f94a8;
}

/* ---------- Page top ---------- */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  background: var(--navy);
  color: var(--teal-bright);
  border: 1px solid var(--teal);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s;
}

.to-top.is-show {
  opacity: 1;
  visibility: visible;
}

/* ---------- Scroll reveal（左から短くスライド＋見出しの罫線が引かれる） ----------
   html.js-adv のときだけ隠す＝JSが動かなければ最初から見える。
   監視するのは要素そのもの（clip-pathでは隠さない） */
.js-adv [data-reveal] {
  opacity: 0;
  transform: translateX(-16px);
}

.js-adv [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.7s ease-out,
    transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js-adv [data-reveal] .sec-head::after,
.js-adv .sec-head[data-reveal]::after {
  transform: scaleX(0);
}

.js-adv [data-reveal].is-visible .sec-head::after,
.js-adv .sec-head[data-reveal].is-visible::after {
  transform: scaleX(1);
  transition: transform 1.1s var(--ease) 0.15s;
}

/* ---------- Responsive ---------- */
@media (max-width: 1140px) {
  .nav__link {
    padding: 10px 7px;
    font-size: 13px;
  }

  .nav__link span {
    display: none;
  }

  .dept__row {
    grid-template-columns: 48px 180px 1fr 160px;
  }
}

@media (max-width: 960px) {
  :root {
    --header-h: 64px;
    --grid-size: 48px;
  }

  .nav-toggle {
    display: block;
  }

  /* 全画面メニュー（ヘッダーにfilter系を付けていないので fixed が画面基準で効く） */
  .nav {
    position: fixed;
    inset: 0;
    z-index: 110;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 24px;
    padding: calc(var(--header-h) + 24px) var(--gutter) 32px;
    background: var(--navy);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-16px);
    transition:
      opacity 0.3s ease-out,
      transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1),
      visibility 0.3s;
  }

  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    border-top: 1px solid var(--line-dark);
  }

  .nav__list li {
    border-bottom: 1px solid var(--line-dark);
  }

  .nav__link {
    padding: 16px 4px;
    font-size: 18px;
    font-weight: 700;
    gap: 16px;
  }

  .nav__link span {
    display: inline;
    font-size: 12px;
  }

  .nav__cta {
    justify-content: center;
    min-height: 56px;
    font-size: 16px;
  }

  body.nav-open {
    overflow: hidden;
  }

  .hero__inner,
  .hours__inner,
  .equipment__head,
  .departments__head,
  .flow__inner,
  .referral__inner,
  .news__inner,
  .contact__inner,
  .emergency__inner {
    grid-template-columns: 1fr;
  }

  .hero__visual {
    max-width: 520px;
  }

  .hero__frame {
    aspect-ratio: 4 / 3;
  }

  .specs {
    grid-template-columns: repeat(2, 1fr);
  }

  .spec:nth-child(3) {
    padding-left: 0;
    border-left: none;
  }

  .spec:nth-child(n + 3) {
    border-top: 1px solid var(--line-dark);
  }

  .eq {
    grid-template-columns: 1fr;
  }

  /* 設備のタブはスマホ・タブレットで横スクロールの帯に */
  .eq__tabs {
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--line-dark);
    scrollbar-width: thin;
  }

  .eq__tab {
    flex: none;
    min-height: 56px;
    padding: 14px 18px;
    border-bottom: none;
    border-right: 1px solid var(--line-dark);
    font-size: 15px;
  }

  .eq__tab::before {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: auto;
    height: 3px;
    transform: scaleX(0);
  }

  .eq__tab.is-active::before {
    transform: scaleX(1);
  }

  .eq__panel {
    grid-template-columns: 1fr;
  }

  .eq__visual {
    border-right: none;
    border-bottom: 1px solid var(--line-dark);
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .dept__row--label {
    display: none;
  }

  .dept__row {
    grid-template-columns: 48px 1fr;
    gap: 6px 16px;
  }

  .dept__row p,
  .dept__tags {
    grid-column: 2;
  }

  .species__list {
    grid-template-columns: 1fr;
  }

  .species__list li + li {
    border-left: none;
    border-top: 1px solid var(--line);
  }

  .doctors__grid {
    grid-template-columns: 1fr 1fr;
  }

  .doc--lead {
    grid-column: 1 / -1;
    grid-row: auto;
    grid-template-columns: 1fr 1.2fr;
  }

  .doc__photo {
    aspect-ratio: auto;
    height: 100%;
  }

  .doc--count {
    grid-column: 1 / -1;
  }

  .flow__side {
    position: static;
  }

  .flow__photo {
    display: none;
  }

  .access__grid {
    grid-template-columns: 1fr;
  }

  .access__photo {
    border-right: none;
    border-bottom: 1px solid var(--line);
    aspect-ratio: 16 / 8;
  }

  .access__dl {
    padding: 8px 20px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .logo__text {
    font-size: 14px;
  }

  .logo__text small {
    font-size: 8px;
    letter-spacing: 0.06em;
  }

  .hero__actions .btn {
    flex: 1 1 100%;
  }

  .spec {
    padding: 20px 12px 24px 0;
  }

  .spec + .spec {
    padding-left: 12px;
  }

  .spec:nth-child(3) {
    padding-left: 0;
  }

  .spec dt {
    font-size: 14px;
  }

  .week th,
  .week td {
    padding: 12px 8px;
  }

  .week tbody th {
    width: 15%;
  }

  .week thead th .mono {
    font-size: 14px;
    letter-spacing: 0;
  }

  .week__memo {
    font-size: 14px;
    line-height: 1.5;
  }

  .now-panel__clock {
    font-size: 38px;
  }

  .doctors__grid {
    grid-template-columns: 1fr;
  }

  .doc--lead {
    grid-template-columns: 1fr;
  }

  .doc__photo {
    aspect-ratio: 9 / 8;
    height: auto;
  }

  .doc--lead .doc__body {
    padding: 22px 20px 26px;
  }

  .doc {
    grid-template-columns: 72px 1fr;
    padding: 20px;
  }

  .doc__thumb {
    width: 72px;
    height: 72px;
  }

  .doc__name span {
    display: block;
    margin-left: 0;
  }

  .timeline__item {
    padding-left: 28px;
  }

  .news__item {
    grid-template-columns: auto 1fr;
  }

  .news__item > span:last-child {
    grid-column: 1 / -1;
  }

  .form__grid {
    grid-template-columns: 1fr;
  }

  .emergency__body dd a {
    font-size: 20px;
  }

  .access__map iframe {
    height: 300px;
  }

  .to-top {
    right: 14px;
    bottom: 14px;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }

  .js-adv [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .js-adv [data-reveal] .sec-head::after,
  .js-adv .sec-head[data-reveal]::after {
    transform: none !important;
  }
}
