@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Manrope:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ============================================================
   theme.css — OccultSanctum Platform Unified Theme
   Cream/gold aesthetic — matches Ask + Numerolabs surface.
   Shared across Samay and BTR pages.
   ============================================================ */

/* ---- CSS Variables ---- */
:root {
  /* Brand — gold replaces purple, keeps amber as complement */
  --brand-primary: #8B6914;       /* Gold — main accent (was purple) */
  --brand-secondary: #B45309;     /* Warm amber — secondary accent */
  --brand-gradient: linear-gradient(135deg, #8B6914 0%, #A67D1A 50%, #6B4F0F 100%);
  --brand-gradient-warm: linear-gradient(135deg, #B45309 0%, #92400E 100%);

  /* Surfaces — cream palette */
  --bg-page: #F4F2EE;             /* Cream page background (Ask's --ink) */
  --bg-card: #FFFFFF;             /* Pure white cards for contrast */
  --bg-card-hover: #FBFAF7;       /* Warm-white card hover */
  --bg-sidebar: #1A1714;          /* Near-black sidebar (Ask's --cream) */
  --bg-input: #F8F7F4;            /* Barely-there input bg */
  --bg-input-focus: #FFFFFF;
  --bg-code: #F1EDE8;             /* Parchment-tan code bg */
  --bg-badge: #F3F0EB;            /* Subtle tan badge */

  /* Text */
  --text-primary: #1A1714;        /* Deep brown-black (Ask's --cream) */
  --text-secondary: #5C564B;      /* Warm medium (Ask's --cream-2) */
  --text-muted: #9A9389;          /* Muted warm gray (Ask's --cream-3) */
  --text-inverse: #F8F7F4;        /* Cream text on dark bg */
  --text-link: #8B6914;           /* Gold links */

  /* Borders */
  --border-light: #D1CDC4;        /* Ask's --line-soft */
  --border-medium: #E2DFD8;       /* Ask's --line */
  --border-focus: #8B6914;        /* Gold focus ring */

  /* Status */
  --status-success: #1A7A4C;      /* Ask's --green */
  --status-success-bg: #EFF7F1;
  --status-warning: #C89F2C;      /* Ask's --amber */
  --status-warning-bg: #FDF8E8;
  --status-error: #B93A3A;        /* Ask's --rose */
  --status-error-bg: #FBEFEF;
  --status-info: #8B6914;         /* Ask's --purple (reserved for info accents) */
  --status-info-bg: #F3E5F5;

  /* Shadows — warm-tinted */
  --shadow-sm: 0 2px 6px rgba(26, 23, 20, 0.08);
  --shadow-md: 0 4px 12px rgba(26, 23, 20, 0.07);
  --shadow-lg: 0 12px 32px rgba(26, 23, 20, 0.10);
  --shadow-glow: 0 0 20px rgba(139, 105, 20, 0.12);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 999px;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Typography — serif display + sans body matches Ask */
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-serif: 'Cormorant Garamond', 'Iowan Old Style', Palatino, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', ui-monospace, monospace;
  --font-size-xs: 11px;
  --font-size-sm: 13px;
  --font-size-base: 15px;
  --font-size-lg: 18px;
  --font-size-xl: 22px;
  --font-size-2xl: 28px;
  --font-size-3xl: 36px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

/* ---- Global Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  color: var(--text-primary);
  background: var(--bg-page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-sm);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}
h1, h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.02em;
}
h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }

p { margin: 0 0 var(--space-md); }
a { color: var(--text-link); text-decoration: none; transition: opacity var(--transition-fast); }
a:hover { opacity: 0.8; }

code, pre {
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
}
code {
  background: var(--bg-code);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}
pre {
  background: var(--bg-code);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 20px;
  font-family: var(--font-sans);
  font-size: var(--font-size-sm);
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  line-height: 1;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--brand-primary);
  color: var(--text-inverse);
}
.btn-primary:hover:not(:disabled) { background: #5B21B6; box-shadow: var(--shadow-glow); }

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}
.btn-secondary:hover:not(:disabled) { background: var(--border-light); }

.btn-danger {
  background: var(--status-error);
  color: var(--text-inverse);
}
.btn-danger:hover:not(:disabled) { background: #B91C1C; }

.btn-sm { padding: 6px 14px; font-size: var(--font-size-xs); }
.btn-lg { padding: 14px 28px; font-size: var(--font-size-base); }

/* ---- Cards ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-normal);
}
.card:hover { box-shadow: var(--shadow-md); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-light);
}

/* ---- Forms ---- */
input[type="text"], input[type="email"], input[type="number"], input[type="date"],
input[type="time"], input[type="password"], input[type="url"], input[type="search"],
textarea, select {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  width: 100%;
  transition: all var(--transition-fast);
  outline: none;
}
input:focus, textarea:focus, select:focus {
  background: var(--bg-input-focus);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(139,105,20,0.1);
}
label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

/* ---- Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: var(--font-size-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  line-height: 1.4;
}
.badge-green  { background: var(--status-success-bg); color: var(--status-success); }
.badge-red    { background: var(--status-error-bg); color: var(--status-error); }

/* ---- Tables ---- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}
th {
  text-align: left;
  padding: 12px 16px;
  background: var(--bg-input);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-light);
}
td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
}

tbody tr:last-child td { border-bottom: none; }

/* ---- Modal ---- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(26, 23, 20, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 999;
}
.modal-content {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  width: min(580px, 100%);
  box-shadow: var(--shadow-lg);
}

/* ---- Utility classes ---- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-4 { margin-top: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-lg); }
.hidden { display: none!important; }
.print-hidden { display: block!important; }

@media (max-width: 680px) {
  .vc-row { flex-wrap: wrap; }
  .vc-row-pos { width: 100%; text-align: center; padding: 0 0 4px; }
  .vc-row-arrow { display: none; }
  .vc-row-houses { justify-content: center; }
  .vc-piles { gap: 16px; }
  .vc-pile-stack { width: 64px; height: 92px; }
  .vc-pile-card { width: 64px; height: 92px; }
  .vc-hcard { width: 68px; }
  .vc-hcard img, .vc-hcard .hc-noimg { width: 52px; height: 74px; }
  .vc-row-planet img, .vc-row-planet .rp-noimg { width: 52px; height: 74px; }
}
