/* ===== Base ===== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #222;
  text-align: center;
  background: #fff;
  line-height: 1.5;
}

h1, h2, h3, h4 {
  font-weight: 500;
  margin: 0.5em 0;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

p {
  margin: 1em 0;
}

a {
  color: #0979FF;
}

img {
  max-width: 100%;
}

/* anchor offset so fixed header doesn't cover section titles */
[id]::before {
  content: "";
  display: block;
  height: 70px;
  margin: -70px 0 0;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  height: 90px;
  width: 100%;
  background: rgba(138, 197, 239, 0.53);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.27);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 10000;
}

.header__logo img {
  height: 60px;
  display: block;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header__nav a {
  color: #384FBF;
  text-decoration: none;
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.2s;
  letter-spacing: 0.03em;
}

.header__nav a:hover {
  background: rgba(255, 255, 255, 0.3);
}

.nav--desktop-only {
  display: inline-block;
}

@media (max-width: 400px) {
  .nav--desktop-only {
    display: none;
  }
  .header__nav a {
    font-size: 0.7rem;
    padding: 4px 6px;
  }
}

/* ===== Hero ===== */
.hero {
  position: relative;
}

.hero__container {
  /* height: 100vh; */
  width: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.hero__background {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px);
}

.hero__content {
  position: relative;
  z-index: 100;
  height: 100%;
  background: linear-gradient(0deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.1) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-bottom: 50px;
  animation: heroFadeIn 0.5s ease-in-out 1s forwards;
  opacity: 0;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: scale(1.1); }
  to { opacity: 1; transform: scale(1); }
}

.hero__start {
  padding-top: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  position: relative;
  width: 100%;
}

.hero__title {
  color: #384FBF;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  padding: 0 20px;
}

.hero__showcase {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
}

.hero__showcase-img {
  width: 70%;
  max-height: 50vh;
  min-height: 100px;
  object-fit: contain;
}

.hero__ce-logo {
  position: absolute;
  right: 30px;
  top: 60%;
  width: 18%;
  min-width: 10%;
  max-height: 50vh;
  object-fit: contain;
  transform: rotate(20deg) scale(1);
  opacity: 0;
  animation: ceLogoIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.5) 2s forwards;
}

@keyframes ceLogoIn {
  from { opacity: 0; transform: rotate(30deg) scale(1.3); }
  to { opacity: 1; transform: rotate(20deg) scale(1); }
}

.hero__store-links {
  display: flex;
  flex-direction: row;
  margin-top: 50px;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero__store-links img {
  width: 150px;
  display: block;
}

.hero__arrow {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  text-align: center;
  color: white;
  font-size: 2rem;
  z-index: 100;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Welcome text fades in while scrolling (JS toggles a class) */
.hero__welcome {
  position: absolute;
  padding: 30px;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.8s ease, transform 0.8s ease;
  pointer-events: none;
}

.hero__welcome-inner {
  max-width: 1000px;
}

.hero.is-scrolled .hero__start {
  opacity: 0;
  transform: translateY(-50px);
  transition: opacity 0.6s, transform 0.6s;
  pointer-events: none;
}

.hero.is-scrolled .hero__welcome {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* ===== Parallax sections ===== */
.parallax {
  position: relative;
  height: 60vh;
  width: 100%;
  overflow: hidden;
  background: #000;
}

.parallax__bg {
  position: absolute;
  left: 0;
  top: -100px;
  width: 100%;
  height: calc(100% + 200px);
  object-fit: cover;
  will-change: transform;
}

/* ===== Content Sections (Paper) ===== */
.section {
  position: relative;
  background-image: linear-gradient(0deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.5) 100%), url("background.jpg");
  background-size: cover;
  background-position: center;
  box-shadow: 0 11px 15px -7px rgba(0, 0, 0, 0.2), 0 24px 38px 3px rgba(0, 0, 0, 0.14), 0 9px 46px 8px rgba(0, 0, 0, 0.12);
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 30px 20px;
}

.container--text {
  padding-top: 30px;
  padding-bottom: 30px;
}

.container--document {
  text-align: left;
  margin-top: 100px;
}

.container--document h1 {
  text-align: left;
}

.bookquote {
  font-style: italic;
  color: #222;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 10px;
  background: #0979FF;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.27), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  border: none;
}

.btn:hover {
  background: #0867dd;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.4);
}

/* ===== Book card ===== */
.book {
  text-align: left;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.33);
  box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.13);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.book h3 {
  margin-bottom: 0;
}

.book h4 {
  margin-top: 0;
  font-weight: 400;
  color: #555;
}

.book__row {
  display: flex;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 20px;
}

.book__row--reverse {
  flex-direction: row-reverse;
}

.book__row img {
  max-width: 200px;
  width: 200px;
  object-fit: contain;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .book__row,
  .book__row--reverse {
    flex-wrap: wrap;
    flex-direction: column;
  }
  .book__row img {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
  }
}

/* ===== Footer ===== */
.footer {
  background-image: linear-gradient(0deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.5) 100%), url("background.jpg");
  background-size: cover;
  box-shadow: 0 11px 15px -7px rgba(0, 0, 0, 0.2);
}

.footer__inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 15px 30px;
  font-size: 0.75rem;
  flex-wrap: wrap;
  gap: 10px;
}

.footer__links a {
  color: #384FBF;
  text-decoration: none;
  font-size: 0.7rem;
  text-transform: uppercase;
  padding: 4px 8px;
  margin-left: 4px;
  border-radius: 6px;
  transition: background 0.2s;
}

.footer__links a:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* ===== Markdown-like doc pages ===== */
.doc h1 { margin-top: 0; }
.doc h2 { margin-top: 1.5em; }
.doc ul, .doc ol { padding-left: 20px; }
.doc p { line-height: 1.6; }

/* Small utility */
.ce-inline {
  height: 20px;
  transform: translate(8px, 4px);
}

.hero__welcome-inner {
  margin-top: 60px;
}