/* ===== Design tokens ===== */
:root {
  --ink: #1b1b1b;
  --cream: #FFF4D6;
  --yellow: #FFD23F;
  --red: #E63323;
  --red-dark: #C9261A;
  --teal: #22A9B8;
  --sand: #FFE9B0;
  --kakao: #FEE500;

  --scale: 1;                 /* S 0.9 / M 1 / L 1.12 */
  --fs-body: calc(17px * var(--scale));
  --fs-lead: calc(19px * var(--scale));
  --fs-small: calc(15px * var(--scale));
  --fs-h3: calc(30px * var(--scale));
  --fs-card: calc(21px * var(--scale));
  --fs-logo: calc(30px * var(--scale));
  --fs-h2: clamp(calc(34px * var(--scale)), calc(5vw * var(--scale)), calc(60px * var(--scale)));

  /* 폰트 세트 A · Retro Pop (기본). 라틴 폰트 먼저, 한/일 글자는 다음 폰트로 떨어짐 */
  --f-display-latin: 'Luckiest Guy';
  --f-body-latin: 'Fredoka';
  --f-display-ko: 'Black Han Sans';
  --f-display-ja: 'Dela Gothic One';
  --f-body-ko: 'Gowun Dodum';
  --f-body-ja: 'M PLUS Rounded 1c';
}
html[data-scale="s"] { --scale: 0.9; }
html[data-scale="l"] { --scale: 1.12; }
/* 세트 B · Friendly / C · Comic — 쓰려면 index.html 폰트 링크에 패밀리 추가 */
html[data-font-set="friendly"] { --f-display-latin: 'Lilita One'; --f-body-latin: 'Nunito'; --f-display-ko: 'Jua'; --f-display-ja: 'Mochiy Pop One'; --f-body-ko: 'Gowun Dodum'; --f-body-ja: 'Kosugi Maru'; }
html[data-font-set="comic"] { --f-display-latin: 'Bangers'; --f-body-latin: 'Fredoka'; --f-display-ko: 'Do Hyeon'; --f-display-ja: 'Rampart One'; --f-body-ko: 'Nanum Gothic'; --f-body-ja: 'M PLUS Rounded 1c'; }

html { --f-display: var(--f-display-latin), var(--f-display-ko), sans-serif; --f-body: var(--f-body-latin), var(--f-body-ko), sans-serif; --f-gothic: 'Noto Sans KR', 'Noto Sans JP', sans-serif; }
html[lang="ja"] { --f-display: var(--f-display-latin), var(--f-display-ja), sans-serif; --f-body: var(--f-body-latin), var(--f-body-ja), sans-serif; --f-gothic: 'Noto Sans JP', 'Noto Sans KR', sans-serif; }

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--f-body); font-size: var(--fs-body); line-height: 1.6; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); }
a:hover { color: var(--red); }
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bold-gothic { font-family: var(--f-gothic); font-weight: 700; }
#top { position: absolute; top: 0; }

/* ===== Header ===== */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--cream); border-bottom: 4px solid var(--ink); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.logo { text-decoration: none; font-family: var(--f-display); font-size: var(--fs-logo); line-height: 1; letter-spacing: 1px; color: var(--red); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); }
.logo:hover { color: var(--red); }
.lang { display: flex; gap: 8px; }
.lang-btn { width: 52px; height: 44px; padding: 0; border: 3px solid var(--ink); border-radius: 10px; background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: .55; }
.lang-btn[aria-pressed="true"] { opacity: 1; box-shadow: 0 0 0 3px var(--red); }
.lang-btn:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
@media (max-width: 420px) {
  .logo { font-size: calc(22px * var(--scale)); -webkit-text-stroke-width: 1.5px; text-shadow: 2px 2px 0 var(--ink); }
  .lang { gap: 6px; }
  .lang-btn { width: 44px; }
}

/* ===== Image frames (01 / 04) ===== */
.hero { background: var(--yellow); border-bottom: 4px solid var(--ink); padding: 40px 20px 56px; }
.tropics { background: var(--sand); padding: 56px 20px 64px; }
.ad-frame { margin: 0 auto; max-width: 760px; border: 6px solid var(--ink); border-radius: 20px; box-shadow: 10px 10px 0 var(--ink); overflow: hidden; }
.ad-frame img { width: 100%; }

/* ===== Section titles ===== */
.section-title { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: var(--fs-h2); line-height: 1.15; color: var(--red); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 4px 4px 0 var(--ink); }
.section-title.yellow { color: var(--yellow); }
.lead { margin: 12px 0 0; font-size: var(--fs-lead); }
.lead.on-teal { color: #fff; font-weight: 700; }

/* ===== Slides (right → left marquee) ===== */
.slides-section { padding: 64px 0 72px; border-bottom: 4px solid var(--ink); overflow: hidden; }
.marquee { margin-top: 36px; overflow: hidden; padding: 6px 0 14px; }
.marquee-track { display: flex; gap: 24px; width: max-content; animation: marquee 36s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.slide { width: 280px; height: 280px; flex: none; object-fit: cover; border: 5px solid var(--ink); border-radius: 18px; box-shadow: 6px 6px 0 var(--ink); background: var(--yellow); }
@media (min-width: 768px) { .slide { width: 400px; height: 400px; } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation-duration: 120s; } }

/* ===== About cassava ===== */
.about-card { margin-top: 56px; background: #fff; border: 4px solid var(--ink); border-radius: 24px; box-shadow: 8px 8px 0 var(--ink); padding: clamp(24px, 4vw, 48px); }
.about-title { margin: 0 0 12px; font-family: var(--f-display); font-weight: 400; font-size: var(--fs-h3); line-height: 1.2; }
.about-intro { margin: 0; max-width: 820px; }
.benefits-title { margin-top: 28px; font-weight: 900; font-size: var(--fs-card); color: var(--red); }
.benefits { margin-top: 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.benefit { background: var(--card); border: 3px solid var(--ink); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.benefit-icon { width: 52px; height: 52px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); display: flex; align-items: center; justify-content: center; }
.benefit-icon svg { width: 28px; height: 28px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.benefit-title { font-weight: 900; font-size: var(--fs-card); line-height: 1.3; }
.benefit-body { font-size: var(--fs-small); line-height: 1.6; }

/* ===== Stores ===== */
.stores-section { background: var(--teal); border-bottom: 4px solid var(--ink); padding: 64px 20px 72px; }
.stores-section > .container { padding: 0; }
.stores { margin-top: 36px; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.store { background: var(--cream); border: 4px solid var(--ink); border-radius: 20px; box-shadow: 6px 6px 0 var(--ink); padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.store-area { align-self: flex-start; background: var(--red); color: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 2px 12px; font-size: var(--fs-small); font-weight: 700; }
.store-name { font-family: var(--f-display); font-size: var(--fs-card); line-height: 1.3; }
.store-meta { font-size: var(--fs-small); }
.store-map { margin-top: 8px; align-self: flex-start; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.store-map svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.kakao-wrap { margin-top: 40px; display: flex; justify-content: center; }
.kakao-btn { width: 84px; height: 84px; display: flex; align-items: center; justify-content: center; background: var(--kakao); border: 4px solid var(--ink); border-radius: 22px; box-shadow: 6px 6px 0 var(--ink); }
.kakao-btn:hover { transform: translate(2px, 2px); box-shadow: 4px 4px 0 var(--ink); }

/* ===== Footer ===== */
.site-footer { background: var(--ink); color: var(--cream); padding: 48px 0 96px; font-size: var(--fs-small); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.footer-logo { font-family: var(--f-display); font-size: var(--fs-logo); line-height: 1; color: var(--yellow); margin-bottom: 8px; }
.footer-label { font-weight: 700; color: var(--yellow); }
.footer-label.spaced { margin-top: 8px; }
.copyright { margin-top: 32px; padding-top: 20px; border-top: 1px solid #5a5a5a; color: #d6cfbd; }

/* ===== Floating TOP ===== */
.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 30; width: 60px; height: 60px; border-radius: 50%; background: var(--red); border: 4px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; text-decoration: none; color: #fff; font-family: 'Luckiest Guy', 'Fredoka', sans-serif; font-size: 16px; line-height: 1; opacity: 0; pointer-events: none; transition: opacity .2s; }
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { color: #fff; }
.to-top svg { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
