/* ==========================================================================
   DreamKeeper landing — warm, quiet, a little playful.
   The Keeper = the two supplied artworks only (badge + sticker). Motion is CSS on those files and on plain shapes.
   ========================================================================== */
.dk-page { --dk-g: #1c3226; --dk-g2: #2c4d39; }

/* ---------- hero ---------- */
.dk-hero { position: relative; isolation: isolate; overflow: hidden; background: var(--ivory); padding-block: 40px clamp(72px, 9vw, 120px); }
.dk-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(46% 56% at 78% 42%, rgba(226, 189, 114, 0.38), transparent 72%), radial-gradient(30% 36% at 6% 62%, rgba(120, 160, 110, 0.14), transparent 70%); }
.dk-hero-grid { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.dk-copy { display: grid; gap: 22px; justify-items: start; }
.dk-back { font-size: 0.9rem; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: color 0.2s, border-color 0.2s; }
.dk-back:hover { color: var(--ink); border-color: var(--gold-lo); }
.dk-hero h1 { font-size: clamp(2.5rem, 5.2vw, 4.4rem); line-height: 1.26; letter-spacing: 0.04em; }
html[lang="en"] .dk-hero h1 { letter-spacing: 0; line-height: 1.14; }
.dk-lede { font-size: clamp(1.05rem, 1.5vw, 1.24rem); line-height: 2; color: var(--muted); }
.dk-note { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.08em; color: var(--gold-lo); }
.dk-note::before { content: "— "; }

.dk-stage { position: relative; width: min(100%, 600px); aspect-ratio: 1; justify-self: center; display: grid; place-items: center; }
/* the Keeper as a shrine ornament: one-tone gilded figure inside a fine halo (light rays in a ring, two hairline rings), floating quietly */
.dk-halo { position: absolute; inset: 4%; border-radius: 50%; background: radial-gradient(circle, rgba(243, 227, 189, 0.75) 0, rgba(243, 227, 189, 0.32) 42%, transparent 66%); pointer-events: none; }
.dk-halo .rays { position: absolute; inset: 0; border-radius: 50%; background: repeating-conic-gradient(from 0deg, rgba(148, 105, 42, 0.30) 0 0.5deg, transparent 0.5deg 6deg);
  mask-image: radial-gradient(circle, transparent 0 37%, #000 41%, #000 46%, transparent 50%); animation: halo-turn 140s linear infinite; }
.dk-halo .ring { position: absolute; border-radius: 50%; border: 1px solid rgba(148, 105, 42, 0.42); }
.dk-halo .r1 { inset: 3%; }
.dk-halo .r2 { inset: 0; border-width: 3px; border-style: double; border-color: rgba(148, 105, 42, 0.26); }
@keyframes halo-turn { to { rotate: 360deg; } }
.dk-talk { position: relative; z-index: 2; width: 80%; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 40%; -webkit-tap-highlight-color: transparent; }
.dk-talk:focus-visible { outline: 2px solid var(--gold-lo); outline-offset: 6px; }
.dk-keeper { display: block; width: 100%; height: auto; transform-origin: 50% 92%; animation: dk-float 5.6s ease-in-out infinite;
  filter: url(#dk-gild) drop-shadow(0 0 22px rgba(243, 214, 140, 0.55)) drop-shadow(0 18px 16px rgba(70, 48, 20, 0.22)); }
.dk-keeper.shake { animation: dk-wobble 0.75s cubic-bezier(0.36, 0.07, 0.19, 0.97); }
@keyframes dk-float { 50% { translate: 0 -7px; } }
@keyframes dk-wobble { 15% { rotate: -6deg; } 32% { rotate: 5deg; } 50% { rotate: -3.5deg; } 68% { rotate: 2deg; } 84% { rotate: -0.8deg; } 100% { rotate: 0deg; } }
.dk-bubble { position: absolute; z-index: 3; right: -2%; top: 4%; width: min(290px, 62%); padding: 14px 20px; border-radius: 22px 22px 22px 6px; background: #fffdf8;
  box-shadow: 0 16px 34px -18px rgba(70, 48, 20, 0.55), 0 0 0 1px var(--line); opacity: 0; translate: 0 10px; scale: 0.96; transform-origin: 12% 100%;
  transition: opacity 0.35s, translate 0.45s var(--ease), scale 0.45s var(--ease); pointer-events: none; }
.dk-bubble.in { opacity: 1; translate: 0 0; scale: 1; }
.dk-bubble p { font-family: var(--head); font-weight: 500; font-size: 1rem; line-height: 1.75; color: var(--text); text-wrap: pretty; }
.dk-bubble::after { content: ""; position: absolute; left: 22px; bottom: -11px; width: 22px; height: 22px; background: #fffdf8; clip-path: polygon(0 0, 100% 0, 18% 100%); }
.dk-defs { position: absolute; }
/* the name in ink: the whole word, in place, slowly comes clear out of a soft blot, rests a good while, then bleeds back into the paper (4.6s) */
.dk-ink { position: absolute; z-index: 4; left: 50%; bottom: 3%; translate: -50% 0; margin: 0; white-space: nowrap; pointer-events: none;
  font-family: "Pixelify Sans", var(--mono), monospace; font-weight: 700; font-size: clamp(2rem, 4.2vw, 3.3rem); line-height: 1; letter-spacing: 0.03em; color: var(--green);
  opacity: 0; animation: ink 4.6s cubic-bezier(0.33, 0, 0.2, 1) infinite; }
@keyframes ink {
  0% { opacity: 0; filter: blur(16px); color: var(--gold-lo); }
  12% { opacity: 0.7; filter: blur(9px); }
  36%, 82% { opacity: 1; filter: blur(0); color: var(--green); }
  94% { opacity: 0.4; filter: blur(8px); color: var(--gold-lo); }
  100% { opacity: 0; filter: blur(14px); }
}

/* ---------- journey ---------- */
.dk-journey { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.dk-journey .copy { display: grid; gap: 20px; }
.dk-journey .copy p { color: var(--muted); font-size: 1.05rem; text-wrap: pretty; }
.dk-journey .note { font-size: 0.9rem; color: var(--gold-lo); padding-left: 14px; border-left: 2px solid var(--gold); }
.forms { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.forms b { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.14em; color: var(--gold-lo); font-weight: 500; margin-right: 6px; }
.forms span { padding: 4px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 0.9rem; }
.dk-steps { display: grid; gap: 0; border-top: 1px solid var(--line); }
.dk-step { display: grid; grid-template-columns: 64px 1fr; gap: 20px; align-items: start; padding: 26px 8px 26px 0; border-bottom: 1px solid var(--line); transition: background 0.3s, padding 0.4s var(--ease); }
.dk-step:hover { padding-left: 14px; background: linear-gradient(90deg, rgba(226, 189, 114, 0.14), transparent); }
.dk-step .no { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; font-family: var(--serif-latin); font-size: 1.4rem; font-weight: 600; color: var(--ink); border: 1px solid var(--gold-lo); background: var(--ivory); }
.dk-step h3 { font-size: 1.25rem; line-height: 1.5; }
.dk-step p { color: var(--muted); font-size: 0.97rem; line-height: 1.8; margin-top: 2px; }

/* ---------- meet: the supplied plain Keeper (keeper-plain.png) in a soft pool of lamplight, with a few fine glints taking turns around it ---------- */
.dk-meet { overflow: hidden; }
.dk-meet-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.dk-meet-copy { display: grid; gap: 22px; }
.dk-meet-copy .h2 { color: #fff; }
.dk-meet-keeper { position: relative; margin: 0; display: grid; place-items: center; padding: clamp(12px, 3vw, 36px); }
.dk-meet-keeper::before { content: ""; position: absolute; inset: 6% 10%; border-radius: 50%; background: radial-gradient(closest-side, rgba(243, 214, 140, 0.34), rgba(243, 214, 140, 0.12) 64%, transparent); }
.dk-duo { position: relative; width: 100%; max-width: 420px; animation: float 4.8s ease-in-out infinite; }
.dk-duo .dog { position: relative; display: block; width: 100%; height: auto; filter: drop-shadow(0 22px 22px rgba(0, 0, 0, 0.32)); }
.dk-twinkles i { position: absolute; left: var(--x); top: var(--y); width: var(--s); aspect-ratio: 1; margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2); background: #fff6d8; opacity: 0; scale: 0;
  clip-path: polygon(50% 0, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0 50%, 42% 42%); filter: drop-shadow(0 0 5px rgba(255, 228, 150, 0.95));
  animation: twinkle 5.6s ease-in-out infinite var(--d); }
@keyframes twinkle { 0%, 100% { opacity: 0; scale: 0; rotate: 0deg; } 8% { opacity: 1; scale: 1; } 18% { opacity: 0; scale: 0.3; rotate: 45deg; } }

/* ---------- before you start ---------- */
.dk-start { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.dk-start .copy { display: grid; gap: 20px; }
.dk-start ul { display: grid; gap: 12px; }
.dk-start li { position: relative; padding-left: 28px; color: var(--muted); text-wrap: pretty; }
.dk-start li::before { content: ""; position: absolute; left: 4px; top: 0.8em; width: 8px; height: 8px; transform: rotate(45deg); background: var(--gold); }
.play-panel { position: relative; display: grid; gap: 16px; justify-items: start; padding: clamp(26px, 3vw, 40px); border-radius: 24px; background: linear-gradient(180deg, var(--dk-g2), var(--dk-g)); color: var(--on-ink); box-shadow: 0 40px 70px -40px rgba(20, 36, 27, 0.8); overflow: hidden; }
.play-panel .tag { font-family: var(--mono); color: var(--gold); letter-spacing: 0.14em; font-size: 0.8rem; text-transform: uppercase; }
.play-panel .btns { display: flex; flex-wrap: wrap; gap: 12px; }
.play-panel .btn-ghost { color: var(--on-ink); border-color: rgba(246, 240, 225, 0.5); }   /* light on the green panel (main.css resets ghost buttons to green) */
.play-panel .btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.play-panel small { color: var(--on-ink-muted); max-width: 20em; line-height: 1.8; position: relative; z-index: 1; }
.play-panel .alt { color: var(--gold); border-bottom: 1px solid rgba(226, 189, 114, 0.5); padding-bottom: 2px; position: relative; z-index: 1; }
/* the Keeper's badge as a coin: a small, quick turn on its axis (never scaled), and now and then a fine glint across it with two tiny stars */
.pp-coin { position: absolute; right: -22px; bottom: -26px; width: 150px; aspect-ratio: 1; perspective: 520px; pointer-events: none; }
.pp-badge { display: block; width: 100%; height: auto; opacity: 0.95; animation: coin 1.8s ease-in-out infinite; }
@keyframes coin { 0%, 100% { transform: rotateY(-16deg); } 50% { transform: rotateY(16deg); } }
.pp-glint { position: absolute; inset: 3%; border-radius: 50%; overflow: hidden; }
.pp-glint::before { content: ""; position: absolute; top: -20%; bottom: -20%; left: 0; width: 34%; translate: -160% 0; rotate: 24deg; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 246, 214, 0.75) 46%, rgba(255, 255, 255, 0.95) 50%, rgba(255, 246, 214, 0.75) 54%, transparent); mix-blend-mode: screen;
  animation: glint 6.5s cubic-bezier(0.45, 0, 0.25, 1) infinite 1.2s; }
@keyframes glint { 0% { translate: -160% 0; opacity: 0; } 3% { opacity: 1; } 15% { translate: 380% 0; opacity: 1; } 16%, 100% { translate: 380% 0; opacity: 0; } }
.pp-spark { position: absolute; left: 22%; top: 12%; width: 16px; aspect-ratio: 1; background: #fff6d8; opacity: 0; scale: 0;
  clip-path: polygon(50% 0, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0 50%, 42% 42%); filter: drop-shadow(0 0 4px rgba(255, 228, 150, 0.9));
  animation: spark 6.5s ease-out infinite 1.9s; }
.pp-spark.s2 { left: 64%; top: 30%; width: 10px; animation-delay: 2.15s; }
@keyframes spark { 0% { opacity: 0; scale: 0; rotate: 0deg; } 4% { opacity: 1; scale: 1; } 10% { opacity: 0; scale: 0.2; rotate: 90deg; } 100% { opacity: 0; scale: 0; } }
.copy-status { font-size: 0.85rem; color: var(--mint); min-height: 1.4em; }

/* ---------- closing ---------- */
.dk-close { text-align: center; background: radial-gradient(60% 90% at 50% 0%, rgba(226, 189, 114, 0.2), transparent 70%), linear-gradient(180deg, var(--dk-g2), var(--dk-g)); color: #fff; }
.dk-close .wrap { display: grid; justify-items: center; gap: 28px; }
/* the supplied TV game console, held still */
.dk-close-tv { width: min(170px, 44vw); height: auto; filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.32)); }
.dk-close h2 { font-size: clamp(1.9rem, 4vw, 3.2rem); line-height: 1.4; }
.dk-close .btns { display: flex; flex-wrap: wrap; gap: 18px 24px; justify-content: center; align-items: center; }

@keyframes float { 50% { transform: translateY(-8px); } }

@media (max-width: 1020px) {
  .dk-hero-grid, .dk-journey, .dk-meet-grid, .dk-start { grid-template-columns: 1fr; }
  .dk-stage { width: min(100%, 460px); }
  .dk-bubble { right: 0; max-width: 220px; padding: 12px 16px; }
  .dk-bubble p { font-size: 0.95rem; }
}
@media (max-width: 640px) {
  .dk-step { grid-template-columns: 52px 1fr; gap: 14px; }
  .dk-step .no { width: 44px; height: 44px; font-size: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) {
  .dk-keeper, .dk-bubble, .dk-duo, .dk-twinkles i, .pp-badge, .pp-glint::before, .pp-spark { animation: none; }
  .dk-ink { animation: none; opacity: 1; }
  .dk-halo .rays, .dk-keeper.shake { animation: none; }
}
.static .dk-ink { animation: none; opacity: 1; }
.static .pp-badge, .static .pp-glint::before, .static .pp-spark, .static .dk-twinkles i { animation: none; }

/* Keep the copy control readable on its dark panel. */
.play-panel .btn-ghost { color: var(--on-ink); border-color: rgba(246, 240, 225, 0.5); }

.play-panel .btn-ghost:hover, .play-panel .btn-ghost:focus-visible { color: var(--green); }
