/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --ink: #1c1230;
  --blue: #c22572;
  --cyan: #ff7a45;
  --muted: #5c4b62;
  --paper: #f8f3f6;
  --line: rgba(90, 30, 80, 0.12);
  --serif: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --header: 76px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header);
}

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

::selection {
  background: #f6d5e6;
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 2000;
  padding: 8px 14px;
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
}

.skip-link:focus {
  top: 12px;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header);
  background: rgba(248, 243, 246, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background 0.3s, box-shadow 0.3s;
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 28px rgba(40, 16, 48, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  width: 42px;
  height: 42px;
}

.logo-text {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.logo-accent {
  background: linear-gradient(120deg, #ff7a3c, #e23d8c 55%, #8b3dff);
  -webkit-background-clip: text;
  background-clip: text;
  color: #c22572;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .logo-accent {
    color: transparent;
  }
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  color: #3a2c48;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(194, 37, 114, 0.1);
  color: var(--blue);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: calc(var(--header) + 28px) 0 72px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 46% 42% at 82% 18%, rgba(255, 122, 60, 0.42), transparent 62%),
    radial-gradient(ellipse 40% 38% at 12% 86%, rgba(226, 61, 140, 0.38), transparent 68%),
    radial-gradient(ellipse 36% 34% at 92% 88%, rgba(124, 58, 237, 0.42), transparent 70%),
    linear-gradient(165deg, #1a0d33 0%, #2a1458 48%, #3a1760 100%);
}

.hero-bg::before {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  top: 22%;
  left: 46%;
  box-shadow:
    70px 36px 0 -1px rgba(255, 255, 255, 0.85),
    150px 110px 0 -2px rgba(255, 255, 255, 0.75),
    -80px 70px 0 -1px rgba(255, 255, 255, 0.7),
    210px -10px 0 -2px rgba(255, 255, 255, 0.8),
    40px 160px 0 -1px rgba(255, 255, 255, 0.55);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffb089;
}

.hero-kicker::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(42px, 5.4vw, 68px);
  font-weight: 560;
  letter-spacing: -0.035em;
  line-height: 0.98;
  color: #fff;
  margin-bottom: 22px;
}

.hero-title em {
  font-style: italic;
  font-weight: 560;
  color: #ff8a4c;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero-title em {
    background: linear-gradient(115deg, #ff7a3c 0%, #e23d8c 52%, #9b4dff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.hero-desc {
  max-width: 460px;
  margin-bottom: 32px;
  font-size: 17px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.78);
}

.hero-phone {
  display: flex;
  justify-content: center;
}

.phone-frame {
  width: min(360px, 100%);
  animation: float 7s ease-in-out infinite;
}

.phone-frame img {
  width: 100%;
  filter: drop-shadow(0 28px 40px rgba(40, 10, 70, 0.45));
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero-content > * {
  animation: rise 0.8s ease both;
}

.hero-kicker { animation-delay: 0.05s; }
.hero-title { animation-delay: 0.14s; }
.hero-desc { animation-delay: 0.24s; }
.hero .store-buttons { animation-delay: 0.34s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* ===== Store Buttons ===== */
.store-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.store-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 176px;
  padding: 10px 18px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
}

.store-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(40, 16, 60, 0.2);
}

.hero .store-btn {
  background: #fff;
  color: var(--ink);
}

.store-btn div {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.store-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  opacity: 0.72;
}

.store-name {
  font-size: 16px;
  font-weight: 700;
}

/* ===== About ===== */
.about {
  padding: 88px 0 80px;
  background: #fff;
}

.about-head {
  max-width: 640px;
  margin-bottom: 28px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
}

.section-tag::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--cyan);
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--ink);
}

.novels-showcase {
  width: min(100%, 980px);
  margin: 8px auto 36px;
  filter: drop-shadow(0 22px 28px rgba(16, 40, 70, 0.16));
}

.genre-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  counter-reset: genre;
}

.genre-list li {
  counter-increment: genre;
  position: relative;
  padding: 26px 24px 28px;
  background: linear-gradient(180deg, #ffffff 0%, #fbf6f8 100%);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.genre-list li::before {
  content: counter(genre, decimal-leading-zero);
  display: block;
  margin-bottom: 14px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 560;
  font-size: 30px;
  line-height: 1;
  color: #d23a78;
}

.genre-list li::after {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--cyan), var(--blue));
}

.genre-list li:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(80, 20, 60, 0.1);
}

.genre-list h3 {
  margin-bottom: 10px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 560;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.genre-list p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}

.btn-outline {
  display: inline-block;
  margin-top: 28px;
  padding: 12px 28px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-outline:hover {
  background: var(--ink);
  color: #fff;
}

/* ===== Explore ===== */
.explore {
  padding: 88px 0;
  background:
    radial-gradient(ellipse 40% 60% at 100% 0%, rgba(226, 61, 140, 0.12), transparent 60%),
    var(--paper);
}

.explore-inner,
.contact-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}

.explore-desc {
  max-width: 460px;
  margin-top: 18px;
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 560;
  font-style: italic;
  line-height: 1.45;
  letter-spacing: -0.02em;
  color: #2c1c38;
}

.explore-image img,
.contact-image img {
  width: 100%;
  border-radius: 28px;
}

.explore-image img {
  box-shadow: 0 24px 50px rgba(20, 70, 110, 0.12);
}

/* ===== Contact ===== */
.contact {
  padding: 72px 0 88px;
  background: #fff;
}

.section-title-sm {
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
}

.contact-question {
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ink);
}

.contact-sub {
  margin: 12px 0 18px;
  font-size: 18px;
  color: #7b8b9a;
}

.contact-email {
  font-size: 22px;
  font-weight: 600;
  color: var(--blue);
}

.contact-email:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ===== Screenshots ===== */
.screenshots {
  padding: 80px 0 88px;
  background: var(--paper);
}

.section-title-center {
  margin-bottom: 40px;
  text-align: center;
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 560;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
}

.carousel-track-wrapper {
  flex: 1;
  overflow: hidden;
  touch-action: pan-y;
}

.carousel-track {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-slide {
  flex: 0 0 calc(33.333% - 16px);
  min-width: calc(33.333% - 16px);
}

.carousel-slide img {
  width: 100%;
  border-radius: 22px;
  box-shadow: 0 16px 40px rgba(16, 40, 70, 0.12);
}

.carousel-btn {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(16, 40, 70, 0.06);
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}

.carousel-btn:hover {
  border-color: var(--cyan);
  color: var(--blue);
  transform: translateY(-1px);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: #c5d4e0;
  cursor: pointer;
  transition: width 0.25s, background 0.25s;
}

.carousel-dot.active {
  width: 22px;
  background: var(--blue);
}

/* ===== Download ===== */
.download {
  padding: 10px 0 88px;
  background: var(--paper);
}

.download-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 48px 56px;
  overflow: hidden;
  border-radius: 32px;
  background:
    radial-gradient(circle at 88% 120%, rgba(255, 196, 140, 0.35), transparent 42%),
    linear-gradient(115deg, #ff7a3c 0%, #e23d8c 48%, #7a3ff0 100%);
  box-shadow: 0 24px 50px rgba(120, 30, 90, 0.28);
}

.download-panel::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -40px;
  top: -80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.download-title {
  position: relative;
  z-index: 1;
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 560;
  letter-spacing: -0.03em;
  color: #fff;
}

.download-panel .store-buttons {
  position: relative;
  z-index: 1;
}

.download-panel .store-btn {
  background: #fff;
  color: var(--ink);
}

.download-panel .store-btn:hover {
  box-shadow: 0 12px 28px rgba(6, 30, 60, 0.18);
}

/* ===== Footer ===== */
.footer {
  background: #140b24;
  padding: 36px 0;
  color: rgba(255, 255, 255, 0.72);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-logo {
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
}

.copyright {
  font-size: 13px;
  line-height: 1.55;
}

.footer-right {
  display: flex;
  gap: 24px;
}

.footer-right a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
}

.footer-right a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .hero-inner,
  .explore-inner,
  .contact-inner,
  .genre-list {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    text-align: center;
    gap: 12px;
  }

  .hero-phone {
    order: -1;
  }

  .hero-kicker {
    justify-content: center;
  }

  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .store-buttons {
    justify-content: center;
  }

  .explore-inner,
  .contact-inner {
    gap: 32px;
  }

  .explore-desc {
    max-width: none;
  }

  .carousel-slide {
    flex: 0 0 calc(50% - 12px);
    min-width: calc(50% - 12px);
  }
}

@media (max-width: 768px) {
  :root {
    --header: 64px;
  }

  .nav {
    position: fixed;
    top: var(--header);
    left: 12px;
    right: 12px;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(16, 40, 70, 0.12);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s, opacity 0.25s;
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    text-align: center;
    padding: 12px;
  }

  .menu-toggle {
    display: flex;
  }

  .hero {
    padding-top: calc(var(--header) + 12px);
    padding-bottom: 48px;
  }

  .phone-frame {
    width: min(250px, 68vw);
  }

  .about,
  .explore,
  .contact,
  .screenshots {
    padding: 56px 0;
  }

  .download {
    padding-bottom: 56px;
  }

  .contact-question {
    font-size: 30px;
  }

  .contact-email {
    font-size: 18px;
    word-break: break-all;
  }

  .carousel {
    gap: 0;
  }

  .carousel-track {
    gap: 14px;
  }

  .carousel-slide {
    flex: 0 0 100%;
    min-width: 100%;
  }

  .carousel-btn {
    display: none;
  }

  .download-panel {
    flex-direction: column;
    text-align: center;
    padding: 36px 22px;
    border-radius: 24px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-right {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .logo-text {
    font-size: 21px;
  }

  .hero-title {
    font-size: 40px;
  }

  .store-btn {
    width: 100%;
    max-width: 240px;
    justify-content: center;
  }

  .btn-outline {
    width: 100%;
    max-width: 240px;
    text-align: center;
  }

  .genre-list h3 {
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
