:root {
  --ink: #2b3a55;
  --paper: #fbf7ee;
  --teal: #2f5d62;
  --orange: #e4572e;
}
body {
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(#d7cdbb 0.65px, transparent 0.8px);
  background-size: 6px 6px;
}
nav { gap: clamp(2px, 1vw, 14px); }
nav a {
  padding: 6px 10px;
  border-radius: 8px;
}
nav a:hover, nav a:focus-visible {
  background-color: var(--ink);
  color: white;
  text-decoration: none;
}
.mark, .cta, .book { background: var(--ink); }
.mark { transform: rotate(-7deg); border-radius: 4px; }
.label, h1 em { color: var(--teal); }
h1 em { font-weight: bold; }
.cta { border-radius: 3px; box-shadow: 4px 4px var(--orange); }
.featured {
  position: relative;
  width: 48%;
  margin: 0 4px;
  padding: 10px;
  background: #fffdf7;
  border: 1px solid #c5bda9;
  box-shadow: 5px 7px 0 #c9bca5;
  transform: rotate(1deg);
}
.featured::before {
  content: "";
  position: absolute;
  width: 78px;
  height: 21px;
  top: -13px;
  left: 38%;
  background: #e7ca89de;
  transform: rotate(-5deg);
}
video { display: block; width: 100%; background: #292e36; }
.featured video { aspect-ratio: 16 / 9; }
figcaption { padding: 12px 8px 4px; }
figcaption small { color: var(--teal); }

.featured, .shorts article, .products .card { border-radius: 20px; }
.featured video, .shorts video { border-radius: 13px; }
.rail-controls { display: flex; gap: 8px; }
.rail-controls button {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--paper); color: var(--ink); border: 1px solid currentColor;
  font: 2rem/1 Arial, sans-serif; cursor: pointer;
}
.rail-controls button:disabled { opacity: .35; cursor: default; }
.rail-controls button:hover:enabled { background: var(--ink); color: white; }
.shorts {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(220px, 29%, 310px);
  gap: clamp(12px, 2vw, 24px);
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  padding: 2px 5px 12px 0;
  margin-bottom: 52px;
}
.shorts::-webkit-scrollbar { display: none; }
.shorts article { scroll-snap-align: start; min-width: 0; }

.shorts article { background: #fffdf7; border: 1px solid #c5bda9; padding: 8px; box-shadow: 3px 5px 0 #d6cbb7; }
.shorts video { aspect-ratio: 9 / 16; }
.shorts h3 { font-size: 1.12rem; padding: 12px 4px 7px; line-height: 1.25; }
.card { box-shadow: 3px 5px 0 #d6cbb7; }
.lav { background: #c5d7d3; }
.pad { border-color: var(--teal); }
aside { background: #ede3d1; border-left: 5px solid var(--orange); border-radius: 2px; }
@media (max-width: 720px) {
  header { flex-wrap: wrap; gap: 8px; }
  .featured { width: min(98%,530px); align-self: center; margin-top: 12px; }
  .shorts { grid-auto-columns: min(76%, 310px); }
}

/* Beranda dan contoh kasus */
.hero { gap: clamp(30px,5vw,68px); padding-block: clamp(42px,6vw,86px); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 24px; }
.hero-actions a { border-radius: 12px; margin: 0; }
.secondary { padding: 11px 17px; border: 1px solid var(--ink); text-decoration: none; font-weight: 700; }
.secondary:hover { background: #ede3d1; }
.workbench {
  width: 47%; flex-shrink: 0; min-height: 330px; position: relative;
  display: flex; justify-content: flex-end; align-items: center; padding: 28px 4% 28px 0;
  background-color: #dce8e1;
  background-image: linear-gradient(#c7d7ce 1px,transparent 1px), linear-gradient(90deg,#c7d7ce 1px,transparent 1px);
  background-size: 22px 22px; border-radius: 32px; isolation: isolate; overflow: hidden;
}
.character { position: absolute; left: -6%; bottom: -4%; width: 51%; transform: rotate(-6deg); z-index: -1; }
.desk-note {
  width: 68%; padding: clamp(14px,2vw,25px); border: 1px solid #c5bda9;
  border-radius: 16px; background: #fffdf7; box-shadow: 5px 6px #aebfb3; transform: rotate(2deg);
}
.desk-note small { display:block; margin-top:16px; color: var(--teal); }
.desk-note h2 { margin: 8px 0 14px; font-size: clamp(1.5rem,2.6vw,2.4rem); }
.desk-note p { font-size: 1rem; }
.watch-first {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 8%;
  padding: clamp(24px,4vw,54px); border-radius: 28px; background: var(--ink); color: var(--paper); margin-bottom: 38px;
}
.watch-first h2 { margin: 12px 0 16px; }
.watch-first .featured { width: 100%; color: var(--ink); box-shadow: 5px 6px #17263d; }
@media (max-width: 800px) {
  .hero { flex-direction: column; align-items: flex-start; }
  .workbench { width: 100%; max-width: 560px; align-self: center; }
  .watch-first { grid-template-columns: 1fr; gap: 22px; }
  .watch-first .featured { margin: 0; }
}
@media (max-width: 420px) {
  .workbench { min-height: 265px; padding-right: 12px; }
  .desk-note { width: 72%; }
}

.products { grid-template-columns: repeat(auto-fit, minmax(min(100%, 265px), 1fr)); }
.products .cover { background: var(--shelf-paper, #eddcc2); }
.products .book { background: var(--shelf-ink, #2b3a55); }
.products .card:nth-child(2) { --shelf-paper: #d7e4dd; --shelf-ink: #305c60; }
.products .card:nth-child(3) { --shelf-paper: #f3d9c6; --shelf-ink: #874635; }
.products .card:nth-child(4) { --shelf-paper: #e4deea; --shelf-ink: #564761; }
.products .card:nth-child(5) { --shelf-paper: #e8e6ce; --shelf-ink: #475340; }
.products .card:nth-child(6) { --shelf-paper: #c5d7d3; }
.product-link { display: inline-block; margin-top: 10px; }
.product-link[aria-disabled] { color: #595e62; font-size: .94rem; }
.product-link[href] { background: var(--ink); color: white; padding: 8px 16px; border-radius: 10px; text-decoration: none; }

.detail-page { padding-block: 32px 72px; }
.detail-page > a { display: inline-block; border-radius: 12px; }
.product-detail { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(24px,5vw,72px); margin-top: 32px; }
.product-detail .cover { height: clamp(250px,36vw,410px); border-radius: 20px; background: var(--shelf-paper); }
.product-detail .book { background: var(--shelf-ink); transform: rotate(-7deg) scale(1.25); }
.product-detail h1 { font-size: clamp(2.5rem,5vw,4.5rem); }
.product-detail h2 { font-size: 1.25rem; letter-spacing: normal; margin: 18px 0 8px; }
.checkout { display: inline-block; background: var(--ink); color: white; font: inherit; font-weight: bold; padding: 12px 20px; border: 0; border-radius: 12px; text-decoration: none; margin: 24px 0 6px; }
.checkout:disabled { background: #626974; }
.checkout-bar:not([hidden]) {
  position: sticky;
  z-index: 10;
  bottom: max(12px, env(safe-area-inset-bottom));
  margin: 8px auto max(12px, env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: min(24rem, calc(100% - 24px));
  padding: 8px 8px 8px 18px;
  background: var(--paper);
  border: 1px solid #cfc6b5;
  border-radius: 18px;
  box-shadow: 0 4px 20px #18263c33;
}
.checkout-bar strong { font-size: 1.125rem; }
.checkout-bar .checkout { margin: 0; width: auto; padding: 10px 16px; text-align: center; }
.availability { display: block; }
@media (max-width: 720px) {
  .product-detail { grid-template-columns: 1fr; }
}

.sale-art { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.product-detail > .sale-art { border-radius: 20px; }
.sale-price { margin-block: 12px; }
.sale-price strong { font-size: 1.25rem; }
.sample-pages { margin: 36px 0; max-width: 700px; }
.sample-pages img { margin-top: 14px; border-radius: 16px; }

.sale-price { display: flex; align-items: flex-end; gap: 12px; line-height: 1.2; }
.original-price { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; }
.original-price del { color: #54555b; text-decoration-color: #be3533; text-decoration-thickness: 2px; }
.burst {
  display: grid; place-items: center; width: 58px; height: 28px;
  color: #fff; background: #a83024; font: bold .78rem/1 Arial,sans-serif;
  clip-path: polygon(0 45%,9% 33%,4% 16%,19% 19%,23% 2%,35% 12%,44% 0,53% 11%,65% 1%,72% 14%,86% 5%,87% 22%,99% 20%,94% 39%,100% 50%,93% 61%,98% 80%,84% 77%,81% 95%,68% 85%,59% 100%,50% 88%,38% 100%,30% 85%,16% 95%,16% 77%,3% 80%,8% 61%);
}
.book-subtitle { color: var(--teal); font-weight: 650; margin-bottom: 1rem; }
.book-reading { max-width: 760px; margin: 3rem auto; }
.book-reading h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); margin: 2rem 0 1rem; }
.book-reading .sale-art { border-radius: 18px; }
.book-reading section { border-top: 1px solid #d3cfc4; margin-top: 2rem; }
.book-reading p, .book-reading li { margin-block: .65rem; overflow-wrap: anywhere; }
.book-reading ol, .book-reading ul { padding-left: 1.6rem; }

.products .card { display: flex; flex-direction: column; }
.products .info { display: flex; flex-direction: column; align-items: flex-start; flex: 1; }
.products .info h3 { margin-bottom: auto; }
.products .cover { height: auto; aspect-ratio: 1; }

.site-footer {
  width: 100%;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 0;
  padding: 0;
  background: #101923;
  color: #c5cdd2;
}
.site-footer::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto 0 0;
  height: 44px;
  opacity: .18;
  background: repeating-linear-gradient(115deg, transparent 0 56px, #40566a 57px 80px, transparent 81px 120px);
}
.footer-inner { width: min(1140px, 90%); margin: auto; }
.footer-directory {
  display: grid;
  grid-template-columns: 1.65fr .85fr .85fr 1fr;
  gap: clamp(24px, 4vw, 60px);
  padding: clamp(42px, 6vw, 78px) 0;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff9ed;
  font-size: 1.35rem;
  font-weight: 800;
  text-decoration: none;
}
.footer-profile p { max-width: 34ch; line-height: 1.6; }
.footer-motto { margin: 18px 0 8px; color: #fff9ed; font-weight: 700; }
.footer-group { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.footer-group h2 { margin: 0 0 9px; color: #fff9ed; font: 700 .875rem/1.5 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; text-transform: uppercase; letter-spacing: .07em; }
.footer-group a { padding: 3px 0; text-decoration: none; }
.site-footer a:is(:hover, :focus-visible) { color: #ffd699; text-decoration: underline; }
.footer-credits { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; padding: 21px 0; border-top: 1px solid #40505e; font-size: .9rem; }
@media (max-width: 820px) {
  .footer-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
}
@media (max-width: 520px) {
  .footer-profile, .footer-group:last-child { grid-column: 1 / -1; }
  .footer-credits { flex-direction: column; }
}

/* Touch layouts */
nav a, .footer-group a, .product-link[href] {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.book-reading { max-width: min(70ch, 100%); }
.book-reading p, .book-reading li { line-height: 1.7; }
@media (max-width: 600px) {
  header { padding-block: 12px; }
  header nav { flex-wrap: wrap; }
  .hero { padding-block: 32px; gap: 24px; }
  .intro h1 { font-size: clamp(2.6rem, 10vw, 3.5rem); }
  .intro { min-width: 0; }
  .section-title { flex-wrap: wrap; gap: 12px; align-items: center; }
  .hero-actions { gap: 8px; }
  .shorts h3 { font-size: 1rem; }
  .product-detail { grid-template-columns: minmax(0, 1fr); }
  .product-detail h1 { font-size: clamp(2rem, 8vw, 3rem); }
  .detail-page { padding-block: 20px 40px; }
  .footer-group { gap: 0; }
  .footer-group a { line-height: 1.4; }
}
@media (max-width: 460px) {
  header nav { width: 100%; justify-content: flex-start; }
  .hero-actions { display: grid; grid-template-columns: minmax(0,1fr); }
  .hero-actions a, .checkout { text-align: center; }
  .checkout { width: 100%; }
}
