@import url('./local-fonts.css');

:root {
  /* Life Armor Blue Palette */
  --color-bg: #ffffff;
  --color-text: #0b1220;
  --color-text-muted: #334155;
  --color-primary: #1a73e8;
  --color-primary-dark: #1e3a5f;
  --color-border: rgba(15, 23, 42, 0.08);

  /* Typography */
  --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --font-heading: var(--font-sans);
  --font-weight-body: 400;
  --font-weight-ui: 500;
  --font-weight-heading: 500;

  /* Layout */
  --container-max-width: 1320px;
  --squircle-radius: 24px;

  /* Legacy variables */
  --oes-color-bg: var(--color-bg);
  --oes-color-text: var(--color-text);
  --oes-color-title: var(--color-text);
  --oes-color-muted: var(--color-text-muted);
  --oes-color-accent: var(--color-primary);
  --oes-gradient-top: rgba(26, 115, 232, 0.08);
  --oes-gradient-bottom: rgba(26, 115, 232, 0.12);
  --oes-padding: clamp(1.5rem, 2vw, 2.5rem);
  --oes-card-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  --oes-card-outline: 1px solid rgba(15, 23, 42, 0.08);
  --oes-card-bg: rgba(255, 255, 255, 0.2);
  --oes-radius: calc(var(--squircle-radius) * 0.6);
}

.squircle {
  border-radius: var(--squircle-radius);
  position: relative;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* html scroll-behavior and body base styles are defined in quantum.css */

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-heading);
  line-height: 1.12;
  letter-spacing: 0;
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-primary-dark);
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: var(--color-primary-dark);
  color: #fff;
  border-radius: 60px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  border: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 12px 30px -8px rgba(15, 23, 42, 0.2);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -8px rgba(15, 23, 42, 0.3);
  color: #fff;
}

section:not(.oes-section) {
  padding: clamp(5rem, 12vw, 10rem) 0;
}

.grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* :focus-visible and ::selection are defined in quantum.css */

/* Section particle effects are defined here so they are always available
   even when page-specific section bundles are not loaded. */
.threat-nebula {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 30%, transparent 70%);
}

.threat-nebula .nebula-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: nebulaFadeIn 2s ease-out forwards;
}

.threat-nebula .nebula-layer-1 {
  background:
    radial-gradient(ellipse 60% 50% at 30% 40%, rgba(255, 42, 42, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 70% 60%, rgba(180, 20, 60, 0.05) 0%, transparent 55%);
  filter: blur(80px);
}

.threat-nebula .nebula-layer-2 {
  background:
    radial-gradient(ellipse 70% 40% at 60% 35%, rgba(255, 60, 50, 0.04) 0%, transparent 55%),
    radial-gradient(ellipse 40% 50% at 25% 65%, rgba(200, 30, 80, 0.05) 0%, transparent 50%);
  filter: blur(100px);
  animation: nebulaFloat1 40s ease-in-out infinite, nebulaFadeIn 2s ease-out 0.3s forwards;
}

.threat-nebula .nebula-layer-3 {
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(150, 25, 60, 0.04) 0%, transparent 50%);
  filter: blur(120px);
  animation: nebulaFloat2 35s ease-in-out infinite, nebulaFadeIn 2s ease-out 0.6s forwards;
}

.threat-nebula .nebula-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 500px;
  height: 350px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(255, 42, 42, 0.08) 0%, rgba(200, 30, 60, 0.04) 40%, transparent 70%);
  filter: blur(60px);
  animation: corePulse 12s ease-in-out infinite;
}

.threat-nebula .nebula-tendrils {
  position: absolute;
  inset: 0;
  opacity: 0.35;
}

.threat-nebula .nebula-dust {
  position: absolute;
  inset: 0;
}

.threat-nebula .dust-particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 80, 60, 0.4);
  filter: blur(1px);
  animation: dustFloat 30s ease-in-out infinite;
}

.threat-nebula .dust-1 { width: 2px; height: 2px; top: 25%; left: 30%; animation-delay: 0s; }
.threat-nebula .dust-2 { width: 2px; height: 2px; top: 35%; left: 65%; animation-delay: -8s; }
.threat-nebula .dust-3 { width: 3px; height: 3px; top: 55%; left: 25%; animation-delay: -15s; }
.threat-nebula .dust-4 { width: 2px; height: 2px; top: 65%; left: 70%; animation-delay: -5s; }
.threat-nebula .dust-5,
.threat-nebula .dust-6,
.threat-nebula .dust-7,
.threat-nebula .dust-8 { opacity: 0.3; }

.threat-nebula .nebula-stars {
  position: absolute;
  inset: 0;
  opacity: 0.4;
}

.threat-nebula .nebula-star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
}

.threat-nebula .star-1 { top: 20%; left: 10%; }
.threat-nebula .star-2 { top: 30%; left: 50%; }
.threat-nebula .star-3 { top: 15%; left: 80%; }
.threat-nebula .star-4 { top: 60%; left: 20%; }
.threat-nebula .star-5 { top: 70%; left: 70%; }
.threat-nebula .star-6 { top: 45%; left: 35%; }
.threat-nebula .star-7 { top: 55%; left: 85%; }
.threat-nebula .star-8 { top: 10%; left: 40%; }
.threat-nebula .star-9 { top: 80%; left: 55%; }
.threat-nebula .star-10 { top: 35%; left: 25%; }
.threat-nebula .star-11 { top: 65%; left: 45%; }
.threat-nebula .star-12 { top: 50%; left: 90%; }

.impact-particles {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 250px;
  height: 350px;
  pointer-events: none;
  z-index: 5;
}

.impact-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--threat-red, #ff2a2a);
  border-radius: 50%;
  opacity: 0.7;
  box-shadow:
    0 0 10px rgba(255, 42, 42, 0.95),
    0 0 20px rgba(255, 42, 42, 0.55);
  animation: particleFloat 2.8s ease-in-out infinite;
}

.impact-particle:nth-child(1) { top: 10%; left: 20%; animation-delay: 0s; }
.impact-particle:nth-child(2) { top: 25%; right: 15%; animation-delay: 0.5s; }
.impact-particle:nth-child(3) { top: 40%; left: 10%; animation-delay: 1s; }
.impact-particle:nth-child(4) { top: 55%; right: 20%; animation-delay: 1.5s; }
.impact-particle:nth-child(5) { top: 70%; left: 25%; animation-delay: 2s; }
.impact-particle:nth-child(6) { top: 85%; right: 10%; animation-delay: 2.5s; }

@keyframes nebulaFadeIn {
  to { opacity: 1; }
}

@keyframes nebulaFloat1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(2%, -1%); }
}

@keyframes nebulaFloat2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-1%, 1%); }
}

@keyframes corePulse {
  0%, 100% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(1.05);
  }
}

@keyframes dustFloat {
  0%, 100% { transform: translate(0, 0); opacity: 0.3; }
  50% { transform: translate(15px, -10px); opacity: 0.5; }
}

@keyframes particleFloat {
  0%, 100% { opacity: 0.35; transform: scale(0.8) translateY(0); }
  50% { opacity: 1; transform: scale(1.25) translateY(-6px); }
}
