/* Purwokerto Kanopi — Bespoke Luxury Dual-Mode Design System */

:root {
  --bg-surface: #f4f7f5;
  --bg-elevated: #eaf0ec;
  --bg-card: #ffffff;
  --header-bg: rgba(244, 247, 245, 0.86);
  --border-card: rgba(0, 89, 83, 0.14);
  --border-accent: rgba(217, 119, 6, 0.30);
  --text-primary: #062e25;
  --text-secondary: #1e293b;
  --text-muted: #334155;
  --brand-color: #005953;
  --accent-gold: #b45309;
  --accent-gold-bright: #d97706;
  --emerald-soft: rgba(0, 89, 83, 0.08);
  --gold-soft: rgba(217, 119, 6, 0.10);
}

html.dark {
  --bg-surface: #030a08;
  --bg-elevated: #061511;
  --bg-card: rgba(2, 44, 34, 0.35);
  --header-bg: rgba(3, 10, 8, 0.84);
  --border-card: rgba(251, 191, 36, 0.15);
  --border-accent: rgba(251, 191, 36, 0.30);
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --brand-color: #ffffff;
  --accent-gold: #fbbf24;
  --accent-gold-bright: #f59e0b;
  --emerald-soft: rgba(16, 185, 129, 0.12);
  --gold-soft: rgba(251, 191, 36, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-surface);
  color: var(--text-secondary);
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

.font-editorial {
  font-family: 'Cormorant Garamond', Georgia, serif;
}

/* Typography token helpers (Light mode enforces high-contrast ink) */
.text-ink-primary { color: var(--text-primary); }
.text-ink-secondary { color: var(--text-secondary); }
.text-ink-muted { color: var(--text-muted); }
.text-brand { color: var(--brand-color); }
.text-gold { color: var(--accent-gold); }
.bg-surface { background-color: var(--bg-surface); }
.bg-elevated { background-color: var(--bg-elevated); }

/* Header Glassmorphism */
.bespoke-header {
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-accent);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Floating Card Physics */
.bespoke-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.04),
    0 1px 3px rgba(0, 0, 0, 0.02);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.3s ease,
              background-color 0.3s ease;
}

.bespoke-card:hover {
  transform: translateY(-4px);
  border-color: rgba(217, 119, 6, 0.38);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.08),
    0 4px 12px rgba(217, 119, 6, 0.10);
}

html.dark .bespoke-card {
  backdrop-filter: blur(12px);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.22),
    0 1px 3px rgba(0, 0, 0, 0.12);
}

html.dark .bespoke-card:hover {
  border-color: rgba(251, 191, 36, 0.35);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.38),
    0 4px 12px rgba(217, 119, 6, 0.16);
}

/* Interactive selection card */
.choice-card {
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-card);
  border-radius: 14px;
  min-height: 44px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  cursor: pointer;
}

.choice-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-gold-bright);
}

.choice-card.is-selected {
  border-color: var(--accent-gold-bright);
  background-color: var(--gold-soft);
  box-shadow: 0 8px 24px rgba(217, 119, 6, 0.14);
}

/* Primary & Glass Buttons */
.bespoke-btn-primary {
  background: linear-gradient(135deg, #005953 0%, #02423d 100%);
  color: #ffffff;
  border: 1px solid rgba(251, 191, 36, 0.35);
  min-height: 44px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.bespoke-btn-primary:hover {
  transform: translateY(-2px) scale(1.015);
  box-shadow: 0 12px 26px rgba(0, 89, 83, 0.25);
  filter: brightness(1.06);
}

html.dark .bespoke-btn-primary {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #ffffff;
  border-color: rgba(251, 191, 36, 0.5);
}

html.dark .bespoke-btn-primary:hover {
  box-shadow: 0 12px 26px rgba(245, 158, 11, 0.25);
}

.bespoke-btn-outline {
  background: var(--emerald-soft);
  color: var(--brand-color);
  border: 1px solid var(--border-card);
  min-height: 44px;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.bespoke-btn-outline:hover {
  transform: translateY(-2px);
  border-color: var(--accent-gold-bright);
}

/* Dark Context Immunity */
.dark-surface {
  background: linear-gradient(160deg, #021a14 0%, #032c24 55%, #02120e 100%);
  color: #f1f5f9;
}

.dark-surface .brand-immunity {
  color: #ffffff !important;
}

.bespoke-btn-glass {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  min-height: 44px;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.bespoke-btn-glass:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(251, 191, 36, 0.65);
  transform: translateY(-2px);
}

/* Upload Dropzone */
.yard-dropzone {
  background-color: var(--bg-elevated);
  border: 2px dashed var(--border-accent);
  border-radius: 18px;
  transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.yard-dropzone.is-dragover {
  border-color: var(--accent-gold-bright);
  background-color: var(--gold-soft);
  transform: scale(1.01);
}

/* Subtle Pulse Ring for live badge */
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(217, 119, 6, 0); }
  100% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0); }
}

.pulse-dot {
  animation: pulse-ring 2.2s infinite;
}

/* Fade transition for wizard steps */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-animate {
  animation: fadeSlideIn 0.28s ease forwards;
}

/* Custom Inputs */
.bespoke-input {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  min-height: 44px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bespoke-input:focus {
  outline: none;
  border-color: var(--accent-gold-bright);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.16);
}

/* Media Vignette */
.media-vignette {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.22) 48%, transparent 100%);
}
