/* ==========================================================================
   1. TOKENS
   ========================================================================== */
:root {
  --font-body: "Inter", "Pyidaungsu", "Noto Sans Myanmar", "Padauk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --fs-2xs: 0.6875rem;
  --fs-xs:  0.75rem;
  --fs-sm:  0.8125rem;
  --fs-md:  0.875rem;
  --fs-lg:  1rem;
  --fs-xl:  1.125rem;
  --fs-2xl: 1.5rem;
  --fs-3xl: 1.875rem;

  /* Myanmar script needs taller leading and zero tracking */
  --lh-tight: 1.4;
  --lh-mm: 1.75;
  --tracking-caps: 0.08em;

  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --sp-12: 56px; --sp-16: 72px;

  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-pill: 999px;

  --shell: 1440px;
  --gutter: 16px;

  /* Row heights — mobile first. Body padding always equals --h-header. */
  --h-breaking: 44px;
  --h-masthead: 56px;
  --h-nav: 0px;
  --h-chiprail: 40px;
  --h-header: calc(var(--h-breaking) + var(--h-masthead) + var(--h-chiprail));

  --t-fast: 150ms;
  --t-normal: 250ms;
  --t-slow: 400ms;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* Layers. Inside the header: masthead 3 > navbar 2 > breaking 1, so the
     language menu can never be painted under the navigation row. */
  --z-header: 100;
  --z-drawer: 200;
  --z-search: 300;
  --z-skip: 400;
}

:root,
[data-theme="light"] {
  color-scheme: light;
  --background: #ffffff;
  --surface: #f6f7f8;
  --surface-2: #ecedf0;
  --surface-invert: #101114;
  --text-primary: #101114;
  --text-secondary: #565c66;
  --text-invert: #ffffff;
  --border: #dcdfe4;
  --border-strong: #b9bec7;

  --accent-breaking: #c8102e;
  --accent-trust:    #0a4fcc;
  --accent-life:     #0f7a4d;
  --accent-premium:  #8a6a12;
  --gold-line:       #c9a227;

  --focus: #0a4fcc;
  --shadow-panel: 0 18px 40px -18px rgb(16 17 20 / 0.28), 0 2px 6px rgb(16 17 20 / 0.06);
  --skeleton: linear-gradient(90deg, #ecedf0 25%, #f6f7f8 50%, #ecedf0 75%);
}

[data-theme="dark"] {
  color-scheme: dark;
  --background: #0b0c0e;
  --surface: #141619;
  --surface-2: #1e2126;
  --surface-invert: #ffffff;
  --text-primary: #f3f4f6;
  --text-secondary: #a4abb6;
  --text-invert: #0b0c0e;
  --border: #2b2f36;
  --border-strong: #454b55;

  --accent-breaking: #ff5468;
  --accent-trust:    #6ba4ff;
  --accent-life:     #3fcb92;
  --accent-premium:  #e6c65c;
  --gold-line:       #e6c65c;

  --focus: #6ba4ff;
  --shadow-panel: 0 18px 40px -18px rgb(0 0 0 / 0.7), 0 2px 6px rgb(0 0 0 / 0.4);
  --skeleton: linear-gradient(90deg, #1e2126 25%, #262a31 50%, #1e2126 75%);
}

@media (prefers-color-scheme: dark) {
  [data-theme="system"] {
    color-scheme: dark;
    --background: #0b0c0e;
    --surface: #141619;
    --surface-2: #1e2126;
    --surface-invert: #ffffff;
    --text-primary: #f3f4f6;
    --text-secondary: #a4abb6;
    --text-invert: #0b0c0e;
    --border: #2b2f36;
    --border-strong: #454b55;
    --accent-breaking: #ff5468;
    --accent-trust:    #6ba4ff;
    --accent-life:     #3fcb92;
    --accent-premium:  #e6c65c;
    --gold-line:       #e6c65c;
    --focus: #6ba4ff;
    --shadow-panel: 0 18px 40px -18px rgb(0 0 0 / 0.7), 0 2px 6px rgb(0 0 0 / 0.4);
    --skeleton: linear-gradient(90deg, #1e2126 25%, #262a31 50%, #1e2126 75%);
  }
}

/* ==========================================================================
   2. BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  /* WCAG 2.4.11 — keeps focused elements clear of the fixed header */
  scroll-padding-top: calc(var(--h-header) + 8px);
}

/* Flex column so the footer sits at the bottom of short pages, and
   padding-top reserves the fixed header's height so nothing shifts. */
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: var(--h-header);
  background: var(--background);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-lg);
  line-height: var(--lh-mm);
  letter-spacing: 0;              /* never letter-space Myanmar */
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color var(--t-normal) var(--ease), color var(--t-normal) var(--ease);
}
body.is-locked { overflow: hidden; }

h1, h2 { margin: 0; line-height: var(--lh-tight); font-weight: 700; }
p  { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a  { color: inherit; text-decoration: none; }

button, input { font: inherit; color: inherit; letter-spacing: inherit; }
button { background: none; border: 0; cursor: pointer; }

kbd {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: var(--fs-2xs);
  padding: 2px 5px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  background: var(--surface);
  line-height: 1;
}

.sprite { display: none; }

.icon {
  width: 20px; height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--sm { width: 17px; height: 17px; }
.icon--xs { width: 15px; height: 15px; }
/* Social glyphs are solid paths */
.social .icon { fill: currentColor; stroke: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: var(--sp-2); left: var(--sp-2);
  z-index: var(--z-skip);
  padding: var(--sp-3) var(--sp-5);
  background: var(--accent-breaking);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: var(--fs-md);
  font-weight: 600;
  transform: translateY(calc(-100% - 16px));
  transition: transform var(--t-fast) var(--ease);
}
.skip-link:focus-visible { transform: translateY(0); }

:where(a, button, input, [tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* Shared wordmark, used in the masthead, the drawer and the colophon */
.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0.32em;
  position: relative;
  flex: none;
  font-size: var(--fs-2xl);
  line-height: 1;
  white-space: nowrap;
}
.logo__mark {
  font-family: "Inter", sans-serif;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text-primary);
}
.logo__word {
  font-family: "Inter", sans-serif;
  font-size: 0.52em;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.logo__rule {
  position: absolute;
  left: 0; bottom: -7px;
  width: 34px; height: 3px;
  background: var(--gold-line);
}

