/* ==========================================================================
   Meridian Auric — Industrial Minerals Manufacturer & Exporter
   Core Brand Stylesheet — Royal Blue, Cobalt & Azure Identity
   ========================================================================== */

:root {
  /* Brand Primary: Royal Cobalt & Deep Sapphire */
  --color-meridian-blue: #0A58CA;
  --color-meridian-blue-light: #2563EB;
  --color-meridian-blue-dark: #0040A8;
  --color-meridian-cyan: #00B4D8;
  --color-meridian-azure: #38BDF8;

  /* Brand Accent: Royal Blue & Sky Accents */
  --color-meridian-ruby: #0A58CA;
  --color-meridian-ruby-dark: #0040A8;
  --color-meridian-ruby-light: #2563EB;

  /* Dark Navy & Corporate Neutrals */
  --color-ink: #061229;
  --color-char: #0A1B36;
  --color-char2: #0F2548;
  --color-navy-border: #16305C;

  /* Light Neutrals */
  --color-fog: #F8FAFC;
  --color-haze: #E2E8F0;
  --color-smoke: #64748B;
  --color-slate-light: #94A3B8;

  /* Typography */
  --font-display: "Outfit", "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

@media (min-width: 768px) {
  html {
    scroll-padding-top: 114px;
  }
}

body {
  font-family: var(--font-body);
  color: #0F172A;
  background: #FFFFFF;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  position: relative;
}

section[id] {
  scroll-margin-top: 84px;
}

@media (min-width: 768px) {
  section[id] {
    scroll-margin-top: 118px;
  }
}

img,
svg,
video,
iframe {
  max-width: 100%;
}

h1,
h2,
h3,
h4,
.dsp {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
}

.mono {
  font-family: var(--font-mono);
  font-feature-settings: "tnum" 1;
}

.code-mono {
  font-family: var(--font-mono);
}

::selection {
  background: #0A58CA;
  color: #ffffff;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #F1F5F9;
}

::-webkit-scrollbar-thumb {
  background: #94A3B8;
  border-radius: 2px;
  border: 2px solid #F1F5F9;
}

::-webkit-scrollbar-thumb:hover {
  background: #0A58CA;
}

/* Technical grid + noise textures */
.grid-tex {
  background-image: linear-gradient(rgba(10, 88, 202, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 88, 202, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
}

.grid-tex-dark {
  background-image: linear-gradient(rgba(56, 189, 248, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.07) 1px, transparent 1px);
  background-size: 56px 56px;
}

.noise:after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

.diag {
  background-image: repeating-linear-gradient(45deg, rgba(10, 88, 202, 0.08) 0 2px, transparent 2px 9px);
}

.diag-ruby {
  background-image: repeating-linear-gradient(45deg, rgba(10, 88, 202, 0.12) 0 2px, transparent 2px 9px);
}

.diag-dark {
  background-image: repeating-linear-gradient(-45deg, rgba(56, 189, 248, 0.05) 0 1px, transparent 1px 8px);
}

/* Rounded geometry echoing the curved contours of the Meridian Auric logo */
.cut {
  clip-path: none !important;
  border-radius: 16px;
}

.cut-sm {
  clip-path: none !important;
  border-radius: 10px;
}

.cut-tr {
  clip-path: none !important;
  border-radius: 16px;
}

.cut-lg {
  clip-path: none !important;
  border-radius: 22px;
}

/* Faceted Diamond Silhouette / Badge */
.gem-facet {
  position: relative;
  background: linear-gradient(135deg, rgba(217, 34, 42, 0.12) 0%, rgba(10, 88, 202, 0.08) 100%);
  border: 1px solid rgba(217, 34, 42, 0.25);
}

/* Reveal animations */
.rv {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.rv.in {
  opacity: 1;
  transform: none;
}

.rv-l {
  opacity: 0;
  transform: translateX(-28px);
  transition: all 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.rv-l.in {
  opacity: 1;
  transform: none;
}

.rv-r {
  opacity: 0;
  transform: translateX(28px);
  transition: all 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.rv-r.in {
  opacity: 1;
  transform: none;
}

.rv-s {
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.rv-s.in {
  opacity: 1;
  transform: none;
}

/* Marquee */
.mq-wrap {
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* Grid blowout prevention */
.grid {
  min-width: 0;
}

.grid>* {
  min-width: 0;
  max-width: 100%;
}

.mq {
  display: flex;
  width: max-content;
  animation: mq 38s linear infinite;
  will-change: transform;
}

.mq:hover {
  animation-play-state: paused;
}

.mq-fast {
  animation-duration: 22s;
}

@keyframes mq {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.mq-wrap:hover .mq {
  animation-play-state: paused;
}

/* Micro-animations */
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

.fl {
  animation: float 6s ease-in-out infinite;
}

@keyframes pulseRing {
  0% {
    transform: scale(0.7);
    opacity: 0.9;
  }

  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

.ring {
  animation: pulseRing 2.6s ease-out infinite;
}

@keyframes scan {
  0% {
    transform: translateY(-100%);
  }

  100% {
    transform: translateY(900%);
  }
}

.scanline {
  animation: scan 6s linear infinite;
}

@keyframes dash {
  to {
    stroke-dashoffset: -1000;
  }
}

.arc {
  stroke-dasharray: 6 8;
  animation: dash 22s linear infinite;
}

@keyframes mapRouteFlow {
  0% {
    stroke-dashoffset: 120;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

.flow-beam {
  filter: drop-shadow(0 0 3px rgba(56, 189, 248, 0.85));
}

.flow-beam-ruby {
  filter: drop-shadow(0 0 3px rgba(10, 88, 202, 0.9));
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spin-slow {
  animation: spin 26s linear infinite;
}

/* Links & interactive components */
.lnk {
  position: relative;
}

.lnk:after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, #0A58CA, #00B4D8);
  transition: width 0.35s ease;
}

.lnk:hover:after,
.lnk.on:after {
  width: 100%;
}

.lnk.on {
  color: #0A58CA;
  font-weight: 600;
}

/* Hover & Cards */
.card-hover {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s, border-color 0.35s;
}

.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 45px -20px rgba(10, 88, 202, 0.28);
  border-color: #0A58CA;
}

.card-hover-ruby:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 45px -20px rgba(10, 88, 202, 0.28);
  border-color: #0A58CA;
}

.zoom img {
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s;
}

.zoom:hover img {
  transform: scale(1.08);
}

.flag {
  width: 34px;
  height: 24px;
  object-fit: cover;
  display: block;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.flag-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid #E2E8F0;
  background: #fff;
  border-radius: 8px;
  transition: 0.3s;
}

.flag-cell:hover {
  border-color: #0A58CA;
  background: #F8FAFC;
  transform: translateY(-3px);
  box-shadow: 0 12px 26px -18px rgba(10, 88, 202, 0.35);
}

details>summary {
  list-style: none;
  cursor: pointer;
}

details>summary::-webkit-details-marker {
  display: none;
}

details[open] .chev {
  transform: rotate(45deg);
}

/* Forms */
input,
select,
textarea {
  font-family: var(--font-body);
}

.fld {
  width: 100%;
  background: #fff;
  border: 1px solid #CBD5E1;
  padding: 0.85rem 1rem;
  font-size: 0.92rem;
  outline: none;
  transition: 0.25s;
  border-radius: 10px;
}

select.fld {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230A58CA' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  -webkit-appearance: none;
  appearance: none;
}

.fld:focus {
  border-color: #0A58CA;
  box-shadow: 0 0 0 4px rgba(10, 88, 202, 0.12);
}

.fld.err {
  border-color: #D9222A;
  background: #FEF2F2;
}

.lbl {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #475569;
  margin-bottom: 0.4rem;
  display: block;
}

.no-sb::-webkit-scrollbar {
  display: none;
}

.no-sb {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Buttons & Hero Accents — Blue Theme */
.btn-ruby,
.btn-cobalt,
.btn-blue {
  background: linear-gradient(135deg, #1D4ED8 0%, #0A58CA 60%, #0040A8 100%);
  color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px -4px rgba(10, 88, 202, 0.45);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-ruby:hover,
.btn-cobalt:hover,
.btn-blue:hover {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 60%, #0A58CA 100%);
  box-shadow: 0 8px 25px -4px rgba(10, 88, 202, 0.65);
  transform: translateY(-2px);
}

.glass-card-light {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 20px 45px -15px rgba(10, 88, 202, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

.glow-card {
  box-shadow: 0 15px 35px -10px rgba(10, 88, 202, 0.08), 0 0 0 1px #E2E8F0;
}

.glow-card:hover {
  box-shadow: 0 20px 45px -12px rgba(10, 88, 202, 0.16), 0 0 0 1px #0A58CA;
}

/* Responsive & accessibility */
@media (max-width: 767px) {
  body {
    padding-bottom: calc(44px + env(safe-area-inset-bottom, 0px));
  }

  .fld {
    font-size: 16px !important;
  }

  .rv-l,
  .rv-r {
    transform: translateY(20px) !important;
  }

  .rv-l.in,
  .rv-r.in {
    transform: none !important;
  }

  .fl {
    animation: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}