/* theme.css — Lacilose Leather. The tenant's own identity, layered over the
 * shared styles.css. Loaded last, so it wins on equal specificity.
 *
 * Direction: a workshop ledger. This is a two-person leather shop with 28
 * catalogued items, real dimensions in cm and named materials, whose stated
 * problem is that newer crafters are easier to find. So the site is built to
 * look like something made by people who measure: a kraft-paper ground like a
 * tannery's wrapping, one industrial grotesque in a wide range of cuts, saddle
 * stitching as the dividing motif, and the product index carrying the weight.
 *
 * Deliberately NOT cream + high-contrast serif + terracotta, which is the
 * default look for a page like this and is what it used to be.
 */

/* ---------- 1. Type: one family, worked hard ---------- */

/* Archivo is variable on both width and weight. A single family set across a
   wide range reads as documentation rather than boutique editorial, and it
   keeps the page to one voice. */
h1, .error-page__code {
  font-variation-settings: "wdth" 112, "wght" 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 0.95;
}
h2 {
  font-variation-settings: "wdth" 105, "wght" 700;
  letter-spacing: -0.01em;
}
h3, h4, .brand__name {
  font-variation-settings: "wdth" 100, "wght" 650;
  letter-spacing: -0.005em;
}

/* Measurements, counts and prices are data: line them up. */
.card__price, .catalog__count, .spec__value, .stat__value {
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  font-variation-settings: "wdth" 88, "wght" 600;
  letter-spacing: 0.14em;
}

/* ---------- 2. Saddle stitch, the dividing motif ---------- */

/* Taken from the craft itself: the dashes are the stitch, the gaps the awl
   holes. Used wherever the page needs a rule, instead of a hairline border. */
.stitch,
.catalog__group-head,
.site-footer__copy {
  border-bottom: 0;
  border-top: 0;
  position: relative;
}
.stitch::after,
.catalog__group-head::after,
.site-footer__copy::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background-image: repeating-linear-gradient(
    90deg,
    currentColor 0 9px,
    transparent 9px 17px
  );
  opacity: 0.45;
}
.stitch::after, .catalog__group-head::after { bottom: 0; }
.site-footer__copy::before { top: 0; }
.site-footer__copy { border-top: 0; padding-top: var(--space-md); }

/* ---------- 3. Sections: paper panels on kraft ---------- */

/* .section--alt was a 1.3% lightness tint, i.e. invisible. Here it becomes a
   pasted-in sheet of lighter paper, edge-stitched. */
.section--alt {
  background: var(--color-surface-container-lowest);
  border-block: 2px solid var(--color-on-surface);
}

.section--dark { background: var(--color-inverse-surface); }

/* ---------- 4. Hero: a specimen pasted onto the page ---------- */

.hero__media {
  position: relative;
  padding: var(--space-sm);
  background: var(--color-surface-container-lowest);
  border: 2px solid var(--color-on-surface);
}
.hero__media img {
  border-radius: 0;
  box-shadow: none;
  aspect-ratio: 4 / 3;
  animation-name: ken-burns;
  animation-duration: 25s;
  animation-timing-function: cubic-bezier(0.32, 0.72, 0, 1);
  animation-iteration-count: infinite;
  transform-origin: center center;
}
/* Registration marks, as on a printed sheet. */
.hero__media::before,
.hero__media::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--color-tertiary);
}
.hero__media::before { top: -2px; left: -2px; border-right: 0; border-bottom: 0; }
.hero__media::after { bottom: -2px; right: -2px; border-left: 0; border-top: 0; }

/* Ken Burns slow pan/zoom */
@keyframes ken-burns {
  0%   { transform: scale(1) translate(0, 0); }
  50%  { transform: scale(1.08) translate(-2%, -1%); }
  100% { transform: scale(1) translate(0, 0); }
}

.hero__meta {
  padding-top: var(--space-sm);
  border-top: 2px solid var(--color-on-surface);
}
.hero__meta li { font-variation-settings: "wdth" 92, "wght" 600; }

/* ---------- 5. Cards: specimen tickets, not SaaS tiles ---------- */

.card {
  border-radius: 0;
  border: 2px solid var(--color-on-surface);
  box-shadow:
    inset 0 0 0 1px var(--color-surface-container),
    0 0 0 2px var(--color-on-surface);
  background: var(--color-surface-container-lowest);
  transition: transform var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}
.card:hover {
  transform: none;
  box-shadow:
    inset 0 0 0 1px var(--color-surface-container),
    6px 6px 0 var(--color-on-surface);
  border-color: var(--color-on-surface);
}
.card__media {
  border-bottom: 2px solid var(--color-on-surface);
  overflow: hidden;
}
.card__media img {
  transition: transform var(--duration-base) var(--ease-out);
}
.card:hover .card__media img {
  transform: scale(1.04);
}
.card__body { padding: var(--space-md) var(--space-sm) var(--space-sm); }

/* The price is the fact the page exists to give. */
.card__price {
  font-variation-settings: "wdth" 100, "wght" 750;
  font-size: var(--text-title-lg);
  color: var(--color-on-surface);
}
.card__price-note {
  font-variation-settings: "wdth" 88, "wght" 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: var(--text-micro);
}

/* Dimensions and materials read as a spec line, under a rule. */
.card__desc--spec {
  padding-top: var(--space-xs);
  border-top: 1px dashed var(--color-outline-variant);
}

.feature {
  border-radius: 0;
  border: 2px solid var(--color-on-surface);
  background: var(--color-surface-container-lowest);
}
.feature__icon {
  border-radius: 0;
  background: var(--color-tertiary-fixed);
  color: var(--color-on-primary-fixed);
}

.channel {
  border-radius: 0;
  border: 2px solid var(--color-outline);
}
.channel:hover { border-color: var(--color-tertiary-fixed); }

/* ---------- 6. Controls: squared off ---------- */

/* A pill is the default shape for a button everywhere. A workshop ledger's
   controls are cut square. (Cemilix keeps its pills, which is half of why the
   two sites no longer read as one template.) */
.btn { border-radius: 0; border-width: 2px; letter-spacing: 0.02em; }
.btn--primary { border-color: var(--color-primary); }
.btn--outline { border-color: var(--color-on-surface); color: var(--color-on-surface); }
.btn:hover { transform: none; box-shadow: 3px 3px 0 var(--color-on-surface); }
.section--dark .btn:hover { box-shadow: 3px 3px 0 var(--color-tertiary-fixed); }

.icon { stroke-width: 1.75; }

.menu-toggle { border-radius: 0; border-width: 2px; border-color: var(--color-on-surface); }
.site-header { border-bottom-width: 2px; border-bottom-color: var(--color-on-surface); }
.primary-nav a[aria-current="page"]::after { border-radius: 0; height: 3px; }

.note {
  border-radius: 0;
  border-left-width: 4px;
  border-left-color: var(--color-tertiary);
  background: var(--color-surface-container);
}

/* ---------- 7. Zipper / stitch divider between sections ---------- */

.section-divider {
  height: 0;
  border: none;
  position: relative;
  margin: 0;
}
.section-divider::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 600px;
  height: 4px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--color-tertiary) 0 8px,
    transparent 8px 16px
  );
  opacity: 0.35;
  border-radius: 2px;
}
.section-divider--zipper::after {
  background-image: repeating-linear-gradient(
    90deg,
    var(--color-on-surface) 0 6px,
    transparent 6px 12px,
    var(--color-on-surface) 12px 18px,
    transparent 18px 24px
  );
  height: 6px;
}

/* ---------- 8. Floating shapes / ambient motion ---------- */

.floating-shapes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.floating-shapes__item {
  position: absolute;
  border: 2px solid var(--color-tertiary);
  opacity: 0.08;
  border-radius: 50%;
  animation: float 20s infinite ease-in-out;
}
.floating-shapes__item--square {
  border-radius: 4px;
  animation-name: float-rotate;
}
.floating-shapes__item:nth-child(1) { top: 10%; left: 5%; width: 80px; height: 80px; animation-delay: 0s; animation-duration: 22s; }
.floating-shapes__item:nth-child(2) { top: 20%; right: 8%; width: 60px; height: 60px; animation-delay: -3s; animation-duration: 18s; }
.floating-shapes__item:nth-child(3) { top: 50%; left: 3%; width: 40px; height: 40px; animation-delay: -7s; animation-duration: 25s; }
.floating-shapes__item:nth-child(4) { bottom: 15%; right: 5%; width: 100px; height: 100px; animation-delay: -12s; animation-duration: 30s; }
.floating-shapes__item:nth-child(5) { bottom: 30%; left: 10%; width: 30px; height: 30px; animation-delay: -5s; animation-duration: 15s; }
.floating-shapes__item:nth-child(6) { top: 70%; right: 15%; width: 70px; height: 70px; animation-delay: -15s; animation-duration: 28s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -20px) scale(1.05); }
  50% { transform: translate(-15px, 30px) scale(0.95); }
  75% { transform: translate(20px, 25px) scale(1.02); }
}
@keyframes float-rotate {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  25% { transform: translate(-25px, 15px) rotate(90deg) scale(1.08); }
  50% { transform: translate(20px, -30px) rotate(180deg) scale(0.92); }
  75% { transform: translate(-15px, -20px) rotate(270deg) scale(1.05); }
}

/* Parallax hero enhancement */
.hero__media::after {
  content: "";
  position: absolute;
  inset: -20px;
  background: radial-gradient(ellipse at center, transparent 40%, var(--color-surface-container) 100%);
  pointer-events: none;
  z-index: 1;
}

/* ---------- 9. Channel cards with colored icons ---------- */

.channel {
  position: relative;
  overflow: hidden;
}
.channel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--channel-color) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-out);
}
.channel:hover::before {
  opacity: 0.08;
}
.channel__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-xs);
  border-radius: var(--radius);
  background: var(--channel-color);
  color: var(--color-on-primary);
  flex-shrink: 0;
}
.channel__icon .icon {
  width: 22px;
  height: 22px;
}

/* Channel-specific colors using project palette */
.channel[data-channel="tokopedia"] { --channel-color: var(--color-tokopedia); }
.channel[data-channel="shopee"] { --channel-color: var(--color-shopee); }
.channel[data-channel="lazada"] { --channel-color: var(--color-lazada); }
.channel[data-channel="instagram"] { --channel-color: #C13584; }

.channel__logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  object-fit: cover;
  margin-bottom: var(--space-2xs);
  flex-shrink: 0;
}

/* Compact buttons for about page CTA */
.section--dark .btn-row .btn {
  min-height: 36px;
  padding-block: var(--space-2xs);
  padding-inline: var(--space-sm);
}
.section--dark .btn-row .btn .icon {
  width: 1em;
  height: 1em;
}

/* Channel logo in product card buttons */
.card__actions .channel__logo {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-sm);
  margin-right: var(--space-2xs);
  vertical-align: middle;
}

/* ---------- 10. Spec icons for tentang-kami ---------- */

.spec-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: var(--space-2xs);
  border-radius: var(--radius);
  background: var(--color-tertiary-fixed);
  color: var(--color-on-primary-fixed);
  flex-shrink: 0;
}
.spec-icon .icon {
  width: 20px;
  height: 20px;
}

.spec > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-2xs);
}
.spec dt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2xs);
}

/* ---------- 11. Steps with icons ---------- */

.steps > li {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-xs);
  padding-top: var(--space-lg);
}
.step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary-fixed);
  color: var(--color-on-primary-fixed);
  margin-bottom: var(--space-xs);
}
.step-icon .icon {
  width: 28px;
  height: 28px;
}

/* ---------- 12. Pull quote enhancement ---------- */

.pullquote {
  position: relative;
  padding-left: var(--space-lg);
}
.pullquote::before {
  content: "❝";
  position: absolute;
  left: 0;
  top: -0.5em;
  font-size: 4em;
  line-height: 1;
  color: var(--color-tertiary);
  opacity: 0.4;
  font-family: Georgia, serif;
}

/* ---------- 13. Card hover magnetic effect ---------- */

.card {
  transition: transform var(--duration-base) var(--ease-spring),
              box-shadow var(--duration-base) var(--ease-out);
}
.card:hover {
  transform: translateY(-4px) scale(1.005);
}

/* ---------- 14. Prose & story image ---------- */

.prose {
  max-width: 72ch;
}
.prose > * + * {
  margin-top: var(--space-md);
}
.story-image {
  margin: var(--space-lg) 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.story-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--duration-lg) var(--ease-out);
}
.story-image:hover img {
  transform: scale(1.02);
}

/* ---------- 15. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .card:hover, .btn:hover { box-shadow: none; }
  .card__media img { transition: none; }
  .card:hover .card__media img { transform: none; }
  .hero__media img { animation: none; }
  .floating-shapes__item { animation: none; opacity: 0.04; }
  .card { transition: none; }
  .story-image img { transition: none; }
}

/* ---------- 8. Pending-photo badge ---------- */
.card__media-note {
  border: 2px solid var(--color-on-surface);
  color: var(--color-on-surface);
  font-variation-settings: "wdth" 88, "wght" 600;
}

/* ---------- 9. Craft page ---------- */
.spec > div {
  padding-top: var(--space-sm);
  border-top: 2px solid var(--color-on-surface);
}
.spec dd { font-variation-settings: "wdth" 100, "wght" 680; }
.spec dt { font-variation-settings: "wdth" 88, "wght" 600; }

.pullquote p {
  font-variation-settings: "wdth" 108, "wght" 750;
  text-transform: uppercase;
  letter-spacing: -0.015em;
  line-height: 1.02;
}
.pullquote { border-left: 4px solid var(--color-tertiary); padding-left: var(--space-md); }

.steps > li::before { font-variation-settings: "wdth" 112, "wght" 800; }
.steps > li { padding-top: var(--space-sm); border-top: 2px solid var(--color-on-surface); }

.figure-band img { border: 3px solid var(--color-on-surface); }

/* ---------- Product Gallery & Lightbox ---------- */

.card__media-gallery {
  position: relative;
  overflow: hidden;
}

.card__media {
  position: relative;
  background: var(--color-surface-container);
}
.card__media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform var(--duration-base) var(--ease-out);
  cursor: zoom-in;
}
.card:hover .card__media img {
  transform: scale(1.03);
}

/* Gallery - hidden on card, shown in lightbox */
.card__gallery {
  display: flex;
  gap: var(--space-xs);
  overflow-x: auto;
  padding: var(--space-xs) 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--color-outline) transparent;
}
.card__gallery::-webkit-scrollbar {
  height: 6px;
}
.card__gallery::-webkit-scrollbar-track {
  background: transparent;
}
.card__gallery::-webkit-scrollbar-thumb {
  background: var(--color-outline);
  border-radius: 3px;
}
.card__gallery-item {
  flex: 0 0 80px;
  scroll-snap-align: start;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.card__gallery-item img,
.card__gallery-item picture img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-out);
}
.card__gallery-item img:hover,
.card__gallery-item picture img:hover {
  transform: scale(1.1);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.95);
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-out);
}
.lightbox.open {
  display: flex;
  opacity: 1;
}
.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  background: none;
  border: none;
  color: var(--color-on-surface);
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  padding: var(--space-md);
  transition: color var(--duration-fast);
  z-index: 10;
}
.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
  color: var(--color-primary);
}
.lightbox__close {
  top: var(--space-md);
  right: var(--space-md);
}
.lightbox__prev {
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
}
.lightbox__next {
  right: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
}
.lightbox__content {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
}

/* Focus styles for accessibility */
.lightbox__close:focus-visible,
.lightbox__prev:focus-visible,
.lightbox__next:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}
