/* =========================
   Aestribra Site
   ========================= */

:root {
  --bg: #080a12;
  --bg-2: #101624;
  --panel: rgba(255, 255, 255, 0.075);
  --panel-strong: rgba(255, 255, 255, 0.11);
  --line: rgba(255, 255, 255, 0.16);
  --line-soft: rgba(255, 255, 255, 0.09);
  --text: #f4f7fb;
  --muted: #a9b3c7;
  --soft: #d8deea;
  --accent: #ffd166;
  --accent-2: #69d2e7;
  --accent-3: #f58cae;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.38);
  --max: 1120px;
  --radius: 8px;
  font-family: Inter, "Noto Sans JP", "Yu Gothic UI", "Hiragino Sans", system-ui, sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  --page-image: url("../images/gallery1.png");
  --page-position: center;
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(8, 10, 18, 0.88) 0%, rgba(8, 10, 18, 0.64) 46%, rgba(8, 10, 18, 0.5) 100%),
    linear-gradient(180deg, rgba(8, 10, 18, 0.26) 0%, rgba(8, 10, 18, 0.78) 100%),
    var(--page-image) var(--page-position) / cover no-repeat,
    var(--bg);
}

body.page-home {
  --page-image: url("../images/gallery1.png");
}

body.page-members {
  --page-image: url("../images/gallery2.png");
}

body.page-gallery {
  --page-image: url("../images/gallery4.png");
}

body.page-links {
  --page-image: url("../images/gallery5.png");
}

body.page-notfound {
  --page-image: url("../images/gallery6.png");
}

body.page-kemari {
  --page-image: url("../images/kemari.png");
  --page-position: center top;
}

body.page-rimus {
  --page-image: url("../images/RimuS.jpg");
  --page-position: center top;
}

body.page-birthday-0523 {
  --page-image: url("../images/SSS.jpg");
  --page-position: center;
}

body.page-birthday-0718 {
  --page-image: url("../images/LLL.png");
  --page-position: center;
}

body.page-birthday-1223 {
  --page-image: url("../images/FFF.png");
  --page-position: center;
}

a {
  color: inherit;
}

canvas#stars {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: transparent;
  image-rendering: crisp-edges;
  opacity: 0.7;
  pointer-events: none;
}

body > :not(canvas) {
  position: relative;
  z-index: 2;
}

.site-header {
  display: flex;
  width: min(100% - 40px, var(--max));
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 18px auto 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 10px 12px 10px 16px;
  background: rgba(8, 10, 18, 0.62);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.22);
}

.site-brand {
  min-width: 0;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.site-nav a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 7px 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  border-color: rgba(105, 210, 231, 0.34);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

header {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 86px) 20px 34px;
  text-align: left;
}

header h1 {
  max-width: 820px;
  margin: 0;
  color: var(--text);
  font-size: clamp(2rem, 5.4vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

header h1::after {
  display: block;
  width: min(220px, 48vw);
  height: 2px;
  margin-top: 24px;
  content: "";
  background: linear-gradient(90deg, var(--accent), var(--accent-2), transparent);
}

header p {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 2vw, 1.12rem);
  line-height: 1.8;
}

main {
  width: min(100% - 40px, var(--max));
  margin: 0 auto;
}

.home {
  display: grid;
  min-height: min(760px, calc(100vh - 188px));
  align-items: center;
  padding: clamp(48px, 9vw, 112px) 0 24px;
}

.home-hero {
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-hero h1 {
  max-width: 850px;
  margin: 0;
  color: var(--text);
  font-size: clamp(2.55rem, 8vw, 6rem);
  line-height: 0.98;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.home-hero h1::after {
  display: block;
  width: min(240px, 48vw);
  height: 2px;
  margin-top: 24px;
  content: "";
  background: linear-gradient(90deg, var(--accent), var(--accent-2), transparent);
}

.home-hero p:not(.eyebrow) {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--soft);
  font-size: clamp(0.98rem, 2vw, 1.12rem);
  line-height: 1.9;
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 340px));
  gap: 18px;
  justify-content: center;
  padding: 18px 0 8px;
}

.link-directory {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 10px 0 8px;
}

.link-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  color: var(--text);
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.link-card:hover,
.link-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(105, 210, 231, 0.55);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.13), var(--panel));
}

.link-banner {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 200 / 40;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(255, 209, 102, 0.16), transparent 40%),
    linear-gradient(90deg, rgba(105, 210, 231, 0.16), rgba(245, 140, 174, 0.12)),
    rgba(255, 255, 255, 0.06);
}

.link-banner::before {
  position: relative;
  z-index: 0;
  content: "Banner 200 x 40";
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.link-banner img {
  position: relative;
  z-index: 1;
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.link-card span {
  color: var(--accent-2);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.link-card strong {
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  line-height: 1.2;
}

.link-card small {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.card,
.profile-card,
.gallery-link a,
.back-btn,
.social-links a {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.card {
  position: relative;
  display: grid;
  min-height: 100%;
  padding: 12px;
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.card::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.18), transparent 34%, rgba(105, 210, 231, 0.12));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.card:hover,
.card:focus-visible,
.card.active {
  transform: translateY(-6px);
  border-color: rgba(255, 209, 102, 0.48);
}

.card:hover::before,
.card:focus-visible::before,
.card.active::before {
  opacity: 1;
}

.avatar {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin-bottom: 16px;
  border-radius: 6px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.05);
}

.name {
  position: relative;
  margin-bottom: 4px;
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.role {
  position: relative;
  min-height: 1.45em;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.tag-list {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.tag {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.78rem;
  line-height: 1;
}

.gallery-link {
  width: min(100% - 40px, var(--max));
  margin: 30px auto 0;
  text-align: center;
}

.gallery-link a,
.back-btn {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius);
  padding: 10px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  transition: transform 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.gallery-link a:hover,
.back-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(105, 210, 231, 0.55);
  color: var(--accent);
}

.gallery-link .emoji {
  display: none;
}

footer {
  width: min(100% - 40px, var(--max));
  margin: 56px auto 0;
  padding: 24px 0 34px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.7;
}

footer p {
  margin: 0;
}

.profile {
  padding: 10px 0 8px;
}

.profile-card {
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: clamp(22px, 4vw, 46px);
  align-items: start;
  border-radius: var(--radius);
  padding: clamp(16px, 3vw, 30px);
}

.avatar-large {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.profile-text {
  min-width: 0;
}

.profile-text h2 {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-text h2:not(:first-child) {
  margin-top: 28px;
}

.profile-text p {
  margin: 0;
  color: var(--soft);
  line-height: 1.9;
}

.profile-text ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-text li {
  position: relative;
  padding-left: 18px;
  color: var(--soft);
}

.profile-text li::before {
  position: absolute;
  top: 0.65em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  content: "";
  background: var(--accent-2);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.social-links a {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.social-links a:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 209, 102, 0.5);
  background: rgba(255, 209, 102, 0.12);
}

.social-links img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
  opacity: 0.88;
}

.profile-text .back-btn {
  margin-top: 30px;
}

@media (max-width: 860px) {
  .members-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  }

  .link-directory {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-card {
    grid-template-columns: 1fr;
  }

  .avatar-large {
    max-width: 360px;
  }
}

@media (max-width: 620px) {
  .site-header {
    width: min(100% - 28px, var(--max));
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
    padding: 12px;
  }

  .site-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    justify-content: stretch;
  }

  .site-nav a {
    min-width: 0;
    padding-inline: 6px;
    font-size: 0.82rem;
  }

  header {
    padding-top: 40px;
  }

  header h1 {
    font-size: clamp(1.8rem, 10vw, 2.8rem);
    line-height: 1.08;
  }

  main,
  .gallery-link,
  footer {
    width: min(100% - 28px, var(--max));
  }

  .home {
    min-height: min(680px, calc(100vh - 194px));
    min-height: min(680px, calc(100dvh - 194px));
    padding-top: 34px;
  }

  .home-hero h1 {
    font-size: clamp(2.2rem, 12vw, 3.4rem);
    line-height: 1.04;
  }

  .members-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    justify-content: stretch;
  }

  .link-directory {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .link-card {
    padding: 10px;
  }

  .card {
    grid-template-columns: 92px 1fr;
    gap: 14px;
    align-items: center;
  }

  .avatar {
    grid-row: 1 / 4;
    margin: 0;
  }

  .name,
  .role,
  .tag-list {
    grid-column: 2;
  }

  .role {
    margin-bottom: 0;
    min-height: 0;
  }

  .tag-list {
    margin-top: 0;
  }
}

@media (max-width: 380px) {
  .site-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-hero h1 {
    font-size: clamp(2rem, 11vw, 2.8rem);
  }

  .card {
    grid-template-columns: 78px 1fr;
  }
}
