/* Color scavenger hunt guide (/color-scavenger-hunt) — additive layer over styles.v5.css and styles.story.v7.css.
   Every rule is scoped to .guide-* so the homepage and /party are untouched. */

.guide-page { --guide-ease: cubic-bezier(.2, .8, .2, 1); }
.guide-page .site-nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.guide-page :target { scroll-margin-top: 72px; }

.guide-js-only { display: none; }
.guide-example.guide-interactive .guide-js-only { display: inline; }
.guide-example.guide-interactive .guide-nojs-only { display: none; }

/* --- Hero ---------------------------------------------------------------------------------- */
.guide-hero { padding: 28px 0 56px; display: grid; gap: 36px; align-items: center; }
.guide-hero h1 { font-size: clamp(2.6rem, 11.5vw, 3.6rem); line-height: .98; letter-spacing: -.055em; margin-bottom: 18px; text-wrap: balance; }
.guide-lede { max-width: 540px; margin-bottom: 24px; color: var(--ink-2); font-size: 1.1rem; line-height: 1.55; }
.guide-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.guide-hero-note { color: var(--ink-2); font-size: .9rem; font-weight: 650; }

/* Three Polaroids: the color to find, and two different things that match it. Sizes are percentages of the stage. */
.guide-hero-art { position: relative; width: min(100%, 520px); aspect-ratio: 1 / .96; margin-inline: auto; isolation: isolate; }
.guide-hero-art::before { content: ""; position: absolute; inset: 8% 6% 2%; z-index: -1; border-radius: 50%; background: var(--story-turquoise); opacity: .17; filter: blur(40px); }
.guide-hero-art .find-card { position: absolute; padding: 2.4% 2.4% 3%; box-shadow: var(--shadow-soft); }
.guide-hero-art figcaption { min-height: 0; padding-top: 7px; display: block; }
.guide-hero-art figcaption small { font-size: .5rem; }
.guide-hero-art figcaption strong { font-size: clamp(.74rem, 2.6vw, .92rem); }
.guide-target-card { z-index: 2; width: 34%; left: 1%; top: 48%; transform: rotate(-5deg); }
.guide-hero-find-door { z-index: 3; width: 56%; left: 22%; top: 2%; transform: rotate(-1.6deg); box-shadow: var(--shadow); }
.guide-hero-find-bike { z-index: 1; width: 44%; right: 0; top: 42%; transform: rotate(5.5deg); }
.guide-hero-art .guide-hero-find-door figcaption strong { font-size: clamp(.84rem, 3vw, 1.05rem); }
.guide-target-card .find-card-photo { background: var(--story-turquoise); }

/* --- Shared section scaffolding -------------------------------------------------------------- */
.guide-section { padding: 56px 0; }
.guide-section-head { max-width: 620px; margin-bottom: 30px; }
.guide-section h2, .guide-party h2 { font-size: clamp(2.1rem, 8.4vw, 3.2rem); line-height: 1; letter-spacing: -.055em; margin-bottom: 14px; }
.guide-section-intro { margin: 0; color: var(--ink-2); font-size: 1.05rem; }

/* --- How to play ---------------------------------------------------------------------------- */
.guide-how { background: var(--surface-2); border-block: 1px solid rgba(25, 24, 21, .04); }
.guide-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; counter-reset: guide-step; }
.guide-step {
  position: relative;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: center;
  gap: 8px 16px;
  padding: 14px 16px 14px 14px;
  border: 1px solid rgba(25, 24, 21, .09);
  border-radius: 22px;
  background: rgba(255, 253, 248, .72);
}
.guide-step-num { position: absolute; top: 10px; left: 12px; z-index: 2; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font: 700 .72rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.guide-step-visual { position: relative; height: 104px; display: grid; place-items: center; }
.guide-step-copy h3 { font-size: 1.22rem; margin-bottom: 4px; }
.guide-step-copy p { margin: 0; color: var(--ink-2); font-size: .98rem; }

.guide-step-color { grid-template-columns: repeat(2, 38px); grid-template-rows: repeat(2, 38px); gap: 8px; justify-content: center; align-content: center; }
.guide-dot { width: 38px; height: 38px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(25, 24, 21, .08); }
.guide-dot-coral { background: var(--story-coral); }
.guide-dot-turquoise { background: var(--story-turquoise); outline: 3px solid var(--ink); outline-offset: 2px; }
.guide-dot-honey { background: var(--c-honey); }
.guide-dot-lilac { background: var(--c-lilac); }
.guide-timer { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 1.1rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.guide-mini-photo { position: relative; width: 92px; aspect-ratio: 1; overflow: hidden; border-radius: 9px; box-shadow: var(--shadow-soft); }
.guide-mini-photo img { width: 100%; height: 100%; object-fit: cover; }
.guide-mini-photo .camera-corners { inset: 9px; background-size: 16px 2px, 2px 16px, 16px 2px, 2px 16px, 16px 2px, 2px 16px, 16px 2px, 2px 16px; background-repeat: no-repeat; }
.guide-step-reveal { display: flex; align-items: center; justify-content: center; }
.guide-mini-find { width: 50px; aspect-ratio: 1; padding: 3px 3px 9px; margin-inline: -7px; border-radius: 3px; background: var(--story-card); box-shadow: 0 4px 12px rgba(39, 33, 27, .2); }
.guide-mini-find img { width: 100%; height: 100%; object-fit: cover; }
.guide-mini-find-1 { transform: rotate(-7deg); }
.guide-mini-find-2 { transform: rotate(2deg); z-index: 2; }
.guide-mini-find-3 { transform: rotate(8deg); }

.guide-tip { margin-top: 22px; padding: 18px 20px; border-radius: 16px; background: var(--honey); }
.guide-tip p { margin: 0; font-size: .98rem; }

/* --- Example ---------------------------------------------------------------------------------- */
.guide-example { padding: 16px 14px 18px; border: 1px solid rgba(25, 24, 21, .09); border-radius: 24px; background: rgba(255, 253, 248, .56); }
.guide-example-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-bottom: 20px; }
.guide-example-prompt { margin: 0; color: var(--ink-2); font-size: .95rem; font-weight: 650; }
.guide-example-prompt[hidden] { display: none; }
.guide-finds { margin: 0; padding: 0; list-style: none; display: grid; gap: 22px; }
.guide-find { display: grid; grid-template-columns: 132px minmax(0, 1fr); align-items: center; gap: 4px 16px; }
.guide-find .find-card { grid-row: 1 / span 2; padding: 6px 6px 8px; box-shadow: var(--shadow-soft); transition: translate .26s var(--guide-ease), box-shadow .26s var(--guide-ease); }
.guide-find:nth-child(1) .find-card { transform: rotate(-3deg); }
.guide-find:nth-child(2) .find-card { transform: rotate(1.5deg); }
.guide-find:nth-child(3) .find-card { transform: rotate(3.5deg); }
.guide-find figcaption { min-height: 0; padding-top: 7px; display: block; }
.guide-find figcaption strong { font-size: .8rem; }
.guide-badge { position: absolute; z-index: 3; left: 50%; top: -12px; transform: translateX(-50%); padding: 6px 9px; border-radius: 999px; background: #fff0bd; color: #7b5520; box-shadow: var(--shadow-soft); font: 700 .5rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .1em; white-space: nowrap; }
.guide-pick {
  grid-column: 2; align-self: end; justify-self: start;
  min-height: 44px; padding: 0 16px;
  border: 1.5px solid var(--line); border-radius: 999px;
  background: #fff; font-size: .88rem; font-weight: 750; cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, scale .16s ease;
}
.guide-pick:active { scale: .97; }
.guide-pick[aria-pressed="true"] { border-color: var(--ink); background: var(--honey); }
@media (hover: hover) { .guide-pick:hover { border-color: var(--ink-3); } }
.guide-match { grid-column: 2; align-self: start; display: flex; align-items: center; gap: 10px; }
.guide-match-swatches { display: inline-flex; }
.guide-match-swatches i { width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 0 0 2px var(--story-card), 0 0 0 3px rgba(25, 24, 21, .1); }
.guide-match-swatches i + i { margin-left: -9px; }
.guide-match-text { color: var(--ink-2); font-size: .9rem; font-weight: 700; }
.guide-find.is-picked .find-card { box-shadow: var(--shadow), 0 0 0 2px var(--ink); }
.guide-example.guide-interactive .guide-find .find-card { cursor: pointer; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .guide-example.guide-interactive .guide-find .find-card:hover { translate: 0 -3px; }
}
.guide-find[data-winner] .find-card { box-shadow: var(--shadow-soft), 0 0 0 2px #e3b24c; }

/* With JS the swatches and badge wait for the guess; without JS everything is simply shown. */
.guide-pick { display: none; }
.guide-example.guide-interactive .guide-pick { display: inline-flex; align-items: center; }
.guide-example.guide-interactive:not(.is-revealed) .guide-match,
.guide-example.guide-interactive:not(.is-revealed) .guide-badge,
.guide-example.guide-interactive:not(.is-revealed) .guide-result-detail { display: none; }
.guide-example.guide-interactive:not(.is-revealed) .guide-find[data-winner] .find-card { box-shadow: var(--shadow-soft); }
.guide-example.guide-interactive:not(.is-revealed) .guide-find .guide-pick { grid-row: 2; }
.guide-example.guide-interactive:not(.is-revealed) .guide-find .find-card { grid-row: 1 / span 2; }
.guide-example.guide-interactive.is-revealed .guide-pick { grid-row: 1; }
.guide-example.guide-interactive.is-revealed .guide-match { grid-row: 2; }

.guide-example-result { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.guide-result-line { margin: 0 0 8px; font-size: 1.35rem; font-weight: 800; letter-spacing: -.035em; line-height: 1.2; min-height: 1.2em; }
.guide-result-detail { margin: 0; color: var(--ink-2); max-width: 640px; }
.guide-reset { min-height: 44px; margin-top: 4px; padding: 0; border: 0; background: none; color: var(--ink-2); font-size: .9rem; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.guide-reset[hidden] { display: none; }
.guide-disclaimer { margin: 10px 0 0; color: var(--ink-3); font-size: .8rem; }

/* --- Where to play ------------------------------------------------------------------------- */
.guide-places { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; max-width: 760px; }
.guide-place { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; align-items: start; padding: 18px; border-radius: 6px; background: var(--story-card); box-shadow: var(--shadow-soft); transform: rotate(var(--tilt, 0deg)); }
.guide-place h3 { margin-bottom: 4px; font-size: 1.15rem; }
.guide-place p { margin: 0; color: var(--ink-2); font-size: .98rem; }
.guide-place-swatch { width: 56px; aspect-ratio: 1; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(25, 24, 21, .06); }
.guide-place-swatch-coral { background: var(--story-coral); }
.guide-place-swatch-turquoise { background: var(--story-turquoise); }
.guide-place-swatch-lilac { background: var(--c-lilac); }

/* --- FindHue Party -------------------------------------------------------------------------- */
.guide-party { padding: 64px 0; background: var(--ink); color: #fff; overflow: hidden; }
.guide-party-layout { display: grid; gap: 40px; align-items: center; }
.guide-party-intro { max-width: 560px; color: rgba(255, 255, 255, .72); font-size: 1.05rem; }
.guide-party-steps { margin: 22px 0 26px; padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: party-step; max-width: 560px; }
.guide-party-steps li { counter-increment: party-step; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; color: rgba(255, 255, 255, .88); }
.guide-party-steps li::before { content: counter(party-step); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .12); color: #fff; font: 700 .72rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.guide-party-cta { background: #fff; color: var(--ink); }
.guide-party-note { margin: 14px 0 0; max-width: 480px; color: rgba(255, 255, 255, .62); font-size: .88rem; }
.guide-party-art { position: relative; width: min(100%, 360px); margin-inline: auto; padding: 36px 0 12px; }
.guide-party-polaroid { width: 74%; margin-left: 20%; transform: rotate(3deg); }
.guide-party-polaroid figcaption { min-height: 0; display: block; padding-top: 9px; }
.guide-party-chip { position: absolute; z-index: 2; left: 0; top: 0; }

/* --- FAQ --------------------------------------------------------------------------------------- */
.guide-faq-layout { max-width: 820px; }
.guide-faq-list { display: grid; }
.guide-faq-item { padding: 20px 0; border-top: 1px solid rgba(25, 24, 21, .13); }
.guide-faq-item:last-child { border-bottom: 1px solid rgba(25, 24, 21, .13); }
.guide-faq-item h3 { margin-bottom: 6px; font-size: 1.12rem; }
.guide-faq-item p { margin: 0; color: var(--ink-2); }
.guide-faq-item a, .guide-faq-more a { font-weight: 700; text-underline-offset: 3px; }
.guide-faq-more { margin: 22px 0 0; color: var(--ink-2); }

/* --- Motion: placed once, never looping. Only when the user hasn't asked for reduced motion. --- */
@media (prefers-reduced-motion: no-preference) {
  .guide-hero-art .find-card { animation: guide-settle .7s var(--guide-ease) both; }
  .guide-hero-find-door { animation-delay: .05s !important; --from: -4deg; }
  .guide-target-card { animation-delay: .2s !important; --from: -11deg; }
  .guide-hero-find-bike { animation-delay: .32s !important; --from: 11deg; }
  .motion-ready .guide-step { opacity: 0; transform: translateY(16px); }
  .motion-ready .guide-steps.is-visible .guide-step { animation: guide-rise .5s var(--guide-ease) forwards; }
  .motion-ready .guide-steps.is-visible .guide-step:nth-child(2) { animation-delay: .1s; }
  .motion-ready .guide-steps.is-visible .guide-step:nth-child(3) { animation-delay: .2s; }
  .motion-ready .guide-steps.is-visible .guide-step:nth-child(4) { animation-delay: .3s; }
  .guide-example.guide-interactive.is-revealed .guide-match, .guide-example.guide-interactive.is-revealed .guide-badge { animation: guide-fade .3s ease both; }
  .guide-example.guide-interactive.is-revealed .guide-badge { animation-name: guide-badge; }
}
@keyframes guide-settle { from { opacity: 0; translate: 0 18px; rotate: var(--from, -6deg); } to { opacity: 1; translate: 0 0; rotate: 0deg; } }
@keyframes guide-rise { to { opacity: 1; transform: none; } }
@keyframes guide-fade { from { opacity: 0; translate: 0 4px; } to { opacity: 1; translate: 0 0; } }
@keyframes guide-badge { from { opacity: 0; transform: translateX(-50%) translateY(5px) scale(.85); } 70% { transform: translateX(-50%) translateY(-2px) scale(1.08); } to { opacity: 1; transform: translateX(-50%) scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .guide-page *, .guide-page *::before, .guide-page *::after { animation: none !important; transition: none !important; }
}

/* --- Larger screens ------------------------------------------------------------------------ */
@media (min-width: 560px) {
  .guide-example { padding: 22px 22px 22px; }
  .guide-find { grid-template-columns: 170px minmax(0, 1fr); gap: 4px 22px; }
  .guide-step { grid-template-columns: 124px minmax(0, 1fr); padding: 18px 22px 18px 18px; }
  .guide-step-visual { height: 124px; }
  .guide-mini-photo { width: 108px; }
  .guide-mini-find { width: 58px; }
}
@media (min-width: 768px) {
  .guide-hero { padding: 40px 0 72px; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: 52px; }
  .guide-hero h1 { font-size: clamp(2.8rem, 4.8vw, 4.2rem); }
  .guide-section { padding: 80px 0; }
  .guide-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .guide-finds { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .guide-find { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 14px; }
  .guide-find .find-card { grid-row: auto; width: min(100%, 210px); padding: 8px 8px 10px; }
  .guide-find figcaption strong { font-size: .9rem; }
  .guide-example.guide-interactive:not(.is-revealed) .guide-find .guide-pick, .guide-example.guide-interactive.is-revealed .guide-pick,
  .guide-example.guide-interactive.is-revealed .guide-match, .guide-pick, .guide-match { grid-column: 1; grid-row: auto !important; justify-self: center; }
  .guide-match { flex-direction: column; gap: 6px; }
  .guide-example-bar { justify-content: space-between; }
  .guide-places { max-width: none; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
  .guide-place { grid-template-columns: 1fr; gap: 14px; padding: 20px; }
  .guide-place:nth-child(2) { margin-top: 18px; }
  .guide-party { padding: 88px 0; }
  .guide-party-layout { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 64px; }
  .guide-faq-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 8px 56px; max-width: none; align-items: start; }
  .guide-faq-layout h2 { grid-row: span 2; position: sticky; top: 24px; }
  .guide-faq-more { grid-column: 2; }
}
@media (min-width: 1100px) {
  .guide-hero { gap: 72px; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); }
  .guide-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .guide-step { grid-template-columns: 1fr; align-content: start; text-align: left; padding: 20px; }
  .guide-step-num { top: 14px; left: 16px; }
  .guide-step-visual { height: 140px; }
  .guide-mini-photo { width: 120px; }
  .guide-mini-find { width: 64px; }
}
@media (max-width: 359px) {
  .guide-step { grid-template-columns: 84px minmax(0, 1fr); gap: 8px 12px; }
  .guide-find { grid-template-columns: 108px minmax(0, 1fr); }
}
.guide-example.guide-interactive.is-revealed .guide-example-prompt { display: none; }
.guide-party-chip { color: var(--ink); }
