/* enhance.css — the motion and editorial layer on top of style.css.
   ----------------------------------------------------------------------------
   Loaded after style.css on every storefront page. It adds:
     · scroll reveals, a sticky-header behaviour and hover micro-interactions;
     · the editorial blocks the homepage uses (marquee, story split, counters,
       collection mosaic, promise band);
     · a single accent hook, so the shop's colour can be changed from Settings.

   The palette is the fresh mint-and-green of the storefront: ink, bone, gold
   and leaf. No gradients beyond a soft wash of the same hue.
   Every animation is wrapped by prefers-reduced-motion at the end of the file. */

:root {
  --bone: #f4f9f4;
  --brass: #f2a33c;
  --ink-soft: rgba(32, 36, 31, .06);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);
}

/* A reveal that slides in from the side sits a few pixels outside the layout until it
   animates, which would otherwise show as a stray horizontal scrollbar on the whole page.
   `clip` rather than `hidden`: it trims the overflow without turning the page into a scroll
   container, so the sticky header keeps working. */
html, body { overflow-x: clip; }

/* ===========================================================================
   1. Scroll reveals
   ======================================================================== */

/* Elements start slightly displaced and settle as they enter the viewport.
   Every rule that *hides* something is scoped to `html.motion`, a class boot.js adds in the
   <head>. If scripting is off, or motion.js fails to load, none of these rules apply and the
   page is simply static — nothing is left invisible waiting for a script that is not coming. */
.motion [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.motion [data-reveal="left"]  { transform: translate3d(-28px, 0, 0); }
.motion [data-reveal="right"] { transform: translate3d(28px, 0, 0); }
.motion [data-reveal="scale"] { transform: scale(.96); }
.motion [data-reveal="mask"]  { opacity: 1; clip-path: inset(0 0 100% 0); transform: none; }

.motion [data-reveal].is-in {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 0 0);
}

/* Children of a stagger container come in one after another. */
.motion [data-stagger] > * {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}
.motion [data-stagger].is-in > * { opacity: 1; transform: none; }

/* ===========================================================================
   2. Header
   ======================================================================== */

.header {
  transition: box-shadow .3s var(--ease), transform .35s var(--ease);
}
.header.is-stuck { box-shadow: 0 1px 0 var(--line), 0 10px 30px rgba(22, 18, 13, .07); }
/* Scrolling down hides the bar and gives the page back its full height;
   scrolling up brings it straight back. */
.header.is-hidden { transform: translateY(calc(-1 * var(--header-shift, 100%))); }

.announce {
  position: relative;
  overflow: hidden;
}

.logo__mark { transition: transform .4s var(--ease-out); }
.logo:hover .logo__mark { transform: rotate(-6deg) scale(1.06); }

.nav__link { position: relative; }
/* The underline grows from the centre instead of appearing all at once. */
.nav__link::after {
  content: "";
  position: absolute;
  left: 50%; right: 50%; bottom: -1px;
  height: 2px;
  background: var(--accent);
  transition: left .28s var(--ease), right .28s var(--ease);
}
.nav__item:hover > .nav__link::after,
.nav__link:focus-visible::after { left: 12px; right: 12px; }

/* The top-level menu has ten entries; rather than pushing a horizontal scrollbar onto the
   whole page at laptop widths, the row wraps and the links tighten up. */
.nav__list { flex-wrap: wrap; }

@media (max-width: 1400px) {
  .nav__link { padding-left: 10px; padding-right: 10px; }
}
@media (max-width: 1180px) {
  .nav__link { padding-left: 8px; padding-right: 8px; font-size: .8rem; }
}

/* Carousel controls sit together in the corner instead of over the headline. */
.hero__arrow {
  top: auto;
  bottom: 18px;
  transform: none;
}
.hero__arrow--prev { left: auto; right: 68px; transform: rotate(180deg); }
.hero__arrow--next { right: 18px; }
.hero__arrow:hover { transform: scale(1.08); }
.hero__arrow--prev:hover { transform: rotate(180deg) scale(1.08); }
.hero__dots { left: 20px; transform: none; bottom: 32px; }
.hero__inner { padding-bottom: 92px; }

.mega {
  animation: megaIn .22s var(--ease-out) both;
  transform-origin: top center;
}
@keyframes megaIn { from { opacity: 0; transform: translateY(-6px); } }

/* ===========================================================================
   3. Buttons and links
   ======================================================================== */

.btn {
  position: relative;
  overflow: hidden;
  transition: background-color .25s var(--ease), border-color .25s var(--ease),
              color .25s var(--ease), transform .18s var(--ease), box-shadow .25s var(--ease);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(22, 18, 13, .13); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn:disabled:hover { transform: none; box-shadow: none; }

/* A quiet sheen that crosses the button once on hover. */
.btn::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .22), transparent);
  transform: skewX(-18deg);
  transition: left .55s var(--ease);
}
.btn:hover::after { left: 120%; }
.btn--ghost::after { background: linear-gradient(100deg, transparent, rgba(22, 18, 13, .06), transparent); }

.section__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom-color: transparent;
  transition: gap .25s var(--ease), border-color .25s var(--ease);
}
.section__link::after { content: "\2192"; transition: transform .25s var(--ease); }
.section__link:hover { gap: 10px; border-bottom-color: var(--accent); }
.section__link:hover::after { transform: translateX(2px); }

/* ===========================================================================
   4. Section headings
   ======================================================================== */

/* The growing rule under a heading needs room before the standfirst underneath it. */
.section__head h2 { position: relative; display: inline-block; margin-bottom: 18px; }
.section__head h2::after {
  content: "";
  position: absolute;
  left: 0; bottom: -8px;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width .8s var(--ease-out) .15s;
}
.section.is-in .section__head h2::after,
.section__head.is-in h2::after { width: 46px; }

.eyebrow {
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: currentColor;
  flex: none;
}
.eyebrow--center { justify-content: center; }

/* ===========================================================================
   5. Hero
   ======================================================================== */

.hero__media {
  animation: kenburns 18s var(--ease) both;
}
@keyframes kenburns { from { transform: scale(1.06); } to { transform: scale(1); } }

/* Each line of the hero card arrives a beat after the one above it. */
.hero__card > * { animation: heroIn .8s var(--ease-out) both; }
.hero__card > .hero__eyebrow { animation-delay: .1s; }
.hero__card > h1 { animation-delay: .2s; }
.hero__card > p { animation-delay: .32s; }
.hero__card > .btn { animation-delay: .44s; }
@keyframes heroIn { from { opacity: 0; transform: translateY(18px); } }

.hero__arrow { transition: background-color .25s var(--ease), transform .25s var(--ease); }
.hero__arrow:hover { background: #fff; border-color: var(--accent); }
.hero__dot { transition: width .3s var(--ease), background-color .3s var(--ease); }

.hero__scroll {
  position: absolute;
  left: 50%; bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: .66rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  pointer-events: none;
}
.hero__scroll i {
  display: block;
  width: 1px; height: 28px;
  background: linear-gradient(var(--accent), transparent);
  animation: scrollHint 1.9s var(--ease) infinite;
}
@keyframes scrollHint {
  0%   { transform: scaleY(0); transform-origin: top; }
  45%  { transform: scaleY(1); transform-origin: top; }
  55%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ===========================================================================
   6. Marquee strip
   ======================================================================== */

.marquee {
  background: var(--ink);
  color: #e7f0e6;
  overflow: hidden;
  padding: 13px 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 34s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 0 26px;
  font-size: .76rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.marquee__item::after {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--brass);
  flex: none;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ===========================================================================
   7. Story split (the editorial block)
   ======================================================================== */

.story {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}
.story__media {
  position: relative;
  aspect-ratio: 5 / 4;
  background: var(--bone);
  border-radius: 2px;
  overflow: hidden;
}
.story__media img { width: 100%; height: 100%; object-fit: cover; }
/* A thin frame offset behind the picture, the way a mounted print sits. */
.story__media::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, .55);
  pointer-events: none;
  z-index: 1;
}
/* The frame lives beside the picture, not inside it: .story__media clips its own contents,
   so an offset frame inside it would never be seen. */
.story__plate { position: relative; }
.story__frame {
  position: absolute;
  inset: auto -16px -16px 28%;
  height: 62%;
  border: 1px solid var(--accent);
  opacity: .45;
  pointer-events: none;
}
.story__body h2 { margin-bottom: 16px; }
.story__body p { color: var(--ink-2); font-size: 1.01rem; margin: 0 0 18px; max-width: 52ch; }
.story__marks {
  display: flex;
  gap: 30px;
  margin: 26px 0 28px;
  flex-wrap: wrap;
}
.story__mark strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.9rem;
  line-height: 1;
  color: var(--accent);
}
.story__mark span { font-size: .76rem; color: var(--muted); letter-spacing: .06em; }

@media (max-width: 860px) {
  .story { grid-template-columns: 1fr; gap: 34px; }
}

/* ===========================================================================
   8. Counter band
   ======================================================================== */

.counters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.counter {
  background: var(--bg);
  padding: 30px 22px;
  text-align: center;
}
.counter__value {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.counter__value sup { font-size: .5em; vertical-align: super; color: var(--accent); margin-left: 2px; }
.counter__label {
  margin-top: 9px;
  font-size: .76rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ===========================================================================
   9. Collection mosaic
   ======================================================================== */

.mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 180px;
  gap: 14px;
}
.mosaic__cell {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  background: var(--bone);
  display: flex;
  align-items: flex-end;
  padding: 20px;
  color: #fff;
  isolation: isolate;
}
.mosaic__cell:first-child { grid-column: span 2; grid-row: span 2; }
.mosaic__cell:nth-child(4) { grid-column: span 2; }
.mosaic__cell img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform .8s var(--ease-out);
}
.mosaic__cell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(22, 18, 13, .05) 35%, rgba(22, 18, 13, .78));
  transition: opacity .4s var(--ease);
}
.mosaic__cell:hover img { transform: scale(1.06); }
/* The gradient under the caption stays exactly as it is on hover — it is there
   so the title can be read, not as a hover effect. Pointing at a collection
   zooms its picture and nothing more. */
.mosaic__title { font-family: var(--serif); font-size: 1.25rem; margin: 0; }
.mosaic__meta { font-size: .76rem; opacity: .85; margin-top: 3px; display: block; }
.mosaic__cell:first-child .mosaic__title { font-size: 1.9rem; }

@media (max-width: 900px) {
  .mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
  .mosaic__cell:first-child { grid-column: span 2; }
  .mosaic__cell:nth-child(4) { grid-column: span 2; }
}

/* ===========================================================================
   10. Promise band
   ======================================================================== */

.promise {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0;
}
.promise__item {
  padding: 26px 24px;
  border-left: 1px solid var(--line);
  transition: background-color .3s var(--ease);
}
.promise__item:first-child { border-left: 0; }
.promise__item:hover { background: var(--bg-soft); }
.promise__item svg { color: var(--accent); margin-bottom: 12px; }
.promise__item h3 { font-family: var(--sans); font-size: .9rem; margin: 0 0 4px; }
.promise__item p { margin: 0; font-size: .82rem; color: var(--muted); }

@media (max-width: 680px) {
  .promise__item { border-left: 0; border-top: 1px solid var(--line); }
  .promise__item:first-child { border-top: 0; }
}

/* ===========================================================================
   11. Product card polish
   ======================================================================== */

.card { transition: transform .35s var(--ease-out); }
.card:hover { transform: translateY(-4px); }
.card__media { position: relative; }
/* No tint over the photograph on hover. The lift above and the small zoom in
   style.css are the whole of the hover signal; darkening the picture only made
   the thing being pointed at harder to see. */
.card__title a { background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size .35s var(--ease); }
.card:hover .card__title a { background-size: 100% 1px; }

.badge { animation: badgeIn .4s var(--ease-out) both; }
@keyframes badgeIn { from { opacity: 0; transform: translateX(-8px); } }

.tile__media { transition: border-color .3s var(--ease), transform .4s var(--ease-out); }
.tile:hover .tile__media { transform: translateY(-4px); }
.tile__media img { transition: transform .6s var(--ease-out); }
.tile:hover .tile__media img { transform: scale(1.07); }

.highlight { transition: transform .45s var(--ease-out); }
.highlight:hover { transform: translateY(-5px); }
.highlight__cta { transition: letter-spacing .3s var(--ease); }
.highlight:hover .highlight__cta { letter-spacing: .04em; }

.brand-chip { transition: transform .3s var(--ease), border-color .3s var(--ease); }
.brand-chip:hover { transform: translateY(-3px); }

.post__media img { transition: transform .7s var(--ease-out); }
.post:hover .post__media img { transform: scale(1.05); }

.review { transition: transform .35s var(--ease-out), box-shadow .35s var(--ease); }
.review:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

/* ===========================================================================
   12. Images and skeletons
   ======================================================================== */

/* Pictures fade up as they decode, so a slow connection never flashes a hard edge. */
img[data-fade] { opacity: 0; transition: opacity .6s var(--ease); }
img[data-fade].is-loaded { opacity: 1; }

.skeleton { position: relative; overflow: hidden; }
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

/* ===========================================================================
   13. Back to top
   ======================================================================== */

.to-top {
  position: fixed;
  right: 22px; bottom: 22px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(14px) scale(.9);
  pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease-out), background-color .25s;
  box-shadow: var(--shadow);
  z-index: 70;
}
.to-top.is-on { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* A hairline progress bar for how far down the page the reader is. */
.read-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--accent);
  z-index: 100;
  pointer-events: none;
}

/* ===========================================================================
   14. Toasts and drawer
   ======================================================================== */

.toast { animation: toastIn .34s var(--ease-out) both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.97); } }

.drawer { transition: transform .32s var(--ease-out); }
.scrim { transition: opacity .3s var(--ease); }

/* ===========================================================================
   15. Reduced motion — everything decorative stops, nothing disappears
   ======================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .motion [data-reveal], .motion [data-stagger] > * { opacity: 1 !important; transform: none !important;
    clip-path: none !important; }
  .marquee__track { animation: none; }
  .hero__scroll { display: none; }
}

/* A collection with no photograph yet gets a warm card rather than the grey the overlay
   would otherwise make of the bone background. */
.mosaic__cell:not(:has(img)) { background: linear-gradient(158deg, #2f6b3a, #12241a); }
.mosaic__cell:not(:has(img))::before { opacity: .35; }

/* ===========================================================================
   16. Product options — colour and size pickers
   ======================================================================== */

.pd__options { margin: 4px 0 24px; display: grid; gap: 18px; }

.pd__option-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 9px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.pd__option-head em {
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}

.pd__swatches { display: flex; flex-wrap: wrap; gap: 9px; }

.swatch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 48px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-size: .85rem;
  color: var(--ink);
  transition: border-color .2s var(--ease), background-color .2s var(--ease),
              color .2s var(--ease), transform .15s var(--ease);
}
.swatch i {
  width: 15px; height: 15px;
  border-radius: 50%;
  flex: none;
  border: 1px solid rgba(22, 18, 13, .16);
}
.swatch:hover:not(:disabled) { border-color: var(--accent); transform: translateY(-1px); }
.swatch.is-on {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
  box-shadow: 0 4px 12px -4px rgba(22, 18, 13, .5);
}
.swatch.is-on i { border-color: rgba(255, 255, 255, .5); }

/* Out of stock in this combination: still offered, visibly empty. */
.swatch.is-soldout { color: var(--muted); border-style: dashed; }
.swatch.is-soldout::after {
  content: "";
  position: absolute;
}

/* Not made in this combination at all: struck through and unclickable. */
.swatch.is-gone {
  color: #c2b8a9;
  border-color: var(--line-2);
  background: var(--bg-soft);
  cursor: not-allowed;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.swatch.is-gone i { opacity: .35; }
.swatch:disabled { pointer-events: none; }

.pd__option-msg {
  margin: 4px 0 0;
  font-size: .82rem;
  color: var(--sale);
  min-height: 1.2em;
}

/* The combination, wherever a line is listed back to the customer. */
.cart-row__variant,
.pkgline__variant {
  font-size: .78rem;
  color: var(--accent);
  margin-bottom: 3px;
}
