/* ==========================================================================
   Happy Café — Barista Course page
   ========================================================================== */

/* ---------- Hero: full-screen film (the pour into the Happy Café cup) ---------- */
.course-hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: #24150c; display: flex; align-items: center; color: var(--cream); }
.ch-media { position: absolute; inset: 0; overflow: hidden; will-change: transform; }
/* nudge the frame right so the cup sits beside the headline (pure GPU transform, video stays crisp) */
.ch-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; scale: 1.1; transform-origin: 0% 50%; }
.ch-shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(26,14,7,.84) 0%, rgba(26,14,7,.62) 30%, rgba(26,14,7,.18) 50%, rgba(26,14,7,0) 62%),
    linear-gradient(0deg, rgba(26,14,7,.62) 0%, rgba(26,14,7,0) 26%),
    linear-gradient(180deg, rgba(26,14,7,.5) 0%, rgba(26,14,7,0) 22%);
}
.ch-grid { position: relative; z-index: 2; width: 100%; max-width: 1480px; padding-top: var(--nav-h); }
.course-hero .extract-copy { display: grid; gap: 20px; justify-items: start; max-width: min(44vw, 620px); }
.course-title { font-size: clamp(3rem, 6.2vw, 6.8rem); color: var(--cream); }
.course-title .ct-line { display: block; }
.course-title em { color: #e2b77d; }
.course-script { margin: -8px 0 0 4px; transform: rotate(-2deg); color: #e2b77d; }
.course-hero .kicker { color: #e2b77d; }
.course-hero .lead { color: rgba(246,236,223,.84); max-width: 38ch; }
.course-hero .btn:not(.btn-ghost) { --bg: var(--cream); --fg: var(--espresso); }
.course-hero .btn-ghost { --fg: var(--cream); --fill: var(--cream); box-shadow: inset 0 0 0 1.5px rgba(246,236,223,.45); }
.course-hero .btn-ghost:hover { color: var(--espresso); }
.course-hero .btn-ghost .btn-ico { background: var(--cream); color: var(--espresso); }

.ch-specs { position: absolute; right: var(--gutter); bottom: 34px; z-index: 2; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, auto); gap: 8px; }
.ch-specs li { display: grid; gap: 2px; padding: 11px 16px; border-radius: 14px; text-align: center;
  background: rgba(26,14,7,.4); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px rgba(233,201,158,.24); }
.ch-specs span { font-size: .6rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; color: #e2b77d; }
.ch-specs b { font-family: var(--font-display); font-weight: 500; font-size: 1.25rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ch-cue { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 2; display: grid; justify-items: center; gap: 8px; font-size: .66rem; letter-spacing: .24em; text-transform: uppercase; font-weight: 700; color: rgba(246,236,223,.8); }
.ch-cue i { display: block; width: 1px; height: 34px; background: linear-gradient(rgba(246,236,223,.8), transparent); }

@media (max-width: 1100px) { .ch-cue { display: none; } }
@media (max-width: 900px) {
  .course-hero { align-items: flex-end; }
  .ch-video { scale: 1; object-position: 55% 50%; }
  .ch-shade { background: linear-gradient(0deg, rgba(26,14,7,.92) 0%, rgba(26,14,7,.7) 38%, rgba(26,14,7,.1) 64%), linear-gradient(180deg, rgba(26,14,7,.45) 0%, rgba(26,14,7,0) 18%); }
  .ch-grid { padding-bottom: 92px; }
  .course-hero .extract-copy { gap: 12px; max-width: none; }
  .course-hero .lead { display: none; }
  .course-title { font-size: clamp(2.4rem, 10vw, 4rem); }
  .course-script { font-size: 1.7rem; }
  .ch-specs { left: var(--gutter); right: var(--gutter); bottom: 22px; grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .ch-specs li { padding: 8px 4px; border-radius: 12px; }
  .ch-specs b { font-size: 1rem; }
  .ch-specs span { font-size: .54rem; letter-spacing: .12em; }
}
@media (max-height: 640px) and (max-width: 900px) { .course-hero .extract-copy .btn-group { display: none; } }

/* ---------- Modules ---------- */
.learn { background: var(--cream-soft); }
.learn-head { max-width: 820px; }
.modules { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.module {
  position: relative; display: grid; grid-template-columns: 90px 1fr 60px; gap: 20px; align-items: center;
  padding: clamp(22px, 3vw, 38px) 0; border-bottom: 1px solid var(--line-strong);
  cursor: default; isolation: isolate;
}
.module::before { content: ""; position: absolute; inset: 0 -2vw; z-index: -1; background: var(--espresso); transform: scaleY(0); transform-origin: bottom; transition: transform .6s var(--ease-out); border-radius: 18px; }
.m-num { font-family: var(--font-display); font-style: italic; font-size: 1.4rem; color: var(--caramel); transition: color .5s; }
.m-main h3 { font-size: clamp(1.8rem, 4vw, 3.6rem); transition: color .5s, transform .6s var(--ease-out); }
.m-main p { margin: 10px 0 0; color: var(--muted); max-width: 60ch; transition: color .5s; }
.m-thumb { display: none; }
.m-arrow { font-size: 1.8rem; color: var(--mocha); justify-self: end; transition: transform .6s var(--ease-out), color .5s; }
@media (hover: hover) and (pointer: fine) {
  .module:hover::before { transform: scaleY(1); transform-origin: top; }
  .module:hover .m-main h3 { color: var(--cream); transform: translateX(18px); }
  .module:hover .m-main p { color: var(--on-dark-muted); }
  .module:hover .m-num { color: var(--latte); }
  .module:hover .m-arrow { color: var(--latte); transform: rotate(-45deg); }
}
.module-float { position: fixed; left: 0; top: 0; z-index: 30; width: 320px; aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden; pointer-events: none; opacity: 0; transform: scale(.6); box-shadow: var(--shadow-lift); }
.module-float img { width: 100%; height: 100%; object-fit: cover; }
@media (hover: none), (pointer: coarse), (max-width: 760px) {
  .module { grid-template-columns: 1fr; gap: 12px; }
  .m-num { order: -1; }
  .m-thumb { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 18px; order: -1; }
  .m-arrow { display: none; }
  .module-float { display: none; }
}

/* ---------- Journey ---------- */
.journey { background: var(--espresso); }
.journey-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 100px); align-items: start; }
.journey-visual { position: sticky; top: 14vh; }
.jv-frame { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius-lg); overflow: hidden; background: var(--coffee); }
.jv-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.12); transition: opacity .9s var(--ease-out), transform 1.6s var(--ease-out); }
.jv-frame img.is-on { opacity: 1; transform: scale(1); }
.jv-count { margin-top: 14px; font-family: var(--font-display); color: var(--on-dark-muted); font-size: 1.1rem; }
.jv-count b { color: var(--latte); font-weight: 500; font-size: 1.6rem; }
.journey-steps { display: grid; gap: 0; }
.jstep { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: 30px 0; opacity: .28; transition: opacity .6s var(--ease-out); }
.jstep.is-on { opacity: 1; }
.js-num { font-family: var(--font-display); font-style: italic; font-size: 1.3rem; color: var(--latte); }
.jstep h3 { font-size: clamp(2rem, 3.8vw, 3.4rem); }
.jstep p { margin: 0; color: var(--on-dark-muted); font-size: 1.05rem; max-width: 48ch; }
.jstep strong { color: var(--on-dark); }
.jstep em { color: var(--latte); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 9px 14px; border-radius: 999px; background: rgba(246,236,223,.08); box-shadow: inset 0 0 0 1px rgba(246,236,223,.18); font-size: .9rem; }
.versus { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.versus > div { padding: 18px; border-radius: 18px; background: rgba(246,236,223,.06); box-shadow: inset 0 0 0 1px rgba(246,236,223,.16); }
.versus .win { background: rgba(180,122,70,.22); box-shadow: inset 0 0 0 1px rgba(214,180,142,.45); }
.versus h4 { margin: 0 0 6px; font-family: var(--font-display); font-weight: 500; font-size: 1.3rem; color: var(--on-dark); }
.versus p { font-size: .92rem; }
.checklist { margin: 0; padding: 0; list-style: none; counter-reset: c; display: grid; gap: 10px; }
.checklist li { counter-increment: c; display: flex; gap: 12px; align-items: baseline; color: var(--on-dark); }
.checklist li::before { content: counter(c, decimal-leading-zero); font-family: var(--font-display); font-style: italic; color: var(--latte); }
.recipe { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.recipe li { display: grid; padding: 16px; border-radius: 18px; background: rgba(246,236,223,.08); box-shadow: inset 0 0 0 1px rgba(246,236,223,.18); }
.recipe b { font-family: var(--font-display); font-weight: 500; font-size: 1.6rem; color: var(--on-dark); }
.recipe span { font-size: .78rem; color: var(--on-dark-muted); }
@media (max-width: 900px) {
  .journey-grid { grid-template-columns: 1fr; }
  .journey-visual { top: calc(var(--nav-h) * .3); z-index: 2; }
  .jv-frame { aspect-ratio: 16 / 9; }
  .jstep { min-height: auto; padding: 60px 0; }
  .versus, .recipe { grid-template-columns: 1fr; }
}

/* ---------- Grind lab ---------- */
.grindlab { background: var(--cream); }
.lab { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 4vw, 60px); align-items: center; padding: clamp(24px, 4vw, 50px); border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow-soft); }
.lab-visual { position: relative; height: 420px; display: grid; justify-items: center; }
.lab-grounds { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 220px; height: 60px; display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; align-content: end; }
.lab-grounds i { display: block; border-radius: 40%; background: #5a3320; }
.lab-basket { position: absolute; top: 80px; width: 200px; height: 46px; border-radius: 6px 6px 40px 40px; background: linear-gradient(90deg, #8f8378, #e9e2d8 40%, #8f8378); }
.lab-bed { position: absolute; left: 10px; right: 10px; top: 6px; height: 16px; border-radius: 4px; background: #4a2c1c; }
.lab-drops { position: absolute; top: 126px; width: 40px; height: 170px; left: 50%; transform: translateX(-50%); }
.lab-drops i { position: absolute; left: 50%; width: 8px; height: 14px; margin-left: -4px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: #5a2e16; }
.lab-cup { position: absolute; bottom: 40px; width: 150px; height: 120px; border-radius: 0 0 50px 50px; background: rgba(255,255,255,.6); box-shadow: inset 0 0 0 3px rgba(42,24,15,.25); overflow: hidden; }
.lab-cup-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 55%; background: linear-gradient(#c58c51 0 10px, #4a240f 10px); transition: height .6s var(--ease-out), filter .6s; }
.lab-timer { position: absolute; right: 0; top: 40%; display: grid; justify-items: center; padding: 14px 16px; border-radius: 18px; background: var(--cream); }
.lab-timer b { font-family: var(--font-display); font-size: 2.4rem; line-height: 1; font-weight: 500; font-variant-numeric: tabular-nums; }
.lab-timer span { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.lab-panel { display: grid; gap: 30px; }
.lab-range { display: grid; gap: 12px; }
.lab-range input { -webkit-appearance: none; appearance: none; width: 100%; height: 12px; border-radius: 99px; background: linear-gradient(90deg, #3b1f12 0%, #b47a46 33%, #d6b48e 50%, #b47a46 67%, #e9d3b4 100%); outline: none; }
.lab-range input::-webkit-slider-thumb { -webkit-appearance: none; width: 34px; height: 34px; border-radius: 50%; background: var(--espresso); border: 5px solid var(--paper); box-shadow: 0 6px 18px rgba(42,24,15,.4); cursor: grab; }
.lab-range input::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--espresso); border: 5px solid var(--paper); box-shadow: 0 6px 18px rgba(42,24,15,.4); cursor: grab; }
.lab-range input:focus-visible { box-shadow: 0 0 0 4px rgba(180,122,70,.3); }
.lr-labels { display: flex; justify-content: space-between; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.lab-result { padding: 24px; border-radius: 22px; background: var(--cream); display: grid; gap: 16px; transition: background-color .5s; }
.lr-tag { justify-self: start; padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: .9rem; background: var(--ok); color: #fff; transition: background-color .5s; }
.lab[data-zone="fine"] .lr-tag { background: #3b1f12; }
.lab[data-zone="coarse"] .lr-tag { background: #b47a46; }
.lab-result dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lab-result dt { font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; color: var(--caramel); }
.lab-result dd { margin: 4px 0 0; font-family: var(--font-display); font-size: 1.3rem; line-height: 1.15; }
@media (max-width: 860px) {
  .lab { grid-template-columns: 1fr; }
  .lab-visual { height: 340px; }
  .lab-cup { bottom: 10px; }
  .lab-drops { height: 140px; }
}

/* ---------- Milk lab ---------- */
.milklab { background: var(--cream-soft); }
.cups { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 2vw, 28px); }
.cup { margin: 0; display: grid; gap: 18px; }
.cup-glass { position: relative; height: 260px; border-radius: 10px 10px 70px 70px; background: rgba(255,255,255,.55); box-shadow: inset 0 0 0 3px rgba(42,24,15,.18), 0 30px 40px -30px rgba(42,24,15,.4); overflow: hidden; }
.cup-glass > div { position: absolute; left: 0; right: 0; }
.c-esp { bottom: 0; height: 0; background: linear-gradient(#5a2e16, #2a140a); }
.c-milk { height: 0; background: linear-gradient(#d9b994, #b88a5e); }
.c-foam { height: 0; background: repeating-radial-gradient(circle at 30% 40%, #fffaf3 0 3px, #f3e6d3 3px 6px); }
.cup figcaption { display: grid; gap: 6px; }
.cup h3 { font-size: 1.7rem; }
.cup p { margin: 0; color: var(--muted); font-size: .92rem; }
.foam-tag { justify-self: start; margin-top: 4px; padding: 6px 12px; border-radius: 999px; background: var(--espresso); color: var(--cream); font-size: .78rem; font-weight: 700; }
.thermo { margin-top: clamp(40px, 6vw, 70px); max-width: 720px; }
.thermo-bar { position: relative; height: 14px; border-radius: 99px; background: var(--sand); overflow: hidden; }
.thermo-bar i { position: absolute; inset: 0; background: linear-gradient(90deg, #e9d3b4, #b47a46, #7a2e14); transform-origin: left; transform: scaleX(0); }
.thermo-zone { position: absolute; top: -4px; bottom: -4px; left: 66.6%; width: 8.4%; border-radius: 4px; box-shadow: 0 0 0 2px var(--espresso); }
.thermo-labels { position: relative; height: 1.4em; margin-top: 10px; font-size: .78rem; font-weight: 600; color: var(--muted); }
.thermo-labels span { position: absolute; top: 0; }
.thermo-labels span:first-child { left: 0; }
.thermo-labels .tz { left: 70.8%; transform: translateX(-50%); color: var(--espresso); white-space: nowrap; }
.thermo-labels span:last-child { right: 0; }
@media (max-width: 900px) { .cups { grid-template-columns: 1fr 1fr; } .cup-glass { height: 200px; } }

/* ---------- Order (Americano vs Long Black) ---------- */
.order { background: var(--cream); }
.order-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 100px); align-items: center; }
.order-copy { display: grid; gap: 20px; justify-items: start; }
.order-glasses { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.og { margin: 0; display: grid; gap: 16px; }
.og-glass { position: relative; height: 280px; border-radius: 8px 8px 30px 30px; background: rgba(255,255,255,.6); box-shadow: inset 0 0 0 3px rgba(42,24,15,.2); overflow: hidden; }
.og-layer, .og-crema { position: absolute; left: 0; right: 0; height: 0; }
.og[data-order="americano"] .og-a { bottom: 0; background: linear-gradient(#4a240f, #2a140a); }
.og[data-order="americano"] .og-b { background: rgba(120,66,32,.55); }
.og[data-order="americano"] .og-crema { background: rgba(214,170,120,.5); }
.og[data-order="longblack"] .og-a { bottom: 0; background: rgba(150,110,80,.25); }
.og[data-order="longblack"] .og-b { background: linear-gradient(#5a2e16, #3b1d0e); }
.og[data-order="longblack"] .og-crema { background: linear-gradient(#e7bd85, #b27238); }
.og h3 { font-size: 1.8rem; }
.og ol { margin: 0; padding-left: 18px; color: var(--coffee); }
.og span { font-size: .85rem; color: var(--muted); }
@media (max-width: 900px) { .order-grid { grid-template-columns: 1fr; } .og-glass { height: 220px; } }

/* ---------- Drinks grid ---------- */
.drinks { background: var(--cream-soft); }
.drinks-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px; }
.drinks-head > div:first-child { display: grid; gap: 18px; }
.drink-filter { display: flex; gap: 6px; padding: 6px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.drink-filter button { min-height: 42px; padding: 0 20px; border-radius: 999px; font-weight: 600; font-size: .9rem; color: var(--coffee); transition: background-color .35s, color .35s; }
.drink-filter button[aria-selected="true"] { background: var(--espresso); color: var(--cream); }
.drink-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(30px, 5vw, 80px); counter-reset: drink; border-top: 1px solid var(--line); }
.drink { counter-increment: drink; display: grid; grid-template-columns: 44px 1fr auto; column-gap: 16px; row-gap: 4px; align-items: baseline; padding: 20px 0; border-bottom: 1px solid var(--line); }
.drink[hidden] { display: none; }
.drink-no::before { content: counter(drink, decimal-leading-zero); font-family: var(--font-display); font-style: italic; font-size: 1.05rem; color: var(--caramel); }
.drink h3 { grid-column: 2; font-size: clamp(1.25rem, 1.8vw, 1.5rem); line-height: 1.2; }
.drink p { grid-column: 2 / -1; margin: 0; color: var(--muted); font-size: .93rem; line-height: 1.55; max-width: 56ch; }
.drink-tag { grid-column: 3; grid-row: 1; justify-self: end; font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--cream); color: var(--mocha); }
.drink-tag.cold { background: #e3ecef; color: #3c5a66; }
@media (max-width: 760px) { .drink-grid { grid-template-columns: 1fr; } .drink { grid-template-columns: 34px 1fr auto; } }

/* ---------- Enrol ---------- */
.enrol { background: var(--ink); }
.enrol-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(30px, 6vw, 100px); align-items: center; }
.enrol-card { display: grid; gap: 26px; justify-items: start; }
.enrol-points { list-style: none; margin: 0; padding: 0; width: 100%; border-top: 1px solid rgba(246,236,223,.14); }
.enrol-points li { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid rgba(246,236,223,.14); }
.enrol-points b { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--latte); font-weight: 700; padding-top: 3px; }
.enrol-points span { color: var(--on-dark); }
.enrol-visual .reveal-img { aspect-ratio: 16 / 10; border-radius: var(--radius-lg); }
@media (max-width: 900px) {
  .enrol-grid { grid-template-columns: 1fr; }
  .enrol-points li { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- Reduced motion ---------- */
.reduce-motion .stream { stroke-dashoffset: 0; }
.reduce-motion .jstep { opacity: 1; }

/* ---------- Batches (from site-config.js) ---------- */
.batches { width: 100%; }
.batches h3 { font-family: var(--font-body); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--latte); font-weight: 700; margin: 0 0 12px; }
.batches ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.batches li { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; background: rgba(246,236,223,.06); border: 1px solid rgba(246,236,223,.14); }
.batches li div { display: grid; gap: 2px; }
.batches li b { color: var(--on-dark); font-weight: 600; }
.batches li span { color: var(--on-dark-muted); font-size: .88rem; }
.batches li em { font-style: normal; font-size: .78rem; font-weight: 700; color: var(--latte); }
.batches li.is-full { opacity: .55; }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(30px, 6vw, 90px); align-items: start; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; padding: 22px 0; font-family: var(--font-display); font-size: clamp(1.15rem, 1.8vw, 1.45rem); line-height: 1.25; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--cream); font-family: var(--font-body); font-size: 1.2rem; transition: transform .4s var(--ease-out), background-color .3s; }
.faq-list details[open] summary::after { transform: rotate(45deg); background: var(--latte); }
.faq-list p { margin: -6px 0 22px; color: var(--muted); max-width: 60ch; }
@media (max-width: 860px) { .faq-grid { grid-template-columns: 1fr; } }
.drink h3 { transition: transform .45s var(--ease-out), color .3s; }
.drink:hover h3 { transform: translateX(6px); color: var(--caramel); }
