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

:root {
  --color-primary: #1a6fc4;
  --color-accent: #00f2ff;
  --color-white: #ffffff;
  --color-bg: #ffffff;
  --color-text: #1e293b;
  --color-text-light: #64748b;
  --color-glass: rgba(255, 255, 255, 0.8);
  --color-glass-border: rgba(0, 242, 255, 0.3);
  --nav-width: 260px;
  --transition: 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans JP", sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.8;
  overflow-x: hidden;
}

/* ========== NAV ========== */
#side-nav {
  position: fixed;
  top: 50%;
  left: 4.5rem;
  transform: translateY(-45%);
  width: var(--nav-width);
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 1.5rem;
  z-index: 100;
  background: #ffffff;
  border: 1px solid var(--color-accent);
  box-shadow: 0 0 15px rgba(0, 242, 255, 0.4), inset 0 0 10px rgba(0, 242, 255, 0.1);
  border-radius: 8px;
}

@media (min-width: 769px) {
  #side-nav {
    opacity: 0;
    transition: opacity 1s ease, transform 1s ease;
  }
  #side-nav.visible {
    opacity: 1;
  }
}

#side-nav::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(0, 242, 255, 0.05) 0%, transparent 100%);
  pointer-events: none;
}

#side-nav .nav-label {
  font-family: "Outfit", sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--color-primary);
  margin-bottom: 2rem;
  text-transform: uppercase;
}

#side-nav ul {
  list-style: none;
}

#side-nav ul li {
  margin: 0.5rem 0;
  text-align: right;
}

#side-nav ul li a {
  font-family: "Outfit", sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--color-text-light);
  text-decoration: none;
  text-transform: uppercase;
  transition: color var(--transition), letter-spacing var(--transition);
  display: block;
  padding: 0.4rem 0;
}

#side-nav ul li a:hover,
#side-nav ul li a.active {
  color: var(--color-primary);
  font-weight: 700;
}

#hamburger {
  display: none;
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 300;
  background: #ffffff;
  border: 1px solid var(--color-accent);
  border-radius: 4px;
  padding: 0.8rem;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
}
#hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: var(--transition);
}
#hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
#hamburger.open span:nth-child(2) {
  opacity: 0;
}
#hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

#mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(232, 244, 253, 0.95);
  backdrop-filter: blur(16px);
  z-index: 150;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}
#mobile-nav.open {
  display: flex;
}
#mobile-nav a {
  font-family: "Outfit", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--color-primary);
  text-decoration: none;
  text-transform: uppercase;
}

/* ========== MAIN ========== */
main {
  margin-left: calc(var(--nav-width) + 10rem);
}

/* ========== SECTION BASE ========== */
section {
  padding: 8rem 4rem;
  position: relative;
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    black 10%,
    black 90%,
    transparent 100%
  );
}

.section-heading {
  position: relative;
  margin-bottom: 2.5rem;
  line-height: 1;
}
.section-heading .en {
  font-family: "Outfit", sans-serif;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--color-primary);
  letter-spacing: 0.05em;
  display: block;
  opacity: 0.35;
}
.section-heading .ja {
  font-family: "Noto Sans JP", sans-serif;
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  font-weight: 700;
  color: var(--color-primary);
  display: block;
  margin-top: -1.2em;
  padding-left: 0.3em;
}

.catchcopy {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 300;
  color: var(--color-text-light);
  text-align: center;
  margin-bottom: 2.5rem;
  letter-spacing: 0.05em;
}

#top {
  height: 75vh; 
  background: url("img/top_back.jpg") right top / 75% auto no-repeat;
  background-color: var(--color-bg);
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 8rem 4rem;
  position: relative;
  mask-image: none;
  margin-left: calc(-1 * (var(--nav-width) + 8rem));
  width: 100vw; 
  padding-left: calc(var(--nav-width) + 2.5rem);

  opacity: 0;
  transition: opacity 1.5s ease;
}

#top.visible {
  opacity: 1;
}

@media (max-width: 1024px) {
  #top {
    height: auto;
    min-height: auto;
    aspect-ratio: auto;
    margin-left: 0;
    width: 100%;
    padding: 0;
    display: flex;
    flex-direction: column;
    background-size: 100% auto;
    background-position: top center;
  }

  .hero-text {
    margin-top: 56.25vw;
    padding: 2rem 1.5rem;
    text-align: center;
    align-items: center;
  }

  .hero-logo-img {
    width: 100%;
    max-width: 650px;
  }

  .hero-author {
    align-self: center;
    margin-right: 0;
    margin-top: 1rem;
    font-size: 0.8rem;
  }
}

#top::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;

  background:
    /* 左フェード */
    linear-gradient(
      to right,
      var(--color-bg) 0%,
      rgba(255,255,255,0) 20%
    ),
    /* 下フェード */
    linear-gradient(
      to top,
      var(--color-bg) 0%,
      rgba(255,255,255,0) 30%
    );
}

#top::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    135deg,
    rgba(232, 244, 253, 0.6) 0%,
    rgba(125, 211, 252, 0.15) 100%
  );
}
.hero-text {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hero-logo-img {
  width: clamp(280px, 45vw, 650px);
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.8));
}

.hero-author {
  font-family: "Zen Kurenaido", sans-serif;
  font-weight: 300;
  font-size: clamp(0.7rem, 0.9vw, 0.9rem);
  color: var(--color-text);
  letter-spacing: 0.4em;
  align-self: flex-end;
  margin-top: clamp(2rem, 5vw, 4rem);
  margin-right: clamp(1rem, 5vw, 5rem);
  opacity: 0.8;
}

.hero-text .sub {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--color-primary);
  letter-spacing: 0.2em;
  margin-bottom: 0.5rem;
}
.hero-text .title {
  display: none;
}
.hero-text .series {
  display: none;
}

/* ========== ABOUT ========== */
#about {
  background: #fff;
  padding-top: 2rem;
}
.about-text {
  max-width: 960px;
  font-size: 1rem;
  line-height: 2;
  color: var(--color-text);
}
.about-text p {
  margin-bottom: 1rem;
}
.about-text p:last-child {
  margin-bottom: 0;
}
.about-text a {
  color: var(--color-primary);
  text-decoration: underline;
}

/* ========== WORLD ========== */
#world {
  background: linear-gradient(160deg, #e8f4fd 60%, #dbeafe 100%);
}
.world-inner {
  display: block; 
  max-width: 960px;
}
.world-text {
  font-size: 0.95rem;
  line-height: 2;
}
.world-text p {
  margin-bottom: 0.5rem;
}
.world-text p:last-child {
  margin-bottom: 0;
}
.world-text h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 1.5rem 0 0.5rem;
}
.world-text h3:first-child {
  margin-top: 0;
}
.world-img {
  float: right;
  width: 40%;
  max-width: 400px;
  margin-left: 2rem;
  margin-bottom: 1rem;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(26, 111, 196, 0.15);
  border: 1px solid var(--color-glass-border);
}
.world-img img {
  width: 100%;
  display: block;
}

/* ========== TITLES ========== */
#titles {
  background: #fff;
}
.titles-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 680px;
}
.title-card {
  background: var(--color-glass);
  backdrop-filter: blur(8px);
  border: 1px solid var(--color-glass-border);
  border-radius: 16px;
  padding: 1.5rem 2rem;
  transition:
    transform var(--transition),
    box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}
.title-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  border-radius: 4px 0 0 4px;
}
.title-card.blue::before {
  background: var(--color-primary);
}
.title-card.red::before {
  background: #e11d48;
}
.title-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(26, 111, 196, 0.15);
}
.title-card .card-catch {
  font-family: "Outfit", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}
.title-card.blue .card-catch {
  color: var(--color-primary);
}
.title-card.red .card-catch {
  color: #e11d48;
}
.title-card .card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 1rem;
}
.title-card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 700;
  border: 1.5px solid var(--color-primary);
  border-radius: 999px;
  padding: 0.3rem 1rem;
  transition:
    background var(--transition),
    color var(--transition);
}
.title-card .card-link:hover {
  background: var(--color-primary);
  color: #fff;
}
.title-card .card-link svg {
  width: 14px;
  height: 14px;
}

/* ========== COMMERCIALIZED ========== */
#commercialized {
  background: linear-gradient(160deg, #e8f4fd 60%, #dbeafe 100%);
  text-align: center;
  overflow: hidden;
}
.cm-overflow-text {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text-light);
  white-space: nowrap;
  display: block;
  margin: 1.5rem 0;
  opacity: 0.8;
  width: 200vw;
  text-align: left;
}
.cm-note {
  font-size: 0.85rem;
  color: var(--color-text-light);
  max-width: 500px;
}
.cm-note a {
  color: var(--color-primary);
}

/* ========== FANFIC ========== */
#fanfic {
  background: #fff;
}
.fanfic-content {
  max-width: 960px;
}
.fanfic-content p {
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
}
.fanfic-content p:last-child {
  margin-bottom: 0;
}
.fanfic-content h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 1.5rem 0 0.5rem;
}
.fanfic-content ul {
  padding-left: 1.5rem;
  font-size: 0.9rem;
  line-height: 2;
  color: var(--color-text-light);
}
.fanfic-content code {
  background: #e8f4fd;
  border-radius: 4px;
  padding: 0.1em 0.4em;
  font-size: 0.85em;
  color: var(--color-primary);
}

/* ========== CONTACT ========== */
#contact {
  background: linear-gradient(160deg, #e8f4fd 60%, #dbeafe 100%);
  text-align: left;
}
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 0.9rem 2.5rem;
  background: var(--color-primary);
  color: #fff;
  font-family: "Outfit", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  border-radius: 999px;
  transition:
    background var(--transition),
    transform var(--transition);
  box-shadow: 0 4px 16px rgba(26, 111, 196, 0.25);
}
.contact-link:hover {
  background: #1558a0;
  transform: translateY(-2px);
}

/* ========== FOOTER ========== */
footer {
  background: var(--color-text);
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  margin-left: 0;
}

/* ========== SCROLL ANIMATION ========== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  #side-nav {
    display: none;
  }
  #hamburger {
    display: flex;
  }
  main {
    margin-left: 0;
  }
  footer {
    margin-left: 0;
  }

  section {
    padding: 4rem 1.5rem;
    overflow: hidden;
  }

  .world-inner {
    display: flex;
    flex-direction: column;
  }
  .world-img {
    float: none;
    width: 100%;
    margin-left: 0;
    margin-top: 1.5rem;
  }

  .cm-overflow-text {
    transform: translateX(0);
  }
}

/* ========== UTILITY ========== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
