:root {
  --color-bg: #FDF6F0;
  --color-bg-raised: #FFFFFF;
  --color-ink: #3A2A22;
  --color-brand: #7D5A50;
  --color-brand-deep: #5C4038;
  --color-accent: #7C8363;
  --color-accent-soft: #EDEFE4;
  --color-line: #E8DDD1;
  --color-muted: #8A7A6E;

  /* nada kertas untuk kolase buku */
  --paper-kraft: #EBD9C2;
  --paper-cream: #F6ECDF;
  --paper-note: #FCF7EE;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-accent: 'Caveat', cursive;
  --font-hand: 'Gochi Hand', 'Caveat', cursive;

  --text-display-xl: clamp(2.75rem, 5vw + 1rem, 4.5rem);
  --text-display-l: clamp(2rem, 3vw + 1rem, 3rem);
  --text-display-m: clamp(1.5rem, 2vw + 0.5rem, 2rem);
  --text-body-l: 1.125rem;
  --text-caption: 0.875rem;
  --text-micro: 0.75rem;

  --radius-button: 8px;
  --radius-card: 12px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 2px rgba(58, 42, 34, 0.04), 0 8px 24px rgba(58, 42, 34, 0.06);

  --container-max: 1120px;
  --container-padding: clamp(1.25rem, 4vw, 3rem);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

p { max-width: 60ch; }
a { color: inherit; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: var(--radius-button);
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
  cursor: pointer;
}
.btn-sm { padding: 9px 18px; font-size: var(--text-caption); }
.btn-primary { background: var(--color-brand); color: var(--color-bg); border: 1.5px solid var(--color-brand); }
.btn-primary:hover { background: var(--color-brand-deep); border-color: var(--color-brand-deep); }
.btn-secondary { background: transparent; color: var(--color-brand); border: 1.5px solid var(--color-brand); }
.btn-secondary:hover { background: rgba(125, 90, 80, 0.06); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(253, 246, 240, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-line);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 88px; }
.brand { display: flex; margin-right: auto; }
.brand img { height: 44px; width: auto; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(3rem, 6vw, 5.5rem) clamp(2.5rem, 5vw, 4rem); }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.eyebrow {
  font-size: var(--text-caption);
  letter-spacing: 0.04em;
  color: var(--color-accent);
  font-variant: small-caps;
  margin-bottom: 14px;
}
.hero-copy h1 { font-size: var(--text-display-xl); margin-bottom: 20px; }
.hero-copy .lead { font-size: var(--text-body-l); color: var(--color-muted); margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-note { margin-top: 22px; font-size: var(--text-caption); color: var(--color-muted); }
.hero-note a { color: var(--color-brand); text-decoration: underline; text-underline-offset: 3px; }
.hero-note a:hover { color: var(--color-brand-deep); }

/* ================================================================== */
/* Book animation                                                      */
/* ================================================================== */
.hero-book { display: flex; flex-direction: column; align-items: center; gap: 18px; }

.book-stage {
  width: 100%;
  max-width: 460px;
  perspective: 2200px;
  overflow: hidden;
  border-radius: 12px;
  padding: 4px;
}

.book {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  /* semua ukuran di dalam kolase memakai em, jadi diskalakan dari sini */
  font-size: clamp(9px, 2.6vw, 15px);
  transform-style: preserve-3d;
  transform: rotateX(6deg);
  transition: transform 500ms ease;
}

.book__spine {
  position: absolute;
  top: 1.5%;
  left: 0;
  width: 2.4%;
  z-index: 55;
  height: 97%;
  background: linear-gradient(90deg, var(--color-brand-deep), var(--color-brand) 55%, var(--color-brand-deep));
  border-radius: 3px 0 0 3px;
  box-shadow: var(--shadow-card);
}

.leaf {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform-origin: left center;
  transition: transform 780ms cubic-bezier(.53,.08,.2,1);
  will-change: transform;
}
.leaf.is-flipped { transform: rotateY(-178deg); }

.face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 3px 10px 10px 3px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-line);
}
.face--back { transform: rotateY(180deg); border-radius: 10px 3px 3px 10px; }

.book .leaf:first-child .face { box-shadow: 0 2px 6px rgba(58,42,34,.12), 0 18px 40px rgba(58,42,34,.16); }

/* permukaan kertas */
.kraft {
  background:
    radial-gradient(140% 120% at 20% 10%, rgba(255,255,255,.35), transparent 55%),
    var(--paper-kraft);
}
.paper {
  background:
    radial-gradient(120% 120% at 80% 0%, rgba(255,255,255,.4), transparent 50%),
    var(--paper-cream);
}
.face::after {
  /* butir kertas sangat tipis */
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(58,42,34,.5) 0.5px, transparent 0.6px);
  background-size: 4px 4px;
  opacity: .05;
  pointer-events: none;
}

/* ---- huruf potongan majalah (ransom) ---- */
.ransom {
  position: absolute;
  top: 8%;
  left: 7%;
  right: 7%;
  display: flex;
  flex-wrap: wrap;
  gap: .18em;
  line-height: 1;
}
.ransom--title { top: 30%; }
.ransom--r { justify-content: flex-end; }
.stack-word { position: absolute; top: 9%; right: 8%; display: flex; flex-direction: column; gap: .12em; }

.cut {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.1em;
  padding: .04em .16em;
  color: var(--color-bg);
  background: var(--color-brand);
  box-shadow: 1px 1px 0 rgba(58,42,34,.18);
  display: inline-block;
}
.ransom--title .cut { font-size: 2.55em; }
.cut.c1 { transform: rotate(-6deg);  background: var(--color-brand); }
.cut.c2 { transform: rotate(4deg);   background: #B26B4A; }
.cut.c3 { transform: rotate(-3deg);  background: var(--color-accent); }
.cut.c4 { transform: rotate(7deg);   background: var(--color-ink); }
.cut.c5 { transform: rotate(-5deg);  background: #C98A3C; }
.cut.c6 { transform: rotate(3deg);   background: var(--color-brand-deep); }
.cut.c7 { transform: rotate(-8deg);  background: #7A6A9C; }
.cut.c8 { transform: rotate(5deg);   background: var(--color-accent); color: var(--color-ink); }

/* ---- frame foto (placeholder, tanpa gambar) ---- */
.snap {
  position: absolute;
  left: var(--x, 12%);
  top: var(--y, 40%);
  width: 46%;
  aspect-ratio: 4 / 3;
  background: var(--color-bg-raised);
  padding: 6% 6% 16%;
  box-shadow: 2px 6px 14px rgba(58,42,34,.16);
  border: 1px solid rgba(58,42,34,.06);
}
.snap::before {
  content: "";
  position: absolute;
  inset: 6% 6% 16%;
  background:
    repeating-linear-gradient(135deg, rgba(58,42,34,.05) 0 8px, transparent 8px 16px),
    var(--paper-note);
  border: 1px dashed rgba(58,42,34,.25);
}
.snap__cap {
  position: absolute;
  left: 0; right: 0; bottom: 4%;
  text-align: center;
  font-family: var(--font-accent);
  font-size: 1.35em;
  color: var(--color-muted);
  z-index: 3;
}

/* ---- bingkai bisa diisi foto oleh pengunjung (preview, tidak diunggah) ---- */
.snap--fill { z-index: 4; }
.snap__input {
  position: absolute;
  inset: 6% 6% 16%;
  z-index: 4;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
  font-size: 0;
}
.snap--circle .snap__input { inset: 8%; }
.snap--fill:focus-within { outline: 2px solid var(--color-brand); outline-offset: 3px; }
.snap__img {
  position: absolute;
  inset: 6% 6% 16%;
  background-size: cover;
  background-position: center;
  z-index: 1;
  display: none;
}
.snap--circle .snap__img { inset: 8%; border-radius: 50%; }
.snap.has-photo .snap__img { display: block; }
.snap.has-photo::before { display: none; }
.snap__add {
  position: absolute;
  inset: 6% 6% 16%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: .82em;
  letter-spacing: .02em;
  color: var(--color-brand);
  background: rgba(253, 246, 240, .35);
  opacity: 0;
  transition: opacity 160ms ease;
}
.snap--circle .snap__add { inset: 8%; border-radius: 50%; }
.snap--fill:hover .snap__add,
.snap--fill:focus-within .snap__add { opacity: 1; }
.snap.has-photo .snap__add { display: none; }
.snap__remove {
  position: absolute;
  top: 3%; right: 3%;
  z-index: 5;
  width: 1.7em; height: 1.7em;
  border: 0;
  border-radius: 50%;
  background: rgba(58, 42, 34, .62);
  color: #fff;
  font-size: 1em;
  line-height: 1;
  cursor: pointer;
  display: none;
}
.snap.has-photo .snap__remove { display: block; }
.snap--big { width: 58%; }
.snap--sm { width: 38%; left: 50%; top: 55%; }
.snap--circle { border-radius: 50%; width: 52%; aspect-ratio: 1; padding: 8%; }
.snap--circle::before { inset: 8%; border-radius: 50%; }
.snap--circle .snap__cap { bottom: 12%; }
.snap--tilt-l { transform: rotate(-5deg); }
.snap--tilt-r { transform: rotate(4deg); }

/* ---- selotip washi ---- */
.tape {
  position: absolute;
  width: 24%;
  height: 7%;
  background: rgba(124, 131, 99, .38);
  border-inline: 1px dashed rgba(255,255,255,.5);
}
.tape--a { top: 4%; left: 10%; transform: rotate(-24deg); background: rgba(178,107,74,.34); }
.tape--b { top: 6%; right: 8%; transform: rotate(18deg); }
.tape--c { bottom: 10%; left: 40%; transform: rotate(-8deg); background: rgba(201,138,60,.32); }

/* ---- tulisan tangan & potongan koran ---- */
.hand {
  position: absolute;
  left: 8%;
  bottom: 8%;
  max-width: 82%;
  font-family: var(--font-accent);
  font-size: 1.7em;
  line-height: 1.15;
  color: var(--color-brand-deep);
  transform: rotate(-2deg);
}
.hand--lg { font-size: 2em; }
.leaf--cover .hand { bottom: 13%; font-size: 1.8em; }
.face--front.paper .doodle--sun { bottom: 4%; }
.clip {
  position: absolute;
  right: 6%;
  bottom: 12%;
  width: 46%;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.92em;
  line-height: 1.35;
  color: rgba(58,42,34,.55);
  background: var(--paper-note);
  padding: .7em .8em;
  box-shadow: 1px 2px 6px rgba(58,42,34,.12);
  transform: rotate(2deg);
}
.clip--rot { transform: rotate(-3deg); left: 8%; right: auto; top: 12%; bottom: auto; }

/* ---- doodle ---- */
.doodle { position: absolute; stroke: var(--color-brand); fill: none; stroke-width: 1.6; stroke-linecap: round; }
.doodle--heart { width: 3.4em; height: 3.4em; top: 10%; right: 10%; fill: rgba(178,107,74,.25); stroke: var(--color-brand-deep); }
.doodle--sun { width: 4em; height: 4em; bottom: 8%; right: 8%; }
.doodle--spark { width: 3em; height: 3em; top: 12%; right: 12%; fill: rgba(201,138,60,.3); stroke: none; }

/* ---- stempel ---- */
.stamp {
  position: absolute;
  top: 8%; right: 8%;
  width: 8.5em; height: 8.5em;
  border: 2px solid var(--color-brand);
  border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .1em;
  color: var(--color-brand);
  font-family: var(--font-body);
  font-size: .8em;
  letter-spacing: .08em;
  text-transform: lowercase;
  transform: rotate(-12deg);
  opacity: .78;
}
.stamp svg { width: 1.8em; height: 1.8em; fill: currentColor; }

.flip-hint {
  position: absolute;
  right: 7%; bottom: 6%;
  font-family: var(--font-body);
  font-size: .8em;
  letter-spacing: .03em;
  color: var(--color-muted);
}

.face.end {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1.4em;
  padding: 12%;
}
.face.end .hand { position: static; transform: rotate(-2deg); }
.face.end .btn { font-size: .95em; }

/* interaksi buku — pita tepi kiri/kanan untuk balik halaman,
   bagian tengah dibiarkan bebas supaya bingkai foto bisa diklik */
.book-tap-left, .book-tap-right {
  position: absolute;
  top: 0; bottom: 0; width: 11%;
  z-index: 60;
  cursor: pointer;
  background: transparent;
  border: 0;
}
.book-tap-left { left: 0; }
.book-tap-right { right: 0; }
.book-tap-left:disabled, .book-tap-right:disabled { cursor: default; }

.book-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}
.book-btn {
  width: 40px; height: 40px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--color-brand);
  background: transparent;
  color: var(--color-brand);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 160ms ease, opacity 160ms ease;
}
.book-btn:hover:not(:disabled) { background: rgba(125, 90, 80, 0.08); }
.book-btn:disabled { opacity: .32; cursor: default; }
.book-progress { font-size: var(--text-caption); color: var(--color-muted); min-width: 8ch; text-align: center; }
.book-tip {
  max-width: 40ch;
  text-align: center;
  font-size: var(--text-micro);
  line-height: 1.5;
  color: var(--color-muted);
}

/* ---------- Ribbon divider ---------- */
.ribbon-divider {
  color: var(--color-brand);
  opacity: 0.28;
  max-width: var(--container-max);
  margin: clamp(3rem, 7vw, 6rem) auto;
  padding-inline: var(--container-padding);
}
.ribbon-divider svg { width: 100%; height: 48px; display: block; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(3rem, 7vw, 6rem); }
.section-raised { background: var(--color-bg-raised); border-block: 1px solid var(--color-line); }
.section-head { max-width: 46ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2 { font-size: var(--text-display-l); margin-bottom: 12px; }
.section-head p { color: var(--color-muted); font-size: var(--text-body-l); }

/* ---------- Features ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.25rem, 3vw, 2rem); }
.feature {
  background: var(--color-bg-raised);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  box-shadow: var(--shadow-card);
}
.feature:nth-child(2) { transform: translateY(-14px); }
.feature-icon { width: 40px; height: 40px; color: var(--color-brand); margin-bottom: 16px; }
.feature h3 { font-size: var(--text-display-m); margin-bottom: 8px; }
.feature p { font-size: var(--text-caption); color: var(--color-muted); }

/* ---------- Guarantee ---------- */
.guarantee-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.25rem, 3vw, 2rem); }
.guarantee-card {
  border: 1px solid var(--color-line);
  border-radius: var(--radius-card);
  padding: 26px 24px;
  background: var(--color-bg);
}
.guarantee-card h3 { font-size: 1.25rem; margin-bottom: 10px; color: var(--color-brand-deep); }
.guarantee-card p { font-size: var(--text-caption); color: var(--color-muted); }

/* ---------- Steps ---------- */
.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
}
.steps li { counter-increment: step; padding-top: 20px; border-top: 1.5px solid var(--color-line); }
.steps li::before {
  content: counter(step);
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--color-accent);
  display: block;
  margin-bottom: 10px;
}
.steps h3 { font-size: var(--text-display-m); margin-bottom: 6px; }
.steps p { font-size: var(--text-caption); color: var(--color-muted); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--color-accent-soft); padding-block: clamp(3rem, 7vw, 5rem); text-align: center; }
.cta-inner h2 { font-size: var(--text-display-l); margin-bottom: 10px; }
.cta-inner p { color: var(--color-muted); margin: 0 auto 26px; }

/* ---------- Footer ---------- */
.site-foot { background: var(--color-bg); border-top: 1px solid var(--color-line); }
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 64px;
  align-items: flex-start;
  justify-content: space-between;
  padding-top: 64px;
  padding-bottom: 56px;
}
.foot-brand { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.foot-logo { height: 42px; opacity: 0.9; }
.foot-tagline { font-family: var(--font-accent); font-size: 1.4rem; color: var(--color-brand); }
.foot-copy { font-size: var(--text-micro); color: var(--color-muted); }
.foot-copy a { color: var(--color-muted); text-decoration: underline; text-underline-offset: 2px; }
.foot-copy a:hover { color: var(--color-brand); }
.foot-contact { display: flex; flex-direction: column; align-items: flex-start; }
.foot-q { font-size: var(--text-caption); color: var(--color-brand); margin-bottom: 6px; }
.foot-addr { font-size: var(--text-caption); margin-top: 10px; opacity: .8; }
.foot-walink {
  font-size: var(--text-body-l);
  color: var(--color-brand);
  text-decoration: underline;
  text-underline-offset: 4px;
  font-family: var(--font-display);
}
.foot-walink:hover { color: var(--color-brand-deep); }
.foot-follow { font-size: var(--text-micro); letter-spacing: 0.03em; color: var(--color-muted); margin: 24px 0 10px; }
.foot-social { display: flex; gap: 14px; }
.foot-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  color: var(--color-brand);
  transition: background 180ms ease, border-color 180ms ease;
}
.foot-social a:hover { background: rgba(125, 90, 80, 0.08); border-color: var(--color-brand); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 600ms ease, transform 600ms ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-book { order: -1; }
  .book-stage { max-width: 340px; }
  .feature-grid, .guarantee-grid, .steps { grid-template-columns: 1fr; }
  .feature:nth-child(2) { transform: none; }
}

@media (max-width: 640px) {
  .foot-inner { flex-direction: column; align-items: flex-start; gap: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .book, .book.is-open { transform: none; transition: none; }
  .leaf { transition: none; }
}
