/* ============================================
   PIXELLOOK — DESIGN SYSTEM
   Product-first · Minimal · Sans-serif only
   ============================================ */

:root {
  /* Base */
  --bg: #FAFAF7;
  --bg-alt: #F4F4EF;
  --surface: #FFFFFF;
  --border: #E5E5E0;
  --border-strong: #D0D0C7;

  /* Text */
  --text: #1A1A1A;
  --text-mute: #6B6B66;
  --text-soft: #9A9A92;
  --text-invert: #FAFAF7;

  /* Brand — deep matcha green */
  --brand: #1F4D3F;
  --brand-hover: #173A30;
  --brand-soft: #E8F0EC;
  --brand-line: #2E6855;

  /* Accents */
  --accent: #D9531E;       /* warm orange — for "required upload" */
  --accent-soft: #FCEBE0;
  --info: #2E5BAA;
  --info-soft: #E4EAF5;
  --success: #1F7A4D;
  --success-soft: #E2F0E9;
  --warn: #B7791F;
  --warn-soft: #FBF1DA;
  --danger: #C73838;
  --danger-soft: #FCE6E6;

  /* Sizing */
  --radius: 8px;
  --radius-lg: 12px;
  --radius-sm: 6px;
  --easing: cubic-bezier(0.32, 0.72, 0, 1);
}

/* === RESET === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Pretendard', 'Apple SD Gothic Neo', system-ui, sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
}
body { min-height: 100vh; }
::selection { background: var(--brand); color: var(--bg); }

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

/* IMPORTANT: no italics anywhere */
em, i, .italic { font-style: normal; }

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  font-family: inherit;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; letter-spacing: -0.025em; }
h3 { font-size: 1.15rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

.text-xs { font-size: 0.72rem; }
.text-sm { font-size: 0.85rem; }
.text-base { font-size: 0.95rem; }
.text-lg { font-size: 1.1rem; }
.text-mute { color: var(--text-mute); }
.text-soft { color: var(--text-soft); }
.text-brand { color: var(--brand); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--brand);
  text-transform: uppercase;
}
.eyebrow::before {
  content: '';
  width: 16px;
  height: 1px;
  background: var(--brand);
}

.mono {
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.78rem;
  letter-spacing: 0;
}

/* === LOGO === */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
  color: var(--text);
}
.logo-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--brand);
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}
.logo-mark::after {
  content: '';
  position: absolute;
  inset: 5px 5px auto auto;
  width: 8px;
  height: 8px;
  background: var(--bg);
  border-radius: 50%;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all 0.18s var(--easing);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}
.btn-lg { padding: 14px 24px; font-size: 0.95rem; }
.btn-sm { padding: 7px 12px; font-size: 0.8rem; }

.btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.btn-primary:hover:not(:disabled) {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--bg-alt);
  border-color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
}
.btn-ghost:hover:not(:disabled) { background: var(--bg-alt); }

.btn-danger {
  background: var(--surface);
  color: var(--danger);
  border-color: var(--border);
}
.btn-danger:hover:not(:disabled) { background: var(--danger-soft); }

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* === FIELD / INPUT === */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.field-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
}
.field-hint {
  font-size: 0.75rem;
  color: var(--text-soft);
}

.input {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.92rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  transition: all 0.15s var(--easing);
}
.input::placeholder { color: var(--text-soft); }
.input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.select {
  width: 100%;
  padding: 10px 36px 10px 14px;
  font-size: 0.92rem;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231A1A1A' fill='none' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  appearance: none;
  color: var(--text);
  transition: all 0.15s var(--easing);
}
.select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

/* === CARD === */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.card-flush { padding: 0; overflow: hidden; }
.card-head {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.card-body { padding: 24px; }

/* === BADGE / PILL === */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  font-size: 0.7rem;
  font-weight: 500;
  border-radius: 4px;
  line-height: 1.4;
}
.badge-brand { background: var(--brand-soft); color: var(--brand); }
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-mute { background: var(--bg-alt); color: var(--text-mute); }
.badge-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
}

/* === DIVIDER === */
.divider {
  height: 1px;
  background: var(--border);
  border: none;
  margin: 24px 0;
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-soft); }

/* === LAYOUT === */
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 860px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1480px; margin: 0 auto; padding: 0 24px; }

/* === GRID === */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1024px) {
  .grid-4, .grid-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4, .grid-6 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .grid-3, .grid-4, .grid-6 { grid-template-columns: 1fr 1fr; gap: 12px; }
}

/* === ANIMATIONS === */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.4s var(--easing) backwards; }

@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: -2px;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.pulse { animation: pulse 1.5s ease-in-out infinite; }

/* === UTILS === */
.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.w-full { width: 100%; }
