@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@100..900&display=swap");

:root {
  --s-color-1: #000000;
  --s-color-2: #008ac8;
  --s-color-3: #dbcbcbff;
  --s-color-4: #eff1f2;
  --s-color-5: transparent;
  --s-color-6: #ffffff;
  --s-color-8: #dee3d0ff;
  --s-color-9: rgb(230, 0, 18);
  --s-color-10: rgb(0, 104, 183);
  --s-color-11: rgb(210, 215, 218);
  --s-color-12: rgb(132, 133, 134);
  --s-color-13: rgb(184, 188, 191);
  --s-color-14: #d7e3d0ff;
  --font-primary: "Noto Sans JP", sans-serif;
  --content-width: 1400px;
  --content-padding: 80px;
  --content-padding-md: 60px;
  --content-padding-sm: 40px;
  --content-padding-xs: 30px;
  --header-height: 120px;
  /* Offsets for sticky service labels */
  --service-sticky-top: calc(var(--header-height) - 36px);
  --service-sticky-top-secondary: calc(var(--service-sticky-top) + 93px);
  --service-sticky-top-lead: calc(var(--service-sticky-top) + 169px);
  --service-sticky-top-lead-single: calc(var(--service-sticky-top) + 80px);
}

@font-face {
  font-family: Material Icons;
  font-style: normal;
  font-weight: 400;
  src: url(https://storage.googleapis.com/production-os-assets/assets/material-icons/1629704621943/MaterialIcons-Regular.eot);
  src: local("Material Icons"), local("MaterialIcons-Regular"),
    url(https://storage.googleapis.com/production-os-assets/assets/material-icons/1629704621943/MaterialIcons-Regular.woff2)
      format("woff2"),
    url(https://storage.googleapis.com/production-os-assets/assets/material-icons/1629704621943/MaterialIcons-Regular.woff)
      format("woff"),
    url(https://storage.googleapis.com/production-os-assets/assets/material-icons/1629704621943/MaterialIcons-Regular.ttf)
      format("truetype");
}

/* Reset & base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-primary);
  color: #333;
  background: #fff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

figure {
  margin: 0;
}

button {
  font: inherit;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  width: 100%;
}

/* Navigation */
.site-header {
  position: relative;
  display: inline-block;
  width: 100%;
  z-index: 4;
}

.site-header__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 30px 40px 0;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.brand__logo {
  width: 180px;
  height: auto;
}

@supports not (mix-blend-mode: difference) {
  .brand__logo {
    filter: none;
  }
}

@media screen and (max-width: 1024px) {
  .brand__logo {
    width: 50%;
  }
}

@media screen and (max-width: 768px) {
  .brand {
    align-items: center;
  }
}

@media screen and (min-width: 769px) and (max-width: 1024px) and (orientation: portrait) {
  .brand {
    align-items: center;
  }
}

@media screen and (max-width: 480px) {
  .site-header__inner {
    padding: 30px 28px 0 30px;
  }
  .brand__logo {
    width: 50%;
  }
}

/* ヒーローセクションのレイアウトと背景 */
/* Layout and background for the hero section */
.hero {
  position: relative;
  height: 100vh;
  min-height: 100vh;
  width: 100%;
  background: var(--s-color-6);
  overflow: hidden;
  --hero-figure-top: 60%;
  --hero-carousel-top: 50%;
  --hero-title-bottom: 36px;
}

.hero__figure {
  position: absolute;
  top: var(--hero-figure-top);
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(220px, 45vw, 520px);
  max-width: 90vw;
  height: auto;
  max-height: 70vh;
  z-index: 3;
  pointer-events: none;
}

.hero__figure::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 15px;
  width: 100%;
  height: 40%;
  background: url("../img/grass.svg") center bottom / contain no-repeat;
  z-index: -1;
  pointer-events: none;
}

.hero__carousel {
  position: absolute;
  top: var(--hero-carousel-top);
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  z-index: 2;
  pointer-events: none;
}

.hero__image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
}

.hero__text-carousel {
  width: 100%;
  overflow: hidden;
  transform: rotate(180deg);
}

.hero__text-track {
  display: flex;
  align-items: center;
  gap: 60px;
  font-size: 18px;
  font-weight: 700;
  padding: 0 30px;
}

.hero__text-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  transform: rotate(180deg);
}

.hero__hash {
  font-weight: 900;
}

.hero__label {
  font-weight: 700;
}

.hero__text-image {
  width: 320px;
  transform: rotate(180deg);
}

.hero__skyline-carousel {
  width: 100%;
  overflow: hidden;
  transform: rotate(180deg);
}

.hero__skyline-track {
  display: flex;
  gap: 60px;
}

.hero__skyline-image {
  width: 1700px;
  transform: rotate(180deg);
}

.hero__title {
  position: absolute;
  bottom: var(--hero-title-bottom);
  left: 40px;
  width: 520px;
  z-index: 2;
}

@media screen and (max-width: 1140px) {
  .hero__text-carousel,
  .hero__skyline-carousel {
    width: 140%;
  }
}

@media screen and (max-width: 768px) {
  .hero__text-carousel,
  .hero__skyline-carousel {
    width: 170%;
  }
}

@media screen and (max-width: 480px) {
  .hero {
    height: 100vh;
    min-height: 100vh;
    padding-bottom: 120px;
  }
  .hero__carousel {
    gap: 12px;
  }
  .hero__figure {
    width: clamp(200px, 85vw, 380px);
    max-height: 50vh;
  }
  .hero__text-track {
    gap: 40px;
    padding: 0 20px;
  }
  .hero__hash,
  .hero__label {
    font-size: 15px;
  }
  .hero__text-carousel,
  .hero__skyline-carousel {
    width: 200%;
  }
  .hero__title {
    left: 28px;
    width: 75%;
  }
  .hero__text-image {
    width: 260px;
  }
  .brand__logo {
    width: 140px;
  }
}

/* Hero offsets per device (edit values as needed) */
@media screen and (min-width: 1025px) {
  .hero {
    --hero-figure-top: 50%;
    --hero-carousel-top: 40%;
    --hero-title-bottom: 90px;
  }
}

@media screen and (min-width: 769px) and (max-width: 1024px) and (orientation: portrait) {
  .hero {
    --hero-figure-top: 45%;
    --hero-carousel-top: 35%;
    --hero-title-bottom: 160px;
  }
}

@media screen and (min-width: 769px) and (max-width: 1024px) and (orientation: landscape) {
  .hero {
    --hero-figure-top: 40%;
    --hero-carousel-top: 30%;
    --hero-title-bottom: 120px;
  }
}

@media screen and (max-width: 480px) and (orientation: portrait) {
  .hero {
    --hero-figure-top: 50%;
    --hero-carousel-top: 35%;
    --hero-title-bottom: 80px;
  }
}

@media screen and (max-width: 768px) and (orientation: landscape) {
  .hero {
    --hero-figure-top: 38%;
    --hero-carousel-top: 18%;
    --hero-title-bottom: 0px;
  }
}

.marquee-track {
  display: flex;
  width: max-content;
}

/* Section headers */
.section-header {
  margin: 0 var(--content-padding);
  max-width: calc(100% - (var(--content-padding) * 2));
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

.section-title__main {
  display: inline-block;
  color: var(--s-color-1);
  font-weight: 700;
  font-size: 48px;
  line-height: 1;
}

.section-title__sub {
  display: inline-block;
  color: var(--s-color-1);
  font-size: 16px;
  font-weight: 400;
}

.section-note {
  color: #333;
  font-size: 13px;
}

@media screen and (max-width: 1140px) {
  .section-header {
    margin: 0 var(--content-padding-md);
    max-width: calc(100% - (var(--content-padding-md) * 2));
  }
}

@media screen and (max-width: 768px) {
  .section-header {
    margin: 0 var(--content-padding-sm);
    max-width: calc(100% - (var(--content-padding-sm) * 2));
  }
}

@media screen and (max-width: 480px) {
  .section-header {
    margin: 0 var(--content-padding-xs);
    max-width: calc(100% - (var(--content-padding-xs) * 2));
  }
  .section-title__main {
    font-size: 32px;
  }
  .section-title__sub {
    font-size: 14px;
  }
  .section-note {
    font-size: 10px;
  }
}

/* Services */
.services {
  padding: 180px 0 120px;
  display: flex;
  flex-direction: column;
  gap: 100px;
}

.service-list {
  margin: 0 var(--content-padding);
  max-width: calc(100% - (var(--content-padding) * 2));
  display: flex;
  flex-direction: column;
  gap: 120px;
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.service-card__counter {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  margin-bottom: 30px;
}

.service-card__hash {
  color: var(--s-color-1);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.service-card__current {
  color: var(--s-color-1);
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: -6px;
}

.service-card__slash {
  color: var(--s-color-1);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: -2px;
}

.service-card__total {
  color: var(--s-color-1);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

/* スクロール中も視界に入るようにタイトルを段階的に固定 */
/* Pin title rows so they stay in view while scrolling the card */
.service-card__pill {
  position: sticky;
  top: var(--service-sticky-top);
  display: flex;
  gap: 6px;
  align-items: flex-end;
  z-index: 1;
  color: #fff;
  mix-blend-mode: difference;
}

.service-card__pill--secondary {
  top: var(--service-sticky-top-secondary);
}

.service-card__pill-main {
  color: inherit;
  font-size: 120px;
  font-weight: 800;
  line-height: 1;
}

.service-card__pill-sub {
  color: inherit;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  padding-bottom: 10px;
}

.service-card__lead {
  position: sticky;
  top: var(--service-sticky-top-lead);
  display: flex;
  gap: 20px;
  padding-top: 30px;
  z-index: 1;
  color: #fff;
  mix-blend-mode: difference;
}

.service-card__lead--single-pill {
  top: var(--service-sticky-top-lead-single);
}

.service-card__lead-text {
  color: inherit;
  mix-blend-mode: inherit;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
}

.service-card__hashtags p {
  color: inherit;
  mix-blend-mode: inherit;
  font-size: 16px;
  line-height: 1.6;
}

.service-card__body {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.service-card__vertical-label {
  writing-mode: vertical-rl;
  -ms-writing-mode: vertical-rl;
  -webkit-writing-mode: vertical-rl;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1;
}

/* 画像＋CTAのエリアはリングを基準に配置 */
/* Position the media + CTA area relative to the sticky ring */
.service-card__cta {
  display: flex;
  flex: 1;
  gap: 30px;
  align-items: flex-start;
  text-decoration: none;
  position: relative;
  width: 75%;
  max-width: 75%;
}

.service-card__cta-ring {
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  border: 3px solid var(--s-color-1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 6;
  transition: background 0.3s;
}

.service-card__icon {
  font-family: Material Icons;
  font-size: 64px;
}

.service-card__icon--outline {
  color: var(--s-color-1);
}

.service-card__icon--fill {
  position: absolute;
  color: var(--s-color-6);
  opacity: 0;
  transform: translate(-20px, 0);
  transition: opacity 0.3s, transform 0.3s;
}

.service-card__media {
  position: relative;
  flex: 1;
  min-height: 360px;
  height: 80vh;
  max-height: 900px;
  padding: 50px;
  overflow: hidden;
}

.service-card__image-frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 2;
}

.service-card__image {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  overflow: hidden;
  z-index: 3;
}

.service-card__image::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: brightness(0.9);
  transition: filter 0.3s;
  z-index: 1;
}

.service-card__image::after {
  content: "Read More";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  font-weight: 600;
  font-size: 24px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  z-index: 5;
}

.service-card__overlay {
  position: absolute;
  inset: 0;
  background: var(--service-accent, var(--s-color-3));
  opacity: 0.4;
  transform-origin: top center;
  pointer-events: none;
  z-index: 2;
}

.service-card__shadow {
  position: absolute;
  inset: 0;
  right: 0;
  width: 50%;
  background: var(--s-color-3);
  z-index: 1;
}

.service-card__cta:hover .service-card__cta-ring,
.service-card__media:hover .service-card__cta-ring {
  background: var(--s-color-1);
}

.service-card__cta:hover .service-card__icon--fill,
.service-card__media:hover .service-card__icon--fill {
  opacity: 1;
  transform: translate(0, 0);
}

.service-card__cta:hover .service-card__image::before,
.service-card__media:hover .service-card__image::before {
  filter: brightness(0.7);
}

.service-card__cta:hover .service-card__image::after,
.service-card__media:hover .service-card__image::after {
  opacity: 1;
  transform: translateY(0);
}

@media screen and (max-width: 1024px) {
  .service-card__body {
    flex-direction: column;
    align-items: flex-start;
  }
  .service-card__cta {
    width: 100%;
    max-width: 100%;
  }
  .service-card__vertical-label {
    writing-mode: horizontal-tb;
    -ms-writing-mode: horizontal-tb;
    -webkit-writing-mode: horizontal-tb;
    font-size: 32px;
  }
  .service-card__media {
    height: 70vh;
    max-height: none;
  }
}

@media screen and (max-width: 1140px) {
  .service-list {
    margin: 0 var(--content-padding-md);
    max-width: calc(100% - (var(--content-padding-md) * 2));
  }
  .service-card__pill-main {
    font-size: 10vw;
  }
}

@media screen and (max-width: 768px) {
  .services {
    --service-sticky-top: 72px;
    --service-sticky-top-secondary: calc(var(--service-sticky-top) + 52px);
    --service-sticky-top-lead: calc(var(--service-sticky-top) + 104px);
    --service-sticky-top-lead-single: calc(var(--service-sticky-top) + 88px);
  }
  .service-card--single-pill {
    --service-sticky-top-secondary: calc(var(--service-sticky-top) + 36px);
    --service-sticky-top-lead: calc(var(--service-sticky-top) + 88px);
  }
  .service-list {
    margin: 0 var(--content-padding-sm);
    max-width: calc(100% - (var(--content-padding-sm) * 2));
    gap: 80px;
  }
  .service-card__pill-main {
    font-size: 10vw;
  }
  .service-card__body {
    flex-direction: column;
    align-items: flex-start;
  }
  .service-card__cta {
    width: 100%;
    max-width: 100%;
  }
  .service-card__vertical-label {
    writing-mode: horizontal-tb;
    -ms-writing-mode: horizontal-tb;
    -webkit-writing-mode: horizontal-tb;
    font-size: 28px;
  }
  .service-card__cta-ring {
    position: absolute;
    top: 0;
    right: 0;
    margin-left: auto;
    width: 160px;
    height: 160px;
    transform: translate(6%, 0);
  }
  .service-card__media {
    height: 70vh;
    padding: 50px;
  }
}

@media screen and (max-width: 480px) {
  .services {
    padding: 120px 0 0;
    gap: 60px;
    --service-sticky-top: 65px;
    --service-sticky-top-secondary: calc(var(--service-sticky-top) + 36px);
    --service-sticky-top-lead: calc(var(--service-sticky-top) + 84px);
    --service-sticky-top-lead-single: calc(var(--service-sticky-top) + 72px);
  }
  .service-card--single-pill {
    --service-sticky-top-secondary: calc(var(--service-sticky-top) + 28px);
    --service-sticky-top-lead: calc(var(--service-sticky-top) + 72px);
  }
  .service-list {
    margin: 0 var(--content-padding-xs);
    max-width: calc(100% - (var(--content-padding-xs) * 2));
  }
  .service-card__counter {
    margin-left: 30px;
  }
  .service-card__pill-main {
    font-size: 9vw;
  }
  .service-card__pill-sub {
    font-size: 16px;
  }
  .service-card__lead-text {
    font-size: 22px;
  }
  .service-card__vertical-label {
    font-size: 24px;
    writing-mode: horizontal-tb;
    -ms-writing-mode: horizontal-tb;
    -webkit-writing-mode: horizontal-tb;
  }
  .service-card__media {
    height: 60vh;
    padding: 30px;
  }
  .service-card__cta-ring {
    width: 120px;
    height: 120px;
    position: absolute;
    right: 0;
    top: 10%;
    transform: translate(0, 0);
  }
}

.service-card--nursing {
  --service-image: url("../img/ASHIHARA_SERVICE_1.webp");
  --service-accent: var(--s-color-2);
}

.service-card--community {
  --service-image: url("../img/ASHIHARA_SERVICE_2.webp");
  --service-accent: var(--s-color-3);
}

.service-card--shortstay {
  --service-image: url("../img/ASHIHARA_SERVICE_3.webp");
  --service-accent: var(--s-color-4);
}

.service-card--day-service {
  --service-image: url("../img/ASHIHARA_SERVICE_4.webp");
  --service-accent: var(--s-color-9);
}

.service-card--ashihara-aid {
  --service-image: url("../img/ASHIHARA_SERVICE_5.webp");
  --service-accent: var(--s-color-10);
}

.service-card--tsumugi-an-stay {
  --service-image: url("../img/ASHIHARA_SERVICE_6.webp");
  --service-accent: var(--s-color-14);
}

.service-card--single-pill {
  /* Slightly tighter stack when only one pill line exists */
  --service-sticky-top-secondary: calc(var(--service-sticky-top) + 46px);
  --service-sticky-top-lead: calc(var(--service-sticky-top) + 80px);
}

.service-card__image::before {
  background-image: var(--service-image);
}

.service-card__shadow,
.service-card__overlay {
  background: var(--service-accent, var(--s-color-3));
}

/* ICT cards */
.ict {
  padding: 180px 0 0;
  display: flex;
  flex-direction: column;
  gap: 100px;
}

.ict__cards {
  margin: 80px var(--content-padding) 0;
  max-width: calc(100% - (var(--content-padding) * 2));
  display: flex;
  flex-wrap: wrap;
  position: relative;
}

.card-column {
  width: 50%;
  float: left;
}

@media screen and (max-width: 480px) {
  .ict__cards {
    margin: 20px 0 0;
    max-width: 100%;
  }
  .card-content {
    width: 100%;
    height: 60vh !important;
    margin: 0 0 calc(60vh * 0.15);
  }
}

@media screen and (max-width: 1024px) {
  .ict__cards {
    margin: 40px 0 0;
    max-width: 100%;
    flex-direction: column;
  }
  .card-column {
    width: 100%;
    margin: 0;
  }
  .card-content {
    width: 100%;
    height: 60vh !important;
    margin: 0 0 calc(60vh * 0.2);
  }
}

.card-content {
  width: 70%;
  position: relative;
  cursor: pointer;
  margin-bottom: calc(80vh * 0.22);
  height: 80vh;
  max-height: 900px;
  perspective: 1000px;
}

.card-column:nth-child(1) .card-content {
  margin-left: 60px;
}

.card-column:nth-child(2) .card-content {
  margin-left: auto;
  margin-right: 60px;
}

@media screen and (max-width: 1024px) {
  .card-column:nth-child(1) .card-content,
  .card-column:nth-child(2) .card-content {
    margin-left: auto;
    margin-right: auto;
  }
}

.card-border {
  position: absolute;
  width: 100%;
  height: 100%;
  padding: 6px;
  border: 2px solid var(--s-color-3);
  opacity: 0.5;
  left: -16px;
  top: -16px;
}

.card-content img {
  width: 40%;
  height: auto;
  position: absolute;
  top: -60px;
  left: -50px;
  z-index: 3;
}

@media screen and (max-width: 1024px) {
  .card-content img {
    left: 50%;
    transform: translateX(-50%);
  }
}

/* ホバーで表裏を回転させるフリップカード */
/* Flip card that rotates on hover/focus/target */
.flip-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: 0.6s 0.5s;
}

.card-content:hover .flip-card,
.card-content:focus-within .flip-card,
.card-content:target .flip-card {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  width: 100%;
  height: 100%;
  background: hsl(220, 25%, 10%);
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  backface-visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.flip-card-front {
  transform: rotateY(0deg);
  z-index: 2;
}

.flip-card-back {
  transform: rotateY(180deg);
  z-index: 1;
}

figure {
  z-index: -1;
}

figure,
.flip-card-bg {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  z-index: 1;
}

.flip-card-img {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("../img/ASHIHARA_001.webp");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.flip-card-bg {
  background: hsla(220, 25%, 10%, 0.5);
}

.flip-card-front .flip-card-bg {
  clip-path: polygon(0 20%, 100% 40%, 100% 100%, 0 100%);
}

.flip-card-front .flip-card-bg::before {
  content: "";
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(15.5deg);
  width: 100%;
  height: 12px;
  border: 1px solid var(--s-color-3);
  border-left-color: transparent;
  border-right-color: transparent;
}

.card-content:hover .flip-card-front .flip-card-bg::before,
.card-content:focus-within .flip-card-front .flip-card-bg::before,
.card-content:target .flip-card-front .flip-card-bg::before {
  animation: flipCardAnimate 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
  border-left-color: var(--s-color-3);
  border-right-color: var(--s-color-3);
}

@keyframes flipCardAnimate {
  0% {
    width: 100%;
    transform: translate(-50%, -50%) rotate(15.5deg);
  }
  50% {
    width: 12px;
    transform: translate(-50%, -50%) rotate(15.5deg);
  }
  100% {
    width: 12px;
    transform: translate(-50%, -50%) rotate(180deg);
  }
}

.card-content ul {
  padding-top: 50%;
  margin: 0 auto;
  width: 70%;
  height: 100%;
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  color: hsl(0, 0%, 90%);
  z-index: 1;
}

.card-content li {
  width: 100%;
  margin-top: 12px;
  padding-bottom: 12px;
  text-align: center;
  position: relative;
  color: hsl(0, 0%, 90%);
  font-size: 32px;
  font-family: var(--font-primary);
}

.card-content li:nth-child(2n) {
  color: hsl(0, 0%, 80%);
}

.card-content li:not(:last-child)::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  opacity: 0.2;
}

.flip-card-desc {
  z-index: 2;
  width: 100%;
  height: 100%;
  background-color: hsla(220, 25%, 10%, 0.5);
  position: relative;
}

.flip-card-desc p {
  display: block;
  width: 90%;
  font-weight: bold;
  color: hsl(0, 0%, 90%);
  letter-spacing: 1.8px;
  line-height: 1.8;
  font-size: 18px;
  opacity: 0;
  transition: 0.6s 0.8s;
  position: absolute;
  top: 50%;
  left: 60%;
  transform: translate(-50%, -50%);
}

.card-content:hover .flip-card-desc p,
.card-content:target .flip-card-desc p,
.card-content:focus-within .flip-card-desc p {
  opacity: 1;
  left: 50%;
}

.design-container {
  --tr: 95;
  --op: 0.5;
  width: 100%;
  height: 100%;
  background: transparent;
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1;
}

.design {
  display: block;
  background: var(--s-color-3);
  position: absolute;
  opacity: var(--op);
  transition: 0.6s 1s;
}

.design--1,
.design--2,
.design--3,
.design--4 {
  width: 1px;
  height: 100%;
}

.design--1,
.design--2 {
  top: 0;
  transform: translateY(calc((var(--tr) - (var(--tr) * 2)) * 1%));
}

.design--1 {
  left: 10%;
}

.design--2 {
  left: 90%;
}

.design--3,
.design--4 {
  bottom: 0;
  transform: translateY(calc((var(--tr) + (var(--tr) - var(--tr))) * 1%));
}

.design--3 {
  left: 14%;
}

.design--4 {
  left: 86%;
}

.design--5,
.design--6,
.design--7,
.design--8 {
  width: 100%;
  height: 1px;
}

.design--5,
.design--6 {
  left: 0;
  transform: translateX(calc((var(--tr) - (var(--tr) * 2)) * 1%));
}

.design--5 {
  top: 21%;
}

.design--6 {
  top: 79%;
}

.design--7,
.design--8 {
  right: 0;
  transform: translateX(calc((var(--tr) + (var(--tr) - var(--tr))) * 1%));
}

.design--7 {
  top: 24%;
}

.design--8 {
  top: 76%;
}

.card-content:hover .design-container,
.card-content:target .design-container,
.card-content:focus-within .design-container {
  --tr: 12;
  --op: 0.7;
}

.card-column:nth-child(1) .card-content:nth-child(2) .card-border {
  border-color: var(--s-color-9);
}

.card-column:nth-child(1) .card-content:nth-child(2) .flip-card-img {
  background-image: url("../img/ASHIHARA_003.webp");
}

.card-column:nth-child(1)
  .card-content:nth-child(2)
  .flip-card-front
  .flip-card-bg::before {
  border-color: var(--s-color-9);
  border-left-color: transparent;
  border-right-color: transparent;
}

.card-column:nth-child(1) .card-content:nth-child(2) .design {
  background: var(--s-color-9);
}

.card-column:nth-child(2) .card-content:nth-child(1) .card-border {
  border-color: var(--s-color-10);
}

.card-column:nth-child(2) .card-content:nth-child(1) .flip-card-img {
  background-image: url("../img/ASHIHARA_005.webp");
}

.card-column:nth-child(2)
  .card-content:nth-child(1)
  .flip-card-front
  .flip-card-bg::before {
  border-color: var(--s-color-10);
  border-left-color: transparent;
  border-right-color: transparent;
}

.card-column:nth-child(2) .card-content:nth-child(1) .design {
  background: var(--s-color-10);
}

.card-column:nth-child(2) .card-content:nth-child(2) .card-border {
  border-color: var(--s-color-8);
}

.card-column:nth-child(2) .card-content:nth-child(2) .flip-card-img {
  background-image: url("../img/ASHIHARA_002.webp");
}

.card-column:nth-child(2)
  .card-content:nth-child(2)
  .flip-card-front
  .flip-card-bg::before {
  border-color: var(--s-color-8);
  border-left-color: transparent;
  border-right-color: transparent;
}

.card-column:nth-child(2) .card-content:nth-child(2) .design {
  background: var(--s-color-8);
}

/* About */
.about {
  padding: 180px 0 120px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.about__body {
  margin: 0 var(--content-padding);
  max-width: calc(100% - (var(--content-padding) * 2));
}

.about__text {
  font-size: 18px;
  line-height: 1.8;
}

@media screen and (max-width: 1140px) {
  .about__body {
    margin: 0 var(--content-padding-md);
    max-width: calc(100% - (var(--content-padding-md) * 2));
  }
}

@media screen and (max-width: 768px) {
  .about__body {
    margin: 0 var(--content-padding-sm);
    max-width: calc(100% - (var(--content-padding-sm) * 2));
  }
}

@media screen and (max-width: 480px) {
  .about__body {
    margin: 0 var(--content-padding-xs);
    max-width: calc(100% - (var(--content-padding-xs) * 2));
  }
}

/* Topics */
.topics {
  padding: 180px 0 120px;
  display: flex;
  flex-direction: column;
  gap: 100px;
}

.topics__list-wrapper {
  margin: 0 var(--content-padding);
  max-width: calc(100% - (var(--content-padding) * 2));
  position: relative;
}

@media screen and (max-width: 768px) {
  .topics__list-wrapper {
    margin: 0 var(--content-padding-sm);
    max-width: calc(100% - (var(--content-padding-sm) * 2));
  }
}

@media screen and (max-width: 480px) {
  .topics {
    padding: 120px 0 60px;
    gap: 60px;
  }
  .topics__list-wrapper {
    margin: 0;
    max-width: 100%;
  }
}

/* スクロールで重なり合うトピックカードのレイアウト */
/* Sticky stacked layout for topic cards while scrolling */
.topics-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
  perspective: 1211px;
}

.topics-list li {
  display: flex;
  gap: 50px;
  border-radius: 60px;
  width: 100%;
  height: 90vh;
  position: sticky;
  padding: 0 40px;
  top: 0;
}

.topics-list li.is--yellow {
  background-color: #fceea9;
  margin-bottom: 100px;
  top: 40px;
}

.topics-list li.is--green {
  background-color: #294e44;
  margin-bottom: 80px;
  top: 60px;
}

.topics-list li.is--blue {
  background-color: #a3ccda;
  margin-bottom: 60px;
  top: 80px;
}

.topics-list li.is--grey {
  background-color: #a8a1a1;
  margin-bottom: 60px;
  top: 100px;
}

.topics-list li.is--coral {
  background-color: #e3ac9e;
  margin-bottom: 60px;
  top: 120px;
}

.topics-list li.is--sage {
  background-color: #a7b8a9;
  top: 140px;
}

.topics-list .content--left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 45%;
  mix-blend-mode: difference;
  color: #fff;
}

.topics-list .content--left h3 {
  font-size: clamp(24px, 3vh, 3.2vh);
  font-family: var(--font-primary);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: clamp(38px, 3.5vh, 5.2vh);
  margin-bottom: 4px;
}

.topics-list .content--left p {
  letter-spacing: -0.02em;
  width: 50vw;
  max-width: 90%;
  margin-bottom: 12px;
  font-family: var(--font-primary);
  font-weight: 300;
  font-size: clamp(26px, 1.3vh, 3vh);
  line-height: clamp(33px, 1.8vh, 3.4vh);
  margin-top: 8px;
}

.topics-list .content--left a {
  display: block;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin-top: 12px;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 600;
}

.topics-list .content--left a::after {
  background-image: url("../img/arrow.svg");
  content: "";
  display: inline-block;
  width: 40px;
  margin-left: 8px;
  background-repeat: no-repeat;
  position: relative;
  background-size: contain;
  height: 8px;
  transition: transform 0.4s;
}

.topics-list .content--left a:hover:after {
  transform: translateX(12px);
}

.topics-list .content--right {
  justify-content: center;
  align-items: center;
  width: 55%;
  display: flex;
  position: relative;
}

.topics-list .content--right::before {
  mask-image: url("../img/topic-polygon-1.svg");
  -webkit-mask-image: url("../img/topic-polygon-1.svg");
  mask-repeat: no-repeat;
  mask-size: contain;
  mask-position: center;
  background-color: #fae370;
  width: 90%;
  height: 90%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: block;
  content: "";
}

.topics-list .content--right img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48%;
  height: auto;
  border-radius: 8px;
  transition: all 0.3s linear;
  cursor: pointer;
}

.topics-list .content--right img:hover {
  z-index: 1;
  scale: 1.1;
}

.topics-list .content--right img:nth-child(1) {
  left: 28%;
  rotate: -8deg;
}

.topics-list .content--right img:nth-child(2) {
  top: calc(50% - 12px);
}

.topics-list .content--right img:nth-child(3) {
  left: 70%;
  top: calc(50% + 28px);
  rotate: 8deg;
}

/* Fallback layout when there are fewer than 3 images */
.topics-list .content--right img:only-child {
  width: 70%;
  top: 50%;
  left: 50%;
  rotate: 0deg;
  transform: translate(-50%, -50%);
}

.topics-list .content--right img:first-child:nth-last-child(2) {
  width: 58%;
  top: 48%;
  left: 46%;
  rotate: -6deg;
}

.topics-list .content--right img:nth-child(2):nth-last-child(1) {
  width: 58%;
  top: 52%;
  left: 54%;
  rotate: 6deg;
}

@media screen and (max-width: 768px) {
  .topics-list li {
    position: static;
    height: auto;
    min-height: 65vh;
    padding: 20px 24px 32px;
    flex-direction: column;
    gap: 24px;
  }
  .topics-list li.is--yellow {
    top: 20px;
  }
  .topics-list li.is--green {
    top: 40px;
  }
  .topics-list li.is--blue {
    top: 60px;
  }
  .topics-list li.is--grey {
    top: 80px;
  }
  .topics-list li.is--coral {
    top: 100px;
  }
  .topics-list li.is--sage {
    top: 120px;
  }
  .topics-list .content--left,
  .topics-list .content--right {
    width: 80%;
    margin: 0 auto;
  }
  .topics-list .content--right {
    min-height: 320px;
  }
  .topics-list .content--right::before {
    width: 95%;
    height: 70%;
  }
  .topics-list .content--right img {
    width: 65%;
  }
  .topics-list .content--right img:only-child {
    width: 78%;
  }
  .topics-list .content--right img:first-child:nth-last-child(2),
  .topics-list .content--right img:nth-child(2):nth-last-child(1) {
    width: 62%;
  }
}

@media screen and (max-width: 480px) {
  .topics-list {
    margin: 10px;
  }

  .topics-list li {
    flex-direction: column;
    position: static;
    height: auto;
    min-height: 70vh;
    padding: 20px 16px 28px;
    gap: 20px;
  }
  .topics-list .content--left,
  .topics-list .content--right {
    width: 80%;
    margin: 0 auto;
  }
  .topics-list .content--right::before {
    width: 100%;
    height: 65%;
  }
  .topics-list .content--right img {
    width: 70%;
  }
  .topics-list .content--right img:only-child {
    width: 86%;
  }
  .topics-list .content--right img:first-child:nth-last-child(2),
  .topics-list .content--right img:nth-child(2):nth-last-child(1) {
    width: 70%;
  }
}

@media screen and (min-width: 769px) and (max-width: 1024px) and (orientation: portrait) {
  .topics {
    padding: 180px 0;
  }
  .topics-list li {
    flex-direction: column;
    position: relative;
    height: auto;
    min-height: 70vh;
    padding: 20px 24px 32px;
    gap: 115px;
    margin-top: -100px;
  }
  .topics-list li:first-child {
    margin-top: 0;
  }
  .topics-list .content--left,
  .topics-list .content--right {
    width: 80%;
    margin: 0 auto;
  }
  .topics-list .content--right {
    min-height: 360px;
  }
  .topics-list .content--right::before {
    width: 95%;
    height: 70%;
  }
  .topics-list .content--right img {
    width: 65%;
  }
  .topics-list .content--right img:only-child {
    width: 78%;
  }
  .topics-list .content--right img:first-child:nth-last-child(2),
  .topics-list .content--right img:nth-child(2):nth-last-child(1) {
    width: 62%;
  }
}

/* Menu button */
.menu-button {
  position: fixed;
  right: 30px;
  bottom: 30px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #008ac8;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-top: 10px;
  z-index: 5;
}

.menu-button:hover {
  background: var(--s-color-1);
}

.menu-button__bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 40px;
}

.menu-button__bar {
  height: 2px;
  background: var(--s-color-6);
}

.menu-button__label {
  color: var(--s-color-6);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
}

/* Corner menu (fixed bottom-right) */
.corner-menu {
  position: fixed;
  right: 30px;
  bottom: 30px;
  z-index: 10;
  display: flex;
  align-items: flex-end;
}

.corner-menu__button {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid #000;
  color: #000;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85),
    0 0 8px rgba(255, 255, 255, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.corner-menu__button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9),
    0 0 10px rgba(255, 255, 255, 0.4), 0 8px 16px rgba(0, 0, 0, 0.12);
}

.corner-menu__icon--menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: opacity 0.2s ease;
}

.corner-menu__bar {
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.corner-menu__arrow {
  position: absolute;
  width: 14px;
  height: 14px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.corner-menu.is-top .corner-menu__icon--menu {
  opacity: 0;
}

.corner-menu.is-top .corner-menu__arrow {
  opacity: 1;
}

.corner-menu__popup {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  min-width: 210px;
  background: #fff;
  border: 2px solid #000;
  border-radius: 12px;
  padding: 16px 18px;
  display: none;
  gap: 10px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
}

.corner-menu.is-open .corner-menu__popup {
  display: grid;
}

.corner-menu__popup[hidden] {
  display: none !important;
}

.corner-menu__popup a {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.corner-menu__popup a:hover {
  text-decoration: underline;
}

@media screen and (max-width: 480px) {
  .menu-button {
    right: 20px;
    bottom: 20px;
    width: 60px;
    height: 60px;
    gap: 4px;
    padding-top: 6px;
  }
  .menu-button__bars {
    width: 30px;
    gap: 8px;
  }
  .menu-button__label {
    font-size: 10px;
  }
  .corner-menu {
    right: 18px;
    bottom: 18px;
  }
  .corner-menu__button {
    width: 52px;
    height: 52px;
  }
  .corner-menu__popup {
    min-width: 190px;
    padding: 14px 16px;
  }
}

/* ===============================
   Footer (replaces old closing)
   =============================== */
.site-footer {
  width: 100%;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  padding: 48px var(--content-padding);
}

.site-footer__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  position: relative;
  overflow: visible;
}

.site-footer__left {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  z-index: 1;
}

/* Text reveal (controlled by JS via --reveal: 0% -> 100%) */
.site-footer__slogan {
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: #2b2b2b;
  --reveal: 100%;
  -webkit-clip-path: inset(0 calc(100% - var(--reveal)) 0 0);
  clip-path: inset(0 calc(100% - var(--reveal)) 0 0);
}

.site-footer__slogan-top {
  display: block;
  font-size: 14px;
  font-weight: 500;
  opacity: 0.75;
}

.site-footer__slogan-bottom {
  display: block;
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 700;
}

.site-footer__right {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  position: relative;
  z-index: 3; /* keep figure above the text when it slides over */
}

.site-footer__figure {
  width: clamp(200px, 22vw, 320px);
  height: auto;
  max-height: 180px;
  object-fit: contain;
  will-change: transform;
}

/* Bottom logo row (centered, JS fades it in after the walk+reveal) */
.site-footer__bottom {
  max-width: var(--content-width);
  margin: 26px auto 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.site-footer__logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-footer__logo-img {
  width: 220px;
  height: auto;
}

@media screen and (max-width: 1140px) {
  .site-footer {
    padding: 40px var(--content-padding-md);
  }
}

@media screen and (max-width: 768px) {
  .site-footer {
    padding: 36px var(--content-padding-sm);
  }
  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .site-footer__right {
    width: 100%;
    justify-content: flex-start;
  }
  .site-footer__bottom {
    margin-top: 20px;
  }
  .site-footer__logo-img {
    width: 180px;
  }
  .site-footer__slogan-top {
    font-size: 12px;
  }
  .site-footer__slogan-bottom {
    font-size: clamp(22px, 6vw, 30px);
  }
  .site-footer__figure {
    width: clamp(160px, 48vw, 240px);
    max-height: 140px;
  }
}

@media screen and (max-width: 480px) {
  .site-footer {
    padding: 30px var(--content-padding-xs);
  }
  .site-footer__logo-img {
    width: 160px;
  }
  .site-footer__slogan-top {
    font-size: 11px;
  }
  .site-footer__slogan-bottom {
    font-size: clamp(20px, 7.2vw, 26px);
  }
  .site-footer__figure {
    width: clamp(150px, 58vw, 210px);
    max-height: 120px;
  }
}
