@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap");

:root {
  --bg: #0a0e16;
  --bg-elevated: #11161f;
  --bg-elevated-2: #161c28;
  --text: #e8ecf3;
  --text-muted: #8891a3;
  --border: #232b3a;
  --accent-a: #6ee7d8;   /* cyan */
  --accent-b: #8c7bff;   /* violet */
  --accent-grad: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  --danger: #ff6b6b;
  --radius: 14px;
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f5f7fb;
  --bg-elevated: #ffffff;
  --bg-elevated-2: #eef1f7;
  --text: #12161f;
  --text-muted: #5b6577;
  --border: #dde2ec;
  --accent-a: #0fb8a3;
  --accent-b: #6a55e0;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
  min-height: 100vh;
}

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 1080px;
  margin: 0 auto;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text);
}

.logo-text { line-height: 1; }

.logo-img {
  height: 30px;
  width: auto;
  display: block;
  transition: transform 0.25s ease;
  animation: logo-sway 5s ease-in-out infinite;
}
.logo:hover .logo-img {
  animation-play-state: paused;
  transform: scale(1.08) rotate(-4deg);
}
@keyframes logo-sway {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-4deg); }
}
@media (prefers-reduced-motion: reduce) {
  .logo-img { animation: none; }
}

.logo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-grad);
  box-shadow: 0 0 12px var(--accent-a);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.nav-links a { text-decoration: none; }
.nav-links a:not(.nav-user) {
  position: relative;
}
.nav-links a:not(.nav-user)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 1.5px;
  background: var(--accent-grad);
  transition: width 0.25s ease;
}
.nav-links a:not(.nav-user):hover::after { width: 100%; }
.nav-links a:hover { color: var(--text); }

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  border-radius: 999px;
  width: 38px;
  height: 38px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn-primary {
  background: var(--accent-grad);
  color: #05070c;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px -6px var(--accent-b);
  animation: btn-glow-pulse 1.6s ease-in-out infinite;
}
@keyframes btn-glow-pulse {
  0%, 100% { box-shadow: 0 8px 28px -6px var(--accent-b); }
  50% { box-shadow: 0 8px 34px -4px var(--accent-a); }
}
@media (prefers-reduced-motion: reduce) {
  .btn-primary:hover { animation: none; }
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent-a); transform: translateY(-1px); }

.btn:active { transform: translateY(0) scale(0.97); }

/* ---------- Hero ---------- */
.hero {
  padding: 96px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  z-index: -1;
  pointer-events: none;
  animation: blob-float 16s ease-in-out infinite;
}
.hero::before {
  width: 320px; height: 320px;
  background: var(--accent-a);
  top: -80px; left: 8%;
}
.hero::after {
  width: 380px; height: 380px;
  background: var(--accent-b);
  bottom: -140px; right: 6%;
  animation-duration: 20s;
  animation-delay: -6s;
}
@keyframes blob-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -24px) scale(1.08); }
  66% { transform: translate(-24px, 20px) scale(0.94); }
}
@media (prefers-reduced-motion: reduce) {
  .hero::before, .hero::after { animation: none; }
}

.hero-eyebrow,
.hero h1,
.hero p,
.hero-actions,
.hero .duo-orbit {
  animation: enter-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero-eyebrow { animation-delay: 0.05s; }
.hero h1 { animation-delay: 0.15s; }
.hero p { animation-delay: 0.28s; }
.hero-actions { animation-delay: 0.4s; }
.hero .duo-orbit { animation-delay: 0.55s; }

@keyframes enter-up {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-eyebrow, .hero h1, .hero p, .hero-actions, .hero .duo-orbit { animation: none; }
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  max-width: 780px;
  margin: 0 auto 20px;
}

.grad {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 .grad {
  background-size: 200% auto;
  animation: shine 4s ease-in-out infinite;
}
@keyframes shine {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}
@media (prefers-reduced-motion: reduce) {
  .hero h1 .grad { animation: none; }
}

.hero p {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 32px;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Signature: 두 개의 궤도가 서로를 감싸며 도는 "Duo" 심볼 — 프론트/백엔드, 사람/AI의 짝을 상징 */
.duo-orbit {
  width: 220px;
  height: 220px;
  margin: 56px auto 0;
  position: relative;
}
.duo-orbit svg { width: 100%; height: 100%; }
.orbit-ring {
  fill: none;
  stroke-width: 1.4;
  opacity: 0.55;
}
.orbit-ring.a { stroke: var(--accent-a); animation: spin 14s linear infinite; transform-origin: center; }
.orbit-ring.b { stroke: var(--accent-b); animation: spin 20s linear infinite reverse; transform-origin: center; }
.orbit-node { filter: drop-shadow(0 0 6px currentColor); }

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .orbit-ring.a, .orbit-ring.b { animation: none; }
}

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.section-head { text-align: center; margin-bottom: 48px; }
.section-head .eyebrow {
  color: var(--accent-a);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.section-head p { color: var(--text-muted); max-width: 520px; margin: 12px auto 0; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 760px) {
  .grid-3 { grid-template-columns: 1fr; }
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 640px;
  margin: 0 auto;
}

@media (max-width: 560px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 44px -24px var(--accent-b);
  border-color: var(--accent-a);
}
@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
  .card:hover { transform: none; }
}

.card .icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--accent-grad);
  margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center;
  color: #05070c; font-weight: 700;
  transition: transform 0.3s ease;
  animation: icon-bob 3.2s ease-in-out infinite;
}
.card:hover .icon {
  animation-play-state: paused;
  transform: rotate(-8deg) scale(1.1);
}
.card:nth-child(2) .icon { animation-delay: -1s; }
.card:nth-child(3) .icon { animation-delay: -2s; }

@keyframes icon-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
@media (prefers-reduced-motion: reduce) {
  .card .icon { animation: none; }
}

.card h3 { font-size: 1.05rem; }
.card p { color: var(--text-muted); font-size: 0.92rem; margin: 0; }

/* ---------- About ---------- */
.about-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}
@media (max-width: 760px) { .about-panel { grid-template-columns: 1fr; } }
.about-panel p { color: var(--text-muted); }
.stat-row { display: flex; gap: 32px; margin-top: 24px; flex-wrap: wrap; }
.stat b { font-family: var(--font-display); font-size: 1.6rem; display: block; }
.stat span { color: var(--text-muted); font-size: 0.85rem; }

/* ---------- Forms ---------- */
.form-panel {
  max-width: 460px;
  margin: 0 auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
}

.field { margin-bottom: 18px; text-align: left; }
.field label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.field input, .field textarea {
  width: 100%;
  background: var(--bg-elevated-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 11px 14px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.field input:focus, .field textarea:focus {
  outline: 2px solid var(--accent-a);
  outline-offset: 1px;
}
.field textarea { resize: vertical; min-height: 110px; }

.form-msg {
  font-size: 0.88rem;
  margin-top: 14px;
  min-height: 1.2em;
}
.form-msg.error { color: var(--danger); }
.form-msg.success { color: var(--accent-a); }
.form-msg.info { color: var(--text-muted); }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin: 22px 0;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.slot-btn {
  padding: 10px 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated-2);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.88rem;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease, background 0.2s ease;
  animation: slot-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.slot-btn:hover:not(:disabled) { border-color: var(--accent-a); transform: translateY(-2px); }
.slot-btn:active:not(:disabled) { transform: translateY(0) scale(0.96); }
.slot-btn.selected {
  background: var(--accent-grad);
  color: #05070c;
  border-color: transparent;
  font-weight: 600;
}
.slot-btn:disabled {
  opacity: 0.35;
  text-decoration: line-through;
  cursor: not-allowed;
}

@keyframes slot-pop {
  from { opacity: 0; transform: scale(0.8) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .slot-btn { animation: none; }
}

.switch-line {
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 18px;
}
.switch-line button {
  background: none; border: none; color: var(--accent-a);
  cursor: pointer; font: inherit; padding: 0;
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ---------- 스크롤 reveal 애니메이션 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- 태그라인 ---------- */
.tagline-panel {
  text-align: center;
  padding: 56px 24px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.tagline-eyebrow {
  color: var(--accent-a);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.tagline-panel h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  margin: 0;
}

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.faq-item:hover { border-color: var(--accent-a); }

.faq-q {
  width: 100%;
  cursor: pointer;
  font-weight: 600;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: none;
  border: none;
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
}
.faq-icon {
  font-size: 1.3rem;
  color: var(--accent-a);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 12px;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }

.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-a-inner { overflow: hidden; }
.faq-a-inner p {
  color: var(--text-muted);
  margin: 0;
  padding: 0 22px 18px;
  font-size: 0.92rem;
}

/* ---------- CTA ---------- */
.cta-panel {
  text-align: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
}
.cta-panel p { color: var(--text-muted); margin-bottom: 24px; }

/* ---------- 타임라인 ---------- */
.timeline {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  padding-left: 28px;
  border-left: 2px solid var(--border);
}
.timeline-item {
  position: relative;
  padding-bottom: 40px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -34px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-grad);
  box-shadow: 0 0 0 0 rgba(110, 231, 216, 0.5);
  animation: pulse-dot 2.4s ease-out infinite;
}
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(110, 231, 216, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(110, 231, 216, 0); }
  100% { box-shadow: 0 0 0 0 rgba(110, 231, 216, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .timeline-dot { animation: none; }
}
.timeline-year {
  color: var(--accent-a);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.timeline-content h3 { margin: 6px 0 6px; }
.timeline-content p { color: var(--text-muted); margin: 0; font-size: 0.92rem; }

/* ---------- 로그인 상태 nav 표시 ---------- */
.nav-user {
  background: var(--bg-elevated-2);
  border: 1px solid var(--border);
  padding: 5px 14px 5px 5px;
  border-radius: 999px;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav-user:hover { border-color: var(--accent-a); }

.nav-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-grad);
  color: #05070c;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}
.nav-avatar-fallback {
  width: 26px;
  height: 26px;
}
.nav-avatar-loading {
  width: 26px;
  height: 26px;
  background: var(--bg-elevated-2);
  border: 1px solid var(--border);
  animation: avatar-pulse 1.2s ease-in-out infinite;
}
@keyframes avatar-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.9; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-avatar-loading { animation: none; }
}

/* ---------- 마이페이지 예약 목록 ---------- */
.booking-list {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.booking-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.booking-card > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.booking-card.past { opacity: 0.55; }
.booking-tag {
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg-elevated-2);
  color: var(--text-muted);
}
.booking-tag.upcoming {
  background: var(--accent-grad);
  color: #05070c;
  font-weight: 600;
}
