/* SOMBRIT — supporting styles beyond Tailwind utilities */

:root {
  --navy: #0b1f3a;
  --navy-deep: #071526;
  --academic-blue: #3b9eff;
  --gold: #c9a227;
  --cream: #f7f9fc;
  --ink: #142033;
  --muted: #5b6b7f;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .parallax-bg {
    transform: none !important;
  }
}

body {
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
}

.font-display {
  font-family: "Playfair Display", Georgia, serif;
}

/* Sticky header elevation */
#site-header {
  transition: background-color 0.25s ease, box-shadow 0.25s ease,
    border-color 0.25s ease;
}

#site-header.is-scrolled {
  background-color: rgba(7, 21, 38, 0.96);
  box-shadow: 0 8px 30px rgba(7, 21, 38, 0.18);
  border-color: transparent;
}

/* Focus visibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--academic-blue);
  outline-offset: 3px;
}

/* Hero atmosphere */
.hero-canvas {
  background:
    radial-gradient(ellipse 80% 60% at 85% 20%, rgba(59, 158, 255, 0.22), transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(201, 162, 39, 0.12), transparent 50%),
    linear-gradient(160deg, #071526 0%, #0b1f3a 48%, #102a4a 100%);
}

.hero-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black 40%, transparent 95%);
}

/* Subtle floating motion */
@keyframes float-soft {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shine-sweep {
  0% {
    transform: translateX(-120%) rotate(12deg);
  }
  100% {
    transform: translateX(120%) rotate(12deg);
  }
}

@keyframes glow-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(59, 158, 255, 0.35),
      0 0 24px rgba(59, 158, 255, 0.22),
      0 0 48px rgba(59, 158, 255, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(59, 158, 255, 0.55),
      0 0 32px rgba(59, 158, 255, 0.38),
      0 0 64px rgba(59, 158, 255, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }
}

.animate-float {
  animation: float-soft 7s ease-in-out infinite;
}

.animate-float-delay {
  animation: float-soft 8s ease-in-out 1.2s infinite;
}

.animate-fade-up {
  animation: fade-up 0.8s ease-out both;
}

.animate-fade-up-delay {
  animation: fade-up 0.8s ease-out 0.15s both;
}

.animate-fade-up-delay-2 {
  animation: fade-up 0.8s ease-out 0.3s both;
}

/* Mid-page parallax */
.parallax-section {
  isolation: isolate;
}

.parallax-bg {
  position: absolute;
  inset: -20% 0;
  background-image:
    linear-gradient(135deg, rgba(7, 21, 38, 0.55), rgba(11, 31, 58, 0.65)),
    radial-gradient(ellipse at 30% 40%, rgba(59, 158, 255, 0.35), transparent 50%),
    radial-gradient(ellipse at 80% 60%, rgba(201, 162, 39, 0.2), transparent 45%),
    url("../images/sombrit-logo.png");
  background-color: #071526;
  background-position: center, center, center, 85% 60%;
  background-size: cover, cover, cover, min(42vw, 280px);
  background-repeat: no-repeat;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.parallax-veil {
  background:
    linear-gradient(180deg, rgba(7, 21, 38, 0.35), rgba(7, 21, 38, 0.55)),
    linear-gradient(90deg, rgba(7, 21, 38, 0.4), transparent 40%, rgba(7, 21, 38, 0.35));
}

/* Subjects glowing section */
.subjects-glow-section {
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(59, 158, 255, 0.18), transparent 55%),
    radial-gradient(ellipse 40% 40% at 90% 80%, rgba(201, 162, 39, 0.1), transparent 50%),
    linear-gradient(180deg, #071526 0%, #0b1f3a 55%, #0a1a30 100%);
}

.subject-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  padding: 1.5rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.subject-card--glow {
  background:
    linear-gradient(160deg, rgba(59, 158, 255, 0.14), rgba(255, 255, 255, 0.03) 45%, rgba(201, 162, 39, 0.08)),
    rgba(10, 26, 48, 0.85);
  border: 1px solid rgba(59, 158, 255, 0.28);
  animation: glow-pulse 4.5s ease-in-out infinite;
}

.subject-card--glow:nth-child(2) {
  animation-delay: 0.4s;
}

.subject-card--glow:nth-child(3) {
  animation-delay: 0.8s;
}

.subject-card--glow:nth-child(4) {
  animation-delay: 1.2s;
}

.subject-card--glow:nth-child(5) {
  animation-delay: 1.6s;
}

.subject-card__shine {
  pointer-events: none;
  position: absolute;
  inset: -40% -60%;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.12) 48%,
    rgba(59, 158, 255, 0.22) 50%,
    rgba(255, 255, 255, 0.1) 52%,
    transparent 65%
  );
  animation: shine-sweep 5.5s ease-in-out infinite;
}

.subject-card--glow:nth-child(2) .subject-card__shine {
  animation-delay: 0.7s;
}

.subject-card--glow:nth-child(3) .subject-card__shine {
  animation-delay: 1.4s;
}

.subject-card--glow:nth-child(4) .subject-card__shine {
  animation-delay: 2.1s;
}

.subject-card--glow:nth-child(5) .subject-card__shine {
  animation-delay: 2.8s;
}

.subject-card--glow:hover {
  transform: translateY(-6px);
  border-color: rgba(59, 158, 255, 0.65);
}

/* Journey connector */
.journey-line {
  background: linear-gradient(90deg, var(--academic-blue), var(--gold));
}

@media (max-width: 767px) {
  .journey-line {
    background: linear-gradient(180deg, var(--academic-blue), var(--gold));
  }
}
