/* =====================================================================
   Vyne 랜딩 — 메인 스타일 (색상은 tokens.css var()만 참조)
   ===================================================================== */

/* ---- reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  word-break: keep-all; /* 한국어 단어 단위 줄바꿈 */
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: var(--app); text-decoration: none; }
a:hover { color: var(--app-hover); }
button { font-family: inherit; }
h1, h2, h3, p { margin: 0; }

:where(a, button, input):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---- 레이아웃 프리미티브 ---- */
.wrap { max-width: var(--maxw); margin: 0 auto; }
.section { padding: clamp(72px, 12vw, 140px) clamp(24px, 5vw, 40px); }

/* skip link */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--on-accent);
  padding: 10px 16px; border-radius: var(--r-md); font-weight: 600;
}
.skip:focus { left: 16px; top: 16px; }

/* =====================================================================
   HERO
   ===================================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: clamp(64px, 10vw, 96px) clamp(28px, 5vw, 40px);
  overflow: hidden;
}
.hero__feather {
  position: absolute; pointer-events: none; user-select: none;
}
/* 히어로 장식 깃털 — LCP 후보가 되지 않도록 CSS 배경 레이어로 처리 */
.hero__bg {
  position: absolute; inset: 0; pointer-events: none; opacity: .04;
  background-image:
    url("/assets/feather-gold.svg"),
    url("/assets/feather-gold.svg"),
    url("/assets/feather-gold.svg");
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-position: -9vw -8vw, right 13vw top 14vh, left 12vw bottom 16vh;
  background-size: min(40vw, 520px), 200px, 160px;
}
.hero__inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
}
.hero__mark { width: clamp(52px, 7vw, 64px); height: auto; }
.wordmark {
  font-family: var(--font-display);
  font-weight: 500; letter-spacing: .02em;
  color: var(--text); line-height: 1;
  font-size: clamp(40px, 6vw, 56px);
  margin-top: clamp(14px, 2vw, 18px);
}
.eyebrow {
  font-family: var(--font-display);
  font-weight: 500; letter-spacing: .42em; text-transform: uppercase;
  color: var(--text-muted);
  font-size: clamp(11px, 1.4vw, 13px);
  margin-top: clamp(11px, 1.6vw, 14px);
}
.hero__title {
  font-family: var(--font-serif-ko);
  font-weight: 300; line-height: 1.4; letter-spacing: -.01em;
  color: var(--text);
  font-size: clamp(34px, 5.2vw, 52px);
  margin-top: clamp(30px, 4vw, 44px);
}
.hero__title .accent-gold { color: var(--party); }
.hero__sub {
  color: var(--text-muted);
  font-size: clamp(15px, 1.8vw, 18px);
  line-height: 1.65; max-width: 560px;
  margin-top: clamp(20px, 2.5vw, 26px);
}

/* 뱃지 */
.badges { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: clamp(26px, 3vw, 34px); }
.badge {
  padding: 7px 15px; border-radius: var(--r-pill);
  background: var(--surface-1); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 13px; font-weight: 500;
}

/* 히어로 CTA */
.hero__cta { display: flex; gap: 12px; margin-top: clamp(30px, 4vw, 38px); flex-wrap: wrap; justify-content: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 52px; padding: 0 30px; border-radius: var(--r-md);
  font-size: 16px; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; text-decoration: none;
  transition: background .2s, color .2s, border-color .2s, opacity .2s;
}
.btn--app { background: var(--app); color: var(--on-accent); }
.btn--app:hover { background: var(--app-hover); color: var(--on-accent); }
.btn--party-outline { background: transparent; border-color: var(--party); color: var(--party); }
.btn--party-outline:hover { background: var(--party); color: var(--on-accent); }
.btn--party { background: var(--party); color: var(--on-accent); height: 52px; padding: 0 34px; }
.btn--party:hover { background: var(--party); color: var(--on-accent); opacity: .9; }

/* =====================================================================
   INTRO — 3 카드
   ===================================================================== */
.intro__title {
  font-family: var(--font-serif-ko); font-weight: 300;
  letter-spacing: -.01em; color: var(--text); text-align: center;
  font-size: clamp(24px, 3.2vw, 30px);
  margin: 0 auto clamp(40px, 6vw, 64px);
}
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: clamp(28px, 3vw, 36px) clamp(24px, 3vw, 32px);
}
.card__icon { color: var(--text-muted); }
.card h3 { font-size: clamp(17px, 2vw, 18px); font-weight: 600; color: var(--text); margin: 20px 0 12px; }
.card p { font-size: clamp(15px, 1.8vw, 16px); line-height: 1.65; color: var(--text-muted); }

/* =====================================================================
   PARTY — 골드 존
   ===================================================================== */
.party {
  position: relative; background: var(--surface-1); overflow: hidden;
  padding: clamp(72px, 9vw, 104px) clamp(28px, 5vw, 40px);
  text-align: center;
}
.party::before, .party::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1px;
  background: var(--grad-gold-rule);
}
.party::before { top: 0; }
.party::after { bottom: 0; }
.party__feather {
  position: absolute; top: 50%; left: 50%; width: 340px;
  transform: translate(-50%, -50%) rotate(6deg);
  opacity: .04; pointer-events: none;
}
.party__inner { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; }
.party__mark { width: 40px; height: 40px; display: inline-block; margin: 0 auto; }
.party__eyebrow {
  font-family: var(--font-display); font-weight: 600;
  letter-spacing: .34em; text-transform: uppercase; color: var(--party);
  font-size: clamp(22px, 3vw, 30px); margin-top: 20px;
}
.party__label {
  font-family: var(--font-serif-ko); font-weight: 300;
  color: var(--text); margin-top: 14px; letter-spacing: -.01em;
  font-size: clamp(20px, 2.6vw, 26px);
}
.party__note { font-size: clamp(15px, 1.8vw, 16px); color: var(--text-muted); margin-top: 28px; }

/* coming soon */
.coming { margin-top: 40px; }
.coming__row { display: flex; align-items: center; justify-content: center; gap: 20px; }
.coming__rule { flex: 0 1 120px; height: 1px; }
.coming__rule--l { background: var(--grad-gold-left); }
.coming__rule--r { background: var(--grad-gold-right); }
.coming__label {
  font-family: var(--font-display); font-weight: 600;
  letter-spacing: .28em; text-transform: uppercase; color: var(--party);
  white-space: nowrap; font-size: clamp(22px, 3vw, 32px);
}
.coming__text { font-size: clamp(15px, 1.8vw, 16px); line-height: 1.7; color: var(--text-muted); max-width: 440px; margin: 24px auto 0; }

/* dated */
.dated { margin-top: 40px; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.dated__row { display: flex; align-items: baseline; gap: 12px; }
.dated__key { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
.dated__val { font-family: var(--font-serif-ko); font-size: clamp(20px, 2.4vw, 24px); color: var(--text); }
.dated__minors { margin-top: 6px; font-size: 13px; font-weight: 600; letter-spacing: .14em; color: var(--party); }

.party__cta { margin-top: 32px; }

/* =====================================================================
   FORM — 사전등록
   ===================================================================== */
.register__title {
  font-family: var(--font-serif-ko); font-weight: 300; letter-spacing: -.01em;
  color: var(--text); text-align: center;
  font-size: clamp(24px, 3.2vw, 30px);
  margin: 0 auto clamp(32px, 4vw, 40px);
}
.form { width: 100%; max-width: 520px; margin: 0 auto; text-align: left; }

.tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--border); margin-bottom: 30px; }
.tab {
  background: none; border: none; padding: 0 0 14px; margin-bottom: -1px; cursor: pointer;
  font-size: 16px; font-weight: 600; color: var(--text-muted);
  border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }

.field-label { display: block; font-size: 13px; font-weight: 500; color: var(--text-muted); margin-bottom: 9px; letter-spacing: .01em; }
.field {
  width: 100%; height: 52px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 0 16px; color: var(--text); font-family: inherit; font-size: 15px;
  outline: none; transition: border-color .2s;
}
.field::placeholder { color: var(--text-dim); }
.field:focus { border-color: var(--accent); }
.form.is-error .field { border-color: var(--error); }
.field-error { font-size: 13px; color: var(--error); margin: 9px 0 0; display: none; }
.form.is-error .field-error { display: block; }

/* honeypot */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.agree { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; margin-top: 22px; }
.agree input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--accent); flex: 0 0 auto; }
.agree span { font-size: 14px; color: var(--text); line-height: 1.5; }
.notice { font-size: 13px; color: var(--text-muted); line-height: 1.65; margin: 10px 0 0; padding-left: 26px; }

.submit {
  width: 100%; height: 52px; margin-top: 26px; border-radius: var(--r-md); border: none;
  font-size: 16px; font-weight: 600; background: var(--surface-2); color: var(--text-dim);
  cursor: not-allowed; transition: background .2s, color .2s;
}
.form.is-ready .submit { background: var(--accent); color: var(--on-accent); cursor: pointer; }
.form.is-loading .submit { opacity: .7; cursor: progress; }

/* 제출 후 안내(중복/네트워크) */
.form-msg { font-size: 13px; line-height: 1.6; color: var(--text-muted); margin: 12px 0 0; min-height: 0; }
.form-msg:empty { margin: 0; }
.form-msg.is-warn { color: var(--error); }

/* 완료 상태 */
.complete { display: none; text-align: center; padding: 24px 0 12px; }
.form-wrap.is-complete .form { display: none; }
.form-wrap.is-complete .complete { display: block; }
.complete__mark { width: 44px; height: 44px; display: inline-block; margin: 0 auto; }
.complete__title { font-family: var(--font-serif-ko); font-weight: 400; font-size: 24px; line-height: 1.4; color: var(--text); margin-top: 18px; }
.complete__sub { font-size: 15px; color: var(--text-muted); margin-top: 12px; }

/* =====================================================================
   FOOTER
   ===================================================================== */
.footer { border-top: 1px solid var(--border); padding: clamp(44px, 6vw, 64px) clamp(24px, 5vw, 40px) clamp(96px, 8vw, 56px); }
.footer__inner { max-width: var(--maxw); margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; font-size: 14px; }
.footer__links a { color: var(--text); }
.footer__links a:hover { color: var(--app-hover); }
.footer__biz { font-size: 13px; line-height: 1.7; color: var(--text-muted); max-width: 760px; }
.footer__age-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: center; }
.footer__age { font-size: 13px; color: var(--text-muted); }
.footer__divider { width: 1px; height: 12px; background: var(--border-strong); }
.footer__social { display: inline-flex; align-items: center; }
.footer__social svg { color: var(--text-muted); }
.footer__copy { font-family: var(--font-display); font-size: 13px; letter-spacing: .2em; color: var(--text-muted); margin-top: 8px; }

/* =====================================================================
   플로팅 테스트 버튼 + 모바일 스티키 CTA
   ===================================================================== */
.float-test {
  position: fixed; bottom: 32px; right: 32px; z-index: 40;
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px;
  border-radius: var(--r-pill); background: var(--surface-2);
  border: 1px solid var(--ring-purple); color: var(--app);
  font-size: 14px; font-weight: 600;
}
.float-test:hover { color: var(--app-hover); border-color: var(--app); }

.sticky-cta { display: none; }

/* =====================================================================
   반응형
   ===================================================================== */
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 640px) {
  .hero__cta { flex-direction: column; align-items: stretch; width: min(300px, 100%); }
  .hero__cta .btn { width: 100%; }

  /* 모바일 하단 스티키 CTA 바 */
  .sticky-cta {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    background: var(--scrim); backdrop-filter: blur(8px);
    border-top: 1px solid var(--border);
  }
  .sticky-cta .btn { width: 100%; height: 46px; }
  /* 스티키 바 위로 플로팅 버튼을 띄움 */
  .float-test { bottom: calc(76px + env(safe-area-inset-bottom)); right: 20px; }
  /* 스티키 바에 콘텐츠가 가리지 않도록 */
  body { padding-bottom: 0; }
  .footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}
