/* ==========================================================================
   SAMPATI TRADING ACADEMY — Global Styles
   Brand: Black / White / Soft White / Gold accent (15% max) / Charcoal cards
   ========================================================================== */

:root {
  --gold: #F5C400;
  --gold-metallic: #D4A017;
  --gold-highlight: #FFD700;
  --charcoal: #151515;
  --soft: #E5E5E5;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, sans-serif;
  background-color: #000000;
  color: #ffffff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- Typography helpers ------------------------------------------------ */
.font-headline { font-family: "Space Grotesk", "Montserrat", sans-serif; }
.font-display  { font-family: "Montserrat", "Space Grotesk", sans-serif; font-weight: 800; }
.font-data     { font-family: "JetBrains Mono", monospace; }

/* ---- Selection --------------------------------------------------------- */
::selection { background: var(--gold); color: #000000; }

/* ---- Focus states (accessibility) -------------------------------------- */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--gold);
  color: #000000;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.skip-link:focus {
  left: 0;
}

/* ---- Cinematic gold glow (gold elements only) -------------------------- */
.glow-gold {
  box-shadow: 0 0 46px rgba(245, 196, 0, 0.16);
}
.text-glow-gold {
  text-shadow: 0 0 26px rgba(245, 196, 0, 0.35);
}

/* ---- Thin gold divider lines ------------------------------------------- */
.gold-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 196, 0, 0.65), transparent);
}
.gold-line-soft {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 196, 0, 0.28), transparent);
}
.gold-line-solid {
  height: 1px;
  background: rgba(245, 196, 0, 0.35);
}

/* ---- Cards -------------------------------------------------------------- */
.card {
  background: var(--charcoal);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  border-color: rgba(245, 196, 0, 0.45);
  transform: translateY(-3px);
  box-shadow: 0 18px 50px -20px rgba(245, 196, 0, 0.18);
}

/* ---- Buttons ------------------------------------------------------------ */
.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--gold);
  color: #000000;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.8rem 1.6rem;
  transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.btn-gold:hover {
  background: var(--gold-metallic);
  box-shadow: 0 0 34px rgba(245, 196, 0, 0.35);
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid rgba(245, 196, 0, 0.5);
  color: var(--gold);
  letter-spacing: 0.05em;
  padding: 0.8rem 1.6rem;
  transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.btn-ghost:hover {
  background: rgba(245, 196, 0, 0.08);
  border-color: var(--gold);
  box-shadow: 0 0 24px rgba(245, 196, 0, 0.18);
}

/* ---- Navigation --------------------------------------------------------- */
.nav-link {
  position: relative;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  color: var(--soft);
  transition: color 0.2s ease;
}
.nav-link:hover,
.nav-link.nav-active {
  color: var(--gold);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  height: 1px;
  width: 100%;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-link:hover::after,
.nav-link.nav-active::after {
  transform: scaleX(1);
}

#site-header {
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
#site-header.scrolled {
  background: rgba(0, 0, 0, 0.92);
  border-color: rgba(245, 196, 0, 0.18);
  box-shadow: 0 10px 40px -18px rgba(0, 0, 0, 0.9);
}

/* ---- Subtle grid backdrop ---------------------------------------------- */
.bg-grid {
  background-image:
    linear-gradient(rgba(245, 196, 0, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 196, 0, 0.045) 1px, transparent 1px);
  background-size: 54px 54px;
}

/* ---- Scroll reveal ------------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---- Reduced motion ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---- Form fields -------------------------------------------------------- */
.field {
  width: 100%;
  background: var(--charcoal);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 0.85rem 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field::placeholder { color: rgba(229, 229, 229, 0.4); }
.field:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}
.field-error {
  border-color: #ff5a5a !important;
}
.error-msg {
  color: #ff8f8f;
  font-size: 0.78rem;
  margin-top: 0.35rem;
}

/* ---- Form status --------------------------------------------------------- */
.status-error {
  border: 1px solid rgba(255, 90, 90, 0.4);
  color: #ff8f8f;
  background: rgba(255, 90, 90, 0.06);
}
.status-ok {
  border: 1px solid rgba(245, 196, 0, 0.4);
  color: var(--gold);
  background: rgba(245, 196, 0, 0.06);
}

/* ---- Tag chip ----------------------------------------------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid rgba(245, 196, 0, 0.4);
  color: var(--gold);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.35rem 0.8rem;
}
.chip-active {
  background: var(--gold);
  color: #000000;
  border-color: var(--gold);
}

/* ---- Marquee-free pillar divider decoration ----------------------------- */
.pillar-num {
  font-family: "JetBrains Mono", monospace;
  color: rgba(245, 196, 0, 0.5);
}

/* ---- Navbar Dropdown ------------------------------------------------------ */
.nav-dropdown {
  position: relative;
}
.nav-dropdown > .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.nav-dropdown > .nav-link::after {
  display: none;
}
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 260px;
  background: var(--charcoal);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 100;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.9);
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  color: var(--soft);
  font-size: 0.875rem;
  letter-spacing: 0.03em;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
}
.nav-dropdown-menu a:hover {
  background: rgba(245, 196, 0, 0.12);
  color: var(--gold);
}
.nav-dropdown-menu a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}
.nav-dropdown-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 196, 0, 0.3), transparent);
  margin: 0.4rem 0.75rem;
}
.nav-dropdown-menu .external-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-dropdown-menu .external-link::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F5C400' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline d='M15 3h6v6'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
}

/* Mobile dropdown */
.mobile-dropdown {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}
.mobile-dropdown.open {
  max-height: 500px;
}
.mobile-dropdown a {
  display: block;
  padding: 0.6rem 1rem 0.6rem 2.5rem;
  color: var(--soft);
  font-size: 0.875rem;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
}
.mobile-dropdown a:hover {
  background: rgba(245, 196, 0, 0.1);
  color: var(--gold);
}
.mobile-dropdown-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 196, 0, 0.2), transparent);
  margin: 0.3rem 1rem;
}
.mobile-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.mobile-dropdown-toggle svg {
  transition: transform 0.2s ease;
}
.mobile-dropdown-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}