:root {
  --bg: #fbfbfd;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --accent: #1d6fc2;
  --accent-deep: #14508d;
  --accent-soft: #eaf3fc;
  --hairline: rgba(0, 0, 0, 0.08);
  --radius: 22px;
  --shadow-card: 0 10px 34px rgba(29, 41, 61, 0.07);
  --shadow-card-hover: 0 18px 48px rgba(29, 41, 61, 0.12);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue",
    "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

::selection {
  background: rgba(29, 111, 194, 0.18);
}

.container {
  width: min(1080px, 92%);
  margin: 0 auto;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(251, 251, 253, 0.72);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease-out);
}

.nav.scrolled {
  border-bottom-color: var(--hairline);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.01em;
}

.nav-brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 14px;
  transition: color 0.25s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
}

.nav-tel {
  background: var(--accent);
  color: #fff !important;
  padding: 7px 16px;
  border-radius: 980px;
  font-weight: 600;
  transition: transform 0.25s var(--ease-out), background 0.25s ease;
}

.nav-tel:hover {
  background: var(--accent-deep);
}

.nav-tel:active {
  transform: scale(0.96);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 40px;
  height: 40px;
  cursor: pointer;
  position: relative;
}

.nav-toggle span {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.35s var(--ease-out), opacity 0.2s ease;
}

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

.nav.open .nav-toggle span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: block; }

  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(251, 251, 253, 0.94);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid var(--hairline);
    padding: 8px 4vw 20px;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.4s var(--ease-out);
  }

  .nav.open .nav-links {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 14px 0;
    font-size: 17px;
    border-bottom: 1px solid var(--hairline);
  }

  .nav-links li:last-child a {
    display: inline-block;
    margin-top: 16px;
    border: 0;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding: 150px 0 40px;
  text-align: center;
}

.hero-eyebrow {
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.08em;
}

.hero h1 {
  font-size: clamp(34px, 6.4vw, 68px);
  line-height: 1.16;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 14px 0 20px;
}

.hero-lead {
  color: var(--text-secondary);
  font-size: clamp(16px, 2.2vw, 20px);
  max-width: 640px;
  margin: 0 auto 32px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 980px;
  font-size: 16px;
  font-weight: 600;
  transition: transform 0.25s var(--ease-out), background 0.25s ease,
    box-shadow 0.25s ease;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-deep);
  box-shadow: 0 8px 24px rgba(29, 111, 194, 0.35);
}

.btn-secondary {
  background: var(--accent-soft);
  color: var(--accent);
}

.btn-secondary:hover {
  background: #dcebfa;
}

.hero-photo {
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.hero-photo img {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
}

.hero-caption {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 14px;
}

/* ---------- Sections ---------- */
.section {
  padding: 96px 0 0;
}

.section:last-of-type {
  padding-bottom: 110px;
}

.section-eyebrow {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section h2 {
  font-size: clamp(28px, 4.4vw, 44px);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 8px 0 28px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 40px;
}

@media (max-width: 640px) {
  .card { padding: 28px 22px; }
}

/* ようこそ */
.welcome-points {
  display: grid;
  gap: 20px;
}

.welcome-point {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.welcome-point .dot {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 20px;
}

.welcome-note {
  margin-top: 18px;
  color: var(--text-secondary);
  font-size: 14px;
}

/* 営業時間 */
.hours-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-size: 15px;
}

.hours-table th,
.hours-table td {
  padding: 16px 6px;
  border-bottom: 1px solid var(--hairline);
}

.hours-table thead th {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
}

.hours-table tbody th {
  color: var(--text-secondary);
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.hours-table tr:last-child th,
.hours-table tr:last-child td {
  border-bottom: 0;
}

.hours-table .open {
  color: var(--accent);
  font-weight: 700;
  font-size: 17px;
}

.hours-table .closed {
  color: #c7c7cc;
}

.hours-notes {
  margin-top: 20px;
  color: var(--text-secondary);
  font-size: 14px;
  display: grid;
  gap: 4px;
}

.hours-badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 980px;
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
}

@media (max-width: 640px) {
  .hours-table { font-size: 13px; }
  .hours-table .open { font-size: 13px; }
  .hours-table th, .hours-table td { padding: 12px 3px; }
}

/* アクセス */
.access-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: stretch;
}

@media (max-width: 820px) {
  .access-grid { grid-template-columns: 1fr; }
}

.access-map {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  min-height: 360px;
}

.access-map iframe {
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
  display: block;
}

.access-info dl {
  display: grid;
  gap: 18px;
}

.access-info dt {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
}

.access-info dd {
  font-size: 16px;
}

.access-info dd strong {
  font-size: 20px;
  letter-spacing: 0.01em;
}

.access-photo {
  margin-top: 24px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.access-photo img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

/* 医療DX */
.dx-list {
  list-style: none;
  display: grid;
  gap: 0;
}

.dx-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
}

.dx-list li:last-child {
  border-bottom: 0;
}

.dx-list .check {
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  display: grid;
  place-items: center;
}

/* 院長紹介 */
.doctor-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 44px;
  align-items: center;
}

@media (max-width: 760px) {
  .doctor-grid { grid-template-columns: 1fr; }
  .doctor-photo { max-width: 340px; margin: 0 auto; }
}

.doctor-photo {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.doctor-photo img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.doctor-name {
  font-size: 30px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.doctor-name span {
  display: block;
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.doctor-certs {
  list-style: none;
  margin-top: 22px;
  display: grid;
  gap: 10px;
}

.doctor-certs li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
}

.doctor-certs .badge {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* 最新情報 */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

@media (max-width: 820px) {
  .news-grid { grid-template-columns: 1fr; }
}

.news-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 30px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
}

.news-card:active {
  transform: translateY(-2px) scale(0.99);
}

.news-date {
  color: var(--text-secondary);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.news-card h3 {
  font-size: 19px;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.news-card p {
  color: var(--text-secondary);
  font-size: 14px;
  flex: 1;
}

.news-more {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
}

/* ---------- Sub pages ---------- */
.page-head {
  padding: 150px 0 20px;
  text-align: center;
}

.page-head .breadcrumb {
  color: var(--text-secondary);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.page-head .breadcrumb a {
  color: var(--text-secondary);
}

.page-head h1 {
  font-size: clamp(34px, 5.6vw, 56px);
  letter-spacing: -0.02em;
  margin-top: 10px;
}

.page-lead {
  color: var(--text-secondary);
  max-width: 620px;
  margin: 16px auto 0;
}

/* お問い合わせ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

@media (max-width: 700px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-card {
  text-align: center;
  padding: 44px 30px;
}

.contact-card .label {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.contact-card .number {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
  margin: 8px 0 4px;
  display: block;
}

a.number:hover {
  color: var(--accent);
}

.reserve-list {
  list-style: none;
  display: grid;
  gap: 16px;
  margin-top: 6px;
}

.reserve-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

/* ブログ */
.post-list {
  display: grid;
  gap: 22px;
}

.post-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 34px 40px;
  color: var(--text);
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.post-card .cat {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.post-card h2 {
  font-size: 22px;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.post-card p {
  color: var(--text-secondary);
  font-size: 15px;
}

.post-body {
  max-width: 720px;
  margin: 0 auto;
}

.post-body .post-meta {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 28px;
}

.post-body p {
  margin-bottom: 1.4em;
}

.post-body .lang-block {
  border-top: 1px solid var(--hairline);
  padding-top: 1.4em;
  margin-top: 1.6em;
}

.post-body .lang-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 30px;
  font-weight: 600;
}

/* ---------- Footer ---------- */
.footer {
  background: #f5f5f7;
  border-top: 1px solid var(--hairline);
  margin-top: 110px;
  padding: 60px 0 40px;
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.4fr;
  gap: 40px;
}

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer h4 {
  color: var(--text);
  font-size: 15px;
  margin-bottom: 14px;
  letter-spacing: 0.01em;
}

.footer ul {
  list-style: none;
  display: grid;
  gap: 8px;
}

.footer a {
  color: var(--text-secondary);
}

.footer a:hover {
  color: var(--text);
}

.footer-copy {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  text-align: center;
  font-size: 12px;
  color: #86868b;
}

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.9s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

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

  .reveal {
    transform: none;
    transition: opacity 0.3s ease;
  }

  .news-card:hover,
  .post-card:hover {
    transform: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .nav {
    background: #fbfbfd;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
