/* Hallmark · Album keluarga · playful · custom · signature: potret stiker Bena di antara potongan kertas dan doodle */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V5 · weakest: S, gunakan kacamata kuning Bena dan cerita asli sebagai materi visual dan isi */
@font-face {
  font-family: Bricolage;
  src: url('assets/bricolage.woff2') format('woff2');
  font-weight: 200 900;
  font-display: swap;
}

@font-face {
  font-family: Nunito;
  src: url('assets/nunito.woff2') format('woff2');
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --ink: #2b211d;
  --muted: #5b4942;
  --paper: #fff5de;
  --white: #fffaf1;
  --yellow: #ffcf35;
  --tape: #ffdf86;
  --tomato: #f27958;
  --red-ink: #9d351f;
  --lilac: #e3d4ff;
  --periwinkle: #909eff;
  --leaf: #cce4a5;
  --orange: #ffb072;
  --archive-sheet: #fffdf8;
  --year-2020: #dfd1f3;
  --year-2019: #d8e8b4;
  --year-2018: #ffd492;
  --year-2017: #bfe3f3;
  --year-2016: #f7c7da;
  --year-2015: #f6b9a6;
  --year-2014: #b8e1d3;
  --year-2013: #f7e38e;
  --year-2012: #c9d2f6;
  --year-2011: #e9c5ed;
  --year-2010: #cadcb0;
  --year-2009: #f6cab7;
  --year-2008: #bcdce4;
  --year-2007: #efdbb9;
  --shadow: #38281e2b;
  --rule: #5a44303c;
  --heading: Bricolage, system-ui, sans-serif;
  --body: Nunito, system-ui, sans-serif;
  --reading: Georgia, 'Times New Roman', serif;
  --gut: clamp(18px, 5vw, 64px);
  --doodles: url('album-assets/doodles.webp');
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-padding-top: 14px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 650 1rem/1.55 var(--body); }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { min-width: 0; overflow-wrap: break-word; text-wrap: balance; font-family: var(--heading); font-weight: 850; letter-spacing: -.06em; line-height: 1; }
a { color: inherit; text-decoration-thickness: .075em; text-underline-offset: .22em; }
a:focus-visible { outline: 3px solid var(--red-ink); outline-offset: 5px; }
a:hover { text-decoration-thickness: .13em; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
time { color: var(--muted); font-size: .87rem; font-weight: 800; }
.wrap { width: min(1100px, 100% - 2 * var(--gut)); margin-inline: auto; }
.skip { position: absolute; z-index: 10; top: 8px; left: 10px; transform: translateY(-160%); padding: 8px 16px; background: var(--white); }
.skip:focus { transform: translateY(0); }

.mast { border-bottom: 1px solid var(--rule); }
.mast-inner { min-height: 75px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 0; padding-block: 8px; font: 900 clamp(1.8rem, 4vw, 2.5rem)/1 var(--heading); letter-spacing: -.092em; text-decoration: none; white-space: nowrap; }
.brand span { color: var(--red-ink); }
.brand img { width: clamp(31px, 5vw, 55px); height: auto; margin-left: 8px; transform: rotate(-10deg); }
.mast nav, .end nav { display: flex; align-items: center; justify-content: flex-end; gap: clamp(12px, 3vw, 28px); }
.mast nav a, .end nav a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 850; }
.mast nav a { text-decoration: none; white-space: nowrap; }
.mast nav a:hover { text-decoration: underline; }

.opener { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1fr); align-items: center; gap: 16px; min-height: clamp(485px, 54vw, 610px); padding-block: 36px 48px; }
.family-pattern { position: absolute; z-index: -1; inset: 0 calc(-1 * var(--gut)); display: grid; grid-template-columns: repeat(3, clamp(360px, 40vw, 520px)); grid-auto-rows: clamp(235px, 25vw, 324px); justify-content: center; overflow: clip; opacity: .42; pointer-events: none; }
.pattern-tile { position: relative; isolation: isolate; background: url('album-assets/pattern/doodle-hobi.webp') center / 66% auto repeat; }
.pattern-tile:nth-child(2n) { background-position: 29% 62%; }
.sticker { position: absolute; width: var(--width, 17%); aspect-ratio: var(--ratio, .9); left: var(--x); top: var(--y); border-radius: 38% 41% 30% 36% / 33% 31% 41% 39%; background: var(--matte); padding: 4px; box-shadow: 2px 3px 0 var(--shadow); transform: rotate(var(--turn)); }
.sticker::before { content: ''; display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--photo) var(--focal) / var(--zoom) auto; }
.sticker-family { --photo: url('album-assets/pattern/keluarga.webp'); --focal: 70% 56%; --zoom: 130%; --x: 3%; --y: 7%; --width: 23%; --ratio: 1.17; --matte: var(--tomato); --turn: -8deg; }
.sticker-zayka-besar { --photo: url('album-assets/pattern/zayka-besar.webp'); --focal: 53% 48%; --zoom: 155%; --x: 42%; --y: 6%; --matte: var(--yellow); --turn: 11deg; }
.sticker-zayka-kecil { --photo: url('album-assets/pattern/zayka-kecil.webp'); --focal: 53% 30%; --zoom: 185%; --x: 78%; --y: 10%; --matte: var(--leaf); --turn: -12deg; }
.sticker-cami-hijab { --photo: url('album-assets/pattern/cami-kerudung.webp'); --focal: 50% 41%; --zoom: 285%; --x: 10%; --y: 57%; --matte: var(--lilac); --turn: 12deg; }
.sticker-cami-kecil { --photo: url('album-assets/pattern/cami-kecil.webp'); --focal: 52% 38%; --zoom: 142%; --x: 51%; --y: 56%; --matte: var(--tomato); --turn: -10deg; }
.sticker-couple { --photo: url('album-assets/pattern/ibu-ubi-dan-bena.webp'); --focal: 71% 50%; --zoom: 145%; --x: 76%; --y: 54%; --width: 22%; --ratio: 1.16; --matte: var(--periwinkle); --turn: 9deg; }
.welcome { z-index: 2; padding-block: 24px; }
.welcome h1 { position: relative; isolation: isolate; font-size: clamp(3.6rem, 7.6vw, 7.15rem); }
.welcome h1::after { content: ''; position: absolute; z-index: -1; left: -.02em; width: min(4.35em, 93%); bottom: .03em; height: .15em; background: var(--yellow); clip-path: polygon(0 25%, 16% 24%, 37% 6%, 62% 16%, 100% 0, 97% 75%, 55% 84%, 35% 78%, 0 100%); transform: rotate(-3deg); }
.welcome h1, .welcome p { text-shadow: 2px 2px 0 var(--paper), -2px -2px 0 var(--paper); }
.welcome p { max-width: 30ch; margin-block: 20px 24px; padding-right: 12px; font-size: clamp(1.06rem, 2vw, 1.25rem); }
.button { display: inline-flex; align-items: center; min-height: 48px; padding: 12px 20px; border: 2px solid var(--ink); border-radius: 6px 9px 6px 5px; background: var(--tomato); box-shadow: 3px 4px var(--ink); font-weight: 900; text-decoration: none; transform: rotate(-2deg); }
.button:hover { background: var(--yellow); transform: rotate(0); }
.button:active { box-shadow: 1px 2px var(--ink); }

.collage { width: 100%; position: relative; isolation: isolate; aspect-ratio: 1.12; align-self: center; }
.paper, .tape { position: absolute; display: block; pointer-events: none; }
.paper-back { z-index: -3; inset: 13% 2% 6% 9%; background: var(--periwinkle); clip-path: polygon(7% 4%, 91% 0, 100% 20%, 96% 88%, 82% 98%, 0 95%, 2% 38%); transform: rotate(5deg); }
.paper-front { z-index: -2; inset: 5% 8% 4% 6%; background: var(--tomato); border-radius: 44% 54% 35% 40% / 43% 35% 57% 49%; transform: rotate(-9deg); }
.tape { background: var(--tape); clip-path: polygon(2% 0, 99% 4%, 94% 20%, 99% 33%, 95% 55%, 100% 71%, 95% 100%, 0 94%, 5% 79%, 0 56%, 4% 37%, 0 20%); }
.tape-portrait { z-index: 1; right: 5%; top: 7%; width: 28%; height: 8.5%; transform: rotate(21deg); opacity: .92; }
.portrait { position: absolute; width: 105%; height: 110%; max-width: none; bottom: 0; left: -1%; object-fit: contain; object-position: center bottom; filter: drop-shadow(5px 7px 0 var(--shadow)); }
.collage.is-playing .portrait:not([hidden]) { animation: cover-wiggle 2s ease-in-out both; transform-origin: 50% 84%; }
@keyframes cover-wiggle {
  0%, 100% { transform: rotate(0); }
  24% { transform: rotate(-2.8deg); }
  51% { transform: rotate(2.6deg); }
  77% { transform: rotate(-1.4deg); }
}
@media (prefers-reduced-motion: reduce) {
  .collage.is-playing .portrait:not([hidden]) { animation: none; }
}

.latest { padding-bottom: clamp(48px, 7vw, 88px); }
.latest > h2, .archive h2, .end h2 { font-size: clamp(2.15rem, 5vw, 4rem); }
.latest > h2, .archive > h2 { margin-bottom: 20px; }
.latest-layout { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: clamp(20px, 4vw, 44px); }
.featured { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: center; position: relative; isolation: isolate; gap: 8px; padding: clamp(24px, 3vw, 36px); }
.featured-without-art { grid-template-columns: minmax(0, 1fr); }
.featured::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--yellow); clip-path: polygon(0 1%, 11% 2%, 36% 0, 69% 1%, 99% 0, 100% 24%, 99.5% 55%, 100% 98%, 85% 100%, 73% 98%, 45% 99%, 18% 97%, 1% 100%); }
.featured h3 { font-size: clamp(2rem, 3.5vw, 3.6rem); margin-block: 8px; }
.featured h3 a { text-decoration: none; }
.featured h3 a:hover { text-decoration: underline; }
.read-link, .back { display: inline-flex; align-items: center; min-height: 44px; font-weight: 850; }
.featured-art { position: relative; display: grid; place-items: center; align-self: center; min-height: 120px; isolation: isolate; }
.featured-art::after { content: ''; position: absolute; z-index: -1; inset: 13% 0 8%; background: var(--white); border-radius: 51% 43% 53% 45% / 62% 43% 57% 38%; transform: rotate(-13deg); }
.featured-art img { width: min(110%, 388px); max-width: 110%; height: auto; transform: rotate(-7deg); }

.recent-list, .month-list { list-style: none; padding: 0; margin: 0; }
.recent-list > li { border-bottom: 1px solid var(--rule); }
.recent-list > li:first-child { border-top: 1px solid var(--rule); }
.journal-row { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 49px; padding: 8px 4px; text-decoration: none; }
.journal-row time { font-size: .79rem; }
.row-title { font-weight: 850; line-height: 1.25; overflow-wrap: anywhere; }
.row-mark { padding-inline: 4px; align-self: center; font-size: 1.45rem; line-height: 1; color: var(--red-ink); }
.journal-row:hover .row-title { text-decoration: underline; }

.archive { margin-bottom: clamp(56px, 9vw, 116px); }
.archive-years { display: grid; gap: 8px; }
.archive-year { --year-paper: var(--lilac); }
.archive-year[data-year='2020'] { --year-paper: var(--year-2020); }
.archive-year[data-year='2019'] { --year-paper: var(--year-2019); }
.archive-year[data-year='2018'] { --year-paper: var(--year-2018); }
.archive-year[data-year='2017'] { --year-paper: var(--year-2017); }
.archive-year[data-year='2016'] { --year-paper: var(--year-2016); }
.archive-year[data-year='2015'] { --year-paper: var(--year-2015); }
.archive-year[data-year='2014'] { --year-paper: var(--year-2014); }
.archive-year[data-year='2013'] { --year-paper: var(--year-2013); }
.archive-year[data-year='2012'] { --year-paper: var(--year-2012); }
.archive-year[data-year='2011'] { --year-paper: var(--year-2011); }
.archive-year[data-year='2010'] { --year-paper: var(--year-2010); }
.archive-year[data-year='2009'] { --year-paper: var(--year-2009); }
.archive-year[data-year='2008'] { --year-paper: var(--year-2008); }
.archive-year[data-year='2007'] { --year-paper: var(--year-2007); }
.archive-year > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto 1.25rem; align-items: center; gap: 12px; min-height: 52px; padding: 8px 16px; background: var(--year-paper); cursor: pointer; list-style: none; border-radius: 3px 6px 5px 2px; }
.archive-year > summary::-webkit-details-marker { display: none; }
.archive-year > summary::after { content: '+'; font: 850 1.35rem/1 var(--heading); text-align: end; }
.archive-year[open] > summary { border-radius: 3px 6px 0 0; }
.archive-year[open] > summary::after { content: '−'; }
.archive-year > summary strong { font: 850 1.3rem/1 var(--heading); }
.year-count { color: var(--muted); font-size: .89rem; font-variant-numeric: tabular-nums; }
.archive-months { padding: 16px 16px 20px; background: var(--archive-sheet); border: 1px solid var(--rule); border-top: 0; border-radius: 0 0 6px 6px; box-shadow: inset 4px 0 var(--year-paper); }
.month-title { width: fit-content; padding: 4px 8px; font-size: 1.08rem; margin-block: 16px 4px; border-radius: 3px; background: var(--year-paper); }
.month-title:first-child { margin-top: 0; }
.month-list li + li { border-top: 1px solid var(--rule); }

.story-cover { position: relative; isolation: isolate; padding-block: clamp(24px, 5vw, 68px) clamp(40px, 7vw, 88px); background: var(--cover); }
.story-cover::after { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--doodles) right 30% / min(40vw, 520px) auto no-repeat; mix-blend-mode: multiply; opacity: .38; }
.cover-yellow { --cover: var(--yellow); }
.reading { width: min(680px, 100% - 2 * var(--gut)); margin-inline: auto; }
.back { margin-bottom: 16px; }
.story-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; font-weight: 900; color: var(--muted); }
.story h1 { font-size: clamp(2.6rem, 6.5vw, 5.45rem); max-width: 15ch; margin-block: 8px 16px; }
.story-body { padding-block: 28px 64px; }
.article-content { font: 400 clamp(1.08rem, 2.4vw, 1.24rem)/1.75 var(--reading); overflow-wrap: anywhere; }
.article-content :is(p, blockquote, ul, ol, figure, pre) { margin-block: 1em; }
.article-content img { width: auto; max-height: 75svh; object-fit: contain; margin: 16px auto; }
.article-content table { display: block; max-width: 100%; overflow-x: auto; }
.article-content pre { white-space: pre-wrap; }
.next-note { display: block; margin-top: 24px; padding: 16px 20px; background: var(--lilac); text-decoration: none; }
.next-note strong { display: block; font: 850 1.35rem/1.16 var(--heading); margin-top: 4px; }
.next-note:hover strong { text-decoration: underline; }

.end { padding-block: 28px 36px; background: var(--orange); border-top: 1px solid var(--rule); }
.end-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px 36px; flex-wrap: wrap; }
.end h2 { font-size: clamp(1.6rem, 3.8vw, 2.5rem); margin-bottom: 8px; }
.end p { max-width: 48ch; }
.end nav { flex-wrap: wrap; justify-content: flex-start; gap: 4px 16px; }
.footer-social { display: inline-flex; gap: 8px; }
.end .social-link { width: 44px; justify-content: center; border: 1px solid var(--ink); border-radius: 50%; text-decoration: none; }
.end .social-link:hover { background: var(--white); }
.social-link svg { display: block; width: 19px; height: 19px; }

@media (max-width: 700px) {
  .mast-inner { min-height: 62px; }
  .mast nav { font-size: .89rem; gap: clamp(8px, 2.4vw, 20px); }
  .opener { min-height: 0; grid-template-columns: minmax(0, 1fr); gap: 0; padding-block: 4px 24px; }
  .family-pattern { grid-auto-rows: 235px; opacity: .36; }
  .welcome { padding: 20px 0 4px; }
  .welcome h1 { font-size: clamp(3rem, 11.3vw, 5.6rem); }
  .welcome p { margin-block: 16px 12px; }
  .collage { width: min(90%, 420px); aspect-ratio: 1.25; margin: 0px auto 0; }
  .paper-back { inset: 15% 0 6% 11%; }
  .paper-front { inset: 7% 6% 3% 11%; }
  .portrait { height: 104%; }
  .latest-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .featured { grid-template-columns: minmax(0, 1fr) minmax(0, .55fr); gap: 4px; padding: 24px 20px; }
  .featured-without-art { grid-template-columns: minmax(0, 1fr); }
  .featured h3 { font-size: clamp(2rem, 7.25vw, 3rem); }
  .featured-art { min-height: 110px; }
  .featured-art::after { inset: 27% 0 22%; }
  .featured-art img { width: 110%; }
  .story-cover::after { background-size: min(85%, 350px) auto; opacity: .28; }
}

@media (max-width: 370px) {
  .brand { font-size: 1.65rem; }
  .brand img { display: none; }
  .mast nav { font-size: .74rem; gap: 4px; }
  .mast-inner { gap: 4px; }
  .featured { padding-inline: 16px; }
}

.music-toggle {
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
}
.music-toggle[aria-pressed="true"] { background: var(--yellow); }
.music-toggle[aria-pressed="true"] .sound-off,
.music-toggle[aria-pressed="false"] .sound-wave { display: none; }
.end .music-credit { font-size: .82rem; }
@media (max-width: 440px) {
  .mast nav { gap: 6px; font-size: .78rem; }
  .mast-inner { gap: 5px; }
  .brand img { width: 24px; margin-left: 4px; }
}
@media (max-width: 370px) {
  .mast nav { font-size: .72rem; gap: 4px; }
}
