/* Články magazínu Story is Mine — všetko pod .mg; každý článok má vlastnú farebnosť (.mg--<id>) a scénu (.mg--<kind>) */
.mg {
  --bg: #f7f2e8;
  --ink: #171310;
  --dim: #6c6157;
  --acc: #b8923a;
  --line: #ded3c0;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  overflow-x: clip;
}
.mg--kava { --bg: #f4ecdf; --acc: #8a5530; --line: #dfd0b8; }
.mg--modra { --bg: #f1f4f7; --acc: #1f4e9c; --line: #d2dbe6; --dim: #5b6470; }
.mg--ruzova-historia { --bg: #fbf1ee; --acc: #c2185b; --line: #edd5cf; --dim: #74605c; }
.mg--ruzova-priroda { --bg: #fbf0f1; --acc: #a8327e; --line: #eed3d8; --dim: #74605f; }
.mg--zrkadlo { --bg: #eef0f1; --acc: #5d6b73; --line: #d5dadd; --dim: #5d6468; }
.mg--valentin { --bg: #f7edea; --acc: #a8324a; --line: #e8d3ce; --dim: #6f5f5c; }

body { margin: 0; background: #f7f2e8; }
:where(.mg) * { box-sizing: border-box; }
:where(.mg) :is(h1, h2, h3, p, ul, ol, figure) { margin: 0; padding: 0; }
:where(.mg) :is(ul, ol) { list-style: none; }
:where(.mg) img { display: block; max-width: 100%; height: auto; }
:where(.mg) a { color: inherit; }
.mg :focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }
.mg-kicker, .mg-step__k { font: 500 .76rem/1.3 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--acc); }
.mg-btn { display: inline-flex; align-items: center; min-height: 46px; padding: 0 1.5rem; border: 1px solid currentColor; font: 500 .8rem var(--sans); letter-spacing: .16em; text-transform: uppercase; text-decoration: none; transition: background .2s, color .2s; }
.mg-btn:hover { background: var(--ink); color: var(--bg); }

/* priebeh + hlavička */
.mg-progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 10; }
.mg-progress i { display: block; height: 100%; background: var(--acc); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.mg-bar { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .2rem 1rem; padding: .8rem var(--gutter); border-bottom: 1px solid var(--line); }
.mg-bar__logo img { width: 7.5rem; }
.mg-bar__back { grid-row: 2; display: inline-flex; align-items: center; min-height: 44px; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; color: var(--dim); }
.mg-bar__back:hover { color: var(--ink); }
.mg-lang { display: flex; justify-self: end; }
.mg-lang a { display: grid; place-items: center; min-width: 44px; min-height: 44px; font-size: .78rem; letter-spacing: .14em; text-decoration: none; color: var(--dim); }
.mg-lang a[aria-current] { color: var(--ink); font-weight: 600; }
@media (min-width: 700px) { .mg-bar { grid-template-columns: 1fr auto 1fr; } .mg-bar__back { grid-row: auto; } }

/* úvod */
.mg-hero { display: grid; gap: 2rem; padding: clamp(2rem, 6vw, 4rem) var(--gutter) 0; max-width: 1240px; margin-inline: auto; }
.mg-hero__text { display: grid; gap: 1.1rem; align-content: center; }
.mg-hero h1 { font: 600 clamp(2.5rem, 8.4vw, 4.6rem)/.98 var(--serif); letter-spacing: -.015em; text-wrap: balance; }
.mg-hero__sub { font: italic 500 clamp(1.3rem, 3.6vw, 1.7rem)/1.25 var(--serif); color: var(--acc); text-wrap: balance; }
.mg-hero__lead { max-width: 36rem; color: var(--dim); font-size: 1.12rem; }
.mg-hero__img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.mg-hero__img figcaption { margin-top: .4rem; font-size: .76rem; color: var(--dim); }
@media (min-width: 900px) { .mg-hero { grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem); } .mg-hero__img img { aspect-ratio: 4 / 5; max-height: 76svh; } }
.mg-intro, .mg-outro { display: grid; gap: 1.1rem; width: min(40rem, 100% - 2 * var(--gutter)); margin: clamp(2.5rem, 7vw, 4.5rem) auto 0; font-size: 1.1rem; }
.mg-outro { margin-bottom: clamp(1rem, 3vw, 2rem); font: 500 clamp(1.35rem, 3.4vw, 1.7rem)/1.4 var(--serif); }
.mg-outro p:first-child::before { content: ""; display: block; width: 3rem; height: 2px; margin-bottom: 1.6rem; background: var(--acc); }

/* scrollová časť: bez JS obyčajný článok, s JS lepkavá scéna + kroky */
.mg-scroll { position: relative; margin-top: clamp(2.5rem, 7vw, 4.5rem); background: var(--tone, transparent); color: var(--tink, inherit); transition: background-color .7s, color .5s; }
.mg-stage { display: none; }
.mg-steps { width: min(38rem, 100% - 2 * var(--gutter)); margin-inline: auto; }
.mg-step { display: grid; gap: .9rem; align-content: center; padding-block: 2rem; }
.mg-step h2 { font: 600 clamp(2rem, 6vw, 3rem)/1.02 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
.mg-step__parts { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-top: .3rem; font-size: .84rem; color: var(--dim); }
.mg-step__parts li, .mg-cup__legend li { display: flex; align-items: center; gap: .5rem; }
.mg-step__parts li::before, .mg-cup__legend li::before { content: ""; width: .8rem; height: .8rem; border-radius: 50%; background: var(--t); border: 1px solid rgba(0, 0, 0, .18); flex: none; }
[data-tone="espresso"] { --t: #3a2213; }
[data-tone="water"] { --t: #c8a878; }
[data-tone="milk"] { --t: #e9d6b8; }
[data-tone="foam"] { --t: #fffaf0; }
[data-tone="chocolate"] { --t: #5e2f1b; }
[data-tone="cream"] { --t: #fff8e8; }
[data-tone="ice"] { --t: #cfe5ec; }
[data-tone="alcohol"] { --t: #c98b2c; }
/* farebné články bez JS: každý krok nesie svoj odtieň sám */
.mg--colour .mg-step { margin-inline: calc(-1 * var(--gutter)); padding: 2.6rem var(--gutter); background: var(--tone); color: var(--tink); }
.mg--colour .mg-step__k { color: inherit; opacity: .75; }

.mg-js .mg-stage { display: grid; place-items: center; position: sticky; top: 0; z-index: 2; height: 44svh; padding: 1rem var(--gutter); background: var(--tone, var(--bg)); border-bottom: 1px solid color-mix(in srgb, currentColor 14%, transparent); transition: background-color .7s; }
.mg-js .mg-steps { padding-block: 6svh 22svh; }
.mg-js .mg-step { min-height: 52svh; opacity: .25; transition: opacity .45s; }
.mg-js .mg-step.is-on { opacity: 1; }
.mg-js.mg--colour .mg-step { margin-inline: 0; padding-inline: 0; background: none; color: inherit; }
.mg-js.mg--coffee .mg-step { min-height: 44svh; }
.mg-js .mg-step__parts { display: none; }
@media (min-width: 900px) {
  .mg-js .mg-scroll { display: grid; grid-template-columns: 1fr 1fr; }
  .mg-js .mg-stage { height: 100svh; border-bottom: 0; }
  .mg-js .mg-steps { width: min(34rem, 100% - 2 * var(--gutter)); padding-block: 18svh 30svh; }
  .mg-js .mg-step { min-height: 74svh; }
  .mg-js.mg--coffee .mg-step { min-height: 56svh; }
}

/* rok */
.mg-ring { position: relative; height: 100%; max-height: 30rem; aspect-ratio: 1; display: grid; place-items: center; }
.mg-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mg-ring__seg { fill: none; stroke: var(--line); stroke-width: 12; transition: stroke .5s, stroke-width .4s; }
.mg-ring__seg.is-done { stroke: var(--acc); }
.mg-ring__seg.is-on { stroke: var(--ink); stroke-width: 24; }
.mg-ring__c { display: grid; justify-items: center; text-align: center; }
.mg-ring__c b { font: 600 clamp(3.4rem, 15svh, 8rem)/.85 var(--serif); }
.mg-ring__c span { font: 500 .82rem var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--acc); margin-top: 1.1rem; }
.mg-ring__c small { font-size: .74rem; letter-spacing: .14em; color: var(--dim); margin-top: .3rem; }

/* káva */
.mg-cupwrap { height: 100%; width: 100%; max-width: 30rem; display: grid; grid-template: "name name" auto "cup legend" minmax(0, 1fr) "note note" auto / auto 1fr; gap: 1rem 1.4rem; align-items: center; align-content: center; justify-content: center; }
.mg-cup__name { grid-area: name; text-align: center; font: 600 clamp(1.5rem, 4.5svh, 2.6rem)/1 var(--serif); }
.mg-cup { grid-area: cup; height: 100%; max-height: 22rem; aspect-ratio: 5 / 8; justify-self: end; display: flex; align-items: flex-end; border: 3px solid color-mix(in srgb, var(--ink) 55%, transparent); border-top: 0; border-radius: 0 0 1.6rem 1.6rem; overflow: hidden; }
.mg-cup__fill { width: 100%; height: 90%; display: flex; flex-direction: column-reverse; transition: height .7s cubic-bezier(.3, .8, .3, 1); }
.mg-cup__fill i { flex: 0 0 0; background: var(--t, transparent); transition: flex-grow .7s cubic-bezier(.3, .8, .3, 1), background-color .5s; }
.mg-cup__fill i[data-tone="ice"] { background-image: linear-gradient(135deg, rgba(255, 255, 255, .7) 25%, transparent 25% 50%, rgba(255, 255, 255, .7) 50% 75%, transparent 75%); background-size: 1.6rem 1.6rem; }
.mg-cup__legend { grid-area: legend; display: grid; gap: .5rem; align-content: center; font-size: .92rem; }
.mg-cup__note { grid-area: note; text-align: center; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }

/* farba */
.mg-chipwrap { height: 100%; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 1rem; justify-items: center; align-items: center; }
.mg-chip { height: 100%; max-height: 24rem; aspect-ratio: 3 / 4; display: grid; grid-template-rows: 1fr auto; padding: .6rem .6rem 0; background: #fff; color: #1a1410; box-shadow: 0 1.2rem 2.8rem rgba(0, 0, 0, .22); transform: rotate(-3deg); }
.mg-chip i { background: var(--tone); transition: background-color .7s; }
.mg-chip p { display: grid; gap: .1rem; padding: .7rem .3rem .8rem; }
.mg-chip small { font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: #8a8079; }
.mg-chip b { font: 600 clamp(1.3rem, 4svh, 2rem)/1 var(--sans); letter-spacing: .04em; }
.mg-chip span { font-size: .74rem; letter-spacing: .12em; color: #8a8079; }
.mg-dots { display: flex; gap: .5rem; }
.mg-dots li { width: 1rem; height: 1rem; border-radius: 50%; background: var(--c); border: 2px solid rgba(255, 255, 255, .85); box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); transition: transform .3s; }
.mg-dots li.is-on { transform: scale(1.5); }
.mg-js.mg--colour .mg-step.is-on ~ .mg-step, .mg-js.mg--colour .mg-step { opacity: .22; }
.mg-js.mg--colour .mg-step.is-on { opacity: 1; }

/* esej */
.mg-say { position: relative; width: 100%; height: 100%; display: grid; align-content: center; justify-items: center; gap: .6rem; text-align: center; }
.mg-say__h, .mg-say__r { max-width: 13ch; font: 600 clamp(1.8rem, min(7.4svh, 10vw), 4.6rem)/1 var(--serif); letter-spacing: -.015em; text-wrap: balance; }
.mg-say__h.is-in { animation: mg-in .7s both; }
.mg-say small { font-size: .74rem; letter-spacing: .16em; color: var(--dim); margin-top: .6rem; }
@keyframes mg-in { from { opacity: 0; transform: translateY(.5em); } }
.mg-say--mirror .mg-say__h { padding-bottom: .5rem; border-bottom: 1px solid color-mix(in srgb, var(--ink) 35%, transparent); }
.mg-say--mirror .mg-say__r { transform: scaleY(-1); opacity: .34; filter: blur(.6px); -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 85%); mask-image: linear-gradient(to top, #000 10%, transparent 85%); }
.mg-say--mirror small { position: absolute; bottom: .4rem; }
.mg-duo { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.mg-duo i { grid-area: 1 / 1; width: min(42%, 19rem); aspect-ratio: 1; border-radius: 50%; mix-blend-mode: multiply; transition: transform 1s cubic-bezier(.3, .8, .3, 1); }
.mg-duo i:first-child { background: #e9a9b4; transform: translateX(calc((1 - var(--p, 0)) * -55%)); }
.mg-duo i:last-child { background: #a9bfe0; transform: translateX(calc((1 - var(--p, 0)) * 55%)); }
.mg-say--duo .mg-say__h, .mg-say--duo small { position: relative; }

/* zdroje, ďalšie čítanie, pätička */
.mg-sources { width: min(40rem, 100% - 2 * var(--gutter)); margin: clamp(3rem, 8vw, 5rem) auto 0; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.mg-sources h2 { font: 500 .76rem var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--acc); margin-bottom: .9rem; }
.mg-sources ul { display: grid; gap: .5rem; font-size: .84rem; color: var(--dim); }
.mg-sources a { text-underline-offset: 3px; overflow-wrap: anywhere; }
.mg-more { width: min(1160px, 100% - 2 * var(--gutter)); margin: clamp(4rem, 10vw, 7rem) auto; display: grid; gap: 1.8rem; }
.mg-more h2 { font: 600 clamp(2.2rem, 6vw, 3.4rem)/1 var(--serif); }
.mg-more ul { display: grid; gap: 1.6rem 1rem; grid-template-columns: repeat(2, 1fr); }
.mg-more li:last-child { display: none; }
.mg-more a { display: grid; gap: .7rem; text-decoration: none; }
.mg-more img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: opacity .3s; }
.mg-more a:hover img { opacity: .86; }
.mg-more h3 { font: 600 clamp(1.25rem, 3.4vw, 1.7rem)/1.12 var(--serif); }
.mg-more p { text-align: center; }
@media (min-width: 760px) { .mg-more ul { grid-template-columns: repeat(3, 1fr); gap: 1.6rem; } .mg-more li:last-child { display: block; } }
.mg-foot { padding: 1.6rem var(--gutter) 2.2rem; background: var(--ink); color: #9d9284; font-size: .8rem; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .mg * { transition: none !important; animation: none !important; }
}

/* doladenie */
.mg-js.mg--essay .mg-step h2 { font-size: clamp(1.4rem, 3.6vw, 1.8rem); color: var(--acc); }
@media (min-width: 900px) { .mg-cupwrap { grid-template-rows: auto minmax(0, 22rem) auto; } }
.mg-js.mg--colour .mg-stage { padding-top: 1.6rem; }
.mg-foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 1.6rem; margin-bottom: .8rem; }
.mg-foot nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; color: #cfc4b3; }

/* jednoduché články (kind plain) */
.mg--plain { --bg: #f6efe6; --acc: #a47a2c; --line: #dfd2be; }
.mg-plain { width: min(40rem, 100% - 2 * var(--gutter)); margin: clamp(2.5rem, 7vw, 4.5rem) auto 0; display: grid; gap: clamp(2rem, 5vw, 3rem); }
.mg-plain section { display: grid; gap: 1rem; padding-top: clamp(1.6rem, 4vw, 2.2rem); border-top: 1px solid var(--line); }
.mg-plain h2 { font: 600 clamp(1.8rem, 5vw, 2.5rem)/1.05 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
.mg-plain p { font-size: 1.08rem; }
.mg-story { width: min(40rem, 100% - 2 * var(--gutter)); margin: clamp(2.5rem, 6vw, 4rem) auto 0; }
.mg-story a { display: grid; gap: .3rem; padding: 1.3rem 1.4rem; border: 1px solid var(--acc); text-decoration: none; transition: background .2s; }
.mg-story a:hover { background: color-mix(in srgb, var(--acc) 12%, transparent); }
.mg-story small { font: 500 .72rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--acc); }
.mg-story strong { font: 600 clamp(1.5rem, 4vw, 2rem)/1.1 var(--serif); }
