/* ============================================
   VET NEWOPEN TEMPLATE
   動物病院・開院したての若手院長 — 白×若草×濃紺
   ヒーローは便箋に縦書きした「開院のごあいさつ」。手書き風の Klee One を手紙と小見出しだけに
============================================ */

:root {
  /* Color */
  --white: #ffffff;
  --paper: #fbfaf5; /* 便箋 */
  --green: #8bb04f; /* 若草 */
  --green-dark: #6d9135;
  --green-pale: #eef4e2;
  --navy: #20304a; /* 濃紺 */
  --navy-2: #34486a;
  --ink: #26303d;
  --ink-soft: #626b78;
  --line: #dfe3e8;
  --rule: #d9e6c4; /* 便箋の罫線 */

  /* Font */
  --font: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", sans-serif;
  --font-hand: "Klee One", "Zen Kaku Gothic New", cursive;

  --gutter: clamp(16px, 5vw, 64px);
  --max: 1160px;
  --header-h: 72px;
  --radius: 10px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.03em;
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
}
body.nav-open {
  overflow: hidden;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
}
ul,
ol {
  list-style: none;
}
button,
input,
textarea {
  font: inherit;
  color: inherit;
}
h1,
h2,
h3 {
  line-height: 1.5;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--navy);
  color: #fff;
  padding: 8px 14px;
  z-index: 200;
}
.skip-link:focus {
  left: 8px;
}

.sec {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(72px, 10vw, 130px) var(--gutter) 0;
  box-sizing: content-box;
}
.sec__head {
  margin-bottom: 32px;
}
.sec__hand {
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 17px;
  color: var(--green-dark);
}
.h2 {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  color: var(--navy);
}
.note {
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: 14px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.btn--navy {
  background: var(--navy);
  color: #fff;
}
.btn--navy:hover {
  background: var(--navy-2);
}
.btn--green {
  background: var(--green);
  color: #fff;
}
.btn--green:hover {
  background: var(--green-dark);
}
.btn--line {
  border-color: var(--navy);
  color: var(--navy);
}
.btn--line:hover {
  background: var(--green-pale);
}
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 var(--gutter);
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  color: var(--navy);
  line-height: 1.25;
}
.logo small {
  display: block;
  font-family: var(--font-hand);
  font-size: 13px;
  font-weight: 400;
  color: var(--green-dark);
}
.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav ul {
  display: flex;
  gap: 18px;
  font-size: 14px;
  font-weight: 500;
}
.nav ul a {
  text-decoration: none;
}
.nav ul a:hover {
  color: var(--green-dark);
}
.nav__cta {
  display: flex;
  gap: 8px;
}
.nav__cta .btn {
  min-height: 44px;
  padding: 0 16px;
  font-size: 14px;
}
.menu {
  display: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--navy);
  background: #fff;
  position: relative;
  cursor: pointer;
}
.menu span {
  position: absolute;
  left: 13px;
  right: 13px;
  height: 2px;
  background: var(--navy);
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.menu span:nth-child(1) {
  top: 15px;
}
.menu span:nth-child(2) {
  top: 22px;
}
.menu span:nth-child(3) {
  top: 29px;
}
.menu[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.menu[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
@media (max-width: 1140px) {
  .menu {
    display: block;
  }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    padding: 16px var(--gutter) 40px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-16px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0s linear 0.3s;
  }
  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0s;
  }
  .nav ul {
    flex-direction: column;
    gap: 0;
    font-size: 18px;
  }
  .nav ul a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }
  .nav__cta {
    flex-direction: column;
  }
  .nav__cta .btn {
    min-height: 54px;
    font-size: 16px;
  }
}

/* ---------- Hero（縦書きの手紙） ---------- */
.hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 72px) var(--gutter) 0;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}
.hero__letter {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: clamp(24px, 3vw, 44px);
  box-shadow: 0 1px 0 var(--line), 6px 8px 0 var(--green-pale);
  overflow-x: auto;
  direction: rtl; /* 縦書きは右から読むので、はみ出したときも右端を起点に */
}
.letter {
  direction: ltr;
  writing-mode: vertical-rl;
  height: clamp(380px, 52vh, 460px);
  margin-left: auto;
  font-family: var(--font-hand);
  font-size: 20px;
  line-height: 2.2;
  letter-spacing: 0.12em;
  color: var(--navy);
  /* 便箋の縦罫 */
  background-image: repeating-linear-gradient(to left, transparent 0 calc(2.2em - 1px), var(--rule) calc(2.2em - 1px) 2.2em);
}
.letter__ttl {
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 26px;
  line-height: 1.6;
  margin-left: 0.6em;
  color: var(--green-dark);
}
.letter p {
  text-indent: 1em;
}
.letter__sign {
  text-indent: 0 !important;
  text-align: end;
  margin-right: 1em;
}
.hero__photo img {
  aspect-ratio: 9 / 8;
  object-fit: cover;
  border-radius: var(--radius);
}
.hero__photo figcaption {
  font-family: var(--font-hand);
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: 6px;
}
.hero__info {
  margin-top: 20px;
  font-size: 15px;
}
.hero__open {
  font-size: 15px;
  color: var(--ink-soft);
}
.hero__open b {
  font-size: 30px;
  color: var(--green-dark);
  margin-right: 4px;
  letter-spacing: 0;
}
.hero__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }
}
/* スマホでは横書きの便箋に切り替え */
@media (max-width: 640px) {
  .hero__letter {
    direction: ltr;
  }
  .letter {
    writing-mode: horizontal-tb;
    height: auto;
    font-size: 16px;
    letter-spacing: 0.05em;
    line-height: 2.2;
    background-image: repeating-linear-gradient(to bottom, transparent 0 calc(2.2em - 1px), var(--rule) calc(2.2em - 1px) 2.2em);
  }
  .letter__ttl {
    font-size: 22px;
    margin: 0 0 0.4em;
    line-height: 1.6;
  }
  .letter__sign {
    margin: 0;
  }
}

/* ---------- お知らせ ---------- */
.news__list {
  border-left: 2px dashed var(--green);
  margin-left: 8px;
}
.news__list li {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  padding: 12px 0 12px 24px;
  position: relative;
  font-size: 15px;
}
.news__list li::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 21px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--green);
}
.news__list li:first-child::before {
  background: var(--green);
}
.news__list time {
  font-weight: 700;
  color: var(--navy);
  font-size: 17px;
}
@media (max-width: 520px) {
  .news__list li {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* ---------- 大切にしていること ---------- */
.promise {
  margin-top: clamp(72px, 10vw, 130px);
  background: var(--green-pale);
  padding: clamp(64px, 8vw, 110px) var(--gutter);
}
.promise__in {
  max-width: var(--max);
  margin: 0 auto;
}
.promise__list li {
  display: grid;
  grid-template-columns: 90px 1fr 1.4fr;
  gap: 24px;
  align-items: baseline;
  padding: 24px 0;
  border-top: 1px solid #cddbb4;
}
.promise__list li:last-child {
  border-bottom: 1px solid #cddbb4;
}
.promise__no {
  font-family: var(--font-hand);
  font-size: 44px;
  color: var(--green-dark);
  line-height: 1;
}
.promise__list h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
}
.promise__list p {
  font-size: 15px;
  color: var(--ink-soft);
}
@media (max-width: 760px) {
  .promise__list li {
    grid-template-columns: 50px 1fr;
    gap: 6px 14px;
  }
  .promise__list p {
    grid-column: 2;
  }
  .promise__no {
    font-size: 34px;
  }
}

/* ---------- 院内 ---------- */
.inside__grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
}
.inside__grid figure {
  margin: 0;
}
.inside__a {
  grid-row: 1 / 3;
}
.inside__grid img {
  border-radius: var(--radius);
  object-fit: cover;
  width: 100%;
}
.inside__a img {
  aspect-ratio: 3 / 2;
}
.inside__b img {
  aspect-ratio: 4 / 3;
}
.inside__c img {
  aspect-ratio: 4 / 3;
}
.inside__grid figcaption {
  font-family: var(--font-hand);
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: 4px;
}
@media (max-width: 640px) {
  .inside__grid {
    grid-template-columns: 1fr 1fr;
  }
  .inside__a {
    grid-column: 1 / 3;
    grid-row: auto;
  }
}

/* ---------- 診療内容 ---------- */
.medical__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 40px;
}
.medical__list div {
  display: grid;
  grid-template-columns: 6em 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.medical__list dt {
  font-weight: 700;
  color: var(--navy);
}
.medical__list dt::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}
.medical__list dd {
  font-size: 15px;
  color: var(--ink-soft);
}
@media (max-width: 760px) {
  .medical__list {
    grid-template-columns: 1fr;
  }
  .medical__list div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* ---------- はじめての方へ ---------- */
.first {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.first__photo img {
  aspect-ratio: 8 / 9;
  object-fit: cover;
  border-radius: 200px 200px var(--radius) var(--radius);
}
.first__bring {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.first__bring li {
  border: 2px solid var(--green);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 500;
}
.first__flow {
  counter-reset: f;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.first__flow li {
  counter-increment: f;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 14px;
  color: var(--ink-soft);
}
.first__flow b {
  display: block;
  font-size: 17px;
  color: var(--navy);
}
.first__flow b::before {
  content: counter(f) ". ";
  color: var(--green-dark);
}
@media (max-width: 760px) {
  .first {
    grid-template-columns: 1fr;
  }
  .first__photo {
    max-width: 280px;
  }
}
@media (max-width: 420px) {
  .first__flow {
    grid-template-columns: 1fr;
  }
}

/* ---------- 院長 ---------- */
.doctor {
  margin-top: clamp(72px, 10vw, 130px);
  background: var(--navy);
  color: #dfe5ee;
  padding: clamp(64px, 8vw, 110px) var(--gutter);
}
.doctor__in {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas: "head cv" "cat cv";
  gap: 24px clamp(28px, 5vw, 64px);
}
.doctor__head {
  grid-area: head;
}
.doctor .sec__hand {
  color: var(--green);
}
.doctor .h2 {
  color: #fff;
  margin-bottom: 12px;
}
.doctor .h2 small {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: #b9c3d2;
}
.doctor__head p:last-child {
  font-size: 15px;
}
.doctor__cv {
  grid-area: cv;
  border-left: 2px solid var(--navy-2);
}
.doctor__cv li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  padding: 14px 0 14px 20px;
  font-size: 15px;
  position: relative;
}
.doctor__cv li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 24px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--navy-2);
}
.doctor__cv time {
  font-weight: 700;
  color: #fff;
}
.doctor__cv .is-now {
  color: #fff;
  font-weight: 700;
}
.doctor__cv .is-now::before {
  background: var(--green);
}
.doctor__cv .is-now time {
  color: var(--green);
}
.doctor__cat {
  grid-area: cat;
  max-width: 360px;
}
.doctor__cat img {
  aspect-ratio: 7 / 5;
  object-fit: cover;
  border-radius: var(--radius);
}
.doctor__cat figcaption {
  font-family: var(--font-hand);
  font-size: 14px;
  margin-top: 4px;
}
@media (max-width: 760px) {
  .doctor__in {
    grid-template-columns: 1fr;
    grid-template-areas: "head" "cv" "cat";
  }
}

/* ---------- 診療時間 ---------- */
.htable {
  width: 100%;
  min-width: 340px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  text-align: center;
  border: 2px solid var(--navy);
  border-radius: var(--radius);
  overflow: hidden;
}
.htable th,
.htable td {
  padding: 14px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.htable tbody tr:last-child th,
.htable tbody tr:last-child td {
  border-bottom: 0;
}
.htable thead th {
  background: var(--navy);
  color: #fff;
  font-weight: 500;
}
.htable tbody th {
  width: 28%;
  font-weight: 500;
  font-size: 14px;
}
.htable td {
  color: var(--navy);
  font-weight: 700;
}
.htable .new {
  color: var(--green-dark);
  font-size: 13px;
}
.htable .is-today {
  background: var(--green-pale);
}
.htable thead .is-today {
  background: var(--green);
}

/* ---------- お問い合わせ ---------- */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 64px);
}
.contact__lead > p {
  font-size: 15px;
}
.contact__tel {
  display: block;
  font-weight: 700;
  font-size: clamp(32px, 4.6vw, 48px);
  color: var(--navy);
  text-decoration: none;
  margin: 10px 0 18px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.contact__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.form {
  background: var(--paper);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 36px);
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
}
.form__ttl {
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 19px;
  color: var(--navy);
}
.form label {
  display: grid;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
}
.form input,
.form textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 11px 12px;
  font-size: 16px;
  min-height: 46px;
}
.form input:focus,
.form textarea:focus {
  outline: 2px solid var(--green);
  outline-offset: 0;
}
.form__msg {
  font-size: 14px;
  font-weight: 700;
  color: var(--green-dark);
}
@media (max-width: 760px) {
  .contact {
    grid-template-columns: 1fr;
  }
}

/* ---------- アクセス ---------- */
.access {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(28px, 5vw, 64px);
  padding-bottom: clamp(72px, 10vw, 130px);
}
.access__info > p {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.access__couple {
  margin-top: 20px;
  max-width: 340px;
}
.access__couple img {
  aspect-ratio: 14 / 9;
  object-fit: cover;
  border-radius: var(--radius);
}
.access__couple figcaption {
  font-family: var(--font-hand);
  font-size: 14px;
  color: var(--ink-soft);
}
.access iframe {
  width: 100%;
  min-height: 420px;
  border: 0;
  border-radius: var(--radius);
  display: block;
}
@media (max-width: 760px) {
  .access {
    grid-template-columns: 1fr;
  }
  .access iframe {
    min-height: 300px;
  }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--green-pale);
  text-align: center;
  padding: 36px var(--gutter);
  font-size: 13px;
  color: var(--ink-soft);
}
.footer__name {
  font-weight: 700;
  font-size: 18px;
  color: var(--navy);
}

/* ---------- スクロール出現（JSが動いたときだけ） ---------- */
html.js .rv {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
html.js .rv.is-in {
  opacity: 1;
  transform: none;
}
html.js .hero .rv {
  transform: translateY(12px);
  transition-duration: 0.9s;
}
html.js .hero .rv.is-in {
  transform: none;
}

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