/* ==================================================
   変数
   ================================================== */
:root {
  /* Color */
  --color-primary: #065043;
  --color-accent: #cc3344;
  --color-button: #d42611;
  --color-heading: #3ba8df;

  --color-text: #222;
  --color-text-sub: #555;
  --color-text-muted: #707070;
  --color-text-on-dark: #fff;

  --color-bg-page: #0b2424;
  --color-bg: #fff;
  --color-bg-sub: #f7f7f7;
  --color-label-bg: #e4f4f1;

  --color-border: #ddd;

  --color-white: #fff;

  /* Font */
  --font-family-base: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  --font-family-en: "Barlow Semi Condensed", var(--font-family-base);
  --line-height-base: 1.7;
  --line-height-tight: 1.2;

  --font-size-xl: clamp(1.75rem, 1.5rem + 3vw, 2.75rem);
  --font-size-l: clamp(1.25rem, 1rem + 1.2vw, 1.6rem);
  --font-size-m: clamp(1.125rem, 1rem + 0.5vw, 1.25rem);
  --font-size-base: 16px;
  --font-size-s: 0.875rem;
  --font-size-xs: 0.6875rem;

  /* Spacing */
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 48px;
  --spacing-xl: 80px;

  /* Layout */
  --content-max-width: 1080px;
  --header-height: 64px;

  /* Z-index */
  --z-header: 100;
}

/* ==================================================
   ベース
   ================================================== */
body {
  color: var(--color-text);
  background: var(--color-bg-page);
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
}

a {
  color: var(--color-primary);
}

/* ==================================================
   ヘッダー
   ================================================== */
.c-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: calc(var(--z-header) + 1);
  pointer-events: none;

  & .inner {
    display: flex;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
  }

  & .menuBtn {
    position: fixed;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    width: 44px;
    height: 44px;
    padding: 0;
    background: var(--color-button);
    border: none;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    pointer-events: auto;

    & span {
      position: absolute;
      left: 50%;
      width: 22px;
      height: 2px;
      background: var(--color-white);
      transform: translateX(-50%);
      transition: transform 0.3s ease, opacity 0.3s ease;

      &:nth-child(1) { top: 15px; }
      &:nth-child(2) { top: 21px; }
      &:nth-child(3) { top: 27px; }
    }

    &.is-active span:nth-child(1) { transform: translateX(-50%) translateY(6px) rotate(45deg); }
    &.is-active span:nth-child(2) { opacity: 0; }
    &.is-active span:nth-child(3) { transform: translateX(-50%) translateY(-6px) rotate(-45deg); }
  }
}

/* ==================================================
   フッター
   ================================================== */
.c-footer {
  text-align: center;

  & .footerInfo {
    background: var(--color-white);
    border-top: 1px solid var(--color-border);
    padding: var(--spacing-md) var(--spacing-sm);
  }

  & .footerInfo__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    max-width: var(--content-max-width);
    margin: 0 auto;
    text-align: center;

    @media (max-width: 768px) {
      flex-direction: column;
    }
  }

  & .footerInfo__text {
    color: var(--color-text);
  }

  & .footerInfo__name {
    margin: 0 0 var(--spacing-xs);

    & img {
      display: block;
      width: 200px;
      max-width: 100%;
      height: auto;
      margin: 0 auto;
    }
  }

  & .footerInfo__address {
    margin: var(--spacing-xs) 0 0;
    font-size: var(--font-size-s);
  }

  & .footerInfo__link {
    margin: var(--spacing-sm) 0 0;
  }

  & .footerInfo__sns {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin: var(--spacing-sm) 0 0;
    padding: 0;
    list-style: none;

    & a {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: var(--color-text);
      color: var(--color-white);
      font-size: 1rem;
      text-decoration: none;
      transition: opacity 0.2s;

      &:hover {
        opacity: 0.8;
      }
    }
  }

  & .footerInfo__map {
    flex: none;
    width: 320px;
    max-width: 100%;
    line-height: 0;

    & iframe {
      display: block;
      width: 100%;
      height: auto;
      aspect-ratio: 16 / 10;
      border: 0;
    }
  }

  & .copyright {
    margin: 0;
    padding: var(--spacing-md) var(--spacing-sm);
    color: var(--color-text-on-dark);
    font-size: 0.8rem;
  }
}

/* ==================================================
   リンクナビ（ドロワー）
   ================================================== */
.c-pageNav {
  & .inner {
    padding: 0;
  }

  & .list {
    position: fixed;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 320px;
    height: 100%;
    overflow-y: auto;
    background: var(--color-white);
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: var(--z-header);

    &.is-open {
      transform: translateX(0);
    }

    & ul {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: var(--spacing-xs);
      margin: 0;
      padding: calc(var(--spacing-sm) * 2 + 44px) var(--spacing-sm) var(--spacing-sm);
      list-style: none;

      & li {
        text-align: center;
      }
    }
  }

  & .overlay {
    display: none;

    &.is-open {
      display: block;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.4);
      z-index: calc(var(--z-header) - 1);
    }
  }
}

/* ==================================================
   見出し
   ================================================== */
.c-heading {
  font-family: var(--font-family-en);
  font-size: var(--font-size-xl);
  font-weight: 500;
  color: var(--color-heading);
  line-height: var(--line-height-tight);

  @media (min-width: 769px) {
    margin: 0 0 var(--spacing-md);
  }
}

/* ==================================================
   ボタン
   ================================================== */
.c-btn {
  display: inline-block;
  box-sizing: border-box;
  padding: 0.6em 2em;
  background: var(--color-button);
  color: var(--color-white);
  font-weight: bold;
  line-height: var(--line-height-tight);
  text-decoration: none;
  border-radius: 4px;
  transition: opacity 0.2s;

  &:hover {
    opacity: 0.85;
  }
}

.c-btn--fill-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  box-sizing: border-box;
  padding: 0.6em 1.6em;
  background: var(--color-button);
  color: var(--color-white);
  font-weight: bold;
  line-height: var(--line-height-tight);
  text-decoration: none;
  border-radius: 6px;
  transition: opacity 0.2s;

  &:hover {
    opacity: 0.85;
  }

  &::after {
    content: "\f105";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 1.1em;
    flex-shrink: 0;
  }
}

.c-btn--shine {
  position: relative;
  overflow: hidden;

  & .c-btn__shine {
    position: absolute;
    top: -3em;
    left: -3em;
    width: 3em;
    height: 3em;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 55%, rgba(255, 255, 255, 0.95) 85%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    animation: c-btn-shine-run 3s ease-in infinite;
  }
}

@keyframes c-btn-shine-run {
  0% {
    transform: scale(0) rotate(50deg);
    opacity: 0;
  }

  40% {
    transform: scale(1) rotate(50deg);
    opacity: 1;
  }

  70% {
    transform: scale(40) rotate(50deg);
    opacity: 0;
  }

  100% {
    transform: scale(60) rotate(50deg);
    opacity: 0;
  }
}

.c-btn--icon-left {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  box-sizing: border-box;
  padding: 0.6em 1.8em;
  background: var(--color-button);
  color: var(--color-white);
  font-weight: bold;
  line-height: var(--line-height-tight);
  text-decoration: none;
  border-radius: 999px;
  transition: opacity 0.2s;

  &:hover {
    opacity: 0.85;
  }

  &::before {
    content: "\f015";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
  }
}

/* ==================================================
   イベントカード
   ================================================== */
.c-card--event {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-bg);

  & .media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
  }

  & .body {
    padding: var(--spacing-sm);

    & .c-btn {
      display: flex;
      justify-content: center;
      width: 100%;
      margin-top: var(--spacing-sm);
    }
  }

  & .eventTitle {
    margin: 0 0 0.5em;
    font-size: var(--font-size-m);
    font-weight: bold;
    color: var(--color-primary);
  }

  & .lead {
    margin: 0 0 var(--spacing-sm);
    font-size: var(--font-size-base);
    color: var(--color-text);
    line-height: var(--line-height-base);
  }

  & .infoList {
    --infoList-line-height: 1.5;

    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    column-gap: 0.5em;
    row-gap: 0.8em;
    margin: 0;
    padding: 0.4em 0;
    padding-top: calc(var(--spacing-sm) + 0.4em);
    border-top: 1px solid var(--color-border);

    & dt {
      padding: 0.15em 0.8em 0.05em;
      margin-top: calc((var(--font-size-base) * var(--infoList-line-height) - var(--font-size-s) * var(--line-height-tight) - 0.2em) / 2);
      border-radius: 4px;
      background: var(--color-label-bg);
      color: var(--color-text);
      font-size: var(--font-size-s);
      font-weight: normal;
      line-height: var(--line-height-tight);
      white-space: nowrap;
    }

    & dd {
      margin: 0;
      color: var(--color-text);
      line-height: var(--infoList-line-height);
    }
  }
}

.c-card--event.js-fadein {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;

  &.is-inview {
    opacity: 1;
    transform: none;
  }

  @media (prefers-reduced-motion: reduce) {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.c-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-md);

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