/* ============================================================
   Yakjo Platform — Main Stylesheet v1.0
   Premium Apple/Stripe/Notion quality UI
   ============================================================ */

:root {
  --primary:      #6366f1;
  --primary-dark: #4f46e5;
  --accent:       #8b5cf6;
  --success:      #22c55e;
  --warning:      #f59e0b;
  --danger:       #ef4444;
  --text:         #0f172a;
  --text-2:       #475569;
  --text-3:       #94a3b8;
  --border:       #e2e8f0;
  --border-2:     #f1f5f9;
  --bg:           #ffffff;
  --bg-2:         #f8fafc;
  --bg-3:         #f1f5f9;
  --card:         #ffffff;
  --radius:       16px;
  --radius-sm:    10px;
  --radius-lg:    24px;
  --shadow:       0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.06);
  --shadow-lg:    0 8px 32px rgba(0,0,0,.10), 0 2px 8px rgba(0,0,0,.06);
  --shadow-card:  0 2px 8px rgba(99,102,241,.08), 0 0 0 1px rgba(99,102,241,.06);
  --font:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition:   all .2s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg-2);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea, select { font-family: inherit; outline: none; }

/* ── Typography ─────────────────────────────────────────────── */
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
h3 { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.01em; }
h4 { font-size: 1rem; font-weight: 600; }

/* ── Layout ─────────────────────────────────────────────────── */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 760px; }
.container-lg { max-width: 1400px; }

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: 64px;
  display: flex; align-items: center;
}
.navbar__inner {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
}
.navbar__logo {
  font-size: 1.5rem; font-weight: 800; letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.navbar__nav { display: flex; align-items: center; gap: 8px; }
.navbar__link {
  font-size: .875rem; font-weight: 500; color: var(--text-2);
  padding: 6px 12px; border-radius: 8px;
  transition: var(--transition);
}
.navbar__link:hover { color: var(--text); background: var(--bg-3); }
.navbar__actions { display: flex; align-items: center; gap: 10px; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-sm); font-size: .875rem; font-weight: 600;
  transition: var(--transition); line-height: 1; white-space: nowrap;
}
.btn-primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 2px 8px rgba(99,102,241,.35);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(99,102,241,.4); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--text-2); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg-3); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: .8125rem; border-radius: 8px; }
.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: var(--radius); }
.btn-icon { padding: 8px; width: 36px; height: 36px; border-radius: 8px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--border); padding: 24px;
  box-shadow: var(--shadow);
}
.card-hover { transition: var(--transition); }
.card-hover:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: rgba(99,102,241,.2); }

/* ── Forms ──────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: .8125rem; font-weight: 600; color: var(--text-2); }
.form-input {
  padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); font-size: .9375rem; color: var(--text);
  transition: var(--transition);
}
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,.12); }
.form-input::placeholder { color: var(--text-3); }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; padding-right: 36px; }
.form-textarea { min-height: 80px; resize: vertical; }
.form-hint { font-size: .75rem; color: var(--text-3); }
.form-error { font-size: .75rem; color: var(--danger); }

/* ── Badge ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; padding: 3px 8px;
  border-radius: 100px; font-size: .7rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
}
.badge-primary { background: rgba(99,102,241,.1); color: var(--primary); }
.badge-success { background: rgba(34,197,94,.1); color: #16a34a; }
.badge-warning { background: rgba(245,158,11,.1); color: #d97706; }
.badge-danger  { background: rgba(239,68,68,.1); color: var(--danger); }
.badge-gray    { background: var(--bg-3); color: var(--text-2); }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  padding: 100px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(99,102,241,.10) 0%, transparent 70%);
  pointer-events: none;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(99,102,241,.08); border: 1px solid rgba(99,102,241,.2);
  color: var(--primary); font-size: .8125rem; font-weight: 600;
  padding: 5px 14px; border-radius: 100px; margin-bottom: 28px;
}
.hero__title { margin-bottom: 20px; }
.hero__title span {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero__subtitle { font-size: 1.125rem; color: var(--text-2); max-width: 540px; margin: 0 auto 40px; line-height: 1.7; }
.hero__actions { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.hero__stats {
  display: flex; align-items: center; justify-content: center; gap: 40px;
  margin-top: 60px; padding-top: 40px; border-top: 1px solid var(--border);
}
.hero__stat-value { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; color: var(--text); }
.hero__stat-label { font-size: .8125rem; color: var(--text-3); margin-top: 2px; }

/* ── Services Grid ──────────────────────────────────────────── */
.services-section { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header p { color: var(--text-2); font-size: 1.0625rem; margin-top: 10px; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.service-card {
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  cursor: pointer;
  transition: var(--transition);
  position: relative; overflow: hidden; text-decoration: none; color: inherit;
}
.service-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--service-color, var(--primary)), transparent);
  opacity: 0;
  transition: var(--transition);
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(99,102,241,.2); }
.service-card:hover::before { opacity: 1; }
.service-card__icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem; margin-bottom: 16px;
  background: var(--service-bg, rgba(99,102,241,.08));
  transition: var(--transition);
}
.service-card:hover .service-card__icon { transform: scale(1.08); }
.service-card__name { font-size: 1.0625rem; font-weight: 700; margin-bottom: 6px; }
.service-card__desc { font-size: .875rem; color: var(--text-2); line-height: 1.5; flex: 1; }
.service-card__footer { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; }
.service-card__tag { font-size: .7rem; color: var(--text-3); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; }
.service-card__arrow { width: 28px; height: 28px; border-radius: 8px; background: var(--bg-3); display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.service-card:hover .service-card__arrow { background: var(--primary); color: #fff; transform: translateX(2px); }

.service-card--coming-soon { opacity: .7; cursor: default; }
.service-card--coming-soon:hover { transform: none; box-shadow: none; }

/* ── Auth Modal ─────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15,23,42,.5);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal {
  background: var(--card); border-radius: var(--radius-lg);
  padding: 36px; width: 100%; max-width: 440px;
  box-shadow: 0 24px 64px rgba(0,0,0,.18);
  transform: scale(.95) translateY(10px);
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
.modal-overlay.active .modal { transform: scale(1) translateY(0); }
.modal__close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 8px; background: var(--bg-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; cursor: pointer; color: var(--text-2);
  transition: var(--transition);
}
.modal__close:hover { background: var(--bg-3); color: var(--text); }
.modal { position: relative; }

/* ── Toast ──────────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  background: var(--text); color: #fff;
  padding: 14px 18px; border-radius: var(--radius);
  font-size: .875rem; font-weight: 500;
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  animation: toastIn .3s cubic-bezier(.34,1.56,.64,1);
  max-width: 360px;
}
.toast.success { background: #166534; }
.toast.error   { background: #991b1b; }
.toast.warning { background: #92400e; }
.toast__icon { font-size: 1.125rem; flex-shrink: 0; }
.toast__close { margin-left: auto; cursor: pointer; opacity: .7; font-size: 1rem; }
.toast__close:hover { opacity: 1; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px) scale(.95); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
.toast.hiding { animation: toastOut .25s ease forwards; }
@keyframes toastOut {
  to { opacity: 0; transform: translateX(20px); }
}

/* ── User Menu ──────────────────────────────────────────────── */
.user-menu { position: relative; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: .875rem; font-weight: 700; cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}
.user-avatar:hover { border-color: var(--primary); }
.user-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 6px;
  box-shadow: var(--shadow-lg); min-width: 200px;
  opacity: 0; pointer-events: none;
  transform: scale(.96) translateY(-4px);
  transition: all .15s cubic-bezier(.4,0,.2,1);
  z-index: 200;
}
.user-dropdown.open { opacity: 1; pointer-events: all; transform: scale(1) translateY(0); }
.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px; cursor: pointer;
  font-size: .875rem; color: var(--text-2); transition: var(--transition);
}
.dropdown-item:hover { background: var(--bg-3); color: var(--text); }
.dropdown-item.danger:hover { background: rgba(239,68,68,.08); color: var(--danger); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }
.dropdown-header { padding: 8px 12px; }
.dropdown-header .name { font-weight: 600; font-size: .875rem; }
.dropdown-header .email { font-size: .75rem; color: var(--text-3); }

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border); padding: 48px 0 32px;
  margin-top: 80px;
}
.footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer__brand p { font-size: .875rem; color: var(--text-3); margin-top: 10px; max-width: 260px; line-height: 1.6; }
.footer__col h5 { font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin-bottom: 14px; }
.footer__col a { display: block; font-size: .875rem; color: var(--text-2); margin-bottom: 8px; transition: var(--transition); }
.footer__col a:hover { color: var(--primary); }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); font-size: .8125rem; color: var(--text-3); }

/* ── Animations ─────────────────────────────────────────────── */
.fade-up {
  opacity: 0; transform: translateY(24px);
  transition: opacity .5s ease, transform .5s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ── Skeleton ────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-3) 25%, var(--border-2) 50%, var(--bg-3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Category Tabs ───────────────────────────────────────────── */
.category-tabs { display: flex; align-items: center; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.category-tabs::-webkit-scrollbar { display: none; }
.category-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 100px; font-size: .8125rem; font-weight: 600;
  white-space: nowrap; cursor: pointer; transition: var(--transition);
  background: var(--bg-3); color: var(--text-2); border: none;
}
.category-tab.active { background: var(--primary); color: #fff; }
.category-tab:hover:not(.active) { background: var(--border); color: var(--text); }

/* ── Scroll progress ─────────────────────────────────────────── */
#scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 9998; transition: width .1s linear;
}

/* ── Mobile ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar__nav { display: none; }
  .hero { padding: 60px 0 50px; }
  .hero__stats { gap: 24px; flex-wrap: wrap; }
  .services-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .service-card { padding: 20px 16px; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1/-1; }
  .container { padding: 0 16px; }
  #toast-container { bottom: 16px; right: 16px; left: 16px; }
  .toast { max-width: 100%; }
}
@media (max-width: 480px) {
  .services-grid { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  h1 { font-size: 2rem; }
}
