/* AniTech Landing Page — Rina x ZiN | styles.css
   Progressive enhancement baseline: EVERYTHING below is visible/static by
   default. app.js only *adds* hidden-state via inline GSAP styles when
   Lenis+GSAP+ScrollTrigger are confirmed loaded — if CDN fails, this file
   alone renders a complete, readable, motion-free page. */

:root {
  --cream: #FAF7F2;
  --cream-soft: #FFFDF9;
  --text-dark: #2A2A35;
  --text-muted: #6E6E7D;

  --rina-blue: #3D7BC4;
  --rina-blue-light: #4A90D9;
  --rina-blue-soft: #EAF2FB;

  --zin-maroon: #5C2E3E;
  --zin-maroon-soft: #F3E9EA;

  --gold: #C9A45C;
  --gold-soft: #F7EEDD;

  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Baloo 2', cursive;

  --radius-card: 22px;
  --shadow-soft: 0 12px 32px rgba(42, 42, 53, .12);
  --shadow-card: 0 18px 40px rgba(42, 42, 53, .16);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: var(--cream);
  color: var(--text-dark);
  font-family: var(--font-body);
  line-height: 1.5;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; }

/* Anchor-scroll offset isn't needed (single page, no fixed header) */

/* ============ GRAIN OVERLAY (satu tekstur, dipakai semua section) ============ */
.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: .045;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============ REUSABLE TEXTURE: WASHI TAPE / STICKY NOTE ============ */
.deco-tape {
  position: absolute;
  width: 92px;
  height: 28px;
  transform: rotate(var(--rot, -4deg));
  background: repeating-linear-gradient(
    -45deg,
    rgba(201, 164, 92, .55),
    rgba(201, 164, 92, .55) 6px,
    rgba(201, 164, 92, .38) 6px,
    rgba(201, 164, 92, .38) 12px
  );
  box-shadow: 0 3px 8px rgba(42, 42, 53, .10);
  opacity: .85;
  pointer-events: none;
  z-index: 2;
}
.deco-tape--story-a { top: -6px; left: 8%; }
.deco-tape--story-b { top: 40%; right: 6%; width: 76px; }
.deco-tape--card { top: -10px; left: 50%; transform: translateX(-50%) rotate(var(--rot, -5deg)); z-index: 5; }

.deco-sticky {
  position: absolute;
  width: 96px;
  height: 96px;
  background: var(--gold-soft);
  box-shadow: var(--shadow-soft);
  transform: rotate(var(--rot, -3deg));
  pointer-events: none;
  z-index: 1;
}
.deco-sticky::after {
  content: '';
  position: absolute;
  right: 0; bottom: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 0 16px 16px;
  border-color: transparent transparent rgba(42,42,53,.14) transparent;
}
.deco-sticky--special { top: -18px; left: -14px; }

/* ============ LOADING SCREEN ============ */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: linear-gradient(160deg, var(--cream-soft), var(--cream) 70%);
  transition: opacity .5s ease, visibility .5s ease;
}
#loading-screen.fade-out { opacity: 0; visibility: hidden; pointer-events: none; }

.loading-progress-track {
  width: 3px;
  height: 120px;
  border-radius: 999px;
  background: rgba(92, 46, 62, .14);
  overflow: hidden;
  position: relative;
}
.loading-progress-fill {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 0%;
  background: linear-gradient(180deg, var(--rina-blue-light), var(--zin-maroon));
  transition: height .25s ease-out;
  border-radius: 999px;
}
.loading-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  color: var(--text-dark);
  letter-spacing: .01em;
}
.loading-percent {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}
.loading-caption {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ============ SECTION BASE ============ */
section {
  position: relative;
  padding: 96px 6vw;
  overflow: hidden;
}

.section-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  text-align: center;
  margin: 0 0 48px;
}

/* ============ HERO ============ */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 64px;
  padding-bottom: 64px;
  background: radial-gradient(120% 100% at 80% 10%, var(--rina-blue-soft) 0%, var(--cream) 55%);
}

.hero-marquee {
  position: absolute;
  top: 8%;
  left: 0;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  opacity: .08;
  pointer-events: none;
  z-index: 0;
}
.hero-marquee span {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 7vw, 4.5rem);
  color: var(--zin-maroon);
  padding-right: 2vw;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  max-width: 1180px;
  margin: 0 auto;
}

.hero-text { order: 2; text-align: center; max-width: 640px; }
.hero-watermark {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: .04em;
  margin: 0 0 10px;
}
.hero-wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 9vw, 4.2rem);
  margin: 0 0 14px;
  color: var(--text-dark);
  letter-spacing: .01em;
}
.hero-tagline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 4vw, 1.9rem);
  line-height: 1.3;
  margin: 0 0 14px;
  color: var(--text-dark);
}
.hero-sub {
  font-size: clamp(.95rem, 2.2vw, 1.1rem);
  color: var(--text-muted);
  margin: 0;
}

.hero-art { order: 1; position: relative; width: 100%; display: flex; justify-content: center; }
.hero-rina { width: min(72vw, 340px); }
.hero-zin-desktop { display: none; }

.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}
.scroll-hint span {
  display: block;
  width: 22px; height: 34px;
  border: 2px solid rgba(42, 42, 53, .28);
  border-radius: 999px;
  position: relative;
}
.scroll-hint span::before {
  content: '';
  position: absolute;
  top: 6px; left: 50%;
  width: 4px; height: 8px;
  border-radius: 999px;
  background: var(--zin-maroon);
  transform: translateX(-50%);
  animation: scrollHintMove 1.6s ease-in-out infinite;
}
@keyframes scrollHintMove {
  0%, 100% { transform: translate(-50%, 0); opacity: 1; }
  50% { transform: translate(-50%, 10px); opacity: .4; }
}

@media (min-width: 1024px) {
  .hero-inner { flex-direction: row; text-align: left; gap: 6vw; }
  .hero-text { order: 1; text-align: left; }
  .hero-art { order: 2; width: 46%; }
  .hero-zin-desktop { display: block; }

  .hero-art { position: relative; height: 460px; }
  .hero-rina {
    width: 320px;
    position: relative;
    z-index: 2;
  }
  .hero-zin-desktop {
    width: 260px;
    position: absolute;
    right: -6%;
    top: -8%;
    z-index: 1;
    opacity: .96;
  }
}

/* ============ STORY ============ */
.story {
  background: var(--cream-soft);
  position: relative;
}
.story-deco-books {
  position: absolute;
  width: 90px;
  right: 6%;
  bottom: 6%;
  transform: rotate(-6deg);
  opacity: .92;
  z-index: 0;
}
.story-inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.story-line { font-size: 1.05rem; margin: 0 0 22px; color: var(--text-dark); }
.story-line--caps strong { font-family: var(--font-display); letter-spacing: .01em; }

.story-quote {
  position: relative;
  margin: 40px auto 40px;
  padding: 6px 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.2rem, 3.4vw, 1.6rem);
  line-height: 1.4;
  color: var(--zin-maroon);
  max-width: 520px;
}
.story-quote-mark {
  display: block;
  font-size: 2.6rem;
  line-height: .6;
  color: var(--gold);
  margin-bottom: 6px;
}
.story-quote-highlight {
  position: absolute;
  left: -4%;
  right: -4%;
  top: 38%;
  height: 46%;
  background: var(--gold-soft);
  transform: rotate(-1.2deg);
  z-index: -1;
  border-radius: 4px;
}

.story-closing {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 4.4vw, 2.1rem);
  line-height: 1.35;
  color: var(--text-dark);
  margin: 32px 0 0;
}

/* ============ KARAKTER CAROUSEL ============ */
.karakter { background: var(--cream); }

.carousel { position: relative; max-width: 460px; margin: 0 auto; }
.carousel-viewport { overflow: hidden; }
.carousel-track {
  display: flex;
  transition: transform .45s cubic-bezier(.22, .8, .3, 1);
  touch-action: pan-y;
  cursor: grab;
}
.carousel-track.dragging { transition: none; cursor: grabbing; }
.carousel-slide { flex: 0 0 100%; padding: 8px; }

.polaroid {
  position: relative;
  background: #fff;
  border-radius: 14px;
  padding: 14px 14px 22px;
  box-shadow: var(--shadow-card);
  transform: rotate(var(--rot, -3deg));
  border-bottom: 6px solid var(--rina-blue);
}
.carousel-slide--zin .polaroid { border-bottom-color: var(--zin-maroon); }

.polaroid-art {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  object-position: bottom;
  margin-bottom: 8px;
}
.polaroid-quote {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--rina-blue);
  margin: 0 0 14px;
}
.carousel-slide--zin .polaroid-quote { color: var(--zin-maroon); }
.polaroid-quote-mark { color: var(--gold); font-size: 1.5rem; margin-right: 2px; }

.polaroid-identity { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.polaroid-avatar-btn {
  position: relative;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid var(--rina-blue);
  padding: 0;
  overflow: hidden;
  background: var(--rina-blue-soft);
  flex-shrink: 0;
}
.carousel-slide--zin .polaroid-avatar-btn { border-color: var(--zin-maroon); background: var(--zin-maroon-soft); }
.polaroid-avatar-btn img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-view-box: inset(0% 38% 83% 38%);
}
.polaroid-name { font-weight: 700; font-size: .95rem; margin: 0; }
.polaroid-name span { display: block; font-weight: 500; font-size: .78rem; color: var(--text-muted); }
.polaroid-bio { font-size: .88rem; color: var(--text-muted); margin: 0; line-height: 1.55; }

.polaroid-egg {
  margin: 8px 0 0;
  font-size: .82rem;
  font-weight: 600;
  color: var(--rina-blue);
  min-height: 1.2em;
  opacity: 0;
  transition: opacity .3s ease;
}
.polaroid-egg.visible { opacity: 1; }

.polaroid-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--zin-maroon);
  color: #fff;
  font-size: .74rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.polaroid-tooltip::after {
  content: '';
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--zin-maroon);
}
.polaroid-avatar-btn:hover .polaroid-tooltip,
.polaroid-avatar-btn.tooltip-active .polaroid-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.carousel-arrow {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dark);
  border: none;
  z-index: 3;
}
.carousel-arrow--prev { left: -6px; }
.carousel-arrow--next { right: -6px; }
@media (min-width: 560px) {
  .carousel-arrow--prev { left: -20px; }
  .carousel-arrow--next { right: -20px; }
}

.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.carousel-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(42, 42, 53, .2);
  border: none;
  padding: 0;
}
.carousel-dot.is-active { background: var(--zin-maroon); width: 22px; border-radius: 999px; transition: width .25s ease; }

/* ============ SPECIAL ============ */
.special { background: var(--zin-maroon-soft); }
.special-card {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  background: var(--cream-soft);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 44px 6vw;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 32px;
  text-align: center;
}

.special-phone {
  position: relative;
  width: 160px;
  height: 300px;
  background: var(--text-dark);
  border-radius: 26px;
  padding: 14px 10px;
  flex-shrink: 0;
  box-shadow: 0 16px 30px rgba(42, 42, 53, .25);
}
.special-phone-notch {
  width: 46px; height: 8px;
  background: #000;
  border-radius: 6px;
  margin: 0 auto 12px;
}
.special-phone-bubble {
  max-width: 78%;
  height: 20px;
  border-radius: 10px;
  margin-bottom: 8px;
  background: #fff;
}
.special-phone-bubble--rina { margin-left: auto; background: var(--rina-blue); height: 16px; width: 60%; }
.special-phone-bubble--short { width: 45%; }

.special-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--zin-maroon);
  margin: 0 0 14px;
}
.special-copy p { margin: 0 0 10px; color: var(--text-dark); font-size: .98rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  margin-top: 12px;
  min-height: 44px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--zin { background: var(--zin-maroon); color: #fff; box-shadow: 0 10px 24px rgba(92, 46, 62, .3); }
.btn--rina { background: var(--rina-blue); color: #fff; box-shadow: 0 10px 24px rgba(61, 123, 196, .3); }

@media (min-width: 720px) {
  .special-card { flex-direction: row; text-align: left; }
}

/* ============ CTA ============ */
.cta { background: var(--cream); }
.cta-card {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--cream-soft);
}
.cta-banner { width: 100%; }
.cta-deco-megaphone {
  position: absolute;
  width: 96px;
  top: 8%;
  right: 4%;
  transform: rotate(4deg);
  z-index: 2;
  filter: drop-shadow(0 6px 10px rgba(42,42,53,.2));
}
.cta-body { padding: 28px 6vw 36px; text-align: center; }
.cta-badge {
  display: inline-block;
  font-size: .74rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--zin-maroon);
  margin-bottom: 14px;
}
.cta-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 4vw, 2rem);
  margin: 0 0 10px;
}
.cta-subline { color: var(--text-muted); margin: 0 0 4px; font-size: .95rem; }

/* ============ SHARE + FOOTER ============ */
.share-footer { background: var(--cream-soft); }
.share-footer-inner {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}
.footer-deco-shrug {
  position: absolute;
  width: 84px;
  left: -4%;
  top: -18%;
  transform: rotate(-5deg);
  opacity: .95;
  z-index: 0;
}
.share-copy {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: var(--shadow-soft);
  font-size: .95rem;
  margin: 0 0 26px;
}
.share-row { display: flex; justify-content: center; gap: 22px; margin-bottom: 40px; }
.share-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: none; }
.share-circle {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--zin-maroon);
}
.share-label { font-size: .72rem; color: var(--text-muted); }

.footer-mini { color: var(--text-muted); font-size: .85rem; }
.footer-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-dark);
  margin: 0 0 8px;
}
.footer-handle { margin-top: 6px; }

/* ============ SCROLL TO TOP + TOAST ============ */
#scroll-top-btn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--zin-maroon);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-card);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}
#scroll-top-btn.visible { opacity: 1; transform: none; pointer-events: auto; }

#scroll-toast {
  position: fixed;
  right: 20px;
  bottom: 78px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: 999px;
  padding: 6px 14px 6px 6px;
  box-shadow: var(--shadow-card);
  max-width: min(78vw, 280px);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}
#scroll-toast.visible { opacity: 1; transform: none; }
#scroll-toast img {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  object-view-box: inset(0% 38% 83% 38%);
  flex-shrink: 0;
  background: var(--cream);
}
#scroll-toast span { font-size: .8rem; line-height: 1.3; }

#share-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(10px);
  z-index: 50;
  background: var(--text-dark);
  color: #fff;
  font-size: .82rem;
  padding: 10px 18px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
  white-space: nowrap;
}
#share-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ ACCESSIBILITY ============ */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--rina-blue);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-hint span::before { animation: none; }
  .loading-progress-fill { transition: none; }
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ============ RESPONSIVE TWEAKS ============ */
@media (max-width: 640px) {
  section { padding: 72px 6vw; }
  .polaroid-art { max-height: 260px; }
}
