:root {
  --color-text: #333;
  --color-text-muted: #666;
  --color-border: #ddd;
  --color-bg-header: rgba(255, 255, 255, 0.95);
  --color-bg-hover: #f2f2f2;
  --color-bg-overlay: rgba(255, 255, 255, 0.75);
  --color-bg-subtle: #f9f9f9;
  --color-bg-subtle-hover: #eee;
  --color-accent: #9fe7c6;
}

html {
  scrollbar-gutter: stable;
}

@view-transition {
  navigation: auto;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.5rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: var(--color-bg-header);
}

@media (min-width: 768px) {
  header {
    padding: 2rem 2.5rem;
  }
}

@media (min-width: 1200px) {
  header {
    padding: 1.5rem 4rem;
  }
}

main {
  padding: 1rem 1.5rem;
  margin-top: 5.5rem;
  flex-grow: 1;
}

@media (min-width: 768px) {
  main {
    padding: 1rem 3.5rem;
  }
}

@media (min-width: 1200px) {
  main {
    padding: 1.5rem 12rem;
  }
}

footer {
  padding: 6rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}

@media (min-width: 768px) {
  footer {
    padding: 4rem 2.5rem;
    align-items: flex-start;
  }
}

@media (min-width: 1200px) {
  footer {
    padding: 4rem 4rem;
  }
}

.footer-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 768px) {
  .footer-main {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
}

.footer-logo {
  height: 24px;
  width: auto;
  filter: grayscale(100%) brightness(0) opacity(50%);
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-links-link {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links-link:hover {
  text-decoration: underline;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-contact {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 1.5rem;
  }
}

.footer-contact p {
  margin: 0;
}

.footer-contact-link {
  color: var(--color-text);
  text-decoration: none;
}

.logo img {
  height: 40px;
  width: auto;
  display: block;
}

nav ul {
  display: flex;
  justify-content: flex-end;
  list-style: none;
  gap: 1.5rem;
  padding: 0;
  margin: 0;
}

nav a {
  color: var(--color-text);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 400;
  transition: background-color 0.2s ease, text-decoration 0.2s ease;
}

nav a:hover {
  background-color: var(--color-bg-hover);
  text-decoration: underline;
}

nav a.is-current {
  font-weight: 700;
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.8rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 1rem;
  color: var(--color-text);
  position: relative;
  z-index: 101;
  margin-left: auto;
}

.menu-toggle-label {
  display: inline-block;
  min-width: 4em;
  text-align: left;
}

.hamburger-icon {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
}

.hamburger-icon span {
  display: block;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.is-open .hamburger-icon span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.menu-toggle.is-open .hamburger-icon span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.is-open .hamburger-icon span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 1200px) {
  .menu-toggle {
    display: flex;
  }

  nav#main-nav {
    display: flex;
    position: fixed;
    inset: 0;
    background-color: var(--color-bg-overlay);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  nav#main-nav.nav-open {
    opacity: 1;
    visibility: visible;
  }

  nav#main-nav ul {
    flex-direction: column;
    gap: 2rem;
  }
}

body.menu-open {
  overflow: hidden;
}

h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 2rem;
  color: var(--color-text);
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  color: var(--color-text);
}

h3 {
  color: var(--color-text);
}

p {
  color: var(--color-text);
}

img {
  max-width: 100%;
  height: auto;
}

footer p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.card-grid--news {
  grid-template-columns: 1fr;
}

@media (min-width: 480px) {
  .card-grid--news {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .card-grid--news {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }
}

.card {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 1.4rem 1.8rem;
  gap: 0.5rem;
}

.card img {
  border-radius: 12px 12px 0 0;
  display: block;
  width: 100%;
  aspect-ratio: 1.618 / 1;
  object-fit: cover;
}

.card h3 {
  margin: 0;
  flex-grow: 1;
}

.card .date {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.card--more {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 700;
  background-color: var(--color-bg-subtle);
  transition: background-color 0.2s ease;
}

.card--more:hover {
  background-color: var(--color-bg-subtle-hover);
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 150px);
  justify-content: center;
  gap: 2rem;
}

.member {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  text-align: center;
}

.member-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
}

.member-name {
  font-weight: 500;
  margin: 0;
}

.member-role {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  margin: 0;
}

.callout {
  background-color: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.5rem 2rem;
}

.callout p {
  margin: 0;
}

.full-bleed {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}

.carousel {
  position: relative;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.carousel-track {
  position: relative;
  height: 320px;
}

.carousel-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.carousel-image.is-active {
  opacity: 1;
}

.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.8);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.2rem;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-prev {
  left: 0.5rem;
}

.carousel-next {
  right: 0.5rem
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.75rem;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--color-border);;
  background-color: var(--color-bg-header);
  cursor: pointer;
  padding: 0;
}

.carousel-dot.is-active {
  background-color: var(--color-accent);
}
