/* BoxFolk website — motion + v3 sections (vanilla, no external libs; respects reduced motion) */
.deco { position: relative; overflow: hidden; }
.deco > .wrap { position: relative; z-index: 1; }
.doodle { position: absolute; z-index: 0; mix-blend-mode: multiply; opacity: .55; pointer-events: none; }
.fl.a { animation: bf-float 7s ease-in-out infinite; } .fl.b { animation: bf-float 9s ease-in-out -3s infinite; }
@keyframes bf-float { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-14px) rotate(3deg); } }
.bob { animation: bf-bob 3.2s ease-in-out infinite; transform-origin: 50% 100%; } .bob.d2 { animation-delay: -.8s; } .bob.d3 { animation-delay: -1.6s; } .bob.d4 { animation-delay: -2.4s; }
@keyframes bf-bob { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-5px) scale(1.015, .99); } }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.stagger > * { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.stagger.in > * { opacity: 1; transform: none; }
.stagger.in > *:nth-child(1) { transition-delay: 0.00s; }
.stagger.in > *:nth-child(2) { transition-delay: 0.06s; }
.stagger.in > *:nth-child(3) { transition-delay: 0.12s; }
.stagger.in > *:nth-child(4) { transition-delay: 0.18s; }
.stagger.in > *:nth-child(5) { transition-delay: 0.24s; }
.stagger.in > *:nth-child(6) { transition-delay: 0.30s; }
.stagger.in > *:nth-child(7) { transition-delay: 0.36s; }
.stagger.in > *:nth-child(8) { transition-delay: 0.42s; }
.stagger.in > *:nth-child(9) { transition-delay: 0.48s; }
.stagger.in > *:nth-child(10) { transition-delay: 0.54s; }
.stagger.in > *:nth-child(11) { transition-delay: 0.60s; }
.stagger.in > *:nth-child(12) { transition-delay: 0.66s; }
.stagger.in > *:nth-child(13) { transition-delay: 0.72s; }
.stagger.in > *:nth-child(14) { transition-delay: 0.78s; }
.stagger.in > *:nth-child(15) { transition-delay: 0.84s; }
.stagger.in > *:nth-child(16) { transition-delay: 0.90s; }
.draw path { stroke-dasharray: 260; stroke-dashoffset: 260; transition: stroke-dashoffset 1.4s ease .2s; } .in .draw path, .draw.in path { stroke-dashoffset: 0; }
.tilt { transition: transform .25s ease, box-shadow .25s ease; will-change: transform; }
.cover .scene { transform-origin: 50% 80%; will-change: transform; }
.cover .title { will-change: transform, opacity; }
.cover .enter .bubble { animation: bf-pulse 2.4s ease-in-out infinite; }
@keyframes bf-pulse { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.cover .enter svg { animation: bf-arrow 1.6s ease-in-out infinite; } @keyframes bf-arrow { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
.moments { grid-template-columns: repeat(6, 1fr) !important; }
/* convo */
.convo { max-width: 720px; margin: 34px auto 0; text-align: left; }
.convo-tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.convo-tabs button { font: 15px/1 var(--zh); padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); cursor: pointer; color: var(--muted); }
.convo-tabs button.on { border-color: var(--pencil); color: var(--ink); box-shadow: 2px 3px 0 var(--sage-l); }
.convo-pane { display: none; min-height: 250px; } .convo-pane.on { display: block; animation: bf-fade .5s ease; }
@keyframes bf-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.msg .zh { display: block; color: var(--muted); font-size: 14px; margin-top: 4px; }
.msg.type { clip-path: inset(0 0 100% 0); } .convo-pane.on .msg.type { animation: bf-type 1.1s ease .45s forwards; }
@keyframes bf-type { to { clip-path: inset(0 0 0 0); } }
.convo-pane.on .msg.me { animation: bf-fade .4s ease; }
/* folk + memo */
.fcard .say { font: 600 19px/1.3 var(--hand); color: var(--pencil); margin: 2px 0 6px; }
.memo { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; margin-top: 56px; text-align: left; }
.memo-book { background: #FFFCF2; border: 1.5px solid var(--pencil); border-radius: 6px 18px 18px 6px; padding: 24px 26px 22px 40px; box-shadow: 4px 5px 0 var(--sage-l); position: relative;
  background-image: repeating-linear-gradient(#FFFCF2 0 33px, #E7E0CC 33px 34px); }
.memo-book::before { content: ""; position: absolute; left: 18px; top: 0; bottom: 0; border-left: 1.5px solid #E2B8A8; }
.memo-title { font-size: 15px; color: var(--muted); margin-bottom: 6px; }
.memo-list { list-style: none; padding: 0; margin: 0; } .memo-list li { font: 600 22px/34px var(--hand); color: var(--ink); opacity: 0; transform: translateX(-8px); transition: .5s ease; }
.memo.in .memo-list li { opacity: 1; transform: none; } .memo.in .memo-list li:nth-child(1) { transition-delay: 0.6499999999999999s; } .memo.in .memo-list li:nth-child(2) { transition-delay: 1s; } .memo.in .memo-list li:nth-child(3) { transition-delay: 1.3499999999999999s; } .memo.in .memo-list li:nth-child(4) { transition-delay: 1.7s; }
.memo-text .en { font-size: 22px; color: var(--sage-d); } .memo-text h3 { font-size: 26px; margin: 4px 0 10px; } .memo-text p { color: var(--muted); }
/* pains */
.pain { grid-template-columns: 1fr 22px 1fr !important; } .pain .arr { font: 600 22px/1 var(--hand); color: var(--sage-d); text-align: center; }
/* features */
.marquee { overflow: hidden; margin: 30px 0 8px; mask-image: linear-gradient(90deg, #0000, #000 10%, #000 90%, #0000); }
.marquee .track { display: flex; gap: 12px; width: max-content; animation: bf-marquee 46s linear infinite; }
.marquee span { white-space: nowrap; padding: 6px 16px; border-radius: 999px; border: 1px dashed var(--sage-d); color: var(--sage-d); font-size: 14px; background: #ffffff70; }
@keyframes bf-marquee { to { transform: translateX(-50%); } }
.fgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px; }
.ftile { background: var(--card); border: 1.5px solid var(--line); border-radius: 20px; padding: 16px 18px 18px; }
.ftile img { width: 64px; height: 64px; object-fit: contain; mix-blend-mode: multiply; margin-bottom: 6px; }
.ftile .en { display: block; font-size: 20px; color: var(--sage-d); line-height: 1.1; } .ftile b { display: block; font-weight: 400; font-size: 17px; margin: 2px 0 4px; } .ftile p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.ftile:hover { border-color: var(--pencil); box-shadow: 3px 4px 0 var(--sage-l); }
.ftile:hover img { animation: bf-wiggle .6s ease; } @keyframes bf-wiggle { 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
.shots figure { margin: 0; background: var(--card); border: 1.5px solid var(--pencil); border-radius: 18px; padding: 10px; box-shadow: 3px 4px 0 var(--sage-l); }
.shots figure:nth-child(1) { transform: rotate(-1.5deg); } .shots figure:nth-child(3) { transform: rotate(1.5deg); }
.shots img { border-radius: 10px; } .shots figcaption { font: 600 19px/1 var(--hand); text-align: center; margin-top: 10px; color: var(--pencil); }
/* brains */
.brains { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 34px; }
.brain { background: var(--card); border: 1.5px solid var(--line); border-radius: 22px; padding: 24px; } .brain .tag { font: 600 19px/1 var(--hand); color: var(--sage-d); } .brain h3 { font-size: 21px; margin: 8px 0; } .brain p { margin: 0; color: var(--muted); font-size: 15px; }
/* identity shine */
.mcard .shine { position: absolute; top: -50%; bottom: -50%; left: -40%; width: 30%; background: linear-gradient(90deg, #0000, #FFF3D040, #0000); transform: rotate(18deg); animation: bf-shine 5s ease-in-out infinite; }
@keyframes bf-shine { 0%, 55% { left: -40%; } 100% { left: 130%; } }
.mcard .q { animation: bf-q 2.6s ease-in-out infinite; } @keyframes bf-q { 50% { transform: rotate(8deg) scale(1.06); } }
.postcard .stamp { animation: bf-q 3s ease-in-out infinite; }
/* snow */
.season { position: relative; overflow: hidden; } .season .wrap { position: relative; z-index: 1; }
.snowfall { position: absolute; inset: 0; pointer-events: none; opacity: .7;
  background-image: radial-gradient(2px 2px at 10% 20%, #fff, #0000), radial-gradient(1.5px 1.5px at 30% 60%, #fff, #0000), radial-gradient(2px 2px at 55% 30%, #fff, #0000), radial-gradient(1.5px 1.5px at 75% 70%, #fff, #0000), radial-gradient(2.5px 2.5px at 90% 15%, #fff, #0000), radial-gradient(1.5px 1.5px at 45% 85%, #fff, #0000);
  background-size: 320px 320px; animation: bf-snow 14s linear infinite; }
@keyframes bf-snow { to { background-position: 40px 320px; } }
@media (max-width: 920px) { .moments { grid-template-columns: 1fr 1fr !important; } .fgrid { grid-template-columns: 1fr 1fr; } .memo, .brains, .shots { grid-template-columns: 1fr; } .doodle { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .reveal, .stagger > *, .memo-list li { opacity: 1 !important; transform: none !important; } .msg.type { clip-path: none !important; } }
.apply { max-width: 560px; margin: 8px auto 0; display: grid; gap: 12px; text-align: left; }
.apply-row { display: grid; grid-template-columns: 1fr 140px; gap: 10px; }
.apply input, .apply select, .apply textarea { font: 15px/1.5 var(--zh); padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); width: 100%; }
.apply input:focus, .apply select:focus, .apply textarea:focus { outline: none; border-color: var(--sage-d); box-shadow: 0 0 0 3px var(--sage-l); }
.apply .btn { justify-self: center; } .apply .hp { position: absolute; left: -9999px; }
.apply-msg { text-align: center; color: var(--sage-d); min-height: 1.5em; margin: 0; }
@media (max-width: 600px) { .apply-row { grid-template-columns: 1fr; } }

/* ---- effects layer ---- */
.cover .fx3d { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.cover .title { z-index: 3; } .cover .enter { z-index: 4; }
.cover .plane { position: absolute; left: 0; top: 0; width: 46px; z-index: 5; opacity: 0; pointer-events: none; filter: drop-shadow(0 4px 4px #0002); }
.cover .window-glow { position: absolute; left: 54%; top: 79%; width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 50%; z-index: 3; opacity: 0; pointer-events: none;
  background: radial-gradient(circle, #FFF6D8 0%, #FBEFC8 45%, #F2EEE3 70%); }
.cover .window-hit { position: absolute; left: 51.3%; top: 73.5%; width: 5.4%; height: 11%; z-index: 4; border: 0; background: transparent; cursor: pointer; border-radius: 40% 40% 6px 6px; }
.cover .window-hit::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(circle, #FFE9A0cc, #FFE9A000 70%); opacity: 0; transition: opacity .4s; }
.cover.lit .window-hit::after, .cover .window-hit:hover::after { opacity: 1; }
.cover .burst { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; border-radius: 50%; background: #F7D774; animation: bf-burst .9s ease-out forwards; }
@keyframes bf-burst { from { transform: rotate(var(--a)) translateY(0); opacity: 1; } to { transform: rotate(var(--a)) translateY(-70px) scale(.3); opacity: 0; } }
.fx-trail { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 60; }
.btn { transition: translate .2s ease, transform .15s ease, box-shadow .15s ease; }
.fcard .art img, .sketchframe .pet { transition: rotate .4s ease; }
/* grouped features */
.fgroups { display: grid; gap: 26px; margin-top: 34px; text-align: left; }
.fgroup { display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: start; padding: 22px; border-radius: 26px; border: 1.5px dashed var(--sage); background: #ffffff59; }
.fg-head .en { display: block; font-size: 26px; color: var(--sage-d); line-height: 1.1; } .fg-head b { display: block; font-weight: 400; font-size: 20px; margin-top: 4px; }
.fg-items { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.fg-items .ftile { padding: 12px 12px 14px; } .fg-items .ftile img { width: 52px; height: 52px; } .fg-items .ftile b { font-size: 15.5px; } .fg-items .ftile p { font-size: 12.5px; }
@media (max-width: 1100px) { .fgroup { grid-template-columns: 1fr; } .fg-items { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .fg-items { grid-template-columns: 1fr 1fr; } }
.fx-reduced .fx3d, .fx-reduced .plane { display: none; }

.styles { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 30px; }
.style-col { background: var(--card); border: 1.5px solid var(--line); border-radius: 24px; padding: 20px; }
.style-col .en { font-size: 24px; color: var(--sage-d); }
.style-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; align-items: end; margin-top: 12px; }
.style-row img { width: 100%; height: 130px; object-fit: contain; }
@media (max-width: 900px) { .styles { grid-template-columns: 1fr; } }
