/**
 * MingalaCredit — shared theme (design tokens + chrome)
 * Load before page-specific CSS.
 */
:root {
  --orange-950: #2a1505;
  --orange-900: #5c2800;
  --orange-800: #8a3a00;
  --orange-700: #c74e00;
  --orange-600: #e85a00;
  --orange-500: #ff7a12;
  --orange-400: #ff9440;
  --gold-600: #e8a820;
  --gold-500: #ffc93d;
  --gold-400: #ffd963;
  --gold-300: #ffe89a;
  --cream: #fff8f0;
  --cream-2: #fff2e2;
  --white: #fffefa;
  --ink: #141008;
  --muted: #5a5046;
  --font-sans: "Lexend", "Noto Sans Myanmar", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-xs: 0 1px 3px rgba(42, 21, 5, 0.06);
  --shadow-sm: 0 4px 16px rgba(42, 21, 5, 0.07);
  --shadow-md: 0 14px 44px rgba(42, 21, 5, 0.1);
  --shadow-lg: 0 28px 72px rgba(42, 21, 5, 0.14);
  --shadow-xl: 0 40px 100px rgba(42, 21, 5, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-pill: 999px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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;
  }
}

::selection {
  background: rgba(255, 180, 70, 0.35);
  color: var(--orange-950);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  line-height: 1.68;
  font-size: 1.03rem;
  letter-spacing: 0.015em;
  background-color: var(--cream);
  background-image:
    radial-gradient(1200px 600px at 100% -10%, rgba(255, 180, 100, 0.2) 0%, transparent 55%),
    radial-gradient(900px 520px at -5% 40%, rgba(255, 122, 60, 0.12) 0%, transparent 48%),
    radial-gradient(ellipse at 50% 100%, rgba(255, 235, 210, 0.6) 0%, var(--cream) 42%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.38;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
  background-image: radial-gradient(rgba(232, 90, 0, 0.045) 1px, transparent 1px);
  background-size: 22px 22px;
}

body > * {
  position: relative;
  z-index: 1;
}

main {
  position: relative;
  z-index: 1;
}

a {
  color: var(--orange-700);
  text-decoration: none;
  font-weight: 600;
}

a:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 3px;
  border-radius: 4px;
}

body > header {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 5vw;
  isolation: isolate;
  background: rgba(255, 251, 246, 0.76);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid rgba(232, 90, 0, 0.09);
  box-shadow:
    var(--shadow-xs),
    0 18px 48px rgba(42, 21, 5, 0.045);
}

body > header::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 38%;
  max-width: 520px;
  pointer-events: none;
  background: radial-gradient(ellipse 100% 140% at 0% 50%, rgba(255, 190, 90, 0.08), transparent 72%);
  z-index: -1;
}

body > header::after {
  content: "";
  position: absolute;
  left: 5vw;
  right: 5vw;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 176, 72, 0.45), transparent);
  opacity: 0.85;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: -0.03em;
  transition: transform 0.2s var(--ease-out);
}

.brand:hover {
  transform: translateY(-1px);
}

.brand img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  box-shadow:
    0 0 0 1px rgba(255, 220, 140, 0.5),
    0 0 0 5px rgba(255, 186, 72, 0.12),
    var(--shadow-xs);
}

body > header nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

body > header nav a {
  font-size: 0.81rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--muted);
  padding: 0.42rem 0.88rem;
  border-radius: var(--radius-pill);
  transition:
    color 0.2s var(--ease-out),
    background 0.22s var(--ease-out),
    box-shadow 0.22s var(--ease-out),
    transform 0.2s var(--ease-out);
}

body > header nav a:hover {
  color: var(--orange-950);
  background: rgba(232, 90, 0, 0.07);
  transform: translateY(-1px);
}

body > header nav a[aria-current="page"] {
  color: var(--white);
  background: linear-gradient(145deg, var(--orange-600) 0%, var(--orange-500) 48%, #ff8c28 100%);
  box-shadow:
    0 6px 22px rgba(232, 90, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

@media (max-width: 640px) {
  body > header {
    padding: 0.78rem 4vw;
  }

  body > header nav a {
    font-size: 0.74rem;
    padding: 0.38rem 0.65rem;
  }

  .brand img {
    width: 44px;
    height: 44px;
  }
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 600;
}

body > footer {
  padding: clamp(1.85rem, 4vw, 2.25rem) 5vw;
  margin-top: auto;
  background:
    radial-gradient(ellipse 1000px 220px at 50% -35%, rgba(255, 155, 72, 0.16), transparent),
    linear-gradient(185deg, #1e1812 0%, #0f0c0a 100%);
  color: rgba(255, 250, 243, 0.9);
  font-size: 0.88rem;
  border-top: 1px solid rgba(255, 160, 72, 0.12);
}

body > footer::before {
  content: "";
  display: block;
  height: 4px;
  margin: -1.85rem -5vw 1.5rem;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 110, 35, 0.5),
    var(--gold-500),
    rgba(255, 180, 72, 0.9),
    var(--orange-500),
    transparent
  );
  opacity: 0.92;
  filter: saturate(1.1);
}

footer .inner {
  max-width: min(1040px, 100%);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

footer img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

footer a {
  color: rgba(255, 210, 160, 0.95);
}

footer a:hover {
  color: #fff;
}

footer .tag {
  padding: 0.38rem 0.92rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(145deg, rgba(255, 130, 40, 0.18), rgba(255, 180, 80, 0.1));
  border: 1px solid rgba(255, 190, 120, 0.22);
  color: rgba(255, 228, 190, 0.98);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
