/* ==========================================
   ST. JOHN - GLOBAL STYLES (style.css)
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Source+Sans+3:wght@400;500;600;700&display=swap');

:root {
  /* St. John Inspired Palette */
  --sj-navy: #0b2b4f;
  --sj-navy-hover: #08233d;
  --sj-burgundy: #7b1e28;
  --sj-burgundy-hover: #621521;
  --sj-gold: #c9a24f;
  --sj-cream: #f7f3ea;
  --sj-mist: #eef2f7;
  --sj-ink: #1b2433;
  --sj-slate: #47566c;
  --sj-shadow: 0 18px 45px rgba(11, 43, 79, 0.18);
  --sj-radius: 22px;

  /* Compatibility tokens (existing class names) */
  --ecusta-navy: var(--sj-navy);
  --ecusta-crimson: var(--sj-burgundy);
  --ecusta-gold: var(--sj-gold);
  --ecusta-navy-hover: var(--sj-navy-hover);
  --ecusta-crimson-hover: var(--sj-burgundy-hover);
}

* {
  box-sizing: border-box;
}

/* Base Setup */
body {
  font-family: 'Source Sans 3', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(circle at 15% 15%, rgba(201, 162, 79, 0.18), transparent 45%),
    radial-gradient(circle at 85% 0%, rgba(11, 43, 79, 0.22), transparent 35%),
    linear-gradient(180deg, var(--sj-cream) 0%, #ffffff 42%, var(--sj-mist) 100%);
  color: var(--sj-ink);
  min-height: 100vh;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .sj-serif {
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
  letter-spacing: 0.01em;
}

::selection {
  background: rgba(201, 162, 79, 0.35);
  color: var(--sj-navy);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--sj-navy);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.45s ease-out forwards;
}

/* Header */
.sj-header {
  background: linear-gradient(110deg, #0b2b4f 0%, #123c69 60%, #0b2b4f 100%);
  color: #fff;
  position: relative;
  box-shadow: 0 12px 30px rgba(11, 43, 79, 0.25);
}

.sj-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sj-gold), #f2d28a, var(--sj-gold));
}

.sj-crest {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(201, 162, 79, 0.85);
  text-transform: uppercase;
}

.sj-crest--sm {
  width: 36px;
  height: 36px;
  font-size: 0.85rem;
}

.sj-logo {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: #ffffff;
  padding: 4px;
  border: 2px solid rgba(201, 162, 79, 0.85);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  object-fit: contain;
}

.sj-logo--sm {
  width: 38px;
  height: 38px;
  padding: 3px;
}

.sj-eyebrow {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: rgba(255, 255, 255, 0.7);
}

.sj-brand-title {
  font-size: 1.35rem;
  font-weight: 600;
}

.sj-nav-link {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
}

.sj-nav-link:hover {
  color: var(--sj-gold);
}

.sj-button {
  background: #fff;
  color: var(--sj-navy);
  border-radius: 999px;
  padding: 0.5rem 1.2rem;
  font-weight: 700;
  border: 1px solid rgba(201, 162, 79, 0.5);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.sj-button:hover {
  background: #f9f4e7;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
}

.sj-user {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.7rem;
}

/* Hero */
.sj-hero {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(11, 43, 79, 0.97), rgba(17, 58, 104, 0.92));
  color: #fff;
  box-shadow: var(--sj-shadow);
}

.sj-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(201, 162, 79, 0.25), transparent 55%),
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.08), transparent 45%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
  opacity: 0.9;
}

.sj-hero > * {
  position: relative;
  z-index: 1;
}

.sj-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(201, 162, 79, 0.2);
  color: #fde8b2;
  border: 1px solid rgba(201, 162, 79, 0.45);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.sj-hero-title {
  font-size: clamp(2rem, 3.2vw, 3.25rem);
  font-weight: 600;
  line-height: 1.05;
}

.sj-hero-copy {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
}

.sj-mini-card {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.75rem 0.9rem;
  border-radius: 16px;
  font-size: 0.85rem;
}

/* Panels */
.sj-panel {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #e5e0d6;
  box-shadow: 0 16px 35px rgba(11, 43, 79, 0.12);
  border-radius: var(--sj-radius);
}

/* Modal Backdrop */
.modal-backdrop {
  background-color: rgba(11, 43, 79, 0.6);
  backdrop-filter: blur(4px);
}

/* Glassmorphism utility for floating cards */
.glass-card {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  border: 1px solid #e5e0d6;
  box-shadow: 0 20px 45px rgba(11, 43, 79, 0.12);
  border-radius: var(--sj-radius);
}

/* Footer */
.sj-footer {
  background: #0b2b4f;
  color: #f7f3ea;
  position: relative;
}

.sj-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--sj-gold), #f2d28a, var(--sj-gold));
}

.sj-footer a {
  color: #f2d28a;
}

.sj-footer a:hover {
  color: #ffffff;
}

.sj-footer-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 1.05rem;
}

/* Form Controls */
input, select, textarea {
  font-family: 'Source Sans 3', sans-serif;
}

input:focus, select:focus, textarea:focus {
  box-shadow: 0 0 0 2px rgba(11, 43, 79, 0.15);
}

@media (max-width: 768px) {
  .sj-brand-title {
    font-size: 1.1rem;
  }

  .sj-eyebrow {
    letter-spacing: 0.2em;
  }
}
