/* RiskSignal Art Deco Design System */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@400;600;700&family=Montserrat:wght@600;700&display=swap');

/* CSS Variables - Art Deco Color Palette */
:root {
  /* Primary Colors */
  --color-gold: #D4AF37;
  --color-baby-blue: #E8F4F8;
  --color-forest-green: #2F5233;
  --color-dark-industrial: #2A2A2A;
  --color-charcoal: #3D3D3D;

  /* Neutrals */
  --color-off-white: #F5F5F5;
  --color-light-gray: #E0E0E0;
  --color-medium-gray: #999999;
  --color-deep-charcoal: #1A1A1A;

  /* Alerts */
  --color-high: #FF6B6B;
  --color-medium: #FFA500;
  --color-low: #4CAF50;

  /* Accents */
  --color-gold-bright: #FFD700;
  --color-gold-transparent: rgba(212, 175, 55, 0.1);
  --color-gold-dark: #C9A227;
  --color-gold-glow: rgba(212, 175, 55, 0.4);

  /* Aliases for backward compatibility */
  --bg-dark: var(--color-deep-charcoal);
  --bg-card: var(--color-charcoal);
  --accent: var(--color-gold);
  --accent-glow: var(--color-gold-transparent);
  --text-primary: var(--color-off-white);
  --text-secondary: var(--color-medium-gray);
  --border: var(--color-gold);
  --baby-blue: var(--color-baby-blue);
  --forest-green: var(--color-forest-green);

  /* Art Deco Specific */
  --border-radius-sharp: 2px;
  --spacing-generous: 100px;
  --spacing-card: 32px;

  /* Noise Pattern (SVG) */
  --noise-pattern: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="300" height="300"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noise)" opacity="0.03"/></svg>');

  /* Crackle Texture Pattern */
  --crackle-pattern: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="400" height="400"><defs><pattern id="crackle" x="0" y="0" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M10,50 Q20,30 40,45 T80,40" stroke="%23D4AF37" stroke-width="0.3" fill="none" opacity="0.08"/><path d="M30,10 Q50,25 60,15 T90,20" stroke="%23D4AF37" stroke-width="0.3" fill="none" opacity="0.08"/><path d="M5,80 Q25,90 45,75 T85,85" stroke="%23D4AF37" stroke-width="0.3" fill="none" opacity="0.08"/></pattern></defs><rect width="100%" height="100%" fill="url(%23crackle)"/></svg>');
}

/* Global Resets */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body - Art Deco Foundation */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--color-dark-industrial);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.03;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Typography - Art Deco Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: var(--color-gold);
  text-shadow: 0 1px 2px rgba(212, 175, 55, 0.3);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.1;
  margin-bottom: 24px;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.2;
  margin-bottom: 20px;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.3;
  margin-bottom: 16px;
}

h4 {
  font-size: 1.5rem;
  line-height: 1.4;
  margin-bottom: 12px;
}

/* Labels - Art Deco Engraved Style */
.label, label {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-gold);
}

/* Buttons - Art Deco Substantial Feel */
button, .button, .btn, .cta-button {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  background: linear-gradient(135deg, #C9A227 0%, #D4AF37 50%, #FFD700 100%);
  color: #0A0A0B;
  border: 2px solid var(--color-gold);
  border-radius: var(--border-radius-sharp);
  padding: 12px 32px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  display: inline-block;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

button:hover, .button:hover, .btn:hover, .cta-button:hover {
  background: var(--color-gold-bright);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
  transform: translateY(-2px);
}

button:active, .button:active, .btn:active, .cta-button:active {
  transform: scale(0.98);
}

button:disabled, .button:disabled, .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Secondary Button */
.button-secondary, .btn-secondary {
  background: transparent;
  color: var(--color-gold);
  border: 2px solid var(--color-gold);
}

.button-secondary:hover, .btn-secondary:hover {
  background: var(--color-gold-transparent);
  box-shadow: 0 4px 12px var(--color-gold-glow);
}

/* Cards - Art Deco Depth & Geometry */
.card {
  background: var(--color-charcoal);
  background-image: var(--crackle-pattern);
  border: 1px solid var(--color-gold);
  border-radius: var(--border-radius-sharp);
  padding: var(--spacing-card);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  position: relative;
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 20px var(--color-gold-glow);
}

/* Art Deco Corner Accent */
.card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  width: 24px;
  height: 24px;
  border-top: 3px solid var(--color-gold);
  border-left: 3px solid var(--color-gold);
  border-radius: var(--border-radius-sharp) 0 0 0;
}

.card::after {
  content: '';
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 24px;
  height: 24px;
  border-bottom: 3px solid var(--color-gold);
  border-right: 3px solid var(--color-gold);
  border-radius: 0 0 var(--border-radius-sharp) 0;
}

/* Inputs - Art Deco Forms */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  background: var(--color-dark-industrial);
  border: 1px solid var(--color-medium-gray);
  border-radius: var(--border-radius-sharp);
  color: var(--text-primary);
  padding: 12px 16px;
  width: 100%;
  transition: all 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #D4AF37;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

input::placeholder,
textarea::placeholder {
  color: var(--color-medium-gray);
}

/* Badges - Art Deco Labels */
.badge {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 12px;
  border-radius: var(--border-radius-sharp);
  display: inline-block;
}

.badge-high {
  background: var(--color-high);
  color: white;
}

.badge-medium {
  background: var(--color-medium);
  color: white;
}

.badge-low {
  background: var(--color-low);
  color: white;
}

.badge-gold {
  background: var(--color-gold-transparent);
  border: 1px solid var(--color-gold);
  color: var(--color-gold);
}

/* Dividers - Art Deco Geometric */
.divider {
  width: 100%;
  height: 1px;
  background: var(--color-gold);
  margin: 40px 0;
  position: relative;
}

.divider::before,
.divider::after {
  content: '';
  position: absolute;
  top: -2px;
  width: 6px;
  height: 6px;
  background: var(--color-gold);
  transform: rotate(45deg);
}

.divider::before {
  left: 0;
}

.divider::after {
  right: 0;
}

/* Section Divider - Gradient Style */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #D4AF37 20%, #D4AF37 80%, transparent 100%);
  border: none;
  margin: 0 auto;
  max-width: 200px;
}

/* Hero Section - Art Deco Corner Accents */
.hero {
  position: relative;
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  border-color: #D4AF37;
  border-style: solid;
  border-width: 0;
}

.hero::before {
  top: 20px;
  left: 20px;
  border-top-width: 2px;
  border-left-width: 2px;
}

.hero::after {
  bottom: 20px;
  right: 20px;
  border-bottom-width: 2px;
  border-right-width: 2px;
}

/* Section Backgrounds - Art Deco Layers */
.section-primary {
  background: var(--color-deep-charcoal);
  background-image: var(--crackle-pattern), var(--noise-pattern);
  padding: var(--spacing-generous) 0;
}

.section-secondary {
  background: var(--color-dark-industrial);
  background-image: var(--noise-pattern);
  padding: var(--spacing-generous) 0;
}

.section-accent {
  background: var(--color-charcoal);
  background-image: var(--crackle-pattern);
  padding: var(--spacing-generous) 0;
}

/* Baby Blue Accent Sections */
.section-baby-blue {
  background: linear-gradient(180deg, rgba(232, 244, 248, 0.05) 0%, transparent 100%);
  padding: 60px 0;
}

/* Links - Gold with Glow */
a {
  color: var(--color-gold);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--color-gold-bright);
  text-shadow: 0 0 8px var(--color-gold-glow);
}

/* Container - Generous Spacing */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Art Deco Geometric Ornament */
.ornament {
  width: 60px;
  height: 60px;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ornament::before {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  border: 2px solid var(--color-gold);
  transform: rotate(45deg);
}

.ornament::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--color-gold);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

/* Alert/Notification - Art Deco */
.alert {
  background: var(--color-gold-transparent);
  border-left: 4px solid var(--color-gold);
  border-radius: var(--border-radius-sharp);
  padding: 16px 20px;
  margin: 16px 0;
}

.alert-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-gold);
  margin-bottom: 4px;
}

.alert-info {
  border-left-color: var(--color-baby-blue);
  background: rgba(232, 244, 248, 0.1);
}

.alert-info .alert-title {
  color: var(--color-baby-blue);
}

/* Footer - Premium Document Feel */
.footer, footer {
  border-top: 1px solid #D4AF37;
  padding: 60px 0 40px;
  margin-top: var(--spacing-generous);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 2px;
  background: var(--color-gold);
}

/* Utility Classes */
.text-gold { color: var(--color-gold); }
.text-baby-blue { color: var(--color-baby-blue); }
.text-forest-green { color: var(--color-forest-green); }
.text-secondary { color: var(--text-secondary); }

.bg-charcoal { background: var(--color-charcoal); }
.bg-dark { background: var(--color-dark-industrial); }
.bg-deep { background: var(--color-deep-charcoal); }

.border-gold { border: 1px solid var(--color-gold); }
.border-radius-sharp { border-radius: var(--border-radius-sharp); }

.spacing-generous { padding: var(--spacing-generous) 0; }
.spacing-card { padding: var(--spacing-card); }

/* Responsive */
@media (max-width: 768px) {
  :root {
    --spacing-generous: 60px;
    --spacing-card: 24px;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.35rem; }

  .container {
    padding: 0 20px;
  }
}
