/* THE COFFEE PAGE (pages/01_what-coffee-scale.php): the head with the looping clip of the live view, the two modes, the cards of what
   only this app does, text + screenshots side by side, the clip "from the recipe to the cup" in a phone frame and the editions table.
   (site.css comes after this file and has the shared parts: .pageHead, .section, .cards, .card, .ticks, .phone, .shots, .ed, .checkTable) */

:root {
	--coffee: #6b4423;
	--coffee-dark: #3f2812;
	--crema: #f6efe6;
	--crema-line: #e8dccb;
}

/* the head: text left, the clip right (one column on phones: the clip first under the title) */
.cofHero {background: linear-gradient(180deg, #ffffff 0%, var(--crema) 100%); border-bottom: 1px solid var(--crema-line);}
.cofHero .wrap.cofHeroGrid {max-width: 1100px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; align-items: center; padding-top: 48px; padding-bottom: 30px;}
.cofHero .lead {margin-bottom: 22px;}
.cofHero .cofFine {font-size: 0.92rem; color: var(--muted); margin: 0;}
.cofHero .jumpWrap {max-width: 1100px; margin: 0 auto; padding: 0 20px 36px;}
.cofPoints {list-style: none; margin: 0 0 22px; padding: 0;}
.cofPoints li {position: relative; padding: 5px 0 5px 30px; margin: 0; color: var(--ink);}
.cofPoints li::before {content: "\2605"; position: absolute; left: 4px; top: 5px; color: var(--coffee); font-weight: 700;}

/* the clip in a card (the head) */
.cofClip {position: relative; margin: 0; background: #fff; border: 1px solid var(--crema-line); border-radius: 20px; padding: 10px 10px 12px; box-shadow: 0 22px 44px rgba(63, 40, 18, 0.16);}
.cofClip video, .cofClip img {display: block; width: 100%; height: auto; aspect-ratio: 784 / 632; border-radius: 12px; background: #f8f5f0;}
.cofClip figcaption {font-size: 0.88rem; color: var(--muted); margin: 10px 6px 0; padding-right: 46px; min-height: 36px; line-height: 1.45;}
.cofClip .cofTag {position: absolute; top: -13px; left: 20px; z-index: 2;}
.cofTag {display: inline-block; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; border-radius: 999px; padding: 4px 11px; background: var(--coffee); color: #fff; box-shadow: 0 2px 0 var(--coffee-dark);}
.cofTag.free {background: #2f7a1e; box-shadow: 0 2px 0 #1d5a10;}
.cofPlay {position: absolute; right: 16px; bottom: 14px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(31, 38, 25, 0.62); color: #fff; font-size: 15px; line-height: 36px; text-align: center; cursor: pointer; padding: 0;}
.cofPlay:hover, .cofPlay:focus-visible {background: rgba(31, 38, 25, 0.85);}

/* the two modes */
.cofModes {display: grid; grid-template-columns: 1fr 1fr; gap: 22px;}
.cofMode {background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 26px 26px 18px; box-shadow: 0 2px 10px rgba(40, 55, 10, 0.05); border-top: 5px solid var(--coffee);}
.cofMode h3 {font-family: var(--pixel); font-size: 13px; line-height: 1.7; color: var(--coffee-dark); margin: 0 0 10px; font-weight: normal;}
.cofMode .ticks {margin-bottom: 8px;}
.cofMode .more {font-weight: 700; margin: 4px 0 0;}

/* what only this app does */
.cofUnique {display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;}
.cofUnique .card {border-color: var(--crema-line); background: linear-gradient(180deg, #ffffff 0%, #fffaf3 100%);}
.cofUnique .card .cofTag {align-self: flex-start; margin-bottom: 14px;}
.cofUnique .card h3 {color: var(--coffee-dark);}
.cofUnique .card .more a {color: var(--coffee);}

/* text + screenshots side by side (like the app page), every second row the other way round */
.cofRow {display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 44px; align-items: center;}
.cofRow.flip {grid-template-columns: auto minmax(0, 1fr);}
.cofRow.flip .cofText {order: 2;}
.cofText h2 {margin-top: 0;}
/* (three screenshots: the text on top, the shots in a row below it) */
.cofRow.stack {grid-template-columns: 1fr; gap: 26px;}
.cofRow.stack .cofText {max-width: 860px; margin: 0 auto;}
.cofText .ticks {margin-top: 14px;}
.cofText .tiers {margin-bottom: 6px;}
.cofText .links {margin-top: 12px;}
.cofNote {margin: 14px 0 0; padding: 12px 16px; border-radius: 12px; background: var(--crema); border: 1px solid var(--crema-line); font-size: 0.95rem; color: #4a3a2a;}
.cofNote b {color: var(--coffee-dark);}

/* the clip "from the recipe to the cup" in the phone frame of the screenshots */
/* (a bit larger than the screenshots: the QR code at the end of the clip can be scanned from the screen) */
.cofWalk .phone.cofPhone {width: 300px;}
.phone.cofPhone video {display: block; width: 100%; height: auto; aspect-ratio: 384 / 860; border-radius: 24px; background: #fff;}
.cofWalk {display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 44px; align-items: center;}
.cofWalk figure {margin: 0; text-align: center; position: relative;}
.cofWalk figure .cofPlay {right: 22px; bottom: 22px;}
.cofSteps {counter-reset: cst; list-style: none; margin: 14px 0 0; padding: 0;}
.cofSteps li {counter-increment: cst; position: relative; padding: 7px 0 7px 44px; margin: 0;}
.cofSteps li::before {content: counter(cst); position: absolute; left: 0; top: 5px; width: 30px; height: 30px; line-height: 30px; border-radius: 50%; background: var(--coffee); color: #fff; font-family: var(--pixel); font-size: 11px; text-align: center;}

/* the published recipes in grams (#ratios): one group row per brewer, the source small under the name */
.cofRecipes tr.group td {background: var(--crema); color: var(--coffee-dark); font-weight: 800;}
.cofRecipes td .small {color: var(--muted); font-size: 0.82rem;}
.cofRecipes td:nth-child(n+2) {white-space: nowrap;}

/* the editions */
.cofEditions td, .cofEditions th {text-align: center;}
.cofEditions td:first-child, .cofEditions th:first-child {text-align: left;}
.cofEditions td.y {color: var(--leaf); font-weight: 800;}
.cofEditions td.n {color: #b9b9b0;}
.cofEditions tr.group td {background: var(--crema); color: var(--coffee-dark); font-weight: 800; text-align: left;}

@media (max-width: 900px) {
	.cofHero .wrap.cofHeroGrid {grid-template-columns: 1fr; gap: 26px; padding-top: 36px;}
	.cofHero .cofClipCol {order: -1;}
	.cofModes, .cofUnique {grid-template-columns: 1fr;}
	.cofRow, .cofRow.flip, .cofWalk {grid-template-columns: 1fr; gap: 26px;}
	.cofRow.flip .cofText {order: 0;}
}
@media (max-width: 700px) {
	.cofEditions td.y, .cofEditions td.n {text-align: left;}
	.cofWalk .phone.cofPhone {width: min(300px, 80vw);}
}
@media (prefers-reduced-motion: reduce) {
	.cofClip video, .cofPhone video {animation: none;}
}
