/* 한마루 — 밝고 활기찬 톤 */
@font-face {
  font-family: 'Tteoksang';
  src: url('/fonts/hanmaru-title.woff2') format('woff2');
  font-display: swap;
}
:root {
  --sky: #47B5FF;
  --sky-deep: #1E8FE0;
  --sun: #FFD43B;
  --berry: #FF6B9E;   /* 이제 장식에는 안 씀 — 입력 오류 표시에만 */
  --royal: #3D6BF5;   /* 배지·필수 표시 — 흰 글씨가 잘 보이는 진한 파랑 */
  --ink: #17233F;
  --ink-soft: #4C5B7A;
  --paper: #FFFFFF;
  --mist: #EEF7FF;
  --display: 'Tteoksang', 'Pretendard Variable', sans-serif;
  --body: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 16px; top: -48px; z-index: 50;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 10px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ── 첫 화면 ── */
.hero {
  position: relative;
  background: var(--sky);
  color: #fff;
  padding: 0 16px 160px;
  overflow: hidden;
}
.hero::before { /* 햇살 점 무늬 */
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.22) 2px, transparent 2.5px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  pointer-events: none;
}
.top {
  position: relative;
  max-width: var(--wrap); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0;
}
.mark { font-family: var(--display); font-size: 26px; text-decoration: none; letter-spacing: .02em; }
/* 유튜브 — 로고만 든 흰 동그라미, 그림자는 아래 카드들과 같은 방식 */
.sub-btn {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: #fff;
}
.sub-btn svg { width: 28px; height: 28px; fill: var(--sky-deep); }
/* 작은 버튼: 획 없음, 그림자는 평소엔 숨어 있다가 마우스를 올리면 살짝 나타남 */
.lift.lift-circle { --r: 50%; --grow: 0px; --sx: 0px; --sy: 0px; --sc: var(--sky-deep); --ring-w: 0px; --hx: 4px; --hy: 4px; --lx: 1px; --ly: 1px; }
.lift.lift-circle::before { border-radius: 50%; opacity: 0; transition: transform .32s cubic-bezier(.3, 1.5, .5, 1), opacity .2s ease; }
.lift.lift-circle:hover::before { opacity: 1; }

.hero-body { position: relative; max-width: var(--wrap); margin: 0 auto; padding: 36px 0 0; text-align: center; }
.wordmark { margin: 0; line-height: 0; }
/* 한마루 — ㅎ ㅏ ㄴ ㅁ ㅏ ㄹ ㅜ 일곱 조각이 각자 물에 뜬 것처럼 출렁인다 */
.wordmark-art {
  height: clamp(60px, 12.4vw, 134px); width: auto; overflow: visible;
  fill: #fff;
}
.jamo {
  transform-box: fill-box; transform-origin: 50% 70%;
  animation: bob var(--d) ease-in-out var(--dl) infinite;
}
.jamo-sh { fill: #2C9AE8; } /* 배경보다 조금 어두운 하늘색 그림자, 번짐 없이 */
@keyframes bob {
  /* 오르내림은 예전의 두 배 (조각마다 약 10~22px) */
  0%, 100% { transform: translateY(0) rotate(0); }
  25% { transform: translateY(calc(var(--y) * -2)) rotate(var(--r)); }
  50% { transform: translateY(calc(var(--y) * -.6)) rotate(0); }
  75% { transform: translateY(calc(var(--y) * 1.2)) rotate(calc(var(--r) * -1)); }
}
.tagline {
  margin: 30px auto 0; max-width: 28em; /* 타이틀 조각이 크게 내려와도 부제목과 겹치지 않게 */
  font-family: var(--display); font-weight: 400;
  font-size: clamp(19px, 2.4vw, 24px);
  color: var(--ink);
}
/* 부제목 — 글자마다 각자 다른 박자로 따로 떠다닌다 (타이틀 조각과 같은 방식) */
.tagline span span {
  display: inline-block;
  animation: bob var(--d) ease-in-out var(--dl) infinite;
}
.waves { position: absolute; left: 0; right: 0; bottom: -1px; height: 320px; overflow: hidden; pointer-events: none; }
.wave { position: absolute; left: 0; bottom: 0; width: 200%; height: 72px; }
.wave-canvas { position: absolute; left: -28px; bottom: -28px; display: block; } /* 가장자리 번짐은 화면 밖으로 */
.wave-canvas.front { filter: url(#goo); } /* 물방울이 떨어지고 합쳐질 때 액체처럼 늘어나 보이게 */
.waves.live .wave { display: none; } /* 움직이는 물결이 돌기 시작하면 SVG 물결은 숨김 */
.wave.front { fill: var(--paper); animation: drift 14s linear infinite; }
.wave.back { fill: rgba(255, 255, 255, .45); animation: drift 22s linear infinite reverse; }
@keyframes drift { to { transform: translateX(-50%); } }

/* ── 최신 영상 ── */
.featured {
  position: relative; z-index: 2;
  max-width: 980px; margin: -96px auto 0; padding: 0 16px;
}
.feature-card {
  display: block; width: 100%; text-align: left;
  background: var(--paper); border: 0; padding: 0; cursor: pointer;
  border-radius: 28px; overflow: hidden;
  box-shadow: 0 0 0 4px var(--ink);
}
.feature-card .shot { position: relative; aspect-ratio: 16 / 9; background: var(--mist); }
.feature-card .shot img { width: 100%; height: 100%; object-fit: cover; }
.feature-card .meta { display: flex; gap: 16px; align-items: center; padding: 18px 22px 20px; }
.feature-card .badge {
  flex: none; font-family: var(--display); font-size: 17px;
  background: var(--royal); color: #fff; padding: 4px 12px 2px; border-radius: 999px;
}
.feature-card h2 { margin: 0; font-size: clamp(19px, 2.6vw, 26px); line-height: 1.3; font-weight: 800; }
.feature-card .sub { margin: 2px 0 0; color: var(--ink-soft); font-size: 14px; }

.play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: 84px; height: 84px; border-radius: 50%;
  background: var(--sun); box-shadow: 0 0 0 4px var(--ink), 0 6px 0 4px var(--ink);
  display: grid; place-items: center;
  transition: transform .15s ease;
}
.play::after {
  content: ''; margin-left: 6px;
  border-left: 26px solid var(--ink); border-top: 16px solid transparent; border-bottom: 16px solid transparent;
}
.feature-card:hover .play, .feature-card:focus-visible .play { transform: scale(1.08); }

/* ── 목록 공통 ── */
main { padding-bottom: 40px; }
.block { max-width: var(--wrap); margin: 0 auto; padding: 72px 16px 0; }
.head { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 30px; }
.head h2 { margin: 0; line-height: 0; color: var(--ink); }
/* 섹션 제목 — 가운데, 크게, 타이틀처럼 조각이 따로 둥둥 (조각 SVG는 tools/jamo_svg.py) */
.sec-art { height: clamp(40px, 5.6vw, 56px); width: auto; overflow: visible; fill: currentColor; }
.count { color: var(--ink-soft); font-weight: 600; }
.shorts-block .head { padding: 0 16px; }

.grid { display: grid; gap: 28px 22px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.tile { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.tile .shot { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--mist); }
.tile .shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.tile:hover .shot img { transform: scale(1.04); }
.tile .play { width: 56px; height: 56px; opacity: 0; transition: opacity .15s ease, transform .15s ease; }
.tile .play::after { border-left-width: 18px; border-top-width: 11px; border-bottom-width: 11px; margin-left: 4px; }
.tile:hover .play, .tile:focus-visible .play { opacity: 1; }
.tile h3 { margin: 12px 2px 0; font-size: 17px; line-height: 1.4; font-weight: 700; }
.tile .sub { margin: 2px 2px 0; color: var(--ink-soft); font-size: 14px; }

/* ── 쇼츠 ── */
.shorts-block { max-width: none; padding-left: 0; padding-right: 0; }
.shorts-block .head { max-width: var(--wrap); margin-left: auto; margin-right: auto; padding: 0 16px; }
.strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: 200px; gap: 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px;
  padding: 14px max(16px, calc((100vw - var(--wrap)) / 2 + 16px)) 28px; /* 떠오른 카드의 테두리 획이 위아래로 잘리지 않게 */
  scrollbar-width: thin; scrollbar-color: var(--sky) transparent;
}
.short { scroll-snap-align: start; }
.short .shot {
  aspect-ratio: 9 / 16; border-radius: 22px;
  box-shadow: 0 0 0 3px var(--ink);
}
.short-info {
  position: absolute; inset: auto 0 0 0; display: flex; flex-direction: column; gap: 2px;
  padding: 44px 14px 14px; text-align: left; color: #fff;
  background: linear-gradient(180deg, transparent, rgba(23, 35, 63, .85));
  opacity: 0; translate: 0 8px; transition: opacity .18s ease, translate .18s ease;
}
.short-title {
  font-family: var(--display); font-size: 22px; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; /* 길면 … 으로 줄임 */
}
.short-meta { font-size: 13px; color: #dce6f7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.short:hover .short-info, .short:focus-visible .short-info { opacity: 1; translate: 0 0; }
@media (hover: none) { .short-info { opacity: 1; translate: 0 0; } } /* 폰은 마우스가 없어 항상 표시 */

/* ── 그 외 활동 ── */
.works { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, 200px); }
.work-tile {
  position: relative; display: block; padding: 0; border: 0; cursor: pointer;
  aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; background: var(--mist);
  box-shadow: 0 0 0 3px var(--ink);
}
.work-tile img, .work-tile video { width: 100%; height: 100%; object-fit: cover; }
.work-name {
  position: absolute; inset: auto 0 0 0; padding: 40px 14px 14px;
  background: linear-gradient(180deg, transparent, rgba(23, 35, 63, .85));
  color: #fff; font-family: var(--display); font-size: 22px; text-align: left; line-height: 1.2;
  opacity: 0; translate: 0 8px; transition: opacity .18s ease, translate .18s ease;
}
.work-tile:hover .work-name, .work-tile:focus-visible .work-name { opacity: 1; translate: 0 0; }
@media (hover: none) { .work-name { opacity: 1; translate: 0 0; } } /* 폰은 마우스가 없어 항상 표시 */

.work-dlg { padding: 0; border: 0; background: transparent; max-width: none; max-height: none; overflow: visible; }
.work-dlg::backdrop { background: rgba(23, 35, 63, .82); }
.work-box {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr);
  width: min(860px, calc(100vw - 32px)); max-height: min(720px, calc(100vh - 48px));
  background: var(--paper); border-radius: 24px; overflow: hidden;
}
.work-media { background: #000; height: 100%; max-height: min(720px, calc(100vh - 48px)); aspect-ratio: 9 / 16; }
.work-media video, .work-media img { width: 100%; height: 100%; object-fit: contain; }
.work-body { overflow-y: auto; padding: 32px 30px 30px; }
.work-body .kind {
  display: inline-block; font-size: 13px; font-weight: 700; color: var(--sky-deep);
  background: var(--mist); padding: 2px 10px; border-radius: 999px;
}
.work-body h3 { margin: 12px 0 10px; font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.2; }
.work-body .desc { margin: 0; max-width: 58ch; color: var(--ink-soft); font-size: 15px; line-height: 1.8; }
.work-body .desc a { color: var(--sky-deep); font-weight: 600; }

/* ── 소개 ── */
.members { display: flex; flex-direction: column; gap: 30px; }
.lift-pill { width: min(100%, 820px); }
/* 짝수 번째 사람은 오른쪽에, 프사도 오른쪽으로 — 순서대로 번갈아 놓인다 */
.members > .lift:nth-child(even) { align-self: flex-end; }
.members > .lift:nth-child(even) .about { flex-direction: row-reverse; padding: 22px 22px 22px 56px; text-align: right; }
.about-links { display: flex; gap: 10px; margin-top: 12px; }
.members > .lift:nth-child(even) .about-links { justify-content: flex-end; }
.social {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: #fff; transition: transform .15s ease, background-color .15s ease;
}
.social svg { width: 18px; height: 18px; fill: var(--sky-deep); transition: fill .15s ease; }
.social:hover { transform: translateY(-2px); background: var(--sky-deep); }
.social:hover svg { fill: #fff; }
.about-tag {
  display: inline-block; vertical-align: middle; margin-left: 6px; padding: 3px 10px 2px;
  font-family: var(--body); font-size: 13px; font-weight: 700; line-height: 1.4;
  color: var(--sky-deep); background: #fff; border-radius: 999px;
}
.about {
  display: flex; align-items: center; gap: 28px;
  background: var(--mist); border-radius: 999px;            /* 완전한 캡슐 */
  padding: 22px 56px 22px 22px;
  box-shadow: 0 0 0 3px var(--ink);                          /* 다른 카드와 같은 테두리 획 */
}
.avatar {
  flex: none; width: 150px; height: 150px; border-radius: 50%; object-fit: cover; background: #fff;
  box-shadow: 0 0 0 3px var(--ink);
}
.about-name { margin: 0 0 6px; font-family: var(--display); font-size: 34px; line-height: 1.1; }
/* 소개 이름 — 타이틀처럼 자모 조각이 따로 출렁인다 (조각 SVG는 tools/jamo_svg.py로 만듦) */
.name-art { display: inline-block; height: 34px; width: auto; overflow: visible; fill: var(--ink); vertical-align: middle; }
/* 평소엔 가만히 있다가, 소개 칸에 마우스를 올리면 출렁이기 시작 (떼면 한 번 출렁임을 마치고 제자리에서 멈춤 — app.js) */
.about .name-art .jamo { animation: none; }
.about .name-art .jamo.on { animation: bob var(--d) ease-in-out infinite; }
.about-role { margin: 0; font-size: 17px; color: var(--ink-soft); line-height: 1.7; }

/* ── 연락 (문의 양식) ── */
.contact-form { max-width: 720px; margin: 0 auto; }
.form-lead { margin: 0 0 22px; color: var(--ink-soft); font-size: 16px; text-align: center; }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 8px; font-weight: 700; font-size: 15px; }
.field label::after { content: ' *'; color: var(--royal); }
.field input, .field textarea {
  display: block; width: 100%; padding: 14px 16px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--mist); border: 3px solid transparent; border-radius: 16px;
  transition: border-color .15s ease, background-color .15s ease;
}
.field textarea { resize: vertical; min-height: 160px; line-height: 1.7; }
.field input::placeholder, .field textarea::placeholder { color: #8a97b0; }
.field input:focus, .field textarea:focus { outline: none; background: #fff; border-color: var(--sky); }
.field.bad input, .field.bad textarea { border-color: var(--berry); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 10px; }
.mail-btn {
  display: inline-flex; align-items: center; gap: 10px; border: 0; cursor: pointer; font: inherit;
  background: var(--ink); color: #fff; text-decoration: none;
  padding: 14px 26px 14px 20px; border-radius: 999px; font-weight: 700; font-size: 17px;
  box-shadow: 0 5px 0 var(--sky);
  transition: transform .12s ease, box-shadow .12s ease, opacity .15s ease;
}
.mail-btn svg { width: 22px; height: 22px; fill: var(--sun); }
.mail-btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--sky); }
.mail-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--sky); }
.mail-btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.form-status { margin: 0; min-height: 1.4em; font-weight: 700; font-size: 15px; text-align: center; }
.form-status.ok { color: #1f9a5b; }
.form-status.err { color: var(--berry); }
.form-alt { margin: 22px 0 0; color: var(--ink-soft); font-size: 14px; text-align: center; }
.form-alt a { color: var(--sky-deep); font-weight: 700; }
.contact-form.sent .field, .contact-form.sent .form-lead { opacity: .5; }

/* ── 빈 상태·로딩 ── */
.skeleton { border-radius: 18px; background: linear-gradient(90deg, var(--mist) 25%, #f7fbff 50%, var(--mist) 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.skeleton.wide { aspect-ratio: 16 / 9; }
.skeleton.tall { aspect-ratio: 9 / 16; border-radius: 22px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { grid-column: 1 / -1; color: var(--ink-soft); background: var(--mist); border-radius: 18px; padding: 28px; text-align: center; }
.notice { max-width: var(--wrap); margin: 40px auto 0; padding: 0 16px; color: var(--ink-soft); font-size: 14px; text-align: center; }

/* ── 바닥 ── */
.foot {
  margin-top: 64px; background: var(--ink); color: #dce6f7;
  text-align: center; padding: 40px 16px;
}
.foot-mark { margin: 0; font-family: var(--display); font-size: 34px; color: var(--sun); }

/* ── 재생 창 ── */
.player {
  width: min(1100px, 100vw); max-width: none; max-height: 100vh;
  padding: 0; border: 0; background: transparent; overflow: visible;
}
.player::backdrop { background: rgba(23, 35, 63, .82); }
.player-box { position: relative; margin: 0 16px; background: var(--ink); border-radius: 22px; overflow: hidden; }
.player-box.vertical { width: min(420px, calc(100vw - 32px)); margin: 0 auto; }
.frame { aspect-ratio: 16 / 9; background: #000; }
.player-box.vertical .frame { aspect-ratio: 9 / 16; max-height: calc(100vh - 140px); margin: 0 auto; }
.frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.player-info { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 14px 18px; color: #fff; }
.player-info h3 { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.4; }
.player-info a { flex: none; color: var(--sun); font-weight: 700; font-size: 14px; }
.close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--sun); display: grid; place-items: center;
}
.close svg { width: 20px; height: 20px; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; fill: none; }

/* ── 작은 화면 ── */
@media (max-width: 640px) {
  .hero { padding-bottom: 136px; }
  .sub-btn { width: 46px; height: 46px; }
  .sub-btn svg { width: 25px; height: 25px; }
  .hero-body { padding-top: 20px; }
  .featured { margin-top: -72px; }
  .feature-card { border-radius: 20px; box-shadow: 0 0 0 3px var(--ink); }
  .feature-card .meta { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 16px 16px; }
  .play { width: 64px; height: 64px; }
  .block { padding-top: 56px; }
  .grid { grid-template-columns: 1fr; }
  .strip { grid-auto-columns: 156px; gap: 14px; }
  .works { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .about { gap: 16px; padding: 14px 30px 14px 14px; }
  .avatar { width: 92px; height: 92px; }
  .about-name { font-size: 26px; margin-bottom: 2px; }
  .name-art { height: 27px; }
  .about-role { font-size: 15px; line-height: 1.55; }
  .work-box { grid-template-columns: 1fr; overflow-y: auto; }
  .work-media { height: auto; max-height: 60vh; aspect-ratio: auto; }
  .work-media video, .work-media img { max-height: 60vh; }
  .work-body { overflow: visible; padding: 22px 18px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}


/* ════════ 첫 방문 인트로 — 물방울 → 파문 → 조각이 떠오름 → 바다가 차오르며 사이트 등장 ════════ */
html.intro body { overflow: hidden; }
html.intro .hero { min-height: 100vh; min-height: 100svh; }
html.intro .hero-body { transform: translateY(var(--intro-shift, 0)); }
html.intro .top,
html.intro main,
html.intro .foot { opacity: 0; }
html.intro .jamo,
html.intro .tagline span span { opacity: 0; }

/* 물방울: 위에서 화면 가운데로 떨어져 수면에 닿는다 */
.intro-fx { position: fixed; inset: 0; z-index: 30; pointer-events: none; }
.intro-fx i { position: absolute; left: 50%; top: 50%; display: block; }
.intro-fx .drop {
  width: 20px; height: 28px; margin: -14px 0 0 -10px;
  background: #fff; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  opacity: 0;
}
html.intro-run .intro-fx .drop { animation: drop-fall .55s cubic-bezier(.55, 0, 1, .45) .15s forwards; }
@keyframes drop-fall {
  0% { opacity: 1; transform: translateY(-55vh) scaleY(1.5); }
  92% { opacity: 1; transform: translateY(-4px) scaleY(1.25); }
  100% { opacity: 0; transform: translateY(0) scale(1.6, .4); }
}
/* 파문: 수면 위로 납작한 고리가 퍼진다 */
.intro-fx .ring {
  width: 300px; height: 76px; margin: -38px 0 0 -150px;
  border: 3px solid #fff; border-radius: 50%; opacity: 0;
}
html.intro-run .intro-fx .r1 { animation: ripple 1.3s cubic-bezier(.2, .7, .3, 1) .68s forwards; }
html.intro-run .intro-fx .r2 { animation: ripple 1.5s cubic-bezier(.2, .7, .3, 1) .86s forwards; }
html.intro-run .intro-fx .r3 { animation: ripple 1.7s cubic-bezier(.2, .7, .3, 1) 1.06s forwards; }
@keyframes ripple {
  0% { opacity: .95; transform: scale(.05); border-width: 6px; }
  100% { opacity: 0; transform: scale(1.9); border-width: 1px; }
}
/* 물보라: 작은 물방울이 튀었다가 떨어진다 */
.intro-fx .spray {
  width: var(--ss); height: var(--ss); margin: calc(var(--ss) / -2) 0 0 calc(var(--ss) / -2);
  background: #fff; border-radius: 50%; opacity: 0;
}
html.intro-run .intro-fx .spray { animation: spray .75s cubic-bezier(.2, .6, .4, 1) calc(.68s + var(--sd)) forwards; }
@keyframes spray {
  0% { opacity: 1; transform: translate(0, 0) scale(.6); }
  55% { opacity: 1; transform: translate(calc(var(--dx) * .8), var(--dy)) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) * -.2 + 30px)) scale(.7); }
}

/* 조각들이 파문 자리에서 하나씩 물 위로 떠오른다 (출렁임과 따로 움직이도록 translate·scale 속성 사용) */
html.intro-run .jamo {
  animation: surface .7s cubic-bezier(.3, 1.55, .5, 1) calc(.85s + var(--pi) * .08s) both,
             bob var(--d) ease-in-out var(--dl) infinite;
}
html.intro-run .tagline span span {
  animation: surface-small .55s cubic-bezier(.3, 1.6, .5, 1) calc(1.45s + var(--ti) * .045s) both,
             bob var(--d) ease-in-out var(--dl) infinite;
}
@keyframes surface {
  0% { opacity: 0; translate: 0 60%; scale: .55 .3; }
  45% { opacity: 1; }
  100% { opacity: 1; translate: 0 0; scale: 1 1; }
}
@keyframes surface-small {
  0% { opacity: 0; translate: 0 14px; scale: .6; }
  100% { opacity: 1; translate: 0 0; scale: 1; }
}

/* 바다가 차오르며 제자리로 — 첫 화면 높이가 화면 전체에서 원래 높이로 줄어들고, 타이틀도 원래 자리로 */
html.intro-out .hero {
  min-height: var(--hero-h);
  transition: min-height 1.1s cubic-bezier(.65, 0, .25, 1);
}
html.intro-out .hero-body {
  transform: translateY(0);
  transition: transform 1.1s cubic-bezier(.65, 0, .25, 1);
}
html.intro-out .top { opacity: 1; transition: opacity .6s ease .5s; }
html.intro-out main,
html.intro-out .foot { opacity: 1; transition: opacity .7s ease .45s; }
html.intro-out .jamo,
html.intro-out .tagline span span { opacity: 1; }


/* ════════ 카드 그림자 받침 — 모든 그림자는 첫 화면 배너와 같은 하늘색.
   마우스를 올리면 카드가 떠오르며 그림자와 더 멀어지고, 그림자에 테두리 획이 생긴다 ════════ */
.lift {
  --sc: var(--sky);          /* 그림자 색 — 배너 하늘색으로 통일 */
  --sx: 6px; --sy: 7px;      /* 평소 그림자 거리 */
  --grow: 3px;               /* 그림자가 테두리만큼 커지게 */
  --r: 22px;                 /* 모서리 둥글기 */
  --ring-w: 3px;             /* 마우스를 올리면 그림자에 생기는 테두리 획 두께 */
  --hx: 6px; --hy: 7px;      /* 마우스를 올리면 그림자가 더 멀어지는 거리 */
  --lx: 3px; --ly: 4px;      /* 마우스를 올리면 카드가 떠오르는 거리 */
  position: relative;
}
.lift::before {
  content: ''; position: absolute; inset: calc(var(--grow) * -1);
  border-radius: calc(var(--r) + var(--grow));
  background: var(--sc); box-shadow: 0 0 0 0 var(--ink);
  transform: translate(var(--sx), var(--sy));
  transition: transform .32s cubic-bezier(.3, 1.5, .5, 1), box-shadow .25s ease;
  pointer-events: none;
}
.lift > :last-child { position: relative; transition: transform .32s cubic-bezier(.3, 1.5, .5, 1); }
.lift-sun { --r: 28px; --grow: 4px; --sx: 10px; --sy: 12px; --ring-w: 4px; }
.lift-pill { --r: 999px; --grow: 3px; --sx: 8px; --sy: 9px; }

@media (hover: hover) {
  .lift:hover::before, .tile:hover .lift::before, .tile:focus-visible .lift::before {
    transform: translate(calc(var(--sx) + var(--hx)), calc(var(--sy) + var(--hy)));
    box-shadow: 0 0 0 var(--ring-w) var(--ink);
  }
  .lift:hover > :last-child, .tile:hover .lift > :last-child, .tile:focus-visible .lift > :last-child { transform: translate(calc(var(--lx) * -1), calc(var(--ly) * -1)); }
}

@media (max-width: 640px) {
  .lift-pill { --sx: 5px; --sy: 6px; width: calc(100% - 8px); }
  .members > .lift:nth-child(even) .about { padding: 14px 14px 14px 30px; }
  .lift-sun { --r: 20px; --grow: 3px; --sx: 6px; --sy: 8px; --ring-w: 3px; }
}


/* ════════ 소개부터 아래는 바다 — 하늘색 물 위에 소개 칸들이 둥둥 떠 있다 ════════ */
.sea { position: relative; background: var(--sky); margin-top: 150px; padding-bottom: 80px; }
.sea > .waves.sea-waves { bottom: calc(100% - 2px); }  /* 물결은 바다 윗변 위로 솟아 있음 */
.sea > .block:first-of-type { padding-top: 24px; }
.sea .head h2 { color: #fff; }
/* 연락 양식 — 바다 위에 뜬 흰 편지지 카드 (소개 칸과 같은 테두리, 진한 파랑 그림자) */
.sea .contact-form {
  position: relative; max-width: 760px;
  background: #fff; border-radius: 36px; padding: 40px 48px 34px;
  box-shadow: 0 0 0 3px var(--ink), 10px 12px 0 3px var(--sky-deep);
}
.sea .contact-form::before {   /* 편지 봉투 느낌의 작은 우표 */
  content: ''; position: absolute; top: -18px; right: 34px; width: 54px; height: 54px; border-radius: 14px;
  background: var(--sun) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%2317233F' d='M3 6.5A1.5 1.5 0 0 1 4.5 5h15A1.5 1.5 0 0 1 21 6.5v11a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 3 17.5v-11Zm2 .9V17h14V7.4l-6.4 4.7a1 1 0 0 1-1.2 0L5 7.4Zm12.6-.4H6.4L12 11.1 17.6 7Z'/%3E%3C/svg%3E") center / 28px no-repeat;
  box-shadow: 0 0 0 3px var(--ink); transform: rotate(8deg);
}
.sea .form-lead { color: var(--ink-soft); }
.sea .form-alt { color: var(--ink-soft); }
.sea .form-alt a { color: var(--sky-deep); }
.sea .field input, .sea .field textarea { background: var(--mist); }
.sea .field input:focus, .sea .field textarea:focus { background: #fff; border-color: var(--sky); }
.sea .mail-btn { box-shadow: 0 5px 0 var(--sky-deep); }
.sea .mail-btn:hover { box-shadow: 0 7px 0 var(--sky-deep); }
.sea .mail-btn:active { box-shadow: 0 2px 0 var(--sky-deep); }
.sea .form-status.ok { color: #1f9a5b; }
.sea .lift { --sc: var(--sky-deep); }  /* 하늘색 바다 위라 그림자는 한 톤 진하게 */
.sea .about { background: #fff; }
main:has(.sea) { padding-bottom: 0; }
main:has(.sea) + .foot { margin-top: 0; }  /* 바다와 바닥 사이에 흰 틈이 생기지 않게 */

/* 소개 칸들이 물 위에 떠서 천천히 오르내린다 (칸마다 박자를 다르게) */
@keyframes buoy {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(var(--tilt, .5deg)); }
}
.members > .lift { animation: buoy 5.4s ease-in-out infinite; }
.members > .lift:nth-child(even) { --tilt: -.6deg; animation-duration: 6.3s; animation-delay: -2.1s; }
.members > .lift:nth-child(3n) { animation-duration: 5.9s; animation-delay: -3.4s; }

@media (max-width: 640px) {
  .sea { margin-top: 110px; padding-bottom: 56px; }
}
.sea .social { background: var(--mist); }

/* 바다 위 뗏목 — 위치·기울기는 waves.js가 수면에 맞춰 정함, 깃발은 바람에 펄럭 */
.raft { position: absolute; left: 0; top: 0; width: 112px; transform-origin: 50% 86%; pointer-events: none; will-change: transform; }
.raft svg { display: block; width: 100%; height: auto; overflow: visible; }
.raft-flag { transform-box: fill-box; transform-origin: 0% 50%; animation: flag 1.6s ease-in-out infinite; }
@keyframes flag { 0%, 100% { transform: skewY(0deg) scaleX(1); } 50% { transform: skewY(-7deg) scaleX(.9); } }
@media (max-width: 640px) { .raft { width: 80px; } }
@media (max-width: 640px) {
  .sea .contact-form { padding: 32px 20px 26px; border-radius: 28px; box-shadow: 0 0 0 3px var(--ink), 6px 8px 0 3px var(--sky-deep); margin-right: 8px; }
  .sea .contact-form::before { width: 44px; height: 44px; right: 22px; top: -14px; background-size: 22px; }
}

/* 마우스를 따라오는 물방울 (bubbles.js) — 화면 전체 위, 클릭은 그대로 통과 */
.bubble-layer { position: fixed; inset: 0; z-index: 40; pointer-events: none; }
