/* Seven Puzzle — 별빛 (night) redesign draft, 2026-10-06. Palette = the game's dark mode. */
:root {
  --night: #0B0D16;          /* 게임 다크 모드 하늘 */
  --night-2: #141627;
  --card: rgba(255, 255, 255, 0.045);
  --card-line: rgba(255, 255, 255, 0.09);
  --ink: #EDE8E0;
  --ink-soft: rgba(237, 232, 224, 0.68);
  --accent: #F0B36E;         /* 조각 2 (주황) — 버튼·강조 */
  --d1: #E56E60; --d2: #EBA660; --d3: #F5DD5E; --d4: #8EB37A;
  --d5: #64BFDD; --d6: #6E6EB4; --d7: #8A64AB;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: radial-gradient(120% 80% at 50% 0%, var(--night-2) 0%, var(--night) 55%) fixed, var(--night);
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body:lang(ko) { word-break: keep-all; line-height: 1.8; }

/* ---------- 별빛 (canvas, fixed behind everything) ---------- */
.stars {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}
header, main, footer, .lang-toggle { position: relative; z-index: 1; }

/* ---------- language toggle ---------- */
.lang-toggle {
  position: fixed; top: 1rem; right: 1rem; z-index: 10;
  border: 1px solid var(--card-line); background: rgba(11, 13, 22, 0.6);
  color: var(--ink); font: inherit; font-size: 14px;
  padding: 0.35rem 0.9rem; border-radius: 999px; cursor: pointer; backdrop-filter: blur(6px);
}
.lang-toggle:hover { border-color: var(--ink-soft); }

/* ---------- hero ---------- */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: clamp(3rem, 8vh, 6rem) 1.5rem 3rem;
}
.hero-art { position: relative; margin-bottom: 1.2rem; }
.hero-cube {
  width: clamp(240px, 42vw, 400px); height: auto; display: block;
  filter: drop-shadow(0 30px 60px rgba(100, 140, 255, 0.18));
  animation: float 9s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.wordmark {
  font-family: Quicksand, "Pretendard Variable", sans-serif; font-weight: 700;
  font-size: clamp(2.4rem, 6.5vw, 4.4rem); letter-spacing: 0.01em; margin: 0 0 0.9rem;
  text-shadow: 0 2px 30px rgba(255, 255, 255, 0.08);
}
.dots { display: flex; gap: 0.7rem; justify-content: center; margin: 0 0 1.4rem; }
.dots i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; box-shadow: 0 0 12px currentColor; }
.dots .d1 { background: var(--d1); color: var(--d1); } .dots .d2 { background: var(--d2); color: var(--d2); }
.dots .d3 { background: var(--d3); color: var(--d3); } .dots .d4 { background: var(--d4); color: var(--d4); }
.dots .d5 { background: var(--d5); color: var(--d5); } .dots .d6 { background: var(--d6); color: var(--d6); }
.dots .d7 { background: var(--d7); color: var(--d7); }

.tagline { font-size: clamp(19px, 2.4vw, 23px); font-weight: 600; margin: 0 0 0.5rem; }
.sub { font-size: 15px; color: var(--ink-soft); margin: 0 0 1.8rem; }

.badges { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; margin: 0; }
.badge {
  display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1.15;
  padding: 0.6rem 1.2rem 0.65rem; min-width: 168px; border-radius: 14px;
  background: var(--ink); color: var(--night); text-decoration: none; text-align: left;
  box-shadow: 0 10px 30px -12px rgba(255, 255, 255, 0.35);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.badge:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgba(255, 255, 255, 0.45); }
.badge-k { font-size: 11px; opacity: 0.7; letter-spacing: 0.02em; }
.badge-n { font-family: Quicksand, sans-serif; font-weight: 700; font-size: 19px; }

/* ---------- sections ---------- */
main section { max-width: 760px; margin: 0 auto; padding: clamp(3rem, 8vh, 5.5rem) 1.5rem; }
main .features { max-width: 1120px; }
main .origin { max-width: 1040px; }
h2 { font-size: clamp(24px, 3vw, 30px); font-weight: 700; margin: 0 0 1.2rem; }
section p { margin: 0 0 1em; color: var(--ink); }

/* ---------- feature cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: clamp(1rem, 2.5vw, 1.8rem); margin-top: 1.6rem; }
.card {
  margin: 0; background: var(--card); border: 1px solid var(--card-line); border-radius: 22px;
  padding: 1rem 1rem 1.2rem; display: flex; flex-direction: column; gap: 0.9rem;
  transition: transform 200ms ease, border-color 200ms ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.18); }
.card img { width: 100%; height: auto; border-radius: 14px; display: block; aspect-ratio: 9 / 16; object-fit: cover; }
.card figcaption { display: flex; flex-direction: column; gap: 0.25rem; font-size: 14px; color: var(--ink-soft); line-height: 1.5; }
.card figcaption b { font-size: 16px; color: var(--ink); font-weight: 700; }

/* ---------- origin (teaching aid) ---------- */
.origin { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.origin-photo { margin: 0; }
.origin-photo img { width: 100%; height: auto; border-radius: 22px; display: block; border: 1px solid var(--card-line); }
.origin-photo figcaption { margin-top: 0.7rem; font-size: 13px; color: var(--ink-soft); text-align: center; }
@media (max-width: 760px) { .origin { grid-template-columns: 1fr; } }

/* ---------- video ---------- */
.phone { margin: 0; text-align: center; }
.phone video { width: 100%; max-width: 340px; height: auto; border-radius: 1.6rem; border: 8px solid #1b1d2b; box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.8); display: block; margin: 1.6rem auto 0; }
.phone figcaption { margin-top: 0.9rem; font-size: 14px; color: var(--ink-soft); }

/* ---------- studio / footer ---------- */
.studio .mail { font-size: 19px; color: var(--accent); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
footer { text-align: center; padding: 3rem 1.5rem 4rem; font-size: 14px; color: var(--ink-soft); }
footer a { color: inherit; }
footer .legal { margin: 0 0 0.5rem; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- motion (opt-in only) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); }
  .reveal.in { opacity: 1; transform: none; transition: opacity 600ms ease-out, transform 600ms ease-out; }
}
@media (prefers-reduced-motion: reduce) { .hero-cube { animation: none; } .stars { display: none; } }

/* full-page capture helper (?shot=1): the hero is viewport-tall by design, which makes a 4000px capture all hero */
html.shot .hero { min-height: 940px; }
html.shot .reveal { opacity: 1 !important; transform: none !important; }
