/* ALSERO full quality audit overrides (static package) */
:root {
  --ag-bg: #000;
  --ag-panel: rgba(255, 255, 255, 0.03);
  --ag-text: rgba(255, 255, 255, 0.9);
  --ag-muted: rgba(255, 255, 255, 0.65);
  --ag-gold: #d8c27a;
}

html,
body {
  background: var(--ag-bg) !important;
  color: var(--ag-text) !important;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Arial, sans-serif !important;
  font-size: 16px !important;
  line-height: 1.56 !important;
  letter-spacing: -0.01em !important;
  font-variant-numeric: lining-nums tabular-nums !important;
  text-rendering: optimizeLegibility !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

/* Remove all residual decorative overlays/grain effects. */
body::before,
body::after {
  content: none !important;
  display: none !important;
  background: none !important;
  background-image: none !important;
}

*,
*::before,
*::after {
  box-shadow: none !important;
}

.bg-black,
header,
footer,
section,
main,
article {
  background-color: #000 !important;
  background-image: none !important;
}

.alsero-hero-grad,
.alsero-resource-card-grad,
[class*="overlay"],
[class*="-overlay"],
[class*="darken"] {
  background: none !important;
  background-image: none !important;
  opacity: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

img,
video,
[class*="thumb"],
[class*="image"],
[class*="photo"] {
  filter: none !important;
}

video.alsero-hero-video {
  opacity: 1 !important;
  visibility: visible !important;
  object-fit: cover !important;
  filter: none !important;
}

[class*="border"],
.border,
.border-t,
.border-b,
.border-l,
.border-r,
.rounded-2xl,
.contact-card,
.glass-card,
.alsero-resource-card,
footer .rounded-\[1\.5rem\] {
  border-color: transparent !important;
}

.contact-card,
.glass-card,
.alsero-resource-card,
[class*="rounded-"] {
  background-image: none !important;
  background-color: var(--ag-panel) !important;
}

/* Remove forbidden/legacy sections and links globally. */
.chat-widget,
.alsero-hero-cta,
.alsero-plan,
.alsero-stats,
a[href="/admin"],
a[href^="/admin?"],
a[href="/auth/login"],
a[href*="portal=exchange"],
a[href="/exchange"],
a[href="/alsero-exchange"],
a[href^="/alsero-cropty/exchange"],
a[href^="/alsero-cropty/admin"],
a[href="/collection"],
a[href="/journal"],
a[href="/story"],
a[href="/destinations"],
a[href="/insights"],
a[href^="/insights/"],
a[href*="insights"] {
  display: none !important;
}

/* Remove stat-like visual blocks if they remain in any page fragment. */
[class*="stat"],
[class*="metric"],
[class*="counter"],
[class*="certificate"],
[class*="cooperation"] {
  display: none !important;
}

/* Typography system: unified Apple-like hierarchy across all pages. */
h1,
h2,
h3,
h4,
h5,
h6,
.brand-wordmark,
.alsero-h2,
.alsero-resource-card-title,
.contact-card-value {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Arial, sans-serif !important;
  letter-spacing: -0.015em !important;
  line-height: 1.22 !important;
  font-weight: 600 !important;
  text-wrap: balance !important;
  font-variant-numeric: lining-nums tabular-nums !important;
}

h1,
h2,
.alsero-h2,
.alsero-resource-card-title {
  font-size: clamp(1.08rem, 1.08vw, 1.2rem) !important;
}

h3,
h4,
h5,
h6,
.contact-card-value,
.brand-wordmark {
  font-size: clamp(1rem, 1vw, 1.1rem) !important;
}

p,
li,
blockquote,
a,
button,
label,
input,
textarea,
select,
.alsero-resource-card-sub,
.contact-card-sub,
.contact-card-label,
.text-xs,
.text-sm,
.text-base,
.text-lg,
.text-xl,
.text-2xl,
.text-3xl,
.text-4xl,
.text-5xl,
.text-6xl {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Arial, sans-serif !important;
  font-size: clamp(0.94rem, 0.94vw, 1rem) !important;
  letter-spacing: -0.006em !important;
  line-height: 1.56 !important;
  text-align: left !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
  font-variant-numeric: lining-nums tabular-nums !important;
}

header nav a,
.brand-wordmark {
  white-space: nowrap !important;
}

.alsero-resource-card-sub,
.contact-card-label,
.ui-eyebrow-soft,
.alsero-eyebrow,
.alsero-eyebrow-gold {
  font-size: clamp(0.72rem, 0.78vw, 0.8rem) !important;
  line-height: 1.36 !important;
  letter-spacing: 0.11em !important;
  text-transform: uppercase !important;
  color: var(--ag-gold) !important;
}

/* Keep content width consistent and harmonic. */
.alsero-section,
.alsero-resources-section,
.alsero-dept-news-section,
.alsero-stripe,
section.mx-auto,
footer > div,
header > div {
  max-width: 1320px !important;
}

.alsero-hero-inner {
  max-width: 1120px !important;
  padding: 0 clamp(1.2rem, 4vw, 3rem) clamp(2rem, 7vw, 4rem) !important;
}

.alsero-hero-sub--xl {
  max-width: 560px !important;
  font-size: clamp(0.95rem, 1.1vw, 1.08rem) !important;
  line-height: 1.58 !important;
  font-weight: 500 !important;
  color: rgba(255, 255, 255, 0.86) !important;
  background: none !important;
}

.alsero-section-head,
.alsero-section-head-row,
.contact-card,
footer {
  text-align: left !important;
}

.alsero-section-head-row {
  align-items: flex-end !important;
}

/* News and cards: adaptive width and no clipped words. */
.alsero-dept-news-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
  gap: clamp(0.9rem, 1.8vw, 1.4rem) !important;
}

/* Fallback: hide duplicated last news card in current static feed. */
#departments-news .alsero-dept-news-grid > .alsero-dept-news-col:nth-child(6) {
  display: none !important;
}

.alsero-dept-news-col,
.alsero-resource-card,
.contact-card {
  min-width: 0 !important;
}

.alsero-dept-news-text,
.alsero-resource-card-title,
.alsero-resource-card-sub {
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
}

.alsero-resource-card-link,
.alsero-dept-news-more,
footer p.mt-6.max-w-\[520px\],
footer a[href="/collection"],
footer a[href="/journal"],
section.border-t.border-white\/7 {
  display: none !important;
}

.ag-telegram-link {
  color: rgba(255, 255, 255, 0.8) !important;
}

@media (max-width: 1100px) {
  .alsero-dept-news-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
  }
}

@media (max-width: 800px) {
  header nav {
    white-space: nowrap !important;
  }
  .alsero-hero-inner {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* Single canonical site: correct version with crest entrance. */
@keyframes ag-crest-slide-in {
  0% { opacity: 0; transform: translate3d(-24px, 0, 0) scale(0.92); filter: blur(2px) saturate(0.85); }
  58% { opacity: 1; transform: translate3d(5px, 0, 0) scale(1.015); filter: blur(0) saturate(1.08); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); filter: none; }
}
header a[href="/"] img[src*="coat_of_arms"],
header img[alt*="ALSERO"],
main img[src*="coat_of_arms"] {
  animation: ag-crest-slide-in 920ms cubic-bezier(0.22, 1, 0.36, 1) both !important;
  transform-origin: center center !important;
  will-change: transform, opacity !important;
}
@media (prefers-reduced-motion: reduce) {
  header a[href="/"] img[src*="coat_of_arms"], header img[alt*="ALSERO"], main img[src*="coat_of_arms"] {
    animation: none !important; opacity: 1 !important; transform: none !important;
  }
}
