/*
 * Y建築工房 FV component
 * すべてのスタイルを .ykfv 配下に限定し、既存テーマとの干渉を防いでいます。
 */

.ykfv,
.ykfv * {
  box-sizing: border-box;
}

.ykfv {
  --ykfv-green-950: #092d27;
  --ykfv-green-900: #113c34;
  --ykfv-gold: #c79448;
  --ykfv-ivory: #f5f1e7;
  width: 100%;
  margin: 0;
  color: #17332d;
  font-family: "Yu Gothic", "YuGothic", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  line-height: 1.6;
}

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

.ykfv button,
.ykfv a {
  -webkit-tap-highlight-color: transparent;
}

.ykfv button {
  font: inherit;
}

.ykfv-topbar {
  position: relative;
  z-index: 30;
  height: 50px;
  padding: 0 max(3.5vw, 34px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  background: var(--ykfv-green-950);
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.ykfv-topbar p {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ykfv-topbar p span {
  margin-right: 20px;
  padding: 5px 13px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.ykfv-topbar > a {
  flex: 0 0 auto;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.ykfv-header {
  position: relative;
  z-index: 30;
  height: 104px;
  padding-left: max(3.5vw, 34px);
  display: flex;
  align-items: center;
  background: #fff;
}

.ykfv-logo {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 15px;
}

.ykfv-logo__mark {
  width: 50px;
  height: 50px;
  border: 1px solid #58746d;
  display: grid;
  place-items: center;
  color: var(--ykfv-green-900);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  line-height: 1;
}

.ykfv-logo__text {
  display: flex;
  flex-direction: column;
}

.ykfv-logo__text strong {
  color: #17332d;
  font-family: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  font-size: 23px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.35;
}

.ykfv-logo__text small {
  margin-top: 4px;
  color: #66736f;
  font-size: 8px;
  letter-spacing: 0.11em;
}

.ykfv-nav {
  min-width: 0;
  margin-left: auto;
  display: flex;
  align-items: center;
  align-self: stretch;
}

.ykfv-nav > a {
  height: 100%;
  padding: 0 clamp(14px, 1.7vw, 32px);
  display: flex;
  align-items: center;
  color: #243a35;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.ykfv-nav > a:hover,
.ykfv-nav > a:focus-visible {
  color: var(--ykfv-gold);
}

.ykfv-nav__mobile-actions {
  display: none;
}

.ykfv-header-actions {
  height: 100%;
  display: flex;
  margin-left: clamp(8px, 1.2vw, 24px);
}

.ykfv-header-actions > a {
  width: clamp(145px, 9.4vw, 180px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.ykfv-header-actions span {
  margin-bottom: 4px;
  font-size: 9px;
  font-weight: 500;
}

.ykfv-header-consult {
  background: var(--ykfv-ivory);
  color: var(--ykfv-green-950);
}

.ykfv-header-estimate {
  background: var(--ykfv-gold);
  color: #fff;
}

.ykfv-menu-button {
  width: 48px;
  height: 48px;
  margin: 0 18px 0 auto;
  padding: 12px 10px;
  border: 0;
  display: none;
  background: transparent;
  cursor: pointer;
}

.ykfv-menu-button span {
  width: 100%;
  height: 1px;
  display: block;
  background: var(--ykfv-green-950);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.ykfv-menu-button span + span {
  margin-top: 7px;
}

.ykfv-menu-button.is-open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.ykfv-menu-button.is-open span:nth-child(2) {
  opacity: 0;
}

.ykfv-menu-button.is-open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.ykfv-hero {
  position: relative;
  height: clamp(610px, calc(100svh - 154px), 790px);
  min-height: 610px;
  overflow: hidden;
  background: #26463f;
  color: #fff;
  isolation: isolate;
}

.ykfv-slides,
.ykfv-slide {
  position: absolute;
  inset: 0;
}

.ykfv-slide {
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease, visibility 1s ease;
}

.ykfv-slide.is-active {
  z-index: 1;
  opacity: 1;
  visibility: visible;
}

.ykfv-slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
}

.ykfv-hero__veil {
  position: absolute;
  z-index: 2;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 33, 28, 0.88) 0%, rgba(7, 35, 30, 0.72) 27%, rgba(7, 32, 28, 0.35) 53%, rgba(7, 32, 28, 0.03) 80%),
    linear-gradient(0deg, rgba(5, 29, 25, 0.25), transparent 42%);
  pointer-events: none;
}

.ykfv-hero__inner {
  position: relative;
  z-index: 3;
  width: min(1475px, calc(100% - 80px));
  height: 100%;
  margin: 0 auto;
}

.ykfv-copy {
  position: absolute;
  top: 50%;
  left: 0;
  width: min(930px, 78%);
  transform: translateY(-50%);
}

.ykfv-copy__eyebrow {
  margin: 0 0 30px;
  font-size: clamp(11px, 0.82vw, 14px);
  font-weight: 700;
  letter-spacing: 0.045em;
  white-space: nowrap;
}

.ykfv-copy__eyebrow span {
  margin: 0 8px;
  color: var(--ykfv-gold);
}

.ykfv-copy__label {
  width: fit-content;
  margin: 0 0 29px;
  padding: 8px 17px;
  border-left: 2px solid #d9a452;
  background: rgba(255, 255, 255, 0.14);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.ykfv-copy__title {
  margin: 0;
  color: #fff;
  font-family: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  font-size: clamp(36px, 3.8vw, 60px);
  font-weight: 500;
  letter-spacing: 0.025em;
  line-height: 1.48;
  text-shadow: 0 2px 26px rgba(0, 0, 0, 0.24);
}

.ykfv-copy__title span {
  display: block;
  white-space: nowrap;
}

.ykfv-copy__description {
  max-width: 650px;
  min-height: 3.5em;
  margin: 28px 0 28px;
  color: rgba(255, 255, 255, 0.87);
  font-size: 14px;
  line-height: 1.95;
  text-wrap: pretty;
}

.ykfv-copy__actions {
  display: flex;
  gap: 14px;
}

.ykfv-button {
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 700;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ykfv-button--large {
  min-width: 245px;
  min-height: 76px;
  padding: 0 30px;
  gap: 32px;
  font-size: 14px;
  letter-spacing: 0.035em;
}

.ykfv-button--accent {
  background: var(--ykfv-gold);
  color: #fff;
}

.ykfv-button--accent:hover,
.ykfv-button--accent:focus-visible {
  background: #ae7e38;
}

.ykfv-button--glass {
  border-color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
}

.ykfv-button--glass:hover,
.ykfv-button--glass:focus-visible {
  background: rgba(255, 255, 255, 0.13);
}

.ykfv-button--outline {
  border-color: var(--ykfv-green-900);
  color: var(--ykfv-green-900);
}

.ykfv-copy__note {
  margin: 17px 0 0;
  color: rgba(255, 255, 255, 0.67);
  font-size: 10px;
  letter-spacing: 0.03em;
}

.ykfv-arrow {
  position: absolute;
  z-index: 5;
  top: 53%;
  width: 58px;
  height: 84px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  background: rgba(4, 35, 29, 0.24);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.ykfv-arrow:hover,
.ykfv-arrow:focus-visible {
  background: rgba(4, 35, 29, 0.48);
}

.ykfv-arrow--prev {
  left: 0;
}

.ykfv-arrow--next {
  right: 0;
}

.ykfv-pagination {
  position: absolute;
  z-index: 5;
  right: max(4.7vw, 50px);
  bottom: 22px;
  display: flex;
  align-items: end;
  gap: 8px;
}

.ykfv-pagination button {
  width: 68px;
  padding: 0 0 14px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.ykfv-pagination button.is-active {
  border-bottom-color: #fff;
  color: #fff;
}

.ykfv-pagination span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
}

.ykfv :focus-visible {
  outline: 2px solid #f3c678;
  outline-offset: 3px;
}

@media (max-width: 1180px) {
  .ykfv-nav > a {
    padding-inline: 13px;
    font-size: 12px;
  }

  .ykfv-header-actions > a {
    width: 145px;
  }
}

@media (max-width: 1020px) {
  .ykfv-topbar {
    height: 38px;
    padding-inline: 24px;
    font-size: 10px;
  }

  .ykfv-topbar > a {
    font-size: 14px;
  }

  .ykfv-header {
    height: 72px;
    padding-left: 24px;
  }

  .ykfv-logo__mark {
    width: 42px;
    height: 42px;
    font-size: 25px;
  }

  .ykfv-logo__text strong {
    font-size: 20px;
  }

  .ykfv-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    height: auto;
    padding: 18px 24px 24px;
    display: grid;
    gap: 0;
    transform: translateY(-10px);
    background: #fff;
    box-shadow: 0 18px 30px rgba(4, 35, 29, 0.12);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  }

  .ykfv-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .ykfv-nav > a {
    height: auto;
    padding: 14px 0;
    border-bottom: 1px solid #e6ebe8;
    font-size: 13px;
  }

  .ykfv-nav__mobile-actions {
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .ykfv-nav__mobile-actions .ykfv-button {
    min-height: 50px;
  }

  .ykfv-header-actions {
    display: none;
  }

  .ykfv-menu-button {
    display: block;
  }

  .ykfv-hero {
    height: min(750px, calc(100svh - 110px));
    min-height: 610px;
  }

  .ykfv-hero__inner {
    width: calc(100% - 48px);
  }

  .ykfv-copy {
    width: min(810px, 90%);
  }

  .ykfv-arrow {
    display: none;
  }

}

@media (max-width: 700px) {
  .ykfv-topbar {
    height: 31px;
    padding-inline: 14px;
    font-size: 8px;
  }

  .ykfv-topbar p span {
    display: none;
  }

  .ykfv-topbar > a {
    display: none;
  }

  .ykfv-header {
    height: 65px;
    padding-left: 16px;
  }

  .ykfv-logo {
    gap: 10px;
  }

  .ykfv-logo__mark {
    width: 36px;
    height: 36px;
    font-size: 22px;
  }

  .ykfv-logo__text strong {
    font-size: 17px;
  }

  .ykfv-logo__text small {
    display: none;
  }

  .ykfv-menu-button {
    margin-right: 10px;
  }

  .ykfv-hero {
    height: min(720px, calc(100svh - 96px));
    min-height: 610px;
  }

  .ykfv-slide img {
    object-position: 58% center;
  }

  .ykfv-slide:nth-child(2) img {
    object-position: 58% center;
  }

  .ykfv-slide:nth-child(3) img {
    object-position: 49% center;
  }

  .ykfv-hero__veil {
    background:
      linear-gradient(90deg, rgba(5, 33, 28, 0.86), rgba(7, 35, 30, 0.42) 82%),
      linear-gradient(0deg, rgba(5, 29, 25, 0.35), transparent 45%);
  }

  .ykfv-hero__inner {
    width: calc(100% - 36px);
  }

  .ykfv-copy {
    top: 48%;
    width: 100%;
  }

  .ykfv-copy__eyebrow {
    margin-bottom: 18px;
    font-size: 9px;
    white-space: normal;
  }

  .ykfv-copy__label {
    margin-bottom: 17px;
    padding: 6px 11px;
    font-size: 9px;
  }

  .ykfv-copy__title {
    font-size: clamp(22px, 6.4vw, 29px);
    line-height: 1.55;
  }

  .ykfv-copy__description {
    max-width: 96%;
    min-height: 3.6em;
    margin: 17px 0 23px;
    font-size: 12px;
    line-height: 1.8;
  }

  .ykfv-copy__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }

  .ykfv-button--large {
    min-width: 0;
    min-height: 55px;
    padding: 0 10px;
    gap: 8px;
    font-size: 11px;
  }

  .ykfv-copy__note {
    margin-top: 11px;
    font-size: 8px;
  }

  .ykfv-pagination {
    right: 18px;
    bottom: 24px;
    left: 18px;
    justify-content: flex-end;
  }

  .ykfv-pagination button {
    width: 44px;
  }
}

@media (max-width: 380px) {
  .ykfv-copy__title {
    font-size: 21px;
  }

  .ykfv-button--large {
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ykfv *,
  .ykfv *::before,
  .ykfv *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
