/* ==========================================================================
   ASRON — Base styles
   Reset, typography, global element styling, utility classes.
   ========================================================================== */

/* ----- Reset ----- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
  background-color: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Subtle noise texture over the whole canvas */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.05'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

img,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

ul[class],
ol[class] {
  list-style: none;
}

::selection {
  background: rgba(54, 87, 255, 0.45);
  color: #fff;
}

/* ----- Focus visibility (accessibility) ----- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.skip-link {
  position: fixed;
  top: -100%;
  left: var(--s-2);
  z-index: calc(var(--z-loader) + 1);
  padding: var(--s-1) var(--s-2);
  background: var(--primary);
  color: #fff;
  border-radius: var(--r-sm);
  font-weight: 700;
  transition: top var(--t-fast);
}

.skip-link:focus {
  top: var(--s-2);
}

/* ----- Scrollbar ----- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--card-hover);
  border-radius: var(--r-full);
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ----- Typography ----- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-tight);
  color: var(--text);
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p { color: var(--text-2); }

strong { color: var(--text); font-weight: 700; }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.65;
  color: var(--text-2);
  max-width: 44em;
}

/* Gradient headline text */
.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.accent-text {
  background: var(--grad-aurora);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Small overline label above section headings */
.overline {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  font-family: var(--font-display);
  font-size: var(--fs-tiny);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--accent);
}

.overline::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: var(--grad-aurora);
}

/* ----- Generic content styling (legal pages, blog article body) ----- */
.prose h2 { margin: var(--s-6) 0 var(--s-2); font-size: var(--fs-h3); }
.prose h3 { margin: var(--s-4) 0 var(--s-2); font-size: var(--fs-h4); }
.prose p  { margin-bottom: var(--s-2); }
.prose ul,
.prose ol { margin: 0 0 var(--s-2) 1.25rem; color: var(--text-2); }
.prose li { margin-bottom: var(--s-1); }
.prose li::marker { color: var(--accent); }
.prose a {
  color: var(--primary-soft);
  border-bottom: 1px solid rgba(92, 119, 255, 0.4);
  transition: color var(--t-fast), border-color var(--t-fast);
}
.prose a:hover { color: var(--accent); border-color: var(--accent); }
.prose blockquote {
  margin: var(--s-3) 0;
  padding: var(--s-2) var(--s-3);
  border-left: 3px solid var(--primary);
  background: var(--surface);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  color: var(--text);
  font-style: italic;
}
.prose code {
  font-family: "Consolas", "Menlo", monospace;
  font-size: 0.875em;
  padding: 0.15em 0.45em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--accent);
}

/* ----- Utilities ----- */
.text-center   { text-align: center; }
.mx-auto       { margin-inline: auto; }
.mt-1 { margin-top: var(--s-1); }
.mt-2 { margin-top: var(--s-2); }
.mt-3 { margin-top: var(--s-3); }
.mt-4 { margin-top: var(--s-4); }
.mt-6 { margin-top: var(--s-6); }
.mb-1 { margin-bottom: var(--s-1); }
.mb-2 { margin-bottom: var(--s-2); }
.mb-3 { margin-bottom: var(--s-3); }
.mb-4 { margin-bottom: var(--s-4); }
.mb-6 { margin-bottom: var(--s-6); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* GPU-friendly transform hint for heavily animated elements */
.gpu { will-change: transform; }

/* Hide content visually until JS reveal runs — but never on no-JS */
.no-js .reveal,
.no-js [data-reveal] { opacity: 1 !important; transform: none !important; }
