/* ═══════════ Base ═══════════ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  word-break: keep-all;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { padding: 0; }

:focus-visible {
  outline: 3px solid var(--brand-300);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ═══════════ Buttons ═══════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  border: 0;
  border-radius: var(--radius-sm);
  transition: transform var(--duration-fast) ease, background var(--duration-fast) ease,
    box-shadow var(--duration-fast) ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover { background: var(--brand-600); box-shadow: var(--shadow-pop); }

.btn-ghost {
  background: var(--brand-100);
  color: var(--brand-600);
}
.btn-ghost:hover { background: var(--brand-300); color: var(--brand-700); }

.btn-white {
  background: #fff;
  color: var(--brand-700);
}
.btn-white:hover { background: var(--brand-50); }

.btn-kakao {
  background: var(--kakao);
  color: var(--kakao-ink);
}
.btn-kakao:hover { filter: brightness(0.96); }

/* 어두운 섹션 위 보조 버튼 (주문서 복사 등) */
.btn-ghost-light {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.24); }

.btn-sm { padding: 9px 18px; font-size: var(--text-sm); }
.btn-lg { padding: 15px 28px; font-size: 1.0625rem; border-radius: 14px; }
.btn-block { width: 100%; padding: 15px; font-size: 1.0625rem; border-radius: 14px; margin-top: 16px; }

/* ═══════════ Nav ═══════════ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 248, 250, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration-normal) ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.nav-logo span { color: var(--brand); }

.nav-menu {
  display: flex;
  gap: 24px;
  margin-left: auto;
}
.nav-menu a {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-sub);
  transition: color var(--duration-fast) ease;
}
.nav-menu a:hover { color: var(--brand); }
.nav-menu a.is-active { color: var(--brand); font-weight: 800; }

.nav-burger {
  display: none;
  border: 0;
  background: transparent;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  position: relative;
}
.nav-burger span,
.nav-burger span::before,
.nav-burger span::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transform: translateX(-50%);
  transition: transform var(--duration-normal) var(--ease-out-expo), opacity var(--duration-fast) ease;
}
.nav-burger span { top: 50%; margin-top: -1px; }
.nav-burger span::before { top: -7px; }
.nav-burger span::after { top: 7px; }
.nav.is-open .nav-burger span { background: transparent; }
.nav.is-open .nav-burger span::before { transform: translateX(-50%) translateY(7px) rotate(45deg); }
.nav.is-open .nav-burger span::after { transform: translateX(-50%) translateY(-7px) rotate(-45deg); }

/* ═══════════ Hero ═══════════ */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(4rem, 3rem + 5vw, 8rem) 24px clamp(4.5rem, 4rem + 4vw, 7.5rem);
}

.hero-waves {
  position: absolute;
  inset: auto 0 0 0;
  width: 100%;
  height: 70%;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-eyebrow {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--brand-100);
  color: var(--brand-600);
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: var(--text-hero);
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: -0.035em;
}
.hero h1 em {
  font-style: normal;
  color: var(--brand);
}

.hero-sub {
  margin-top: 20px;
  font-size: clamp(1rem, 0.95rem + 0.4vw, 1.1875rem);
  color: var(--ink-sub);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-note {
  margin-top: 18px;
  font-size: var(--text-xs);
  color: var(--ink-mute);
  font-weight: 500;
}

/* ── Hero visual: rank card ── */
.hero-visual { position: relative; }

.rank-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  padding: 22px;
  max-width: 400px;
  margin-left: auto;
}

.rank-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.rank-kw { font-size: var(--text-sm); font-weight: 700; color: var(--ink-sub); }
.rank-live {
  font-size: 0.6875rem;
  font-weight: 800;
  color: var(--up);
  background: #fdeef0;
  padding: 3px 9px;
  border-radius: 999px;
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
}
.rank-me {
  background: var(--brand-50);
  border: 1.5px solid var(--brand-300);
}
.rank-no { font-weight: 900; color: var(--ink-mute); width: 16px; }
.rank-me .rank-no { color: var(--brand); }
.rank-name { font-weight: 700; flex: 1; }
.rank-name i {
  font-style: normal;
  font-size: 0.6875rem;
  font-weight: 800;
  color: #fff;
  background: var(--brand);
  border-radius: 6px;
  padding: 2px 7px;
  margin-left: 6px;
  vertical-align: 1px;
}
.rank-move { font-size: var(--text-xs); font-weight: 800; }
.rank-move.up { color: var(--up); }
.rank-move.down { color: var(--down); }

.rank-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.rank-metrics b { display: block; font-size: 1.0625rem; color: var(--brand-600); letter-spacing: -0.02em; }
.rank-metrics span { font-size: 0.6875rem; color: var(--ink-mute); font-weight: 600; }

.float-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border-radius: 999px;
  box-shadow: var(--shadow-card);
  font-size: var(--text-xs);
  font-weight: 800;
  padding: 9px 16px;
  animation: floaty 3.6s ease-in-out infinite;
}
.float-chip svg { width: 14px; height: 14px; flex-shrink: 0; }
.chip-save svg { color: var(--up); }
.chip-route svg { color: var(--brand); }
.chip-save { top: -18px; right: 8%; }
.chip-route { bottom: -14px; left: 4%; animation-delay: 1.8s; }

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ═══════════ Trust strip ═══════════ */
.strip {
  background: var(--surface);
  border-block: 1px solid var(--line);
}
.strip-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.strip-item { text-align: center; }
.strip-item b { display: block; font-size: 1rem; letter-spacing: -0.01em; }
.strip-item span { font-size: var(--text-xs); color: var(--ink-mute); font-weight: 500; }

/* ═══════════ Sections ═══════════ */
.section { padding: var(--space-section) 24px; }
.section-tint { background: var(--bg-tint); }

.section-inner { max-width: 1120px; margin: 0 auto; }
.section-narrow { max-width: 780px; }

.section-eyebrow {
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--brand);
  margin-bottom: 14px;
}

.section h2 {
  font-size: var(--text-h2);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.section-sub {
  margin-top: 14px;
  color: var(--ink-sub);
  font-size: var(--text-base);
}

.fine-print {
  margin-top: 24px;
  font-size: var(--text-xs);
  color: var(--ink-mute);
}

.on-dark { color: #fff; }
p.on-dark { color: rgba(255, 255, 255, 0.75); }
.section-eyebrow.on-dark { color: var(--brand-300); }

/* ═══════════ Service cards ═══════════ */
.service-grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform var(--duration-normal) var(--ease-out-expo),
    box-shadow var(--duration-normal) ease, border-color var(--duration-normal) ease;
}
.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-300);
  box-shadow: var(--shadow-card);
}

.service-card h3 {
  font-size: var(--text-h3);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.service-card p {
  font-size: var(--text-sm);
  color: var(--ink-sub);
  flex: 1;
}
.service-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.service-price b {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--brand-600);
  letter-spacing: -0.02em;
}
.service-price span { font-size: var(--text-xs); color: var(--ink-mute); font-weight: 600; }

/* ═══════════ Packages ═══════════ */
.package-grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

.package-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  transition: transform var(--duration-normal) var(--ease-out-expo), box-shadow var(--duration-normal) ease;
}
.package-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card); }

.package-card.is-highlight {
  background: linear-gradient(160deg, var(--brand) 0%, var(--brand-700) 100%);
  border: 0;
  color: #fff;
  box-shadow: var(--shadow-pop);
}
.package-card.is-highlight:hover { transform: translateY(-6px) scale(1.01); }

.package-badge {
  position: absolute;
  top: -13px;
  left: 26px;
  background: var(--ink);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border-radius: 999px;
}

.package-grade {
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--brand);
}
.is-highlight .package-grade { color: var(--brand-300); }

.package-card h3 {
  margin-top: 6px;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.package-tagline {
  margin-top: 6px;
  font-size: var(--text-sm);
  color: var(--ink-sub);
}
.is-highlight .package-tagline { color: rgba(255, 255, 255, 0.75); }

.package-price {
  margin-top: 20px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.package-price b { font-size: 1.9rem; font-weight: 900; letter-spacing: -0.03em; }
.package-price del { font-size: var(--text-sm); color: var(--ink-mute); font-weight: 600; }
.is-highlight .package-price del { color: rgba(255, 255, 255, 0.55); }
.package-price .per { font-size: var(--text-xs); color: var(--ink-mute); font-weight: 600; width: 100%; }
.is-highlight .package-price .per { color: rgba(255, 255, 255, 0.65); }

.package-items {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 11px;
  flex: 1;
}
.is-highlight .package-items { border-top-color: rgba(255, 255, 255, 0.2); }

.package-items li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--text-sm);
}
.package-items .label { color: var(--ink-sub); font-weight: 500; }
.package-items .amount { font-weight: 800; text-align: right; }
.is-highlight .package-items .label { color: rgba(255, 255, 255, 0.8); }

.package-fit {
  margin-top: 18px;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--ink-mute);
  background: var(--bg);
  border-radius: 999px;
  padding: 6px 12px;
  justify-self: start;
  align-self: flex-start;
}
.is-highlight .package-fit { background: rgba(255, 255, 255, 0.14); color: #fff; }

.package-cta { margin-top: 20px; width: 100%; padding: 13px; border-radius: 12px; font-size: 1rem; }
.is-highlight .package-cta { background: #fff; color: var(--brand-700); }
.is-highlight .package-cta:hover { background: var(--brand-50); box-shadow: none; }

/* ═══════════ Process ═══════════ */
.process-grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  counter-reset: step;
}

.process-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
}
.process-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--brand-100);
  color: var(--brand-600);
  font-weight: 900;
  margin-bottom: 14px;
}
.process-card h3 { font-size: 1.0625rem; font-weight: 800; letter-spacing: -0.01em; }
.process-card p { margin-top: 8px; font-size: var(--text-sm); color: var(--ink-sub); }

/* ═══════════ FAQ ═══════════ */
.faq-list { margin-top: 36px; display: grid; gap: 10px; }

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--duration-fast) ease;
}
.faq-item[open] { border-color: var(--brand-300); }

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
  font-weight: 700;
  font-size: var(--text-base);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--ink-mute);
  transition: transform var(--duration-normal) var(--ease-out-expo);
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); color: var(--brand); }

.faq-item p {
  padding: 0 20px 20px;
  font-size: var(--text-sm);
  color: var(--ink-sub);
}

/* ═══════════ Order ═══════════ */
.section-order {
  background:
    radial-gradient(900px 400px at 85% -10%, rgba(255, 255, 255, 0.14), transparent 60%),
    linear-gradient(160deg, var(--brand) 0%, var(--brand-700) 100%);
}

.order-form {
  margin-top: 40px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 4vw, 36px);
  display: grid;
  gap: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field { display: grid; gap: 8px; }
.field > span {
  font-size: var(--text-sm);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}
.field > span b { color: #ffd7dc; }

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1.5px solid transparent;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: var(--text-base);
  padding: 13px 15px;
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}
.field textarea { resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(25, 31, 40, 0.15);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--ink-mute); }
.field input.is-error,
.field select.is-error { border-color: var(--up); }

.order-quote {
  background: rgba(255, 255, 255, 0.1);
  border: 1px dashed rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  color: #fff;
  font-size: var(--text-sm);
}
.order-quote pre {
  margin: 8px 0 0;
  font-family: inherit;
  white-space: pre-wrap;
  color: rgba(255, 255, 255, 0.85);
}

.order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}
.order-actions .btn { flex: 1; min-width: 200px; }

.order-note {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.65);
}

/* ═══════════ Footer ═══════════ */
.footer { background: var(--ink); color: rgba(255, 255, 255, 0.7); }
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
}
.footer .nav-logo { color: #fff; }
.footer-brand p { margin-top: 10px; font-size: var(--text-sm); }
.footer-info { font-size: var(--text-sm); display: grid; gap: 6px; }
.footer-info b { color: #fff; }
.footer-info a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-info a:hover { color: var(--brand-300); }
.footer-fine { font-size: var(--text-xs); color: rgba(255, 255, 255, 0.45); max-width: 480px; }

/* ═══════════ Toast ═══════════ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 700;
  padding: 13px 22px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-normal) ease, transform var(--duration-normal) var(--ease-out-expo);
  z-index: 100;
  max-width: calc(100vw - 40px);
  text-align: center;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ═══════════ Reveal motion ═══════════ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--duration-slow) var(--ease-out-expo),
    transform var(--duration-slow) var(--ease-out-expo);
}
.reveal.is-in { opacity: 1; transform: none; }
.delay-1 { transition-delay: 90ms; }
.delay-2 { transition-delay: 180ms; }
.delay-3 { transition-delay: 270ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .float-chip { animation: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* 테스트/스크린샷용 모션 오프 (?noanim) */
.no-anim { scroll-behavior: auto; }
.no-anim * { animation: none !important; transition: none !important; }
.no-anim .reveal { opacity: 1; transform: none; }

/* ═══════════ Responsive ═══════════ */
@media (max-width: 1023px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { max-width: 440px; margin: 12px auto 0; width: 100%; }
  .rank-card { margin: 0 auto; }
  .service-grid, .package-grid, .process-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .nav-burger { display: block; margin-left: auto; }
  .nav-cta { display: none; }
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px rgba(25, 31, 40, 0.08);
    padding: 8px 12px 12px;
    display: none;
  }
  .nav.is-open .nav-menu { display: flex; }
  .nav-menu a {
    padding: 14px 12px;
    font-size: 1rem;
    border-radius: 10px;
  }
  .nav-menu a:hover, .nav-menu a.is-active { background: var(--brand-50); }
  .strip-inner { grid-template-columns: repeat(2, 1fr); row-gap: 20px; }
  .service-grid, .package-grid, .process-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .package-card.is-highlight { order: -1; }
  .float-chip { display: none; }
  .order-actions .btn { min-width: 100%; }
}

