@charset "utf-8";

/* =========================================================
   OHTAYA Components
   複数ページで再利用する見出し・カード・レール・モーダル等
========================================================= */

.home-container {
  width: min(calc(100% - 40px), var(--home-width));
  margin-inline: auto;
}

.home-section {
  padding: 76px 0;
}

.home-section--soft {
  background: var(--home-bg-soft);
}

.home-section--guide {
  background: var(--home-bg-guide);
}

.home-section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}

.home-section__heading {
  position: relative;
  z-index: 0;
  width: fit-content;
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.35;
  letter-spacing: .04em;
  isolation: isolate;
}

.home-section__heading::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -26px;
  left: -18px;
  width: 88px;
  height: 88px;
  background: var(--section-accent, #dcf3cb);
  border-radius: 50%;
}

.home-section__lead {
  max-width: 650px;
  margin: 10px 0 0;
  color: var(--home-muted);
  font-size: 16px;
  line-height: 1.9;
}

.home-section__all {
  flex: 0 0 auto;
  color: var(--home-main) !important;
  font-weight: 700;
  text-decoration: none;
}

.home-section__all::after {
  content: " →";
}

/* コンテンツレール */
.home-rail-wrap {
  position: relative;
}

.home-rail {
  display: grid;
  grid-auto-columns: minmax(270px, calc((100% - 40px) / 3));
  grid-auto-flow: column;
  gap: 20px;
  overflow-x: auto;
  padding: 4px 2px 20px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  overscroll-behavior-inline: contain;
  touch-action: auto;
  cursor: grab;
}

.home-rail>* {
  scroll-snap-align: start;
}

.home-hero__viewport.is-dragging,
.home-rail.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  user-select: none;
}

.home-hero__viewport.is-positioning,
.home-rail.is-positioning,
.home-rail.is-dragging {
  scroll-behavior: auto;
  scroll-snap-type: none;
}

.home-rail.is-dragging a,
.home-rail.is-dragging button,
.home-hero__viewport.is-dragging a {
  pointer-events: none;
}

.home-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--home-line);
  border-radius: var(--home-radius);
}

.home-card__image {
  width: 100%;
  aspect-ratio: 3 / 2;
  margin: 0;
  overflow: hidden;
  background: #e8e3dd;
}

.home-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  -webkit-user-drag: none;
  user-select: none;
  transition: transform .35s ease;
}

.home-card:hover .home-card__image img {
  transform: scale(1.025);
}

.home-card__image-link,
.home-card__image-button {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  color: inherit;
  background: transparent;
  border: 0;
  text-decoration: none;
  cursor: pointer;
}

.home-card__image-link:focus-visible,
.home-card__image-button:focus-visible {
  outline: 3px solid var(--home-accent);
  outline-offset: -3px;
}

.home-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

.home-card__meta {
  margin: 0 0 7px;
  color: var(--home-main);
  font-size: 16px;
  font-weight: 700;
}

.home-card h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.55;
}

.home-card__text {
  margin: 10px 0 0;
  color: var(--home-muted);
  font-size: 16px;
  line-height: 1.75;
}

.home-card__link {
  margin-top: auto;
  padding-top: 18px;
  color: var(--home-main) !important;
  font-weight: 700;
  text-decoration: none;
}

.home-card__link::after {
  content: " →";
}

.home-card__link--button {
  width: fit-content;
  padding-right: 0;
  padding-bottom: 0;
  padding-left: 0;
  background: transparent;
  border: 0;
  font: inherit;
  font-weight:bold;
  cursor: pointer;
}

.home-card__link--button::after {
  content: " →";
}

.home-rail__controls {
  display: flex;
  gap: 8px;
}

.home-rail__button {
  width: 42px;
  height: 42px;
  color: var(--home-text);
  background: #fff;
  border: 1px solid var(--home-line);
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
}

.home-rail__button:disabled {
  opacity: .35;
  cursor: default;
}

/* お役立ち・会社情報 */
.home-link-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.home-link-panel {
  display: block;
  min-height: 150px;
  padding: 26px;
  background: #fff;
  border: 1px solid var(--home-line);
  border-radius: var(--home-radius);
  text-decoration: none;
}

.home-link-panel h3 {
  margin: 0;
  font-size: 19px;
}

.home-link-panel p {
  margin: 10px 0 0;
  color: var(--home-muted);
  font-size: 16px;
  line-height: 1.75;
}

.home-link-panel span {
  display: inline-block;
  margin-top: 16px;
  color: var(--home-main);
  font-weight: 700;
}

/* お知らせモーダル */
.home-dialog {
  position: fixed !important;
  inset: 0 !important;
  width: min(calc(100% - 32px), 680px);
  max-height: min(86vh, 760px);
  margin: auto !important;
  padding: 0;
  color: var(--home-text);
  background: #fff;
  border: 0;
  border-radius: var(--home-radius);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
  overflow: auto;
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity .24s ease,
    transform .24s ease,
    display .24s allow-discrete,
    overlay .24s allow-discrete;
}

.home-dialog[open] {
  opacity: 1;
  transform: translateY(0);
}

.home-dialog.is-closing {
  opacity: 0;
  transform: translateY(10px);
}

.home-dialog::backdrop {
  opacity: 0;
  background: rgba(24, 21, 19, .72);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  transition:
    opacity .24s ease,
    display .24s allow-discrete,
    overlay .24s allow-discrete;
}

.home-dialog[open]::backdrop {
  opacity: 1;
}

.home-dialog.is-closing::backdrop {
  opacity: 0;
}

@starting-style {
  .home-dialog[open] {
    opacity: 0;
    transform: translateY(14px);
  }

  .home-dialog[open]::backdrop {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {

  .home-dialog,
  .home-dialog::backdrop {
    transition: none !important;
  }

  .home-dialog,
  .home-dialog[open],
  .home-dialog.is-closing {
    transform: none !important;
  }
}

.home-dialog__close {
  position: sticky;
  z-index: 2;
  top: 14px;
  float: right;
  width: 44px;
  height: 44px;
  margin: 14px 14px -58px 0;
  color: #fff;
  background: rgba(30, 27, 25, .75);
  border: 0;
  border-radius: 50%;
  font-size: 25px;
  cursor: pointer;
}

.home-dialog__image {
  aspect-ratio: 16 / 8;
  margin: 0;
  background: #eee;
}

.home-dialog__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* モーダル本文内に掲載する画像・紙面・広告など */
.home-dialog__document {
  display: grid;
  gap: 12px;
  width: 100%;
  margin: 22px 0;
}

.home-dialog__document img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg, 16px);
}

/* 同じfigure内に画像が2枚以上ある場合 */
.home-dialog__document:has(> img:nth-of-type(2)) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-dialog__body {
  padding: 30px 34px 36px;
}

.home-dialog__meta {
  margin: 0 0 9px;
  color: var(--color-daiji);
  font-size: 16px;
  font-weight: 700;
}

.home-dialog h2 {
  margin: 0 !important;
  padding: 0 !important;
  color: inherit !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  font-size: clamp(19px, 4vw, 32px);
  line-height: 1.5;
  text-align: left !important;
}

.home-dialog h2::before,
.home-dialog h2::after {
  display: none !important;
  content: none !important;
}

.home-dialog h2 .text-phrase {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}

.home-dialog__body p {
  line-height: 1.9;
}

.home-dialog__action {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding: 10px 20px;
  color: #fff !important;
  background: var(--color-daiji);
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

/* 営業案内を開いた直後に要点が把握できる要約枠 */
.home-dialog__summary {
  margin: 22px 0;
  padding: 18px 20px;
  background: #f8f5f1;
  border-left: 4px solid var(--color-daiji);
  border-radius: 8px;
}

.home-dialog__summary p {
  margin: 0;
}

.home-dialog__summary p+p {
  margin-top: 6px;
}

.home-dialog__schedule {
  margin: 0;
}

.home-dialog__schedule>div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  padding: 10px 0;
}

.home-dialog__schedule>div+div {
  border-top: 1px solid #ded8d1;
}

.home-dialog__schedule dt,
.home-dialog__schedule dd {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
}

.home-dialog__note {
  padding-left: 1em;
  color: var(--home-muted);
  text-indent: -1em;
}

/* お問い合わせ・会員申込み */
.home-actions {
  padding: 64px 0;
  background: #fff;
}

.home-actions__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.home-action-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  min-height: 150px;
  padding: 28px 30px;
  color: var(--home-text) !important;
  background: #fff;
  border: 2px solid var(--action-accent, var(--home-main));
  border-radius: var(--home-radius);
  text-decoration: none !important;
  transition: transform .2s ease, box-shadow .2s ease;
}

.home-action-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(57, 46, 35, .13);
}

.home-action-card__eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--action-accent, var(--home-main));
  font-size: 16px;
  font-weight: 700;
}

.home-action-card strong {
  display: block;
  font-size: clamp(21px, 2vw, 28px);
  line-height: 1.4;
}

.home-action-card p {
  margin: 8px 0 0;
  color: var(--home-muted);
  font-size: 16px;
  line-height: 1.75;
}

.home-action-card__arrow {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  color: #fff;
  background: var(--action-accent, var(--home-main));
  border-radius: 50%;
  font-size: 17px;
}

.home-action-card__icon,
.home-link-panel__icon {
  display: grid !important;
  place-items: center;
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  margin: 0;
  color: #fff !important;
  background: var(--card-accent, var(--action-accent, var(--home-main)));
  border-radius: 50%;
}

.home-action-card__icon svg,
.home-link-panel__icon svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-link-panel--visual {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.home-link-panel--visual .home-link-panel__content>span {
  display: inline-block;
  margin-top: 16px;
}

.text-phrase {
  display: inline-block;
}

@media screen and (max-width: 768px) {
  .text-phrase-sp {
    display: block;
  }
  .ctrsp {
    text-align: center;
  }
}

/*見出しアンダーライン表示アニメーション*/

.heading-line-reveal {
  --heading-line-color: #368262;
  --heading-line-height: 5px;
  --heading-line-gap: .18em;
  --heading-line-duration: 2.15s;
  --heading-line-delay: 0s;

  position: relative;
  display: inline-block;
  padding-bottom: var(--heading-line-gap);
}

/* 通常：見出し全体に1本 */
.heading-line-reveal::after {
  content: "";

  position: absolute;
  left: 0;
  bottom: 0;

  width: 100%;
  height: var(--heading-line-height);

  background: var(--heading-line-color);
  border-radius: 999px;

  transform: scaleX(0);
  transform-origin: left center;

  transition:
    transform
    var(--heading-line-duration)
    cubic-bezier(.12, .8, .2, 1)
    var(--heading-line-delay);
}

.heading-line-reveal.is-visible::after {
  transform: scaleX(1);
}


/* ========================================
   複数フレーズそれぞれにアンダーライン
======================================== */

.heading-line-reveal--phrases {
  display: block;
  padding-bottom: 0;
}

/* 親自身のラインは消す */
.heading-line-reveal--phrases::after {
  display: none;
}

.heading-line-reveal--phrases .text-phrase {
  position: relative;
  display: inline-block;
  padding-bottom: var(--heading-line-gap);
}

.heading-line-reveal--phrases .text-phrase::after {
  content: "";

  position: absolute;
  left: 0;
  bottom: 0;

  width: 100%;
  height: var(--heading-line-height);

  background: var(--heading-line-color);
  border-radius: 999px;

  transform: scaleX(0);
  transform-origin: left center;

  transition:
    transform
    var(--heading-line-duration)
    cubic-bezier(.12, .8, .2, 1)
    var(--heading-line-delay);
}

.heading-line-reveal--phrases.is-visible .text-phrase::after {
  transform: scaleX(1);
}

.heading-line-reveal--phrases .text-phrase:nth-child(2)::after {
  transition-delay: .06s;
}

.heading-line-reveal--phrases .text-phrase:nth-child(3)::after {
  transition-delay: .12s;
}

/* ==================================================
   見出しマーカー表示アニメーション
================================================== */

.heading-marker-reveal {
  --heading-marker-color: #fde401;
  --heading-marker-opacity: .35;
  --heading-marker-height: .7em;
  --heading-marker-duration: 2.15s;
  --heading-marker-delay: 0s;

  display: inline;

  background-image:
    linear-gradient(
      rgb(from var(--heading-marker-color) r g b / var(--heading-marker-opacity)),
      rgb(from var(--heading-marker-color) r g b / var(--heading-marker-opacity))
    );

  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: 0% var(--heading-marker-height);

  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;

  transition:
    background-size
    var(--heading-marker-duration)
    cubic-bezier(.12, .8, .2, 1)
    var(--heading-marker-delay);
}

.heading-marker-reveal.is-visible {
  background-size: 100% var(--heading-marker-height);
}


/* ========================================
   複数フレーズそれぞれにマーカー
======================================== */

.heading-marker-reveal--phrases {
  display: block;
  background: none;
}

.heading-marker-reveal--phrases .text-phrase {
  --heading-marker-local-delay: var(--heading-marker-delay);

  display: inline;

  background-image:
    linear-gradient(
      rgb(from var(--heading-marker-color) r g b / var(--heading-marker-opacity)),
      rgb(from var(--heading-marker-color) r g b / var(--heading-marker-opacity))
    );

  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: 0% var(--heading-marker-height);

  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;

  transition:
    background-size
    var(--heading-marker-duration)
    cubic-bezier(.12, .8, .2, 1)
    var(--heading-marker-local-delay);
}

.heading-marker-reveal--phrases.is-visible .text-phrase {
  background-size: 100% var(--heading-marker-height);
}

.heading-marker-reveal--phrases .text-phrase:nth-child(2) {
  --heading-marker-local-delay: .06s;
}

.heading-marker-reveal--phrases .text-phrase:nth-child(3) {
  --heading-marker-local-delay: .12s;
}

@media (prefers-reduced-motion: reduce) {
  .heading-marker-reveal,
  .heading-marker-reveal--phrases .text-phrase {
    background-size: 100% var(--heading-marker-height) !important;
    transition: none !important;
  }
}

.text-phrase.heading-marker-reveal {
  display: inline-block;
}