/* ==========================================================================
   Doni Fruits Group — site styles (on top of Tailwind)

   Idea: the produce is the palette. Products and categories carry their own
   colour (set inline as CSS variables, see produce_vars() in helpers.php):
     --c       the colour          --c-soft  stronger tint (hover, chips)
     --c-tint  light background    --c-ink   readable dark shade for text
   Product photos sit on white studio backgrounds; mix-blend-mode: multiply
   melts that white into the tint, so each product appears on its own colour.
   ========================================================================== */

html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #1B2316; outline-offset: 3px; border-radius: 4px; }
::selection { background: #FFD9D0; color: #1B2316; }
body.menu-locked { overflow: hidden; }

/* Fraunces at its softest: round, fruit-like letterforms */
.font-display { font-variation-settings: "SOFT" 100, "WONK" 0; font-optical-sizing: auto; }
.wonk { font-variation-settings: "SOFT" 100, "WONK" 1; }

/* ---------- Produce colour helpers ---------------------------------------- */
.bg-c { background-color: var(--c); }
.bg-c-tint { background-color: var(--c-tint); }
.bg-c-soft { background-color: var(--c-soft); }
.text-c { color: var(--c); }
.text-c-ink { color: var(--c-ink); }
.multiply { mix-blend-mode: multiply; }

/* Product tile: photo melts into its own colour */
.produce-tile { background-color: var(--c-tint); transition: background-color .35s ease; }
.produce-tile img { mix-blend-mode: multiply; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
a:hover .produce-tile, .group:hover .produce-tile { background-color: var(--c-soft); }
a:hover .produce-tile img, .group:hover .produce-tile img { transform: scale(1.06) rotate(-1.5deg); }

/* Dot in the product's colour (category labels, filters) */
.c-dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 9999px; background: var(--c); flex: none; }

/* ---------- Header ------------------------------------------------------- */
.site-header {
    color: #1B2316;
    background: rgba(255, 255, 255, .94);
    transition: box-shadow .3s ease;
}
@supports (backdrop-filter: blur(10px)) {
    .site-header { background: rgba(255, 255, 255, .82); backdrop-filter: saturate(1.6) blur(14px); }
}
.site-header.is-scrolled { box-shadow: 0 1px 0 rgba(27, 35, 22, .08); }

.nav-link { position: relative; color: rgba(27, 35, 22, .78); transition: color .2s; }
.nav-link:hover { color: #1B2316; }
.nav-link.is-active { color: #1B2316; font-weight: 600; }
/* active page: a small seed-shaped mark in brand red under the label */
.nav-link.is-active::after {
    content: ""; position: absolute; left: 50%; bottom: .15rem; width: .4rem; height: .4rem;
    margin-left: -.2rem; border-radius: 9999px; background: #D72027;
}

.lang-switch { box-shadow: inset 0 0 0 1px rgba(27, 35, 22, .16); }
.lang-switch a { color: rgba(27, 35, 22, .65); transition: background-color .2s, color .2s; }
.lang-switch a:hover { color: #1B2316; }
.lang-switch a.is-active { background: #1B2316; color: #fff; }

.mobile-menu { background: #fff; color: #1B2316; max-height: calc(100svh - 4.5rem); overflow-y: auto; }

/* ---------- Buttons & pills ---------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
    border-radius: 9999px; font-weight: 600; white-space: nowrap;
    transition: background-color .2s ease, color .2s ease, box-shadow .2s ease, transform .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-ink { background: #1B2316; color: #fff; }
.btn-ink:hover { background: #2E3B26; }
.btn-b2b { background: #D72027; color: #fff; }
.btn-b2b:hover { background: #B5161D; }
.btn-line { box-shadow: inset 0 0 0 1.5px rgba(27, 35, 22, .2); color: #1B2316; }
.btn-line:hover { box-shadow: inset 0 0 0 1.5px #1B2316; }

.link-u { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .28em; text-decoration-color: rgba(27, 35, 22, .3); transition: text-decoration-color .2s; }
.link-u:hover { text-decoration-color: currentColor; }

.filter-pill {
    display: inline-flex; align-items: center; gap: .5rem;
    border-radius: 9999px; padding: .55rem 1rem;
    font-size: .9rem; font-weight: 500; white-space: nowrap;
    background: #fff; color: #1B2316;
    box-shadow: inset 0 0 0 1px rgba(27, 35, 22, .14);
    transition: box-shadow .2s, background-color .2s, color .2s;
}
.filter-pill:hover { box-shadow: inset 0 0 0 1px rgba(27, 35, 22, .4); }
.filter-pill.is-active { background: var(--c-tint, #1B2316); color: var(--c-ink, #fff); box-shadow: inset 0 0 0 1.5px var(--c, #1B2316); font-weight: 600; }
.filter-pill.is-active.is-plain { background: #1B2316; color: #fff; box-shadow: none; }

/* ---------- Hero: rotating copy + arch photo ------------------------------ */
.hero-stack { display: grid; }
.hero-stack > * { grid-area: 1 / 1; }
.hero-slide { opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility 0s linear .8s; }
.hero-slide.is-active { opacity: 1; visibility: visible; transition: opacity .8s ease, visibility 0s; }
.hero-photo { opacity: 0; transform: scale(1.04); transition: opacity 1s ease, transform 6s cubic-bezier(.2, .6, .2, 1); }
.hero-photo.is-active { opacity: 1; transform: scale(1); }

.arch { border-radius: 999px 999px 2rem 2rem; }

/* produce "stickers" around the arch */
.sticker { border-radius: 9999px; box-shadow: 0 0 0 6px #fff; }
.sticker img { mix-blend-mode: multiply; }

.hero-dot { width: 2.25rem; height: 4px; border-radius: 9999px; background: rgba(27, 35, 22, .14); overflow: hidden; position: relative; }
.hero-dot-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: #1B2316; border-radius: inherit; }
.hero-dot[aria-selected="true"] .hero-dot-fill { width: 100%; }
.hero-dot.is-current .hero-dot-fill { width: 0; animation: hero-progress var(--slide-duration, 7s) linear forwards; }
.hero.is-paused .hero-dot.is-current .hero-dot-fill { animation-play-state: paused; }
@keyframes hero-progress { to { width: 100%; } }

/* The one orchestrated entrance: copy rises once after first paint */
.hero-rise { transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.js .hero:not(.is-ready) .hero-rise { opacity: 0; transform: translateY(18px); }
.hero.is-ready .hero-rise:nth-child(2) { transition-delay: .1s; }
.hero.is-ready .hero-rise:nth-child(3) { transition-delay: .2s; }

/* ---------- Spectrum: the whole range, ordered like a rainbow -------------- */
.spectrum { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.spectrum-track { display: flex; gap: .75rem; width: max-content; animation: spectrum-drift var(--spectrum-duration, 120s) linear infinite; }
.spectrum:hover .spectrum-track, .spectrum:focus-within .spectrum-track { animation-play-state: paused; }
@keyframes spectrum-drift { to { transform: translateX(-50%); } }
.spectrum-item { position: relative; flex: none; width: 8.5rem; }
@media (min-width: 1024px) { .spectrum-item { width: 10rem; } }
.spectrum-item .produce-tile { aspect-ratio: 1; border-radius: 1.75rem; }
.spectrum-name {
    position: absolute; left: .6rem; right: .6rem; bottom: .6rem; padding: .3rem .6rem;
    border-radius: 9999px; background: #fff; color: var(--c-ink); font-size: .78rem; font-weight: 600;
    text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .25s;
}
.spectrum-item:hover .spectrum-name, .spectrum-item:focus-visible .spectrum-name { opacity: 1; transform: none; }

/* thin stripe of the same colours, used as a divider */
.spectrum-line { height: 6px; background: var(--spectrum-gradient, linear-gradient(90deg, #e0393e, #f39a1e, #f5c518, #3f9a3c, #3f5fa0, #6b2d5c)); }

/* inline product chip inside a sentence */
.chip {
    display: inline-flex; align-items: center; gap: .3em; vertical-align: .06em;
    padding: .04em .42em .04em .06em; border-radius: 9999px; font-size: .86em; line-height: 1.15;
    background: var(--c-tint); color: var(--c-ink); white-space: nowrap;
}
.chip img { width: 1.2em; height: 1.2em; border-radius: 9999px; object-fit: contain; mix-blend-mode: multiply; }

/* ---------- Category tiles ------------------------------------------------- */
.cat-tile { background: var(--c-tint); color: var(--c-ink); transition: background-color .35s ease; }
.cat-tile:hover { background: var(--c-soft); }
.cat-tile .cat-fruit { mix-blend-mode: multiply; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.cat-tile:hover .cat-fruit:nth-child(1) { transform: translate(-6%, -4%) rotate(-6deg); }
.cat-tile:hover .cat-fruit:nth-child(2) { transform: translate(4%, -8%) rotate(5deg); }
.cat-tile:hover .cat-fruit:nth-child(3) { transform: translate(8%, 2%) rotate(-3deg); }

/* ---------- Rich text from the CMS -------------------------------------- */
.prose-doni { max-width: 66ch; color: rgba(27, 35, 22, .84); font-size: 1.1rem; line-height: 1.75; }
.prose-doni > * + * { margin-top: 1.1em; }
.prose-doni h2, .prose-doni h3, .prose-doni h4 {
    font-family: Fraunces, Georgia, serif; font-variation-settings: "SOFT" 100, "WONK" 0;
    color: #1B2316; font-weight: 650; letter-spacing: -.015em;
}
.prose-doni h2 { margin-top: 2em; font-size: 1.9rem; line-height: 1.15; }
.prose-doni h3 { margin-top: 1.8em; font-size: 1.4rem; line-height: 1.25; }
.prose-doni h4 { margin-top: 1.6em; font-size: 1.15rem; }
.prose-doni > :first-child { margin-top: 0; }
.prose-doni h2 + *, .prose-doni h3 + *, .prose-doni h4 + * { margin-top: .6em; }
.prose-doni ul { list-style: none; padding-left: 0; }
.prose-doni ul > li { position: relative; padding-left: 1.5em; }
.prose-doni ul > li::before {
    content: ""; position: absolute; left: .15em; top: .62em;
    width: .5em; height: .5em; border-radius: 9999px; background: var(--c, #D72027);
}
.prose-doni ol { list-style: decimal; padding-left: 1.4em; }
.prose-doni ol > li::marker { color: #D72027; font-weight: 600; }
.prose-doni li + li { margin-top: .5em; }
.prose-doni a { color: #1B2316; font-weight: 500; text-decoration: underline; text-decoration-color: #D72027; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.prose-doni strong, .prose-doni b { color: #1B2316; font-weight: 650; }
.prose-doni blockquote { border-left: 3px solid #D72027; padding-left: 1.25em; color: #1B2316; font-family: Fraunces, Georgia, serif; font-size: 1.25em; line-height: 1.5; }
.prose-doni img { border-radius: 1.25rem; }
.prose-doni .ql-align-center { text-align: center; }
.prose-doni .ql-align-right { text-align: right; }
.prose-doni .ql-align-justify { text-align: justify; }

/* ---------- Lightbox ----------------------------------------------------- */
.lightbox { position: fixed; inset: 0; }
.lightbox::backdrop { background: rgba(10, 14, 8, .92); }

/* Horizontal scrollers (filter pills): scroll by swipe/trackpad, no visible bar */
.no-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ---------- Motion preferences ------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
    .spectrum { overflow-x: auto; scrollbar-width: none; -webkit-mask-image: none; mask-image: none; }
    .spectrum::-webkit-scrollbar { display: none; }
    .spectrum-track { animation: none; }
    .hero-rise { opacity: 1; transform: none; }
}
