/* Subscription 11..13 (Opus, Nov 9, preview only): the two Weekly Box designs Matt picked, combined.
   Official Weekly Box 6 (O1 Photo lid: real box photo, $40 vs $42 math) + Weekly Box 8 (O3 Your week: four-stop week line).
   Group r2cfunnel, ids o6 / o7 / o8. Markup inside #r2cFunnel in index.html; behaviour in /js/r3-weekly-combo-opus.js.
   Shared atoms (.r3wo card, .r3wo-tag, .r3wo-h, .r3wo-num, .r3wo-go, .r3wo-fine) come from /css/r3-weekly-opus.css; everything
   here is scoped to .r3wc / .r3wo-o6 / .r3wo-o7 / .r3wo-o8. $40 a week, $2 under six Classics. */

.r3wc { --r3wc-cream2: #fbf5ea; --r3wc-gold-soft: #fdf3dc; --r3wc-gold-line: #ecd9a8; --r3wc-gold-ink: #b8902d; }
.r3wc :is(dl, dd, dt, figure, h3) { margin: 0; }
.r3wc svg { fill: none; stroke: var(--r3-plum); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Shared checks row (O1's ticks). */
.r3wc-checks { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin-top: 12px !important; font-size: .76rem; line-height: 1.35; color: var(--r3-soft); }
.r3wc-checks li::before { content: '\2713'; margin-right: 5px; font-weight: 700; color: var(--r3wc-gold-ink); }

/* ---------- Subscription 11 (o6): O1's photo lid on top, O3's week as a tappable four-stop line, O1's price story. ---------- */
.r3wo-o6 { padding: 0; overflow: hidden; }
.r3wc-lid { position: relative; height: 188px; overflow: hidden; background: #e9dccb; }
.r3wc-lid img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.r3wc-lid::after { content: ''; position: absolute; inset: auto 0 0; height: 50%; background: linear-gradient(to top, rgba(45, 25, 40, .55), transparent); pointer-events: none; }
.r3wc-lid figcaption { position: absolute; z-index: 1; left: 16px; bottom: 12px; font: 600 .74rem/1.2 'DM Sans', sans-serif; color: var(--r3-cream); text-shadow: 0 1px 6px rgba(0, 0, 0, .35); }
.r3wc-in { padding: 16px 20px 16px; }
.r3wo-o6 .r3wo-h { margin-bottom: 16px; }

.r3wc-week { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.r3wc-week::before, .r3wc-week::after {
  content: ''; position: absolute; top: 21px; left: 12.5%; right: 12.5%; height: 2px; border-radius: 2px; pointer-events: none;
}
.r3wc-week::before { background: #eee2c4; }
.r3wc-week::after { background: linear-gradient(90deg, var(--r3-gold), var(--r3-gold-light)); transform-origin: left center; scale: 0 1; transition: scale .6s var(--r3-ease); }
.r3wc-week[data-step="1"]::after { scale: .3334 1; }
.r3wc-week[data-step="2"]::after { scale: .6667 1; }
.r3wc-week[data-step="3"]::after { scale: 1 1; }
.r3wc-week button {
  appearance: none; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; min-height: 44px; padding: 0 2px 4px;
  border: 0; background: none; cursor: pointer; color: var(--r3-soft); font: 600 .78rem/1.2 'DM Sans', sans-serif; text-align: center;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.r3wc-week i {
  position: relative; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--r3wc-gold-soft); border: 1px solid var(--r3wc-gold-line); box-shadow: 0 0 0 4px var(--r3-paper);
  transition: background-color .3s ease, border-color .3s ease, transform .3s var(--r3-ease);
}
.r3wc-week svg { width: 21px; height: 21px; transition: stroke .3s ease; }
.r3wc-week .is-done i { background: #f6e3b4; border-color: #e2c57c; }
.r3wc-week .is-on i { background: var(--r3-plum); border-color: var(--r3-plum); transform: scale(1.06); }
.r3wc-week .is-on svg { stroke: var(--r3-gold-light); }
.r3wc-week .is-on button, .r3wc-week .is-done button { color: var(--r3-ink); }
.r3wc-week .is-on button { font-weight: 700; }
.r3wc-week button:focus-visible { outline: none; }
.r3wc-week button:focus-visible i { outline: 3px solid var(--r3-gold); outline-offset: 2px; }
@media (hover: hover) { .r3wc-week li:not(.is-on) button:hover i { border-color: var(--r3-gold); } }
.r3wc-say {
  display: flex; align-items: center; gap: 10px; min-height: 46px; margin: 12px 0 16px !important; padding: 9px 14px; border-radius: 14px;
  background: var(--r3wc-cream2); border: 1px solid var(--r3-line); font-size: .86rem; line-height: 1.35; color: var(--r3-muted);
}
.r3wc-say b { flex: none; font: italic 600 1.15rem/1 'Glaze Display', Georgia, serif; color: var(--r3wc-gold-ink); }
.r3wc-say span { transition: opacity .25s ease; }
.r3wc-say.is-swap span { opacity: 0; transition: none; }

.r3wc-price { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 16px; padding: 14px 0 16px; border-top: 1px solid var(--r3-line); }
@container (max-width: 400px) {
  .r3wc-lid { height: 160px; }
  .r3wc-in { padding-inline: 16px; }
  .r3wc-week button { font-size: .7rem; }
  .r3wc-week i { width: 40px; height: 40px; }
  .r3wc-week::before, .r3wc-week::after { top: 19px; }
  .r3wc-price { grid-template-columns: 1fr; gap: 8px; }
  .r3wc-checks { flex-direction: column; align-items: center; gap: 4px; text-align: center; }
}

/* ---------- Subscription 12 (o7): O3 leads (the week, top to bottom), a small real-box snapshot, O1's math as a receipt. ---------- */
.r3wc-head { display: grid; grid-template-columns: 1fr 112px; align-items: center; gap: 16px; margin-bottom: 14px !important; }
.r3wo-o7 .r3wo-h { margin: 0; }
.r3wc-snap { position: relative; padding: 5px 5px 0; background: var(--r3-paper); border-radius: 10px; rotate: 3deg; box-shadow: 0 12px 22px -10px rgba(45, 25, 40, .5), 0 0 0 1px var(--r3-line); }
.r3wc-snap img { display: block; width: 100%; height: 108px; object-fit: cover; object-position: 50% 58%; border-radius: 7px; }
.r3wc-snap figcaption { padding: 5px 2px 6px; font: 600 .62rem/1.2 'DM Sans', sans-serif; text-align: center; color: var(--r3-soft); }

.r3wc-rail { position: relative; display: grid; gap: 14px; margin-bottom: 16px !important; }
.r3wc-rail::before {
  content: ''; position: absolute; left: 19px; top: 20px; bottom: 20px; width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, var(--r3-gold), #e9d39c); transform-origin: center top;
}
.r3wc-rail li { position: relative; display: grid; grid-template-columns: 40px 1fr; align-items: center; column-gap: 14px; }
.r3wc-rail i {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; grid-row: span 2;
  background: var(--r3wc-gold-soft); border: 1px solid var(--r3wc-gold-line); box-shadow: 0 0 0 4px var(--r3-paper);
}
.r3wc-rail svg { width: 20px; height: 20px; }
.r3wc-rail b { align-self: end; font-size: .92rem; line-height: 1.2; color: var(--r3-ink); }
.r3wc-rail span { align-self: start; font-size: .8rem; line-height: 1.35; color: var(--r3-soft); }
.r3wc-rail li:last-child i { background: var(--r3-plum); border-color: var(--r3-plum); }
.r3wc-rail li:last-child svg { stroke: var(--r3-gold-light); }

.r3wc-receipt { margin-bottom: 14px !important; padding: 4px 16px; border-radius: 16px; background: var(--r3wc-cream2); border: 1px solid var(--r3-line); }
.r3wc-receipt > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; }
.r3wc-receipt > div + div { border-top: 1px dashed #e3d4bf; }
.r3wc-receipt dt { font-size: .84rem; line-height: 1.3; color: var(--r3-muted); }
.r3wc-receipt dd { flex: none; font: 700 .9rem/1.2 'DM Sans', sans-serif; color: var(--r3-ink); text-align: right; }
.r3wc-receipt .is-you { align-items: center; padding: 11px 0 12px; }
.r3wc-receipt .is-you dt { font-weight: 700; color: var(--r3-ink); }
.r3wc-receipt .is-you dt small { display: block; margin-top: 2px; font-weight: 500; font-size: .74rem; color: var(--r3-soft); }
.r3wc-receipt .is-you dd { display: flex; align-items: flex-end; gap: 6px; }
.r3wc-receipt .is-you dd b { font: 600 2.4rem/.86 'Glaze Display', Georgia, serif; color: var(--r3-plum); letter-spacing: -.02em; }
.r3wc-receipt .is-you dd span { padding-bottom: 2px; font-size: .86rem; }
.r3wo-o7 .r3wo-fine1 { margin-top: 8px !important; }
@container (max-width: 360px) {
  .r3wc-head { grid-template-columns: 1fr 88px; gap: 12px; }
  .r3wc-snap img { height: 88px; }
  .r3wc-receipt { padding-inline: 12px; }
  .r3wc-receipt .is-you { display: block; }
  .r3wc-receipt .is-you dd { justify-content: flex-start; margin-top: 8px; }
  .r3wc-receipt .is-you dd b { font-size: 2.1rem; }
}

/* ---------- Subscription 13 (o8): the fast lane. The real box fills the top with the headline on it, a $40 seal,
   one line of math, the week in four words, and the button. ---------- */
.r3wo-o8 { padding: 0; overflow: hidden; }
.r3wc-hero { position: relative; height: 252px; overflow: hidden; background: #e9dccb; }
.r3wc-hero img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 52%; }
.r3wc-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(45, 25, 40, .9) 0%, rgba(45, 25, 40, .55) 34%, transparent 66%); pointer-events: none; }
.r3wc-over { position: absolute; z-index: 1; left: 20px; right: 20px; bottom: 16px; }
.r3wo-o8 .r3wc-over .r3wo-tag { color: var(--r3-gold-light); }
.r3wo-o8 .r3wc-over .r3wo-h { margin: 0; font-size: 1.9rem; color: var(--r3-cream); text-shadow: 0 2px 12px rgba(0, 0, 0, .3); }
.r3wo-o8 .r3wc-over .r3wo-h em { color: var(--r3-gold-light); }
.r3wc-seal {
  position: absolute; z-index: 1; top: 14px; right: 14px; display: grid; place-content: center; justify-items: center; width: 88px; height: 88px;
  border-radius: 50%; background: var(--r3-gold); color: var(--r3-ink); rotate: -8deg;
  box-shadow: 0 0 0 4px rgba(212, 168, 67, .35), 0 10px 22px -8px rgba(0, 0, 0, .55);
}
.r3wc-seal::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; border: 1px dashed rgba(45, 25, 40, .4); }
.r3wc-seal b { font: 600 1.85rem/.9 'Glaze Display', Georgia, serif; letter-spacing: -.02em; }
.r3wc-seal span { font: 700 .66rem/1.2 'DM Sans', sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.r3wc-body { padding: 14px 18px 16px; }
.r3wc-vs { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin-bottom: 12px !important; padding-bottom: 12px; border-bottom: 1px solid var(--r3-line); }
.r3wc-vs span:first-child { font-size: .82rem; color: var(--r3-soft); }
.r3wc-vs span:last-child { font: 700 .86rem/1.2 'DM Sans', sans-serif; color: var(--r3-ink); }
.r3wc-vs b { font: 600 1.4rem/1 'Glaze Display', Georgia, serif; color: var(--r3-plum); }
.r3wc-path { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 8px; margin-bottom: 14px !important; counter-reset: r3wc; }
.r3wc-path li {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; counter-increment: r3wc;
  background: var(--r3wc-gold-soft); border: 1px solid var(--r3wc-gold-line); font: 700 .8rem/1.2 'DM Sans', sans-serif; color: var(--r3-ink);
}
.r3wc-path li::after { content: counter(r3wc); margin-left: auto; font: italic 600 1rem/1 'Glaze Display', Georgia, serif; color: var(--r3wc-gold-ink); }
.r3wc-path svg { width: 17px; height: 17px; flex: none; }
.r3wo-o8 .r3wo-go { min-height: 62px; font-size: 1.1rem; }
.r3wo-o8 .r3wo-fine1 { margin-top: 10px !important; }
@container (max-width: 400px) {
  .r3wc-hero { height: 232px; }
  .r3wc-over { left: 16px; right: 16px; }
  .r3wo-o8 .r3wc-over .r3wo-h { font-size: 1.65rem; }
  .r3wc-seal { width: 76px; height: 76px; top: 12px; right: 12px; }
  .r3wc-seal b { font-size: 1.6rem; }
  .r3wc-seal span { font-size: .58rem; }
  .r3wc-body { padding-inline: 16px; }
  .r3wc-path li { gap: 6px; padding: 7px 9px; font-size: .72rem; }
  .r3wc-path li::after { font-size: .9rem; }
}

/* ---------- Motion: one reveal when a variant shows (0.8 s, ease-out, no bounce). Subscription 11's week steps through once
   when it comes into view (the only moving thing on screen); Subscription 12's line draws. The button never moves or waits. ---------- */
.r3wc.is-in :is(.r3wc-lid, .r3wc-hero, .r3wc-head, .r3wo-tag, .r3wo-h, .r3wc-week, .r3wc-rail li, .r3wc-receipt, .r3wc-price, .r3wc-vs, .r3wc-path) { animation: r3wo-rise .8s var(--r3-ease) both; }
.r3wc.is-in .r3wc-hero .r3wo-tag, .r3wc.is-in .r3wc-hero .r3wo-h { animation: none; }
.r3wo-o7.is-in .r3wc-rail li:nth-child(2) { animation-delay: .07s; }
.r3wo-o7.is-in .r3wc-rail li:nth-child(3) { animation-delay: .14s; }
.r3wo-o7.is-in .r3wc-rail li:nth-child(4) { animation-delay: .21s; }
.r3wo-o7.is-in .r3wc-rail::before { animation: r3wo-draw-y .9s .2s var(--r3-ease) both; }
@media (prefers-reduced-motion: reduce) {
  .r3wc, .r3wc *, .r3wc *::before, .r3wc *::after { animation: none !important; transition: none !important; }
}
html.glz-static .r3wc, html.glz-static .r3wc *, html.glz-static .r3wc *::before, html.glz-static .r3wc *::after { animation: none !important; transition: none !important; }
