/* Home Journey — animated buyer game for bydan.ca */
:root {
  --navy: #0b1f3a;
  --gold: #c8a45d;
  --gold-deep: #a9813a;
  --paper: #fffaf0;
  --meadow: #7a9b63;
  --ink: #0b1f3a;
  --ink-soft: #3b4a63;
  --land-b: 1;
  --sun-x: 12%;
  --sun-y: 70%;
  --ease: cubic-bezier(.22,.9,.3,1.1);
  --serif: "Young Serif", Georgia, "Times New Roman", serif;
  --sans: Figtree, "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { height: 100%; background: #5f8452; }
body { min-height: 100%; }

body.hj {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--sans);
  color: var(--ink);
  background: #9cc3ef;
}

/* ---------- Sky ---------- */
.sky { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.sky-layer { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s ease; }
.sky-layer[data-sky="0"] { background: linear-gradient(#8fa6d6, #f7c9b4 70%, #ffe3c9); }
.sky-layer[data-sky="1"] { background: linear-gradient(#9cc3ef, #ffe2b8 75%); }
.sky-layer[data-sky="2"] { background: linear-gradient(#8ec5f5, #e6f4ff 80%); }
.sky-layer[data-sky="3"] { background: linear-gradient(#6fb4f0, #d8eeff 80%); }
.sky-layer[data-sky="4"] { background: linear-gradient(#7fb3e6, #fff0cf 80%); }
.sky-layer[data-sky="5"] { background: linear-gradient(#f2b880, #ffe7b3 75%); }
.sky-layer[data-sky="6"] { background: linear-gradient(#3d3f7a, #b45f74 55%, #f08a5d); }
.sky-layer[data-sky="7"] { background: linear-gradient(#1d2550, #4b3c78 60%, #8a5f8f); }
.sky-layer[data-sky="8"] { background: linear-gradient(#0b1230, #1c2552 60%, #2c3468); }
body[data-stage="0"] .sky-layer[data-sky="0"],
body[data-stage="1"] .sky-layer[data-sky="1"],
body[data-stage="2"] .sky-layer[data-sky="2"],
body[data-stage="3"] .sky-layer[data-sky="3"],
body[data-stage="4"] .sky-layer[data-sky="4"],
body[data-stage="5"] .sky-layer[data-sky="5"],
body[data-stage="6"] .sky-layer[data-sky="6"],
body[data-stage="7"] .sky-layer[data-sky="7"],
body[data-stage="8"] .sky-layer[data-sky="8"] { opacity: 1; }

.sun, .moon {
  position: absolute;
  left: var(--sun-x);
  top: var(--sun-y);
  width: 92px; height: 92px;
  margin: -46px 0 0 -46px;
  border-radius: 50%;
  transition: left 2.2s ease-in-out, top 2.2s ease-in-out, opacity 1.4s ease;
}
.sun { background: radial-gradient(circle, #fff6d6 0 38%, #ffd36b 40%, rgba(255,200,90,.35) 62%, transparent 70%); }
.moon { left: 82%; top: 16%; width: 56px; height: 56px; opacity: 0; box-shadow: -10px 6px 0 0 #f4ead0; background: transparent; }
body[data-stage="7"] .sun, body[data-stage="8"] .sun { opacity: 0; }
body[data-stage="7"] .moon, body[data-stage="8"] .moon { opacity: 1; }

.stars {
  position: absolute; inset: 0 0 40% 0; opacity: 0; transition: opacity 2s ease;
  background-image:
    radial-gradient(1.5px 1.5px at 8% 20%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 18% 42%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 30% 12%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 44% 30%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 57% 8%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 66% 36%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 75% 24%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 90% 40%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 95% 10%, #fff 50%, transparent 51%);
  animation: twinkle 4s ease-in-out infinite alternate;
}
body[data-stage="7"] .stars { opacity: .5; }
body[data-stage="8"] .stars { opacity: 1; }
@keyframes twinkle { to { filter: brightness(.6); } }

.cloud {
  position: absolute; height: 26px; border-radius: 30px; background: rgba(255,255,255,.75);
  filter: blur(1px); transition: opacity 1.6s ease;
}
.cloud::before, .cloud::after { content: ""; position: absolute; border-radius: 50%; background: inherit; }
.cloud.c1 { top: 18%; width: 130px; animation: drift 70s linear infinite; }
.cloud.c1::before { width: 56px; height: 56px; left: 20px; top: -28px; }
.cloud.c1::after { width: 40px; height: 40px; left: 64px; top: -18px; }
.cloud.c2 { top: 32%; width: 90px; animation: drift 95s linear infinite; animation-delay: -40s; opacity: .7; }
.cloud.c2::before { width: 40px; height: 40px; left: 16px; top: -20px; }
.cloud.c2::after { width: 30px; height: 30px; left: 46px; top: -12px; }
body[data-stage="6"] .cloud, body[data-stage="7"] .cloud, body[data-stage="8"] .cloud { opacity: .18; }
@keyframes drift { from { transform: translateX(-200px); } to { transform: translateX(110vw); } }

/* ---------- Land and the house that builds itself ---------- */
.land {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1;
  width: 100%; height: 34vh; min-height: 190px; max-height: 360px;
  filter: brightness(var(--land-b));
  transition: filter 1.6s ease;
}
.hills-far path { fill: #a9c29a; }
.hills-mid path { fill: #86a874; }
.hills-near path { fill: #5f8452; }
.hills-far, .hills-mid, .hills-near { transition: transform 1.4s ease; }
body[data-walk="1"] .hills-far { transform: translateX(-14px); }
body[data-walk="1"] .hills-mid { transform: translateX(-28px); }
body[data-walk="1"] .hills-near { transform: translateX(-46px); }

.house .part {
  opacity: 0;
  transform: translateY(26px) scale(.96);
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transition: opacity .9s ease, transform 1s var(--ease);
}
.house .part.on { opacity: 1; transform: none; }
.house .marker rect { fill: #e9dcc0; }
.house .marker text { font: 800 11px var(--sans); fill: var(--navy); }
.house .stone { fill: #8c8f95; }
.house .wall { fill: #f6efe2; stroke: var(--navy); stroke-width: 2; }
.house .roof { fill: var(--navy); }
.house .chimney { fill: #6d4a3a; }
.house .door { fill: var(--gold); }
.house .knob { fill: var(--navy); }
.house .win { fill: #cfe0f0; stroke: var(--navy); stroke-width: 2; transition: fill 1.4s ease, filter 1.4s ease; }
.house .trunk { fill: #6d4a3a; }
.house .leaf { fill: #4f7a45; }
.house .bloom { fill: #f2a7b5; }
.house .bloom.b2 { fill: #ffd36b; }
.house .path { fill: #e3d2ad; }
.house .fence { stroke: #fff4dd; stroke-width: 4; stroke-linecap: round; fill: none; }
.house .lamp-post { fill: #2d3440; }
.house .lamp { fill: #ffe9a8; transition: filter 1.4s ease; }
.house .smoke circle { fill: rgba(255,255,255,.55); }
.house .smoke.on circle { animation: smoke 4s ease-in infinite; transform-box: fill-box; }
.house .smoke.on circle:nth-child(2) { animation-delay: 1.3s; }
.house .smoke.on circle:nth-child(3) { animation-delay: 2.6s; }
@keyframes smoke { 0% { opacity: 0; transform: translateY(16px) scale(.6); } 30% { opacity: .9; } 100% { opacity: 0; transform: translateY(-26px) scale(1.4); } }
body[data-stage="7"] .house .win, body[data-stage="8"] .house .win { fill: #ffd27a; filter: drop-shadow(0 0 8px #ffcf6a); }
body[data-stage="7"] .house .lamp, body[data-stage="8"] .house .lamp { filter: drop-shadow(0 0 10px #ffe39a); }
.house .leaf { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 6s ease-in-out infinite alternate; }
@keyframes sway { from { transform: rotate(-1.5deg); } to { transform: rotate(1.5deg); } }

/* ---------- Header ---------- */
.hj-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: max(12px, env(safe-area-inset-top)) 20px 12px;
  background: linear-gradient(rgba(255,255,255,.28), rgba(255,255,255,0));
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
body.night .hj-top { background: linear-gradient(rgba(11,18,48,.45), rgba(11,18,48,0)); }
.hj-brand {
  color: var(--ink); text-decoration: none; font: 400 1.05rem var(--serif); white-space: nowrap;
  transition: color 1.4s ease;
}
.hj-trail { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.hj-trail li {
  width: 34px; height: 8px; border-radius: 8px; background: rgba(255,255,255,.45);
  transition: background .6s ease, width .6s var(--ease);
}
.hj-trail li span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hj-trail li.done { background: var(--gold); }
.hj-trail li.now { width: 54px; background: var(--navy); }
body.night .hj-trail li.now { background: #fff; }
.hj-sound {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem .9rem; border: 0; border-radius: 999px;
  background: rgba(255,250,240,.82); color: var(--navy);
  font: 600 .88rem var(--sans); cursor: pointer;
}
.hj-sound:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.hj-sound-icon { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; }
.hj-sound-icon::before, .hj-sound-icon::after { content: ""; width: 3px; height: 6px; border-radius: 2px; background: currentColor; }
.hj-sound[aria-pressed="true"] .hj-sound-icon::before { animation: eq .9s ease-in-out infinite alternate; }
.hj-sound[aria-pressed="true"] .hj-sound-icon::after { animation: eq .7s ease-in-out infinite alternate-reverse; }
@keyframes eq { from { height: 4px; } to { height: 14px; } }
.hj-copy {
  position: fixed; right: 20px; bottom: 10px; z-index: 4; margin: 0;
  color: rgba(255,255,255,.92); font-size: .75rem; text-shadow: 0 1px 2px rgba(0,0,0,.4);
}
html[lang^="ko"] {
  --serif: "Noto Serif KR", "Young Serif", Georgia, serif;
  --sans: "Noto Sans KR", Figtree, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
}
html[lang^="ko"] .hj-q, html[lang^="ko"] .hj-lede, html[lang^="ko"] .medal .word, html[lang^="ko"] .medal .sub,
html[lang^="ko"] .peak h3, html[lang^="ko"] .peak p, html[lang^="ko"] .peak li, html[lang^="ko"] .bubble { word-break: keep-all; }
html[lang^="ko"] .hj-q { line-height: 1.3; }
.hj-now {
  position: fixed; left: 20px; bottom: 10px; z-index: 4; margin: 0;
  color: rgba(255,255,255,.9); font-size: .75rem; text-shadow: 0 1px 2px rgba(0,0,0,.35);
}

/* ---------- Screen ---------- */
.hj-main {
  position: relative; z-index: 3;
  min-height: 100vh;
  padding: 78px 20px calc(min(34vh, 360px) + 10px);
  display: flex; justify-content: center;
}
.hj-screen { width: min(1100px, 100%); text-align: center; }
.hj-screen.leaving { animation: leave .45s ease forwards; }
.hj-screen.entering { animation: enter .6s var(--ease) both; }
@keyframes leave { to { opacity: 0; transform: translateX(-40px); } }
@keyframes enter { from { opacity: 0; transform: translateX(50px); } }

.hj-q {
  max-width: 22ch; margin: .4rem auto .5rem;
  font: 400 clamp(1.7rem, 4.2vw, 3rem)/1.12 var(--serif);
  color: var(--ink); text-wrap: balance;
  transition: color 1.4s ease;
}
.hj-q.wide { max-width: 28ch; }
.hj-lede {
  max-width: 56ch; margin: 0 auto 1.6rem;
  color: var(--ink-soft); font-size: 1.05rem; line-height: 1.55;
  transition: color 1.4s ease;
}
.hj-reflect {
  max-width: 52ch; margin: 0 auto 1rem; padding: .7rem 1.1rem;
  border-radius: 16px; background: rgba(255,250,240,.72);
  color: var(--navy); font: italic 400 1rem/1.5 var(--sans);
}
body.night { --ink: #fff7e6; --ink-soft: #e8dcef; }
body.night .hj-brand { color: #fff7e6; }

/* ---------- Medallions ---------- */
.hj-medals {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: clamp(12px, 2.4vw, 26px);
  margin: 0 auto; max-width: 1060px;
}
button.medal {
  --size: clamp(96px, 13vw, 132px);
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: .55rem;
  width: calc(var(--size) + 40px);
  padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer;
  animation: pop .7s var(--ease) both;
  animation-delay: calc(var(--i) * 90ms + 120ms);
}
.medal .disc {
  position: relative;
  display: grid; place-items: center;
  width: var(--size); height: var(--size);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--paper) 60%, #f1e4c8);
  box-shadow: 0 14px 30px rgba(11,31,58,.18), inset 0 0 0 3px rgba(200,164,93,.45);
  animation: bob 4.6s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.7s);
  transition: box-shadow .3s ease, transform .3s var(--ease);
}
.medal .disc svg { width: 64%; height: 64%; overflow: visible; }
.medal .word {
  font: 400 1.18rem/1.15 var(--serif); color: var(--ink);
  text-shadow: 0 1px 10px rgba(255,255,255,.55);
  transition: color 1.4s ease;
}
body.night .medal .word { text-shadow: 0 1px 8px rgba(0,0,0,.4); }
.medal .sub {
  max-width: 19ch; color: var(--ink-soft); font-size: .86rem; line-height: 1.35;
  transition: color 1.4s ease;
}
.medal .tone {
  position: absolute; top: -6px; right: 6px;
  padding: .15rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 800;
  background: var(--paper); color: var(--navy); box-shadow: 0 4px 10px rgba(0,0,0,.12);
}
.medal .tone.positive { background: #e3f1dc; color: #2f6b45; }
.medal .tone.negative { background: #f7e1dc; color: #8d3f31; }
.medal .feel {
  padding: .12rem .55rem; border-radius: 999px; background: var(--gold); color: var(--navy);
  font-size: .74rem; font-weight: 800;
}
button.medal:hover .disc, button.medal:focus-visible .disc {
  transform: translateY(-6px) scale(1.05);
  box-shadow: 0 22px 40px rgba(11,31,58,.24), inset 0 0 0 3px var(--gold);
}
button.medal:focus-visible { outline: none; }
button.medal:focus-visible .disc { outline: 3px solid var(--navy); outline-offset: 4px; }
button.medal[aria-pressed="true"] .disc {
  box-shadow: 0 0 0 6px var(--gold), 0 0 40px 8px rgba(255,214,120,.7), 0 22px 40px rgba(11,31,58,.24);
}
button.medal[aria-pressed="true"] .disc::after {
  content: ""; position: absolute; right: 2px; top: 2px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--navy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat;
  animation: pop .4s var(--ease);
}
.hj-medals.chosen button.medal:not([aria-pressed="true"]) { animation: drop .5s ease forwards; }
.hj-medals.chosen button.medal[aria-pressed="true"] .disc { animation: rise .6s var(--ease) forwards; }
@keyframes pop { from { opacity: 0; transform: translateY(30px) scale(.6); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes drop { to { opacity: 0; transform: translateY(40px) scale(.8); } }
@keyframes rise { to { transform: translateY(-24px) scale(1.12); } }

/* Animated parts inside illustrations */
.ic .spin { transform-box: fill-box; transform-origin: center; animation: spin 18s linear infinite; }
.ic .sw { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 2.6s ease-in-out infinite alternate; }
.ic .pl { transform-box: fill-box; transform-origin: center; animation: pulse 2.4s ease-in-out infinite; }
.ic .bb { animation: tinybob 2.2s ease-in-out infinite; }
.ic .st { animation: steam 2.4s ease-in-out infinite; }
.ic .hand { transform-box: fill-box; transform-origin: 50% 100%; animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { transform: scale(1.12); opacity: .75; } }
@keyframes tinybob { 50% { transform: translateY(-3px); } }
@keyframes steam { 0% { opacity: 0; transform: translateY(4px); } 50% { opacity: 1; } 100% { opacity: 0; transform: translateY(-6px); } }

/* ---------- Buttons ---------- */
.hj-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; margin-top: 1.8rem; }
.hj-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 50px; padding: .85rem 1.6rem; border: 0; border-radius: 999px;
  background: var(--navy); color: #fff; font: 800 1rem var(--sans); text-decoration: none; cursor: pointer;
  box-shadow: 0 12px 26px rgba(11,31,58,.25);
  transition: transform .2s var(--ease), background .2s ease, opacity .2s ease;
}
.hj-btn:hover { transform: translateY(-2px); background: #143f73; }
.hj-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.hj-btn[disabled] { opacity: .4; cursor: not-allowed; transform: none; }
.hj-btn.ghost { background: rgba(255,250,240,.85); color: var(--navy); box-shadow: none; }
.hj-btn.gold { background: var(--gold); color: var(--navy); }
.hj-btn.big { min-height: 60px; padding: 1rem 2.2rem; font-size: 1.1rem; }
.hj-btn.glow { animation: glow 2.2s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 8px rgba(200,164,93,.35), 0 12px 26px rgba(11,31,58,.25); } }
.hj-count { margin: 1rem 0 0; color: var(--ink-soft); font-size: .92rem; }

/* ---------- Intro ---------- */
.hj-intro .hj-q { max-width: 16ch; font-size: clamp(2.3rem, 6vw, 4.4rem); }
.hj-intro .hj-lede { font-size: 1.15rem; }
.hj-quiet { margin-top: 1rem; }
.hj-quiet button { border: 0; background: none; color: var(--ink-soft); font: 600 .95rem var(--sans); text-decoration: underline; cursor: pointer; }

/* ---------- Podium (results) ---------- */
.podium {
  display: grid; grid-template-columns: 1fr 1.7fr 1fr; align-items: end;
  gap: clamp(10px, 2vw, 24px); max-width: 1080px; margin: 0 auto;
}
.peak { border: 0; background: none; padding: 0; color: inherit; font: inherit; animation: pop .8s var(--ease) both; }
.peak.left { animation-delay: .35s; }
.peak.right { animation-delay: .5s; }
.peak.center { animation-delay: .1s; }
.peak .card {
  position: relative;
  padding: 1.2rem 1.1rem 1.3rem; border-radius: 28px;
  background: rgba(255,250,240,.94);
  box-shadow: 0 18px 44px rgba(11,31,58,.2);
  text-align: center;
}
.peak.center .card { padding: 1.6rem 1.6rem 1.7rem; box-shadow: 0 0 0 4px var(--gold), 0 0 60px 6px rgba(255,214,120,.55), 0 26px 60px rgba(11,31,58,.28); }
button.peak { cursor: pointer; }
button.peak:hover .card { transform: translateY(-6px); }
button.peak .card { transition: transform .3s var(--ease); }
button.peak:focus-visible { outline: none; }
button.peak:focus-visible .card { outline: 3px solid var(--navy); outline-offset: 4px; }
.peak .rank { display: inline-block; margin-bottom: .5rem; padding: .2rem .7rem; border-radius: 999px; background: #efe3c6; color: var(--navy); font-size: .8rem; font-weight: 800; }
.peak.center .rank { background: var(--navy); color: #fff; }
.peak .pic {
  display: grid; place-items: center; margin: 0 auto .7rem;
  width: 96px; height: 96px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #f6ead0);
  box-shadow: inset 0 0 0 3px rgba(200,164,93,.5);
}
.peak.center .pic { width: 150px; height: 150px; animation: bob 4.6s ease-in-out infinite; }
.peak .pic svg { width: 66%; height: 66%; overflow: visible; }
.peak h3 { margin: 0 0 .35rem; font: 400 1.15rem/1.2 var(--serif); color: var(--navy); }
.peak.center h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.peak p { margin: .3rem 0; color: #3b4a63; font-size: .9rem; line-height: 1.5; }
.peak.center p { font-size: 1rem; }
.peak ul { margin: .7rem auto 0; padding: 0; list-style: none; max-width: 46ch; text-align: left; }
.peak li { position: relative; padding: .25rem 0 .25rem 1.5rem; color: #3b4a63; font-size: .93rem; line-height: 1.45; }
.peak li::before { content: ""; position: absolute; left: 0; top: .55rem; width: .75rem; height: .75rem; border-radius: 50%; background: var(--gold); }
.peak .swap { margin-top: .6rem; color: var(--gold-deep); font-size: .85rem; font-weight: 800; }
.types { display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem; margin-top: 1rem; }
button.type {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .5rem .9rem .5rem .55rem; border: 2px solid #e6d6b2; border-radius: 999px;
  background: #fff; color: var(--navy); font: 700 .9rem var(--sans); cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s var(--ease);
}
button.type svg { width: 30px; height: 30px; }
button.type:hover { transform: translateY(-2px); border-color: var(--gold); }
button.type:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
button.type[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
button.type .best { font-size: .74rem; font-weight: 800; color: var(--gold-deep); }
button.type[aria-pressed="true"] .best { color: var(--gold); }
.hj-brief {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: -.6rem auto 1.4rem;
}
.hj-brief span { padding: .35rem .8rem; border-radius: 999px; background: rgba(255,250,240,.85); color: var(--navy); font-size: .88rem; }
.hj-brief b { color: var(--gold-deep); }
.hj-note { max-width: 60ch; margin: 1.2rem auto 0; color: var(--ink-soft); font-size: .82rem; }

/* ---------- Contact with waving Daniel ---------- */
.hj-contact { display: grid; grid-template-columns: minmax(240px, 380px) minmax(280px, 460px); justify-content: center; align-items: center; gap: clamp(20px, 4vw, 56px); text-align: left; }
.dan { position: relative; width: min(300px, 70vw); margin: 0 auto; aspect-ratio: 1; }
.dan-photo {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
  box-shadow: 0 0 0 6px var(--paper), 0 0 0 10px var(--gold), 0 24px 60px rgba(0,0,0,.35);
  animation: danbob 2.4s ease-in-out infinite;
  transform-origin: 50% 90%;
}
.dan-cartoon { aspect-ratio: 1; }
.dan-video {
  display: block; width: 100%; height: 100%; object-fit: cover;
  border-radius: 34px; background: #6e5246;
  box-shadow: 0 0 0 6px var(--paper), 0 0 0 10px var(--gold), 0 24px 60px rgba(0,0,0,.35);
  animation: pop .8s var(--ease) both;
}
.dan-cartoon.joy .dan-video { animation: pop .8s var(--ease) both, danjoy 1.4s ease-in-out .8s infinite; }
.dan-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; display: block; }
.dan-arm {
  position: absolute; right: -9%; bottom: 3%; width: 40%; height: auto;
  transform-origin: 30% 96%;
  animation: wave 1.1s ease-in-out infinite alternate;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,.25));
}
.dan.joy .dan-arm { animation-duration: .45s; }
.dan.joy .dan-photo { animation: danjoy .9s ease-in-out infinite; }
.dan-lines { position: absolute; right: -24%; top: 12%; width: 22%; opacity: .9; animation: lines 1.1s ease-in-out infinite alternate; }
@keyframes wave { from { transform: rotate(-16deg); } to { transform: rotate(18deg); } }
@keyframes danbob { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-6px) rotate(1.5deg); } }
@keyframes danjoy { 0%, 100% { transform: translateY(0) rotate(-3deg) scale(1); } 50% { transform: translateY(-14px) rotate(3deg) scale(1.03); } }
@keyframes lines { from { opacity: .2; transform: translateX(-4px); } to { opacity: 1; transform: none; } }
.bubble {
  position: relative; margin: 1.6rem auto 0; max-width: 300px; padding: .9rem 1.1rem;
  border-radius: 20px; background: var(--paper); color: var(--navy);
  font: 400 1.1rem/1.35 var(--serif); text-align: center;
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
  animation: pop .7s var(--ease) .5s both;
}
.bubble::before { content: ""; position: absolute; left: 50%; top: -10px; margin-left: -10px; border: 10px solid transparent; border-top: 0; border-bottom-color: var(--paper); }
.hj-form {
  display: grid; gap: .9rem; padding: 1.6rem; border-radius: 28px;
  background: rgba(255,250,240,.95); color: var(--navy);
  box-shadow: 0 24px 60px rgba(0,0,0,.3);
  animation: pop .8s var(--ease) .2s both;
}
.hj-form h2 { margin: 0; font: 400 1.6rem/1.2 var(--serif); }
.hj-form p { margin: 0; color: #3b4a63; line-height: 1.5; }
.hj-form label { display: grid; gap: .35rem; font-weight: 800; font-size: .92rem; }
.hj-form input {
  width: 100%; min-height: 50px; padding: .8rem 1rem; border: 2px solid #e6d6b2; border-radius: 14px;
  background: #fff; color: var(--navy); font: 400 1rem var(--sans);
}
.hj-form input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(200,164,93,.2); }
.hj-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.hj-error { min-height: 1.3em; margin: 0; color: #a13d2d !important; font-weight: 700; font-size: .92rem; }
.hj-small { font-size: .84rem; }
.hj-summary { padding: .9rem 1rem; border-radius: 16px; background: #f3e8cf; font-size: .95rem; line-height: 1.5; }
.hj-summary b { font-weight: 800; }

.hj-done .dan { width: min(260px, 60vw); }
.hj-done .hj-q { margin-top: 1.6rem; }

/* ---------- Confetti ---------- */
.confetti { position: fixed; inset: 0; z-index: 6; pointer-events: none; overflow: hidden; }
.confetti i {
  position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px;
  animation: fall linear forwards;
}
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

.hj-noscript { padding: 2rem; border-radius: 20px; background: var(--paper); }

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
  .hj-top { padding: 10px 14px; }
  .hj-brand { display: none; }
  .hj-now { display: none; }
  .hj-copy { left: 0; right: 0; text-align: center; bottom: 6px; font-size: .7rem; }
  .hj-trail li { width: 20px; }
  .hj-trail li.now { width: 34px; }
  .hj-main { padding: 70px 16px calc(min(34vh, 360px) + 10px); }
  button.medal { --size: 92px; width: 132px; }
  .medal .sub { font-size: .8rem; }
  .podium { grid-template-columns: 1fr 1fr; }
  .peak.center { grid-column: 1 / -1; grid-row: 1; }
  .peak.center .pic { width: 120px; height: 120px; }
  .hj-contact { grid-template-columns: 1fr; text-align: center; }
  .hj-form { text-align: left; }
  .hj-form .two { grid-template-columns: 1fr; }
  .dan { width: min(220px, 58vw); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .2s !important; }
  .dan-arm { transform: rotate(10deg); }
  .confetti { display: none; }
}
