/* Phase 1 — Punchline system. Ink, paper, honey. Anton for the joke. */
@font-face {
  font-family: 'Anton Local';
  src: url('/fonts/anton-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Heebo Local';
  src: url('/fonts/heebo-hebrew.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}

:root {
  --ink: #1A1612;
  --paper: #F4EFE6;
  --sand: #EDE4D3;
  --honey: #E6A23C; /* fill. Ink text on this fill is 5.5:1 */
  --honey-ink: #7A4A16; /* text on cream/sand. 7.2:1 */
  --ink-soft: rgba(26, 22, 18, 0.68);
  --line: rgba(26, 22, 18, 0.14);
  --display: 'Anton Local', 'Anton', Impact, sans-serif;
  --body: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --nav-h: 65px;
  --trust-h: 38px; /* must equal the inline .trust-bar height and .navbar top (38px) */
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
}

.trust-bar {
  background: var(--sand);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  height: var(--trust-h);
}
.trust-item, .trust-text { color: var(--ink); }
.trust-icon { color: var(--honey-ink); }

.navbar {
  position: fixed;
  top: 38px;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(244, 239, 230, 0.94) !important;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  height: var(--nav-h);
}
.nav-container {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--nav-h);
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  position: relative;
}
.logo { margin-inline-end: auto; }
.logo-text {
  font-family: var(--display);
  letter-spacing: 0.08em;
  color: var(--ink);
  font-size: 28px;
}
.nav-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn, .hamburger, .cart-btn, .nav-tools .country-toggle, .nav-tools .lang-toggle, .nav-tools .account-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 0;
}
.cart-btn { position: relative; gap: 0; }
.cart-btn #cart-count {
  position: absolute;
  top: 4px;
  inset-inline-end: 2px;
  background: var(--honey);
  color: var(--ink);
  border-radius: 999px;
  min-width: 16px;
  height: 16px;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}
.hamburger { flex-direction: column; gap: 5px; border-color: var(--line); }
.hamburger span { display: block; width: 16px; height: 1.5px; background: var(--ink); }

.nav-panel {
  display: none;
  position: absolute;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px 20px;
  z-index: 40;
}
.nav-panel.open { display: block; }
.nav-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.nav-links a { color: var(--ink); text-decoration: none; padding: 12px 4px; font-size: 18px; }
.nav-tools { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.nav-tools .country-toggle, .nav-tools .lang-toggle, .nav-tools .account-btn {
  width: auto;
  min-height: 44px;
  height: auto;
  justify-content: flex-start;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
}
.country-toggle-label { font-size: 13px; }

/* style.css hides .nav-links under 768px and only shows .nav-links.open.
   The panel toggles .nav-panel.open, so the links stayed display:none. */
@media (max-width: 899px) {
  .nav-panel.open .nav-links {
    display: flex;
    position: static;
    top: auto;
    left: auto;
    right: auto;
    background: transparent;
    padding: 0;
    border: 0;
    z-index: auto;
  }
}

@media (min-width: 900px) {
  .hamburger { display: none; }
  .nav-panel, .nav-panel.open {
    display: flex;
    position: static;
    background: transparent;
    border: 0;
    padding: 0;
    align-items: center;
    gap: 18px;
    flex: 1;
  }
  .nav-links { flex-direction: row; gap: 16px; }
  .nav-links a { font-size: 14px; padding: 0; letter-spacing: 0.04em; }
  .nav-tools {
    flex-direction: row;
    margin: 0 0 0 auto;
    padding: 0;
    border: 0;
    gap: 4px;
  }
  .nav-tools .country-toggle .country-toggle-label,
  .nav-tools .account-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .nav-tools .country-toggle, .nav-tools .lang-toggle, .nav-tools .account-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
    border-color: var(--line);
  }
}

.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(244, 239, 230, 0.97);
  z-index: 80;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  gap: 12px;
}
.search-overlay[hidden] { display: none; }
.search-overlay input {
  width: 100%;
  max-width: 720px;
  margin: 48px auto 0;
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--honey);
  color: var(--ink);
  font-size: 28px;
  font-family: var(--display);
  padding: 8px 0;
}
.search-results { max-width: 720px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; }
.search-results button {
  text-align: start;
  background: transparent;
  color: var(--ink);
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  font-size: 16px;
  cursor: pointer;
}

/* Pinned hero: the back print is the content. The front fades in on scroll.
   overflow-x:hidden on html/body (style.css) turns body into a scroll container
   and position:sticky never sticks. clip still blocks the sideways pan. */
html, body { overflow-x: clip !important; }
/* Skip layout for everything below the pinned hero until it nears the viewport. */
.mood-band,
#real-people,
#about,
#contact,
#slogan-box,
#privacy,
#faq,
.quality-promise,
.brand-strip {
  content-visibility: auto;
  contain-intrinsic-size: auto 70vh;
}
.mood-band, .mood-strip { contain-intrinsic-size: auto 160px; }
/* The footer holds Cookie settings. Skipping it put that control outside the hit target. */
/* Honey strip (#C17E3A) with white type is ~3.3:1. Ink on that honey is 5.8:1. */
section.brand-strip { background: #C17E3A; }
section.brand-strip .marquee span { color: #0E0E0C; }
.footer-links {
  flex-wrap: wrap;
  justify-content: center;
  max-width: 100%;
  row-gap: 4px;
  padding-inline: 12px;
}
.footer-links .footer-cookie-settings { max-width: 100%; }
.auth-modal:not(.open) { content-visibility: hidden; }
.auth-modal.open { content-visibility: visible; }
/* Sections stay readable with JS off. The old fade-in hid them at opacity 0. */
.fade-in-section,
.fade-in-section:not(.visible) {
  opacity: 1;
  transform: none;
  animation: none;
}
/* Short hero. Phone: no vh min-height (#103). Desktop caps near 60vh so the
   grid can start on the first screen. The back print stays visible; hover
   reveals the front. Scroll does not drive --flip. */
.hero-pin { height: auto; background: var(--paper); color: var(--ink); }
.hero-sticky {
  position: relative;
  top: auto;
  height: auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--ink);
  overflow: hidden;
  padding: 8px 16px 4px;
}
.hero-copy {
  position: relative;
  z-index: 2;
  padding: 8px 4px 12px;
  background: none;
}
.hero-kicker { letter-spacing: 0.14em; text-transform: uppercase; font-size: 12px; color: var(--honey-ink); margin: 0 0 8px; }
.hero-joke {
  font-family: var(--display);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: -0.02em;
  margin: 0;
  font-size: clamp(40px, 11vw, 64px);
  direction: ltr;
  color: var(--ink);
}
.hero-joke span { display: block; }
.hero-joke .power { color: var(--honey-ink); }
.hero-sub { margin: 10px 0 14px; max-width: 28ch; color: var(--ink); }
.hero-cta {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 18px;
  background: var(--honey);
  color: var(--ink);
  text-decoration: none;
  border-radius: 999px;
  font-weight: 700;
}
.hero-flip {
  position: relative;
  inset: auto;
  height: auto;
  min-height: 0;
  max-height: 200px;
}
.hero-flip img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  object-position: center center;
  background: var(--sand);
  border-radius: 16px;
}
.hero-flip .front {
  position: absolute;
  inset: 0;
  opacity: var(--flip, 0);
  object-fit: contain;
  object-position: center;
  height: 100%;
}
@media (min-width: 900px) {
  .hero-sticky {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    height: clamp(320px, 46vh, 500px);
    max-height: 70vh;
    min-height: 0;
    padding: 12px 40px 8px;
  }
  .hero-flip { max-height: none; height: 100%; min-height: 0; }
  .hero-flip img { height: 100%; max-height: 100%; }
  .hero-copy { padding: 12px 28px; }
  .hero-joke { font-size: clamp(64px, 5.6vw, 96px); }
}
@media (max-width: 899px) {
  .hero-pin, .hero-sticky, .hero-flip, .mood-band, .mood-strip {
    min-height: 0;
    height: auto;
  }
}

.mood-band { min-height: 0; display: none; }
.mood-band h2 { font-family: var(--display); font-size: clamp(42px, 8vw, 84px); line-height: 0.9; margin: 8px 0; direction: ltr; }
.mood-band a { color: var(--honey); }
@supports (animation-timeline: view()) {
  .mood-band h2 {
    animation: mood-rise linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
  }
}
@keyframes mood-rise { from { transform: translateY(24px); } to { transform: none; } }

section#shop.shop {
  background: var(--paper);
  color: var(--ink);
  padding: 12px 12px 32px;
  scroll-margin-top: calc(var(--nav-h) + 38px);
}
/* translateY(0) on .fade-in-section is still a transform, and it traps
   position:fixed inside the section. The sheet has to use the viewport. */
section#shop.fade-in-section,
section#shop.fade-in-section.visible,
section#shop.fade-in-section:not(.visible) {
  transform: none;
  animation: none;
  opacity: 1;
}
section#shop .section-header { margin-bottom: 10px; }
section#shop .section-header h2 { font-size: 1.7rem; margin-bottom: 2px; }
section#shop .section-header p { font-size: 0.95rem; margin: 0; }
section#shop .shop-bar {
  position: sticky;
  top: calc(var(--nav-h) + 38px);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 6px 0;
  background: var(--paper);
}
section#shop .filter-sort-btn,
section#shop .mood-chip,
section#shop .filter-btn,
section#shop .gender-btn,
section#shop .ships-toggle,
section#shop .filter-sheet-close {
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  padding: 0 14px;
  cursor: pointer;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
}
section#shop .filter-sort-btn { flex: 0 0 auto; font-weight: 700; background: var(--ink); color: var(--paper); }
section#shop .mood-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  flex: 1 1 auto;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent);
}
section#shop .mood-filters::-webkit-scrollbar { display: none; }
section#shop .mood-chip { scroll-snap-align: start; flex: 0 0 auto; }
body[dir="rtl"] section#shop .mood-filters {
  mask-image: linear-gradient(to left, #000 calc(100% - 36px), transparent);
}
section#shop .mood-chip.is-on,
section#shop .filter-btn.active,
section#shop .gender-btn.active,
section#shop .ships-toggle[aria-pressed="true"],
section#shop .mood-chip:hover,
section#shop .filter-btn:hover,
section#shop .gender-btn:hover,
section#shop .ships-toggle:hover {
  background: var(--ink);
  color: var(--paper);
}
section#shop .shop-filters {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1400;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin: 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  max-height: 78vh;
  overflow: auto;
  background: var(--paper);
  color: var(--ink);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -12px 40px rgba(14, 14, 12, 0.28);
  transform: translateY(110%);
  visibility: hidden;
}
section#shop .shop-filters.is-open { transform: none; visibility: visible; }
section#shop .filter-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
section#shop .filter-sheet-head h3 { margin: 0; font-size: 1.1rem; }
section#shop .gender-filter,
section#shop .filter-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  margin: 0;
}
section#shop .ships-toggle { align-self: flex-start; }
section#shop .sort-label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; }
section#shop .sort-label select {
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  padding: 0 12px;
}
section#shop .filter-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1390;
  border: 0;
  background: rgba(14, 14, 12, 0.45);
}
section#shop .filter-backdrop[hidden] { display: none; }
html.filter-sheet-open, html.filter-sheet-open body { overflow: hidden; }

section#shop .products-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 900px) {
  section#shop.shop { padding: 12px 24px 48px; }
  section#shop .section-header { margin-bottom: 16px; }
  section#shop .section-header h2 { font-size: clamp(2rem, 4vw, 3rem); }
  section#shop .shop-bar { position: static; padding: 0; margin-bottom: 18px; gap: 10px; flex-wrap: wrap; row-gap: 8px; align-items: center; }
  section#shop .filter-sort-btn,
  section#shop .filter-sheet-head,
  section#shop .filter-backdrop { display: none; }
  section#shop .shop-filters {
    display: contents;
    position: static;
    transform: none;
    visibility: visible;
    max-height: none;
    overflow: visible;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }
  /* Under ~1200px the one-row bar overflows and the chips paint on top of each other. */
  section#shop .filter-tabs { order: 1; flex: 1 1 100%; flex-wrap: wrap; min-width: 0; overflow: visible; }
  section#shop .mood-filters { order: 2; flex: 1 1 auto; min-width: 0; max-width: none; overflow-x: auto; }
  section#shop .gender-filter { order: 3; flex: none; flex-wrap: wrap; }
  section#shop .ships-toggle { order: 4; flex: none; white-space: nowrap; }
  section#shop .sort-label { order: 5; margin-inline-start: 0; flex: none; flex-direction: row; align-items: center; white-space: nowrap; }
  section#shop .products-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; }
}
@media (min-width: 1280px) {
  section#shop .filter-tabs { flex: 1 1 220px; flex-wrap: nowrap; min-width: 0; overflow-x: auto; }
  section#shop .mood-filters { flex: 1 1 180px; max-width: 280px; }
  section#shop .sort-label { margin-inline-start: auto; }
}
.product-card {
  background: #fff;
  color: var(--ink);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
}
.product-image { position: relative; aspect-ratio: 1; background: #ece7dc; }
.product-image .img-view { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.product-card .product-image picture.img-view { position: absolute; inset: 0; display: block; width: 100%; height: 100%; margin: 0; }
.product-card .product-image picture.img-view img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
}
.product-image .img-front { opacity: 0; transition: opacity 0.25s ease; z-index: 1; }
.onbody-color {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.92);
  color: #1c1915;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 5px 8px;
  border-radius: 999px;
  pointer-events: none;
}
.modal-image { position: relative; }
.modal-image picture { display: block; width: 100%; height: 100%; }
.modal-image picture img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.modal-image .onbody-color { display: none; }
.modal-image.is-onbody .onbody-color { display: inline-block; }
.product-card:hover .img-front, .product-card:focus-within .img-front, .product-card.is-swapped .img-front { opacity: 1; }
.product-image .img-persona { display: none; }
.product-info { padding: 10px 12px 12px; }
.product-phrase { font-weight: 650; line-height: 1.25; }
.card-ship { font-size: 12px; margin-top: 6px; color: #3d3a33; }
.product-card.not-shippable { outline: 2px solid #8a3b00; }
.product-card.not-shippable .card-ship { color: #8a3b00; font-weight: 700; }
.quick-add {
  margin-top: 8px;
  min-height: 40px;
  width: 100%;
  border-radius: 999px;
  border: 0;
  background: var(--honey);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}
.card-skeleton {
  aspect-ratio: 1;
  border-radius: 16px;
  background: linear-gradient(90deg, #ece7dc 25%, #f7f3ea 37%, #ece7dc 63%);
  background-size: 400% 100%;
  animation: shimmer 1.2s ease infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.products-grid[data-loading="1"] .card-skeleton { display: block; }
.card-skeleton { display: none; }

.cookie-buttons { flex-wrap: nowrap; align-items: center; }
.btn-cookie-accept, .btn-cookie-decline {
  box-sizing: border-box;
  min-height: 44px;
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.2;
  border-radius: 6px;
}
.btn-cookie-accept { background: var(--honey); color: var(--ink); border: 1px solid var(--honey); }
.btn-cookie-decline { background: transparent; color: var(--paper); border: 1px solid rgba(244, 240, 230, 0.7); }
#dubis-preview-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99999;
}
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  padding: 1rem 2rem;
  background: var(--ink);
  color: var(--paper);
}
.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

/* Close control is a 44px target on every viewport. style.css sizes it
   to the × glyph (about 15×26 on desktop). */
body .dubis-popup-close {
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

/* Phone: the 15% popup is a bottom sheet, not a centered modal.
   35vh keeps most of the product grid on screen. No dark overlay,
   and pointer-events stay off the page so it still scrolls.
   Desktop keeps the compact centered card in style.css. */
@media (max-width: 899px) {
  body .dubis-popup-overlay {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
  }
  body .dubis-popup-overlay.visible {
    pointer-events: none;
    opacity: 1;
  }
  body .dubis-popup-overlay .dubis-popup {
    pointer-events: auto;
    width: 100%;
    max-width: none;
    max-height: 35vh;
    max-height: 35dvh;
    overflow: auto;
    border-radius: 16px 16px 0 0;
    padding: 8px 12px 12px;
    margin: 0;
    text-align: start;
    box-shadow: 0 -10px 28px rgba(14, 14, 12, 0.28);
    transform: translateY(110%);
  }
  body .dubis-popup-overlay.visible .dubis-popup {
    transform: translateY(0);
  }
  body .dubis-popup-close {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    top: 2px;
    right: auto;
    left: auto;
    inset-inline-end: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #f4f0e6;
    font-size: 28px;
    line-height: 1;
    z-index: 2;
    cursor: pointer;
  }
  body .dubis-popup-body { padding-inline-end: 44px; }
  body .dubis-popup-title {
    font-size: 1.15rem;
    margin: 6px 0 2px;
    letter-spacing: 0;
  }
  body .dubis-popup-sub {
    font-size: 0.8rem;
    line-height: 1.3;
    margin-bottom: 8px;
  }
  body .dubis-popup-form { flex-direction: row; gap: 8px; }
  body .dubis-popup-input,
  body .dubis-popup-btn {
    padding: 8px 10px;
    min-height: 40px;
  }
  body .dubis-popup-dismiss { margin: 4px 0 0; }
  body .dubis-popup-error { margin: 6px 0 0; font-size: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-pin, .hero-sticky, .hero-flip { height: auto; min-height: 0; max-height: none; }
  .hero-flip .front { animation: none !important; opacity: 0 !important; }
  .mood-band h2, .mood-card img { animation: none !important; transform: none !important; }
  .product-image .img-front { transition: none; }
  .card-skeleton { animation: none; }
}
