/* Pick my brew (Recept zame): the game in a black band with lime choices, the recipes as square cards that
   open in place, and the same recipe cards on the front page and beside the coffees in the shop. */

/* The game's link in the header */
.links .brew-link { background: var(--lime); color: #000000; }
.links .brew-link:hover, .links .brew-link[aria-current="page"] { background: #000000; color: #ffffff; }
.more .brew-link { text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 6px; text-underline-offset: 6px; }

/* Opening */
.brew-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px clamp(32px, 5vw, 88px); align-items: center;
  padding-top: clamp(20px, 4vw, 64px); }
.brew-hero .lead { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.45; max-width: 30em; margin: 24px 0 28px; }
.brew-note { margin-top: 16px; font-size: 15px; }
.brew-mosaic { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-bottom: 32px; }
.brew-mosaic img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--round); background: var(--soft); }
.brew-mosaic li:nth-child(even) { transform: translateY(32px); }
@media (max-width: 900px) {
  .brew-hero { grid-template-columns: minmax(0, 1fr); }
  .brew-mosaic { order: -1; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding-bottom: 12px; }
  .brew-mosaic li:nth-child(even) { transform: translateY(12px); }
}

/* The game */
.quiz { background: #000000; color: #ffffff; margin-top: var(--space); padding-block: clamp(36px, 6vw, 96px); scroll-margin-top: 0;
  --ink-2: #b9b9b9; --hairline: #333333; --soft: #161616; }
.quiz[hidden] { display: none; }
.quiz :focus-visible { outline-color: #ffffff; }
.quiz a { color: #ffffff; }
.quiz-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; }
.quiz-back { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; color: #ffffff; font-weight: 700; font-size: 16px; cursor: pointer; }
.quiz-back[hidden] { display: inline-flex; visibility: hidden; }
.quiz-back:hover { color: var(--lime); }
.quiz-count { margin-left: auto; font-weight: 600; color: #b9b9b9; }
.quiz-bar { height: 8px; margin: 12px 0 clamp(28px, 4vw, 56px); background: #2a2a2a; border-radius: var(--control-round); overflow: hidden; }
.quiz-bar span { display: block; width: 0; height: 100%; background: var(--lime); transition: width .45s var(--ease); }
.step { min-width: 0; margin: 0; padding: 0; border: 0; }
.step[hidden] { display: none; }
.step legend { max-width: 14em; padding: 0; margin-bottom: clamp(24px, 3.4vw, 48px); font: 800 clamp(42px, 6.6vw, 108px)/.9 var(--display);
  letter-spacing: -.04em; text-wrap: balance; outline: none; }
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.opt { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 8px; min-height: clamp(112px, 12vw, 168px);
  padding: 20px 22px; border: 3px solid #ffffff; border-radius: var(--round); background: transparent; color: #ffffff; text-align: left; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .25s var(--ease); animation: opt-in .45s var(--ease) both; }
.opt:nth-child(2) { animation-delay: .05s; }
.opt:nth-child(3) { animation-delay: .1s; }
.opt:nth-child(4) { animation-delay: .15s; }
.opt:nth-child(5) { animation-delay: .2s; }
.opt:nth-child(6) { animation-delay: .25s; }
.opt b { font: 800 clamp(24px, 2.4vw, 34px)/1 var(--display); letter-spacing: -.02em; }
.opt span { font-size: 16px; color: #c9c9c9; }
.opt:hover, .opt[aria-pressed="true"] { background: var(--lime); border-color: var(--lime); color: #000000; transform: translateY(-3px); }
.opt:hover span, .opt[aria-pressed="true"] span { color: #000000; }
.opt:focus-visible { outline: 3px solid #ffffff; outline-offset: 3px; }
@keyframes opt-in { from { opacity: 0; transform: translateY(16px); } }
@media (max-width: 600px) { .opt { min-height: 84px; padding: 16px 18px; } }

.mixing { padding: clamp(40px, 8vw, 120px) 0; text-align: center; }
.mixing[hidden] { display: none; }
.slot { min-height: 1.1em; font: 800 clamp(38px, 6.4vw, 104px)/1 var(--display); letter-spacing: -.04em; color: var(--lime); }
.mixing-words { margin-top: 18px; font-weight: 600; color: #b9b9b9; }

.result { outline: none; animation: opt-in .5s var(--ease) both; }
.result[hidden] { display: none; }
.result-kicker { display: inline-block; margin-bottom: 24px; padding: 6px 12px; border-radius: var(--control-round); background: var(--lime); color: #000000; font-weight: 700; }
.result-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 32px clamp(32px, 5vw, 88px); align-items: start; }
.res-pic { position: sticky; top: 24px; }
.res-pic img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--round); }
.res-copy h2 { margin-bottom: 16px; font-size: clamp(44px, 6vw, 100px); line-height: .88; letter-spacing: -.04em; }
.res-copy .r-hook { display: block; font-size: clamp(18px, 1.5vw, 22px); color: #dcdcdc; }
.result-actions { margin-top: 36px; }
.quiz .btn { background: #ffffff; color: #000000; border-color: #ffffff; }
.quiz .btn.quiet { background: transparent; color: #ffffff; }
.quiz .btn:hover, .quiz .btn.quiet:hover { background: var(--lime); color: #000000; border-color: var(--lime); }
.result-also { margin: clamp(44px, 5vw, 72px) 0 14px; font: 700 18px/1.3 var(--text); letter-spacing: 0; }
.result-alts { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.result-alts button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px; border: 2px solid #3a3a3a; border-radius: var(--round);
  background: transparent; color: #ffffff; text-align: left; cursor: pointer; transition: border-color .15s; }
.result-alts button:hover { border-color: var(--lime); }
.result-alts img { flex: none; width: 72px; height: 72px; object-fit: cover; border-radius: 4px; }
.result-alts b { display: block; font: 800 20px/1.05 var(--display); letter-spacing: -.01em; }
.result-alts small { display: block; margin-top: 4px; font-size: 14px; color: #b9b9b9; }
@media (max-width: 900px) {
  .result-main { grid-template-columns: minmax(0, 1fr); }
  .res-pic { position: static; }
  .result-alts { grid-template-columns: minmax(0, 1fr); }
}

/* A recipe: the same parts in the list and in the game's result */
.r-meta { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.r-meta li { padding: 3px 10px; border: 2px solid currentColor; border-radius: var(--control-round); font-size: 13px; font-weight: 700; }
.r-body { padding-top: 26px; }
.r-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px clamp(24px, 4vw, 56px); }
.r-body h4 { margin: 0 0 10px; padding-top: 10px; border-top: 3px solid currentColor; font: 700 15px/1.3 var(--text); }
.r-ing { list-style: none; padding: 0; }
.r-ing li { padding: 8px 0; border-bottom: 1px solid var(--hairline); font-size: 16px; }
.r-steps { list-style: none; padding: 0; counter-reset: step; }
.r-steps li { position: relative; padding: 8px 0 8px 44px; counter-increment: step; font-size: 16px; line-height: 1.5; }
.r-steps li::before { content: counter(step); position: absolute; left: 0; top: 7px; display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 4px; background: var(--lime); color: #000000; font: 800 16px/1 var(--display); }
.r-tip { margin-top: 24px; padding: 14px 16px; border-left: 6px solid var(--lime); background: var(--soft); font-size: 16px; }
.r-decaf { margin-top: 10px; font-size: 15px; color: var(--ink-2); }
.r-shop { margin-top: 26px; }
.r-shop ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 10px; padding: 0; }
.r-shop a { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px; border: 2px solid currentColor; border-radius: var(--round);
  color: inherit; text-decoration: none; transition: background-color .15s, color .15s, border-color .15s; }
.r-shop img { flex: none; width: 52px; height: 52px; object-fit: cover; border-radius: 4px; }
.r-shop b { display: block; font-size: 15px; line-height: 1.2; }
.r-shop .price { font-size: 14px; color: var(--ink-2); }
.r-shop a:hover { background: var(--lime); border-color: var(--lime); color: #000000; }
.r-shop a:hover .price { color: #000000; }
@media (max-width: 700px) { .r-cols { grid-template-columns: minmax(0, 1fr); } }

/* The list of recipes */
.r-filters { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 24px; }
.r-filters[hidden] { display: none; }
.r-filters button { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 2px solid var(--ink); border-radius: var(--control-round);
  background: transparent; color: var(--ink); font: 700 15px/1 var(--text); cursor: pointer; transition: background-color .15s, color .15s; }
.r-filters button:hover { background: var(--lime); }
.r-filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.r-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: clamp(32px, 3.4vw, 52px) clamp(14px, 2vw, 28px); }
.recipe { min-width: 0; scroll-margin-top: 16px; }
.recipe[hidden] { display: none; }
.recipe summary { display: block; list-style: none; cursor: pointer; }
.recipe summary::-webkit-details-marker { display: none; }
.recipe summary:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.r-pic { display: block; overflow: hidden; border-radius: var(--round); background: var(--soft); }
.r-pic img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform .8s var(--ease); }
.recipe summary:hover .r-pic img { transform: scale(1.04); }
.r-head { display: block; }
.r-name { margin-top: 14px; font-size: clamp(22px, 1.9vw, 30px); line-height: 1.02; letter-spacing: -.02em; }
.r-hook { display: block; margin-top: 6px; font-size: 16px; color: var(--ink-2); }
.recipe summary:hover .r-name { text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 6px; text-underline-offset: 6px; }
.r-open { display: inline-flex; align-items: center; min-height: 44px; margin-top: 6px; font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.recipe[open] { grid-column: 1 / -1; padding: clamp(16px, 2.4vw, 32px); border: var(--frame) solid var(--ink); border-radius: var(--round); }
.recipe[open] summary { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 20px clamp(20px, 3vw, 48px); align-items: end; }
.recipe[open] .r-name { margin-top: 0; font-size: clamp(36px, 4.6vw, 76px); line-height: .9; letter-spacing: -.04em; }
.recipe[open] .r-hook { font-size: clamp(17px, 1.4vw, 20px); }
.recipe[open] .r-open { display: none; }
@media (max-width: 700px) { .recipe[open] summary { grid-template-columns: minmax(0, 1fr); } }

/* The game on the front page: a lime band */
.brew-teaser { margin-top: var(--space); padding-block: clamp(48px, 7vw, 112px); background: var(--lime); color: #000000; }
.brew-teaser .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px clamp(32px, 5vw, 88px); align-items: center; }
.brew-teaser h2 { font-size: clamp(46px, 6.6vw, 108px); line-height: .88; letter-spacing: -.04em; }
.brew-teaser p { max-width: 30em; margin: 22px 0 28px; font-size: clamp(18px, 1.5vw, 21px); }
.brew-teaser .btn, .brew-teaser .btn:not(.quiet):hover { background: #000000; color: #ffffff; border-color: #000000; }
.brew-teaser .btn:hover { background: #ffffff; color: #000000; }
.brew-teaser :focus-visible { outline-color: #000000; }
.brew-teaser ul { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.brew-teaser img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--round); }
.brew-teaser li:nth-child(3n + 2) { transform: translateY(-20px); }
@media (max-width: 900px) { .brew-teaser .wrap { grid-template-columns: minmax(0, 1fr); } .brew-teaser li:nth-child(3n + 2) { transform: none; } }

/* A call to play, on the recipes page and after an order */
.brew-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin: 28px 0;
  padding: clamp(18px, 2.4vw, 28px); background: var(--lime); color: #000000; border-radius: var(--round); }
.brew-cta p { margin: 0; font: 800 clamp(22px, 2.2vw, 32px)/1.05 var(--display); letter-spacing: -.02em; }
.brew-cta .btn, .brew-cta .btn:not(.quiet):hover { background: #000000; color: #ffffff; border-color: #000000; }

@media (prefers-reduced-motion: reduce) {
  .brew-mosaic li, .brew-teaser li { transform: none !important; }
}
