:root {
  --screen-width: 100vw;
  --screen-height: 100vh;

  --header-bg: #004cff;
  --footer-bg: #004cff;
  --text-color-main: #000000;
  --placeholder-bg: #004cff;
  --placeholder-text-color: #ffffff;

  --header-height: 70px;
  --header-padding-x: -50px;
  --header-logo-width: 100px;
  --header-nav-gap: 40px;
  --header-font-size: 20px;

  --ca-top: 50px;
  --ca-left: 50%;
  --ca-width: 420px;
  --ca-height: 70px;
  --ca-font-size: 30px;

  --main-logo-top: 200px;
  --main-logo-left: 50%;
  --main-logo-width: 500px;

  --years-text-top: 500px;
  --years-text-left: 5%;
  --years-text-font-size: 60px;
  --years-text-line-height: 0.5;

  --hero-right-bottom: -1020px;
  --hero-right-right: 5%;
  --hero-right-width: 350px;

  --screen-2-padding-top: 250px;
  --screen-2-columns-gap: 0px;

  --section-title-font-size: 60px;
  --lore-title-margin-bottom: 20px;
  --chart-title-margin-bottom: 20px;

  --lore-frame-width: 610px;
  --lore-frame-height: 309px;
  --chart-frame-width: 610px;
  --chart-frame-height: 309px;

  --center-character-width: 400px;
  --center-character-bottom: 10px;

  --footer-height: 60px;
  --footer-font-size: 14px;

  --toast-bg: #000000;
  --toast-color: #ffffff;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

body {
  font-family: "Black Han Sans", sans-serif;
  color: var(--text-color-main);
  background: #ffffff;
  scroll-behavior: smooth;
}

button { font-family: inherit; }

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--header-bg);
  z-index: 1000;
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--header-padding-x);
}

.header-logo img {
  width: var(--header-logo-width);
  height: auto;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--header-nav-gap);
}

.nav-link {
  background: none;
  border: none;
  color: #ffffff;
  font-size: var(--header-font-size);
  cursor: pointer;
  letter-spacing: 0.04em;
}

.nav-link:hover { opacity: 0.8; }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.burger span {
  width: 22px;
  height: 3px;
  background: #ffffff;
  border-radius: 3px;
}

.page-wrapper {
  margin-top: var(--header-height);
  width: 100%;
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  scroll-snap-type: y mandatory;
}

.screen {
  position: relative;
  width: var(--screen-width);
  min-height: var(--screen-height);
  scroll-snap-align: start;
}

.screen-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.screen-1 {
  background: url("bg_screen1.png") center / cover no-repeat;
}

.screen-2 {
  background: url("bg_screen2.png") center / cover no-repeat;
}

.ca-wrapper {
  position: absolute;
  top: var(--ca-top);
  left: var(--ca-left);
  transform: translateX(-50%);
  width: var(--ca-width);
  height: var(--ca-height);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ca-banner {
  width: 100%;
  height: 100%;
  padding: 0 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url("ca_banner.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  overflow: hidden;
}

.ca-text {
  font-size: var(--ca-font-size);
  color: #000000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.main-logo {
  position: absolute;
  top: var(--main-logo-top);
  left: var(--main-logo-left);
  transform: translateX(-50%);
}

.main-logo img {
  width: var(--main-logo-width);
}

.years-text {
  position: absolute;
  top: var(--years-text-top);
  left: var(--years-text-left);
  font-size: var(--years-text-font-size);
  line-height: var(--years-text-line-height);
}

.hero-right {
  position: absolute;
  right: var(--hero-right-right);
  bottom: var(--hero-right-bottom);
}

.hero-right img { width: var(--hero-right-width); }

.screen-2-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding-top: var(--screen-2-padding-top);
  padding-bottom: calc(var(--footer-height) + 20px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: flex-start;
  column-gap: var(--screen-2-columns-gap);
}

.section-title {
  margin: 0 0 20px;
  font-size: var(--section-title-font-size);
  color: #004cff;
}

.lore-frame {
  width: var(--lore-frame-width);
  height: var(--lore-frame-height);
  background: rgba(255,255,255,0.9);
  border-radius: 8px;
  overflow: hidden;
}

.lore-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: .2s;
}

.lore-preview:hover {
  opacity: .85;
  transform: scale(1.02);
}

.chart-frame {
  width: var(--chart-frame-width);
  height: var(--chart-frame-height);
  background: rgba(255,255,255,0.9);
  border-radius: 8px;
  overflow: hidden;
}

.placeholder-text {
  width: 100%;
  height: 100%;
  background: var(--placeholder-bg);
  color: var(--placeholder-text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.center-character img {
  width: var(--center-character-width);
  position: relative;
  bottom: var(--center-character-bottom);
}

.site-footer {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: var(--footer-height);
  background: var(--footer-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: var(--footer-font-size);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%) translateY(100%);
  background: var(--toast-bg);
  color: var(--toast-color);
  padding: 10px 20px;
  border-radius: 999px;
  opacity: 0;
  transition: .2s;
  pointer-events: none;
  z-index: 2000;
}

.toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: .9;
}

@media (max-width: 900px) {
  :root {
    --header-height: 64px;
    --header-logo-width: 100px;
    --header-nav-gap: 24px;
    --header-font-size: 18px;

    --ca-top: 25px;
    --ca-width: 320px;
    --ca-height: 60px;
    --ca-font-size: 18px;

    --main-logo-top: 130px;
    --main-logo-width: 360px;

    --years-text-top: 340px;
    --years-text-left: 10%;
    --years-text-font-size: 25px;

    --hero-right-right: 50%;
    --hero-right-bottom: -950px;
    --hero-right-width: 260px;

    --lore-frame-width: 90vw;
    --lore-frame-height: 220px;
    --chart-frame-width: 90vw;
    --chart-frame-height: 220px;

    --center-character-width: 240px;
    --center-character-bottom: 0;

    --footer-font-size: 12px;
  }

  .hero-right {
    right: 50%;
    transform: translateX(50%);
  }

  .screen-2-inner {
    grid-template-columns: 1fr;
    row-gap: 60px;
    text-align: center;
  }

  .header-nav { display: none; }

  .burger { display: flex; }

  .header-nav.open {
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--header-bg);
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 10px 0 16px;
    display: flex;
  }

  .header-nav.open .nav-link { font-size: 18px; }
}
