/* ============================================================
   NASYWA OS: BASE TOKENS, WALLPAPER & ACCESSIBILITY
   Default Theme: Light Mode (Lavender Wallpaper + Mentaya River)
   Optional Theme: Dark Mode (#10173A & #1B2350)
   ============================================================ */

:root,
[data-theme="light"] {
  --bg-wall-top: #EFEAFD;
  --bg-wall-mid: #E6DDFB;
  --bg-wall-bottom: #F6F3FE;
  --river-silhouette: rgba(195, 177, 242, 0.48);
  --river-line: rgba(106, 79, 179, 0.16);

  --window-bg: #FFFFFF;
  --glass-bg: rgba(255, 255, 255, 0.82);
  --glass-strong: rgba(255, 255, 255, 0.92);
  --surface-sub: #F4F1FD;
  --surface-hover: #ECE6FB;

  --navy: #14204A;
  --text-heading: #14204A;
  --text-body: #2A325C;
  --text-muted: #555B82;

  --accent: #C3B1F2;
  --accent-soft: #EDE7FC;
  --link: #6A4FB3;
  --link-hover: #513A94;
  --border: #D9D0F3;
  --border-strong: #B8A7EA;

  --btn-bg: #14204A;
  --btn-text: #FFFFFF;
  --btn-hover: #253470;

  --shadow-window: 0 18px 48px rgba(20, 32, 74, 0.1);
  --shadow-card: 0 8px 22px rgba(20, 32, 74, 0.06);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-pill: 9999px;

  --ease: 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --bg-wall-top: #10173A;
  --bg-wall-mid: #151E49;
  --bg-wall-bottom: #0E1433;
  --river-silhouette: rgba(195, 177, 242, 0.16);
  --river-line: rgba(195, 177, 242, 0.2);

  --window-bg: #1B2350;
  --glass-bg: rgba(27, 35, 80, 0.84);
  --glass-strong: rgba(27, 35, 80, 0.94);
  --surface-sub: #141B42;
  --surface-hover: #242E66;

  --navy: #FFFFFF;
  --text-heading: #FFFFFF;
  --text-body: #E9E5FA;
  --text-muted: #B9B4D9;

  --accent: #C3B1F2;
  --accent-soft: rgba(195, 177, 242, 0.18);
  --link: #C3B1F2;
  --link-hover: #DDD2FA;
  --border: #323C73;
  --border-strong: #5863A8;

  --btn-bg: #C3B1F2;
  --btn-text: #10173A;
  --btn-hover: #DCD0FA;

  --shadow-window: 0 22px 54px rgba(5, 8, 24, 0.55);
  --shadow-card: 0 10px 26px rgba(5, 8, 24, 0.36);
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
  background-color: var(--bg-wall-top);
  overflow-x: clip;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-body);
  min-height: 100vh;
  background: linear-gradient(155deg, var(--bg-wall-top) 0%, var(--bg-wall-mid) 52%, var(--bg-wall-bottom) 100%);
  background-attachment: fixed;
  overflow-x: clip;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--ease), color var(--ease);
}

/* Subtle Mentaya River Silhouette Wallpaper Layer */
.os-wallpaper {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.os-wallpaper svg {
  width: 100%;
  height: 100%;
}

.os-root {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3,
h4 {
  color: var(--text-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

p,
li,
a,
span {
  overflow-wrap: anywhere;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color var(--ease);
}

a:hover {
  color: var(--link-hover);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  touch-action: manipulation;
}

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

ul,
ol {
  list-style: none;
}

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

:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 3px;
  border-radius: 8px;
}

.skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 4000;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background-color: var(--btn-bg);
  color: var(--btn-text);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.skip-link:focus {
  top: 16px;
}

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

.is-hidden {
  display: none !important;
}

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