/* ============================================
   Zetsu — Landing Page Stylesheet
   Design system: Cartethyia (exact replica)
   ============================================ */

/* ── Reset & Base ───────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  font-size: 16px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

body {
  height: 100%;
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  color: #ffffff;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  background: #070b13;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ── Font Serif (heading) ───────────────────── */
.font-serif {
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
}

/* ── Landing Root ───────────────────────────── */
.landing-root {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow-x: hidden;
  background: #070b13;
  color: #ffffff;
}

/* ── Background Layers ──────────────────────── */
.landing-bg-base {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: #070b13;
}

.landing-bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  contain: strict;
}

.landing-scene-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 1;
  transform: translateZ(0);
  backface-visibility: hidden;
  background-color: #070b13;
  will-change: opacity;
}

.landing-scene-image-current {
  opacity: calc(1 - var(--scene-progress, 0));
}

.landing-scene-image-next {
  opacity: var(--scene-progress, 0);
}

.landing-scene-image-final {
  opacity: 1;
}

/* Gradient overlays untuk readability */
.landing-overlay-h {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(3, 7, 15, 0.48) 0%,
    rgba(3, 7, 15, 0.25) 34%,
    rgba(3, 7, 15, 0.08) 75%,
    rgba(3, 7, 15, 0.22) 100%
  );
}

.landing-overlay-v {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(3, 7, 15, 0.36) 0%,
    transparent 34%,
    rgba(3, 7, 15, 0.48) 100%
  );
}

/* ── Header ─────────────────────────────────── */
.landing-header {
  position: fixed;
  inset-x: 0;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
}

.landing-header-inner {
  margin: 0 auto;
  display: flex;
  height: 64px;
  width: min(100% - 2rem, 1280px);
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 640px) {
  .landing-header-inner {
    height: 72px;
    width: min(100% - 3rem, 1280px);
  }
}

.landing-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: #ffffff;
  text-decoration: none;
}

.landing-logo-icon {
  display: flex;
  height: 36px;
  width: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: #ffffff;
  padding: 2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.landing-logo-icon img {
  height: 100%;
  width: 100%;
  border-radius: 9px;
  object-fit: cover;
}

.landing-logo-text {
  display: grid;
  gap: 2px;
}

.landing-logo-text strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}

@media (min-width: 640px) {
  .landing-logo-text strong {
    font-size: 21px;
  }
}

.landing-logo-text small {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.55);
}

/* ── Navigation ─────────────────────────────── */
.landing-nav {
  display: none;
  align-items: center;
  gap: 4px;
}

@media (min-width: 768px) {
  .landing-nav {
    display: flex;
  }
}

.landing-nav a {
  display: inline-flex;
  height: 36px;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  transition: background-color 150ms, color 150ms;
}

.landing-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* CTA button di header */
.landing-cta-btn {
  display: inline-flex;
  height: 36px;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  transition: background-color 150ms, color 150ms;
}

.landing-cta-btn:hover {
  background: #ffffff;
  color: #070b13;
}

/* ── Main Content ───────────────────────────── */
.landing-main {
  position: relative;
}

.landing-content-wrapper {
  pointer-events: none;
  position: fixed;
  inset-x: 0;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  min-height: 100vh;
  align-items: center;
}

.landing-content-wrapper > .landing-scene-enter {
  pointer-events: auto;
}

.landing-scene-enter {
  margin: 0 auto;
  width: min(100% - 2rem, 1280px);
  padding-top: 64px;
  max-width: 672px;
  animation: scene-enter 180ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@media (min-width: 640px) {
  .landing-scene-enter {
    width: min(100% - 3rem, 1280px);
    padding-top: 72px;
  }
}

@keyframes scene-enter {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Chapter meta (number + label) */
.landing-chapter-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #67e8f9;
}

.landing-chapter-divider {
  height: 1px;
  width: 40px;
  background: currentColor;
  opacity: 0.7;
}

/* Location */
.landing-location {
  margin-top: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.55);
}

/* Title */
.landing-title {
  margin-top: 12px;
  max-width: 576px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 6vw, 78px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.045em;
  color: #ffffff;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.5));
}

/* Description */
.landing-description {
  margin-top: 20px;
  max-width: 576px;
  font-size: 14px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.8);
}

@media (min-width: 640px) {
  .landing-description {
    font-size: 16px;
  }
}

/* ── Buttons ────────────────────────────────── */
.landing-buttons {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-control, 11px);
  font-weight: 500;
  transition: color 150ms, background-color 150ms, border-color 150ms,
              opacity 150ms, transform 150ms;
}

.btn:active {
  transform: scale(0.97);
}

.btn:focus-visible {
  outline: 2px solid #67e8f9;
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.btn-lg {
  height: 40px;
  padding: 0 16px;
  font-size: 14px;
  gap: 8px;
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
  gap: 6px;
}

/* Landing primary button — white-on-dark */
.btn-landing-primary {
  border-radius: 8px;
  background: #ffffff;
  color: #070b13;
}

.btn-landing-primary:hover {
  background: #cffafe;
}

/* Landing secondary button — glass outline */
.btn-landing-secondary {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.btn-landing-secondary:hover {
  background: #ffffff;
  color: #070b13;
}

/* ── Signals ────────────────────────────────── */
.landing-signals {
  margin-top: 28px;
  display: grid;
  gap: 0;
}

@media (min-width: 640px) {
  .landing-signals {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

.signal-row {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0;
}

@media (min-width: 640px) {
  .signal-row {
    gap: 12px;
  }
}

.signal-row svg {
  flex-shrink: 0;
  align-self: center;
}

.signal-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.65);
}

.signal-value {
  margin-left: auto;
  text-align: right;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #ffffff;
}

/* ── Chapter Links (last chapter) ───────────── */
.landing-chapter-links {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 12px;
  font-weight: 600;
}

.landing-chapter-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.75);
  transition: color 150ms;
}

.landing-chapter-links a:hover {
  color: #ffffff;
}

/* ── Scroll Sections ────────────────────────── */
.landing-scroll-sections {
  position: relative;
}

.landing-scroll-section {
  min-height: 100vh;
  scroll-snap-align: start;
}

/* ── Progress Indicator ─────────────────────── */
.landing-progress {
  position: fixed;
  right: 128px;
  top: 50%;
  z-index: 20;
  display: none;
  transform: translateY(-50%);
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.6);
}

@media (min-width: 768px) {
  .landing-progress {
    display: flex;
  }
}

/* Mobile: horizontal bottom */
@media (max-width: 767px) {
  .landing-progress {
    display: flex;
    bottom: 56px;
    left: 16px;
    right: 16px;
    top: auto;
    transform: none;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
}

.landing-progress-number {
  white-space: nowrap;
}

.landing-progress-track {
  background: rgba(255, 255, 255, 0.25);
  position: relative;
  overflow: hidden;
}

.landing-progress-vertical {
  height: 80px;
  width: 1px;
}

.landing-progress-fill {
  display: block;
  background: #67e8f9;
  transition: height 140ms linear;
}

.landing-progress-vertical .landing-progress-fill {
  width: 100%;
  height: calc(var(--scene-progress, 0) * 100%);
}

/* Mobile horizontal */
@media (max-width: 767px) {
  .landing-progress-vertical {
    height: 1px;
    width: 100%;
    flex: 1;
  }
  .landing-progress-vertical .landing-progress-fill {
    width: calc(var(--scene-progress, 0) * 100%);
    height: 100%;
  }
}

.landing-progress-percent {
  width: 32px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 767px) {
  .landing-progress-percent {
    width: auto;
    text-align: left;
  }
}

/* ── Chapter Navigation ─────────────────────── */
.landing-chapter-nav {
  position: fixed;
  right: 32px;
  top: 50%;
  z-index: 20;
  display: flex;
  transform: translateY(-50%);
  flex-direction: column;
  align-items: flex-end;
  gap: 20px;
}

@media (max-width: 767px) {
  .landing-chapter-nav {
    bottom: 20px;
    left: 50%;
    right: auto;
    top: auto;
    width: calc(100% - 2rem);
    transform: translateX(-50%) translateY(0);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
}

.chapter-nav-btn {
  text-align: right;
  transition: color 150ms;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

@media (max-width: 767px) {
  .chapter-nav-btn {
    flex: 1;
  }
}

.chapter-nav-btn.active {
  color: #67e8f9;
}

.chapter-nav-btn:not(.active) {
  color: rgba(255, 255, 255, 0.55);
}

.chapter-nav-btn:not(.active):hover {
  color: #ffffff;
}

.chapter-nav-btn .nav-number {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.chapter-nav-btn .nav-label {
  display: block;
  margin-top: 4px;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 767px) {
  .chapter-nav-btn .nav-label {
    display: none;
  }
}

/* ── Footer Status ──────────────────────────── */
.landing-footer {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 20;
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.45);
}

@media (min-width: 1024px) {
  .landing-footer {
    display: flex;
  }
}

.landing-status-dot {
  height: 6px;
  width: 6px;
  border-radius: 50%;
  background: #65f1b5;
  box-shadow: 0 0 10px #65f1b5;
}

/* ── Script Loader ──────────────────────────── */
.script-loader {
  margin-top: 24px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(3, 7, 15, 0.82);
  overflow: hidden;
  animation: scene-enter 180ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.script-loader-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #67e8f9;
}

.script-loader-code {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
}

.script-loader-code code {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  font-family: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
}

.script-loader-code code::-webkit-scrollbar {
  display: none;
}

.script-copy-btn {
  flex-shrink: 0;
  height: 28px;
  padding: 0 10px;
  font-size: 11px;
  border-radius: 6px;
}

.script-loader-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.script-feature {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(103, 232, 249, 0.2);
  background: rgba(103, 232, 249, 0.08);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #67e8f9;
}

.script-feature svg {
  color: #67e8f9;
}

/* ── Reduced Motion ─────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
