/* ==========================================================================
   BERANDA
   ========================================================================== */

/* ---------- hero: tiga lembar tulle ---------- */

.hero { position: relative; overflow-x: clip; min-height: calc(100svh - 68px); display: flex; align-items: center; padding-block: 24px 72px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 5vw, 80px); align-items: center; }
.hero-title {
  font-family: var(--hand); font-weight: 400; color: var(--ink);
  font-size: clamp(68px, 8.4vw, 136px); line-height: .88; margin: 20px 0 28px;
}
.hero-title .line { display: block; }
.hero-title .line:last-child { padding-left: .5em; }
.hero-lede { font-family: var(--display); font-weight: 300; font-size: clamp(22px, 2vw, 30px); line-height: 1.3; max-width: 26ch; margin: 0 0 32px; }
.hero-lede em { color: var(--ink); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }
.hero-art { margin: 0; }
.hero-scroll { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); font-size: 12px; color: var(--muted); margin: 0; letter-spacing: .08em; }

.tulle {
  position: relative;
  aspect-ratio: 4 / 4.6;
  width: 100%;
  max-height: calc(100svh - 150px);
  margin-inline: auto;
  --mx: -999px; --my: -999px; --r: 0px;
  touch-action: pan-y;
}
.tulle .layer {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  will-change: transform;
  -webkit-mask-image: radial-gradient(circle at var(--mx) var(--my), transparent 0, transparent var(--r), #000 calc(var(--r) + 140px));
          mask-image: radial-gradient(circle at var(--mx) var(--my), transparent 0, transparent var(--r), #000 calc(var(--r) + 140px));
}
.tulle .layer img { position: relative; max-height: 88%; width: auto; max-width: 78%; object-fit: contain; }
.tulle .layer::before {
  /* selembar kain tulle: putih tipis, berserat */
  content: ""; position: absolute; inset: 2% 9%;
  background:
    repeating-linear-gradient(60deg, rgb(35 33 29 / .05) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(-60deg, rgb(35 33 29 / .05) 0 1px, transparent 1px 5px),
    rgb(255 255 255 / .34);
  box-shadow: 0 0 0 1px rgb(255 255 255 / .5), 0 18px 40px -26px rgb(35 33 29 / .35);
  pointer-events: none;
}
.tulle .layer:nth-child(1) { transform: translate(-9%, 3%) rotate(-2.5deg); opacity: .7; }
.tulle .layer:nth-child(2) { transform: translate(8%, -4%) rotate(1.8deg); opacity: .8; }
.tulle .layer:nth-child(2) img { max-width: 70%; transform: translateY(12%); }
.tulle .layer:nth-child(3) { transform: translate(0, 2%); opacity: 1; }
.tulle-caption { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--mono); font-size: 13px; color: var(--muted); margin-top: 12px; }
.tulle-caption .hand { font-size: 24px; color: var(--ink); line-height: 1; }

@media (max-width: 860px) {
  .hero { min-height: auto; padding-top: 12px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .tulle { aspect-ratio: 4 / 3.6; }
  .hero-scroll { display: none; }
}

canvas.ink-trail { position: fixed; inset: 0; pointer-events: none; z-index: 30; }

/* ---------- kalimat yang diingat, lalu dilupakan ---------- */

.remember { position: relative; }
.remember-pin { min-height: 100svh; display: flex; align-items: center; padding-block: 80px; }
.remember-quote {
  margin: 22px 0 32px; max-width: 20ch;
  font-family: var(--display); font-weight: 300; color: var(--graphite);
  font-size: clamp(38px, 6vw, 96px); line-height: 1.04; letter-spacing: -.01em;
}
.remember-quote em { color: var(--ink); font-style: italic; }
.remember-quote .w {
  --p: 1;
  opacity: calc(.1 + .9 * var(--p));
  filter: blur(calc((1 - var(--p)) * 9px));
  transform: translateY(calc((1 - var(--p)) * .14em));
}
.remember-note { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: baseline; margin: 0; }
.remember-note .hand { font-size: clamp(28px, 3vw, 40px); color: var(--ink); line-height: 1; }
.remember-note .mono { font-size: 13px; color: var(--muted); }
.remember-note a { color: var(--ink); }

/* ---------- daftar hadir ---------- */

.guestbook { position: relative; padding-block: var(--rhythm) 0; scroll-margin-top: 80px; overflow-x: clip; }
.names-drift { position: relative; height: 70px; margin-bottom: 40px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.names-track { position: absolute; left: 0; top: 10px; display: flex; gap: 46px; white-space: nowrap; font-family: var(--hand); font-size: 40px; color: var(--ink); line-height: 1; will-change: transform; }
.names-track span { opacity: var(--o, .5); }
.names-track span::after { content: "·"; margin-left: 46px; color: var(--muted); opacity: .6; }

.guestbook-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 20px 56px; align-items: end; margin-bottom: 36px; }
.section-title { font-family: var(--hand); font-weight: 400; color: var(--ink); font-size: clamp(56px, 7.4vw, 112px); line-height: .9; margin: 10px 0 0; }
.section-title.display-title { font-family: var(--display); font-weight: 300; color: var(--graphite); letter-spacing: -.015em; line-height: .98; }
.section-title.display-title em { color: var(--ink); }
.section-lede { margin: 0; font-family: var(--display); font-weight: 300; font-size: clamp(21px, 1.9vw, 27px); line-height: 1.34; max-width: 32ch; }
.section-lede a, .section-lede em { color: var(--ink); }
@media (max-width: 760px) { .guestbook-head { grid-template-columns: 1fr; } }

.ledger {
  --row: 58px; --num: 74px;
  position: relative;
  background-color: var(--sheet);
  background-image:
    linear-gradient(90deg, transparent 0 calc(var(--num) - 1px), var(--margin-red) calc(var(--num) - 1px) var(--num), transparent var(--num)),
    repeating-linear-gradient(180deg, transparent 0 calc(var(--row) - 1px), var(--rule) calc(var(--row) - 1px) var(--row));
  background-position: 0 0, 0 44px;
  box-shadow: var(--shadow-paper);
  padding-bottom: 8px;
  overflow: hidden;
}
.ledger::before {
  content: ""; position: absolute; left: 22px; top: 0; bottom: 0; width: 12px;
  background: radial-gradient(circle, var(--paper-2) 0 5px, transparent 6px) 0 20px/12px 116px repeat-y;
}
.ledger-row { display: grid; grid-template-columns: var(--num) minmax(0, 1.2fr) minmax(0, 1.5fr) 190px; align-items: end; min-height: var(--row); }
.ledger-row > * { padding: 0 14px 10px; min-width: 0; }
.ledger-row.is-head { min-height: 44px; align-items: center; border-bottom: 1.5px solid var(--line-strong); }
.ledger-row.is-head > * { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding-bottom: 0; }
.ledger-row .no { font-family: var(--mono); font-size: 13px; color: var(--muted); text-align: right; padding-right: 16px; }
.ledger-row .name { font-family: var(--hand); font-size: 32px; line-height: 1.05; color: var(--ink); overflow-wrap: anywhere; }
.ledger-row .msg { font-family: var(--hand); font-size: 23px; line-height: 1.15; color: var(--ink-2); overflow-wrap: anywhere; }
.ledger-row .when { font-family: var(--mono); font-size: 13px; color: var(--muted); white-space: nowrap; }
.ledger-row.is-writing .name, .ledger-row.is-writing .msg { animation: write 1.6s steps(28, end) both; }
.ledger-row.is-writing .msg { animation-delay: .9s; }
@keyframes write { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.ledger-row.is-new { background: linear-gradient(90deg, transparent var(--num), rgb(222 143 34 / .09) var(--num)); }
.ledger-form input[type="text"] { width: 100%; border: 0; background: transparent; outline: none; padding: 0; margin: 0; font-family: var(--hand); color: var(--ink); }
.ledger-form .name input { font-size: 32px; line-height: 1.05; }
.ledger-form .msg input { font-size: 23px; }
.ledger-form input::placeholder { color: rgb(31 45 115 / .32); }
.ledger-form .ledger-row:focus-within { background: linear-gradient(90deg, transparent var(--num), rgb(31 45 115 / .035) var(--num)); }
.ledger-form .when { display: flex; justify-content: flex-end; }
.sign-btn { border: 0; background: none; padding: 0; font-family: var(--hand); font-size: 28px; line-height: 1; color: var(--sodium); white-space: nowrap; }
.sign-btn:hover { color: var(--kraft-deep); }
.ledger-note { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; font-family: var(--mono); font-size: 13px; color: var(--muted); padding: 14px 16px 10px calc(var(--num) + 14px); min-height: 48px; }
.ledger-note .ok { color: var(--ink); font-family: var(--serif); font-size: 17px; }
.ledger-note .err { color: #9b3228; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 760px) {
  .ledger { --num: 44px; --row: 54px; }
  .ledger::before { display: none; }
  .ledger-row { grid-template-columns: var(--num) minmax(0, 1fr); }
  .ledger-row.is-head > :nth-child(3), .ledger-row.is-head > :nth-child(4) { display: none; }
  .ledger-row .msg, .ledger-row .when { grid-column: 2; padding-top: 0; }
  .ledger-row .msg { padding-bottom: 4px; }
  .ledger-row .when { padding-bottom: 12px; }
  .ledger-row .no { padding-right: 8px; }
  .ledger-note { padding-left: calc(var(--num) + 8px); }
}

/* ---------- tiga ruang arsip, digulir menyamping ---------- */

.rooms { padding-top: calc(var(--rhythm) * .6); }
.rooms-pin { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: clamp(20px, 3vh, 40px); padding-block: 28px; overflow: hidden; }
.rooms-intro .section-title { font-size: clamp(48px, 6vw, 92px); }
.rooms-track { display: flex; gap: clamp(20px, 3vw, 40px); padding-inline: var(--gutter); width: max-content; }
.room {
  position: relative; flex: none;
  width: min(76vw, 1080px); height: calc(100svh - 260px); min-height: 420px; max-height: 660px;
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  background: var(--sheet); box-shadow: var(--shadow-paper);
  text-decoration: none; color: inherit; overflow: hidden;
}
.room-copy { display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; padding: clamp(24px, 3vw, 44px); position: relative; z-index: 2; }
.room-copy h3 { margin: 0; font-size: clamp(64px, 7vw, 112px); line-height: .85; color: var(--ink); font-weight: 400; }
.room-copy p { margin: 0; max-width: 30ch; font-family: var(--display); font-weight: 300; font-size: clamp(19px, 1.5vw, 23px); line-height: 1.35; }
.room-no { position: absolute; top: clamp(20px, 3vw, 40px); left: clamp(24px, 3vw, 44px); font-size: 13px; color: var(--muted); }
.room-visual { position: relative; overflow: hidden; }
.room:hover .room-copy h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 10px; }

/* kartu katalog */
.room--tulisan { background: #efe7d6; }
.cards .card {
  position: absolute; width: 64%; aspect-ratio: 5 / 3; left: 18%; top: 50%;
  background: var(--sheet); box-shadow: var(--shadow-paper);
  padding: 16px 18px; display: flex; flex-direction: column; justify-content: space-between;
  background-image: linear-gradient(180deg, transparent 0 38px, rgb(196 70 60 / .5) 38px 39px, transparent 39px), repeating-linear-gradient(180deg, transparent 0 25px, var(--rule) 25px 26px);
  background-position: 0 0, 0 40px;
  transition: transform .8s var(--ease);
}
.cards .card b { font-family: var(--mono); font-weight: 400; font-size: 11px; color: var(--stamp); letter-spacing: .08em; }
.cards .card strong { font-family: var(--display); font-weight: 400; font-size: clamp(18px, 1.7vw, 25px); line-height: 1.12; color: var(--graphite); }
.cards .card small { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.cards .card::after { content: ""; position: absolute; bottom: 8px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #efe7d6; box-shadow: inset 0 1px 2px rgb(0 0 0 / .2); }
.cards .card:nth-child(1) { transform: translateY(-50%) translate(-6%, -34%) rotate(-7deg); }
.cards .card:nth-child(2) { transform: translateY(-50%) translate(5%, -12%) rotate(4deg); }
.cards .card:nth-child(3) { transform: translateY(-50%) translate(-3%, 12%) rotate(-2deg); }
.cards .card:nth-child(4) { transform: translateY(-50%) translate(4%, 34%) rotate(3deg); }
.room--tulisan:hover .card:nth-child(1) { transform: translateY(-50%) translate(-14%, -52%) rotate(-10deg); }
.room--tulisan:hover .card:nth-child(4) { transform: translateY(-50%) translate(12%, 54%) rotate(6deg); }

/* tumpukan sketsa */
.room--gambar { background: #ddd2bc; }
.pile img {
  position: absolute; width: 34%; box-shadow: var(--shadow-paper); background: var(--sheet);
  transform: translate(-50%, -50%) rotate(var(--r)); left: var(--x); top: var(--y);
  transition: transform .9s var(--ease);
}
.room--gambar:hover .pile img { transform: translate(-50%, -50%) rotate(calc(var(--r) * 1.8)) scale(1.04); }

/* rekam: ruang proyeksi (strip film) + kamar gelap (cetakan di tali) */
.room--rekam { background: var(--night); color: var(--sheet); }
.room--rekam .room-copy h3 { color: var(--sheet); }
.room--rekam .room-copy p { color: rgb(251 248 241 / .82); }
.room--rekam .room-no { color: #f2c47c; }
.room--rekam:hover .room-copy h3 { text-decoration: none; }
.doors { display: grid; gap: 0; margin-top: 6px; border-top: 1px solid rgb(255 255 255 / .14); }
.door { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgb(255 255 255 / .14); text-decoration: none; }
.door .mono { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: rgb(251 248 241 / .55); }
.door--video .link-arrow { color: #f2c47c; }
.door--foto .link-arrow { color: #ff7b5c; }
.door:hover .link-arrow { text-decoration: underline; text-underline-offset: 5px; }
.rekam { display: grid; grid-template-rows: 1fr 1fr; }
.rekam .half { position: relative; overflow: hidden; display: flex; align-items: center; transition: opacity .5s var(--ease), filter .5s var(--ease); }
.room--rekam:has(.door--video:hover) .darkprints, .room--rekam:has(.door--foto:hover) .strip { opacity: .35; filter: saturate(.3); }
.darkprints { background: radial-gradient(90% 120% at 80% 0%, rgb(216 52 28 / .38), transparent 70%), #120908; justify-content: center; gap: 6%; padding: 22px 8% 0; align-items: flex-start !important; }
.darkprints svg { position: absolute; left: 0; top: 12px; width: 100%; height: 30px; overflow: visible; }
.darkprints path { fill: none; stroke: #7d6a61; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.darkprints img { position: relative; width: 24%; max-height: 82%; object-fit: cover; background: #efe7dc; padding: 5px 5px 16px; margin-top: calc(10px + var(--i) * 0px); box-shadow: 0 18px 30px -12px rgb(0 0 0 / .8); transform: rotate(calc((var(--i) - 1) * 3deg)); transform-origin: 50% 0; transition: transform .9s var(--ease); }
.darkprints img:nth-child(3) { margin-top: 26px; }
.room--rekam:hover .darkprints img { transform: rotate(calc((var(--i) - 1) * -4deg)); }
.strip { display: flex; align-items: center; }
.strip .film {
  display: flex; gap: 10px; padding: 26px 10px; background: #0b0b0a;
  transform: rotate(-6deg) translateX(-4%); width: 140%;
  background-image:
    repeating-linear-gradient(90deg, transparent 0 10px, rgb(241 236 225 / .55) 10px 20px, transparent 20px 30px),
    repeating-linear-gradient(90deg, transparent 0 10px, rgb(241 236 225 / .55) 10px 20px, transparent 20px 30px);
  background-size: 100% 8px, 100% 8px; background-repeat: repeat-x; background-position: 0 8px, 0 calc(100% - 8px);
}
.strip .film > * { flex: none; width: 24%; aspect-ratio: 3 / 4; object-fit: cover; filter: sepia(.25) contrast(1.05); }
.strip video { position: absolute; }

@media (max-width: 860px) {
  .rooms-pin { min-height: 0; overflow: visible; }
  .rooms-track { flex-direction: column; width: auto; }
  .room { width: 100%; height: auto; min-height: 0; grid-template-columns: 1fr; }
  .room-visual { height: 340px; order: -1; }
  .room-no { top: 16px; }
  .room-copy { padding-top: 48px; }
}

.more-rooms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); margin-top: clamp(40px, 6vw, 80px); }
.more-room { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-top: 1.5px solid var(--graphite); padding: 16px 0 8px; text-decoration: none; }
.more-room .hand { font-size: 42px; line-height: 1; color: var(--ink); }
.more-room .mono { font-size: 13px; color: var(--muted); text-align: right; }
.more-room:hover .hand { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1.5px; }
@media (max-width: 860px) { .more-rooms { grid-template-columns: 1fr; } }
.rekam .strip .film { padding: 18px 10px; transform: rotate(-4deg) translateX(-4%); }
.rekam .strip .film > * { width: 17%; aspect-ratio: 4 / 3; }
