/* =========================================================
   DEMO: Palarnia Ziarno
   Kolor strony zmienia się razem z pochodzeniem kawy
   ========================================================= */
:root {
  --abg: #24150F;
  --afg: #F3D9B1;
  --accent: #E9A23B;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Schibsted Grotesk", system-ui, sans-serif;
  --pad: clamp(20px, 4.5vw, 72px);
  --cursor-bg: #E9A23B; --cursor-fg: #24150F;
}
body {
  background: var(--abg); color: var(--afg);
  font-family: var(--sans); font-size: 17px; line-height: 1.55; overflow-x: hidden;
  transition: background-color 1s var(--ease-out), color 1s var(--ease-out);
}
h1, h2, h3 { font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 800; line-height: .88; letter-spacing: -.03em; }
h2 { font-size: clamp(48px, 7.5vw, 128px); }

.a-btn {
  display: inline-flex; align-items: center; justify-content: center; height: 52px; padding: 0 26px; border-radius: 99px;
  background: var(--accent); color: #24150F; font-weight: 600; font-size: 15px; text-decoration: none;
  transition: background .3s, color .3s, transform .6s var(--ease-out);
}
.a-btn:hover { background: var(--afg); }
.a-btn--line { background: transparent; color: var(--afg); border: 1.5px solid currentColor; }
.a-btn--line:hover { background: var(--afg); color: var(--abg); }
.a-btn--line.is-added { background: var(--afg); color: var(--abg); }
.a-btn--full { width: 100%; height: 58px; }

/* Nawigacja */
.a-nav { position: fixed; z-index: 300; top: 18px; left: var(--pad); right: var(--pad); display: flex; align-items: center; gap: 30px; mix-blend-mode: normal; }
.a-logo { font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 800; font-size: 30px; letter-spacing: -.04em; text-decoration: none; margin-right: auto; }
.a-logo sup { font-family: var(--sans); font-size: 11px; font-weight: 500; vertical-align: top; }
.a-nav nav { display: flex; gap: 6px; padding: 5px; border-radius: 99px; background: color-mix(in srgb, var(--abg) 70%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.a-nav nav a { padding: 9px 16px; border-radius: 99px; text-decoration: none; font-size: 14px; font-weight: 500; transition: background .3s; }
.a-nav nav a:hover { background: color-mix(in srgb, var(--afg) 14%, transparent); }
.a-cart-btn { display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 8px 0 20px; border-radius: 99px; background: var(--afg); color: var(--abg); font-weight: 600; font-size: 14px; transition: background 1s, color 1s; }
.a-cart-count { display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: #24150F; font-variant-numeric: tabular-nums; }
.a-cart-count.pop { animation: pop .6s var(--ease-out); }
@keyframes pop { 30% { transform: scale(1.5); } }

/* Hero */
.a-hero { position: relative; min-height: 100svh; padding: 130px var(--pad) 40px; display: grid; grid-template-rows: 1fr auto; overflow: hidden; }
.a-hero__title { position: relative; z-index: 3; font-size: clamp(72px, 13.5vw, 240px); line-height: .82; align-self: center; }
.a-hero__title > span { display: block; }
.a-hero__title > span:nth-child(2) { padding-left: 1.1em; font-style: italic; font-weight: 400; color: var(--accent); }
.a-disc-wrap { position: absolute; z-index: 1; right: -6vw; top: 50%; width: min(52vw, 760px); aspect-ratio: 1; translate: 0 -50%; }
.a-disc {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden; background: #3a2418;
  box-shadow: 0 60px 120px -40px rgba(0,0,0,.7);
  transform: scale(var(--ds, .6)) rotate(var(--dr, 0deg)); opacity: var(--do, 0);
  transition: opacity 1.2s ease;
}
.a-steam { position: absolute; left: 50%; bottom: 46%; width: 26%; translate: -50% 0; z-index: 2; fill: none; stroke: #fff; stroke-width: 7; stroke-linecap: round; filter: blur(7px); opacity: .55; pointer-events: none; }
.a-steam path { stroke-dasharray: 120 400; animation: steam 4.2s ease-in-out infinite; opacity: 0; }
.a-steam path:nth-child(2) { animation-delay: -1.4s; } .a-steam path:nth-child(3) { animation-delay: -2.8s; }
@keyframes steam { 0% { stroke-dashoffset: 0; opacity: 0; transform: translateY(20px); } 25% { opacity: .9; } 100% { stroke-dashoffset: -420; opacity: 0; transform: translateY(-40px); } }
.is-ready .a-disc { --do: 1; }
.a-disc img { width: 100%; height: 100%; object-fit: cover; scale: 1.15; }
.a-hero__foot { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; flex-wrap: wrap; }
.a-hero__foot p { max-width: 34ch; opacity: .85; }
.a-badge { position: absolute; z-index: 3; width: 150px; left: 52%; bottom: 9vh; fill: var(--afg); font-size: 15px; letter-spacing: .12em; text-transform: uppercase; animation: spin 18s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Ziarno filmowe */
.a-grain { position: fixed; inset: -50%; z-index: 9999; pointer-events: none; opacity: .07; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); animation: grain .6s steps(4) infinite; }
@keyframes grain { 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-1%, 3%); } }
.in-frame .a-grain { display: none; }

/* Ticker */
.a-ticker { background: var(--accent); color: #24150F; padding: 16px 0; font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 700; font-size: clamp(26px, 3vw, 44px); letter-spacing: -.02em; }
.a-ticker .marquee__track { align-items: center; }
.a-ticker span { padding: 0 .6em; }
.a-ticker b { font-size: .4em; }

/* Pochodzenie */
.a-origins { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--pad); padding: 0 var(--pad); }
.a-origins__sticky { position: sticky; top: 0; height: 100svh; display: grid; place-items: center; align-content: center; gap: 30px; }
.a-bag { width: min(34vw, 460px); aspect-ratio: 4 / 5; border-radius: 26px; overflow: hidden; background: rgba(0,0,0,.2); transform: rotate(var(--br, -4deg)); transition: transform 1s var(--ease-out); box-shadow: 0 40px 80px -30px rgba(0,0,0,.6); }
.a-bag img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.25); }
.a-origins__name { font-family: var(--serif); font-variation-settings: "SOFT" 100; font-style: italic; font-size: clamp(40px, 5vw, 80px); line-height: 1; }
.a-origins__name.swap { animation: nameIn .8s var(--ease-out); }
@keyframes nameIn { from { opacity: 0; transform: translateY(30px); filter: blur(6px); } }
.a-origins__list { padding: 22vh 0 10vh; }
.a-origins__h { margin-bottom: 18vh; }
.origin { min-height: 88svh; display: flex; flex-direction: column; justify-content: center; }
.origin__region { font-size: 15px; opacity: .75; margin-bottom: 14px; }
.origin h3 { font-size: clamp(54px, 6vw, 100px); margin-bottom: 26px; }
.origin__notes { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin-bottom: 36px; }
.origin__notes li { padding: 8px 16px; border-radius: 99px; background: color-mix(in srgb, var(--afg) 14%, transparent); font-size: 15px; }
.origin__meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 22px 0; border-block: 1px solid color-mix(in srgb, var(--afg) 25%, transparent); margin-bottom: 30px; }
.origin__meta dt { font-size: 13px; opacity: .65; }
.origin__meta dd { font-weight: 500; font-variant-numeric: tabular-nums; }
.origin__buy { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.origin__price { font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 700; font-size: 40px; letter-spacing: -.02em; }
.origin__price small { font-family: var(--sans); font-size: 14px; font-weight: 400; opacity: .7; letter-spacing: 0; }

/* Quiz */
.a-quiz { padding: clamp(100px, 12vw, 170px) var(--pad); display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(30px, 6vw, 100px); align-items: center; }
.a-quiz__head h2 { font-size: clamp(44px, 5.6vw, 96px); margin-bottom: 24px; }
.a-quiz__head p { opacity: .8; max-width: 36ch; }
.a-quiz__box { position: relative; min-height: 460px; padding: clamp(26px, 3.4vw, 50px); border-radius: 30px; background: color-mix(in srgb, var(--afg) 8%, transparent); border: 1px solid color-mix(in srgb, var(--afg) 18%, transparent); overflow: hidden; }
.a-quiz__bar { position: absolute; left: 0; right: 0; top: 0; height: 4px; background: color-mix(in srgb, var(--afg) 12%, transparent); }
.a-quiz__bar i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(var(--qp, 0)); transition: transform .8s var(--ease-out); }
.a-q { position: absolute; inset: clamp(26px, 3.4vw, 50px); opacity: 0; transform: translateX(60px); pointer-events: none; transition: opacity .5s, transform .8s var(--ease-out); }
.a-q.is-on { opacity: 1; transform: none; pointer-events: auto; transition-delay: .2s; }
.a-q.is-gone { transform: translateX(-60px); }
.a-q__n { font-size: 14px; opacity: .65; margin-bottom: 14px; }
.a-q h3 { font-size: clamp(32px, 3.2vw, 52px); margin-bottom: 30px; }
.a-q__opts { display: grid; gap: 10px; }
.a-q__opts button { text-align: left; padding: 18px 22px; border-radius: 16px; border: 1.5px solid color-mix(in srgb, var(--afg) 25%, transparent); font-size: 17px; font-weight: 500; transition: background .3s, color .3s, border-color .3s, transform .5s var(--ease-out); }
.a-q__opts button:hover { background: var(--afg); color: var(--abg); border-color: var(--afg); transform: translateX(8px); }
.a-result__name { font-size: clamp(46px, 5vw, 84px) !important; color: var(--accent); }
.a-result__why { max-width: 40ch; opacity: .85; margin-bottom: 30px; }
.a-result__actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.a-result__again { text-decoration: underline; font-size: 15px; }

/* Menu */
.a-menu { display: grid; grid-template-columns: 1fr 1fr; gap: var(--pad); padding: clamp(100px, 12vw, 180px) var(--pad); align-items: center; }
.a-menu__img { aspect-ratio: 4 / 5; border-radius: 28px; overflow: hidden; }
.a-menu__img img { width: 100%; height: 118%; object-fit: cover; }
.a-menu__body h2 { margin-bottom: 50px; }
.a-menu__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.a-menu h3 { font-size: 30px; font-style: italic; font-weight: 400; margin-bottom: 18px; }
.a-prices { list-style: none; }
.a-prices li { display: flex; align-items: baseline; gap: 10px; padding: 10px 0; }
.a-prices i { flex: 1; border-bottom: 1.5px dotted color-mix(in srgb, var(--afg) 40%, transparent); }
.a-prices b { font-family: var(--serif); font-size: 22px; font-variant-numeric: tabular-nums; }
.a-menu__note { margin-top: 30px; opacity: .7; font-size: 15px; }

/* Pasek zdjęć */
.a-strip { overflow: hidden; padding: 20px 0 clamp(100px, 12vw, 180px); }
.a-strip__track { display: flex; gap: 18px; width: max-content; will-change: transform; }
.a-strip img { width: clamp(220px, 26vw, 400px); aspect-ratio: 3 / 4; object-fit: cover; border-radius: 20px; background: rgba(0,0,0,.2); }
.a-strip img:nth-child(even) { aspect-ratio: 1; align-self: center; }

/* Wizyta */
.a-visit { padding: 0 var(--pad) 150px; }
.a-visit__big { font-size: clamp(64px, 13vw, 230px); line-height: .82; margin-bottom: 70px; }
.a-visit__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; border-top: 1.5px solid var(--afg); padding-top: 26px; }
.a-visit h3 { font-size: 26px; font-style: italic; font-weight: 400; margin-bottom: 8px; }

/* Koszyk */
.cart { position: fixed; z-index: 7000; top: 12px; right: 12px; bottom: 12px; width: min(440px, calc(100vw - 24px)); display: flex; flex-direction: column; border-radius: 26px; background: #F7EBDD; color: #24150F; padding: 26px; transform: translateX(calc(100% + 30px)); transition: transform .8s var(--ease-io); overflow: auto; overscroll-behavior: contain; }
.cart.is-open { transform: none; }
.cart-shade { position: fixed; inset: 0; z-index: 6900; background: rgba(20,10,5,.45); opacity: 0; visibility: hidden; transition: opacity .6s, visibility .6s; }
.cart.is-open + .cart-shade { opacity: 1; visibility: visible; }
.cart__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.cart__head h2 { font-size: 40px; }
.cart__close { width: 44px; height: 44px; border-radius: 50%; font-size: 26px; }
.cart__close:hover { background: rgba(36,21,15,.08); }
.cart__ship { padding: 16px; border-radius: 16px; background: rgba(36,21,15,.06); font-size: 14px; }
.cart__bar { height: 6px; border-radius: 9px; background: rgba(36,21,15,.12); margin-top: 10px; overflow: hidden; }
.cart__bar i { display: block; height: 100%; width: 100%; background: #2F7A3B; transform-origin: 0 50%; transform: scaleX(var(--sp, 0)); transition: transform .8s var(--ease-out); border-radius: 9px; }
.cart__items { list-style: none; margin: 18px 0; flex: 1; }
.cart__item { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; padding: 16px 0; border-bottom: 1px solid rgba(36,21,15,.12); animation: itemIn .6s var(--ease-out); }
@keyframes itemIn { from { opacity: 0; transform: translateX(30px); } }
.cart__item h3 { font-family: var(--sans); font-weight: 600; font-size: 16px; letter-spacing: 0; line-height: 1.3; font-variation-settings: normal; }
.cart__item b { font-variant-numeric: tabular-nums; }
.qty { display: inline-flex; align-items: center; border: 1px solid rgba(36,21,15,.25); border-radius: 99px; width: fit-content; }
.qty button { width: 34px; height: 34px; border-radius: 50%; font-size: 18px; }
.qty button:hover { background: rgba(36,21,15,.08); }
.qty span { min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.cart__rm { font-size: 13px; text-decoration: underline; justify-self: end; opacity: .7; }
.cart__empty { margin: 30px 0; opacity: .7; }
.cart__foot p { display: flex; justify-content: space-between; font-size: 18px; margin-bottom: 14px; }
.cart__foot b { font-family: var(--serif); font-size: 28px; }

@media (max-width: 900px) {
  .a-nav nav { display: none; }
  .a-badge { left: auto; right: 6vw; bottom: 22vh; width: 110px; }
  .a-origins { grid-template-columns: 1fr; }
  .a-origins__sticky { display: none; }
  .a-origins__list { padding-top: 100px; }
  .a-origins__h { margin-bottom: 10vh; }
  .origin { min-height: 0; padding: 60px 0; }
  .origin__meta { grid-template-columns: 1fr 1fr; }
  .a-menu, .a-quiz { grid-template-columns: 1fr; }
  .a-quiz__box { min-height: 430px; }
  .a-disc-wrap { width: 86vw; right: -30vw; top: 42%; }
  .a-menu__cols { grid-template-columns: 1fr; }
  .a-visit__grid { grid-template-columns: 1fr; }
}
