/* =========================================================
   ONEETSAKO STORY SYSTEM
   =========================================================
   • Fully fluid responsive architecture via clamp()
   • Modern desktop visual standard with phone-first readability
   • High-visibility body text & enhanced telemetry contrast
   • ZERO @media queries | ZERO @container queries
   ========================================================= */


/* =========================================================
   ROOT — FLUID DESIGN SYSTEM
   ========================================================= */

:root {
  --bg-color: #040608;

  --text-color: #f1f5f9;
  --text-bright: #ffffff;
  --text-body: #ffffff;
  --text-soft: #e2e8f0;

  --gold-accent: #d4af37;
  --gold-light: #fef08a;
  --astro-blue: #38bdf8;
  --danger-red: #f87171;

  --border-color: rgba(212, 175, 55, 0.25);
  --grid-line: rgba(56, 189, 248, 0.08);

  --card-bg: rgba(15, 23, 42, 0.65);
  --card-glow: rgba(56, 189, 248, 0.06);

  /* Continuous Page Layout Padding */
  --page-side: clamp(1rem, 6vw, 5.5rem);

  /* Fluid Spacing Scale */
  --breath-xs: clamp(1rem, 2.5vw, 2.2rem);
  --breath-small: clamp(2rem, 4.5vw, 4.5rem);
  --breath-medium: clamp(3.5rem, 8vw, 8rem);
  --breath-large: clamp(5rem, 12vw, 12rem);
  --breath-massive: clamp(7rem, 16vw, 16rem);

  /* Body Typography (Increased Base Size & Scaling) */
  --body-size: clamp(1.05rem, 1.25vw + 0.75rem, 1.35rem);
  --body-large: clamp(1.15rem, 1.4vw + 0.8rem, 1.45rem);
  --body-lh: clamp(1.75, 0.5vw + 1.6, 2.05);

  /* Telemetry & Labels */
  --mono-small: clamp(0.78rem, 0.85vw + 0.5rem, 0.95rem);
  --mono-medium: clamp(0.88rem, 1vw + 0.55rem, 1.05rem);

  /* Fluid Headings */
  --heading-h1: clamp(1.85rem, 3.5vw + 1rem, 3.5rem);
  --heading-h2: clamp(1.45rem, 2.4vw + 0.85rem, 2.4rem);
  --heading-h3: clamp(1.2rem, 1.8vw + 0.75rem, 1.75rem);

  /* Cultural Elements */
  --chant-size: clamp(1.4rem, 3.8vw + 0.6rem, 2.8rem);

  /* Navigation */
  --nav-height: clamp(3.8rem, 5.5vw, 5.2rem);
  --nav-padding: clamp(0.85rem, 2vw, 1.6rem);
}


/* =========================================================
   RESET
   ========================================================= */

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


/* =========================================================
   HTML & BODY
   ========================================================= */

html {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
  background: var(--bg-color);
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  min-width: 280px;
  min-height: 100vh;

  overflow-x: hidden;

  background: var(--bg-color);
  color: var(--text-color);

  font-family: "Montserrat", sans-serif;
  font-size: var(--body-size);
  font-weight: 400;
  line-height: var(--body-lh);

  padding: clamp(5.5rem, 9vw, 8rem) var(--page-side) clamp(2.5rem, 6vw, 5.5rem);

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}


/* =========================================================
   MEDIA & LINKS
   ========================================================= */

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

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}


/* =========================================================
   GLOBAL TEXT SAFETY
   ========================================================= */

p,
h1,
h2,
h3,
h4,
h5,
h6,
span,
a {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
}


/* =========================================================
   BACKGROUND STARFIELD WATERMARK
   ========================================================= */

.watermark-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.05;

  background-image:
    radial-gradient(white, rgba(255, 255, 255, 0.2) 2px, transparent 3px),
    radial-gradient(white, rgba(255, 255, 255, 0.15) 1px, transparent 2px),
    radial-gradient(white, rgba(255, 255, 255, 0.1) 2px, transparent 3px);

  background-size:
    clamp(400px, 40vw, 600px) clamp(400px, 40vw, 600px),
    clamp(250px, 25vw, 400px) clamp(250px, 25vw, 400px),
    clamp(150px, 15vw, 200px) clamp(150px, 15vw, 200px);
}


/* =========================================================
   SHARED NAVIGATION
   ========================================================= */

.navbar.oneetsako-nav {
  position: fixed;
  top: clamp(0.6rem, 1.5vw, 1.25rem);
  left: 50%;
  transform: translateX(-50%);

  width: min(calc(100% - var(--page-side)), 1100px);
  min-height: var(--nav-height);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(0.5rem, 2vw, 1.5rem);

  padding: 0 var(--nav-padding);
  z-index: 9999;

  border: 1px solid var(--border-color);
  border-radius: clamp(8px, 1.2vw, 16px);
  background: rgba(4, 6, 8, 0.92);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.navbar.oneetsako-nav .logo {
  display: inline-flex;
  align-items: center;
  gap: clamp(0.45rem, 1vw, 0.8rem);
  min-width: 0;
  color: var(--text-bright);
  font-family: "Cinzel Decorative", serif;
  font-size: clamp(0.92rem, 1.4vw, 1.25rem);
  font-weight: 400;
  letter-spacing: clamp(0.03em, 0.12vw, 0.08em);
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

.navbar.oneetsako-nav .logo:hover {
  opacity: 0.82;
}

.navbar.oneetsako-nav .logo-leaf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(1.6rem, 3vw, 2.4rem);
  height: clamp(1.6rem, 3vw, 2.4rem);
  flex: 0 0 auto;
  font-size: clamp(1rem, 2vw, 1.5rem);
}

.navbar.oneetsako-nav .logo-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.navbar.oneetsako-nav .theme-toggle {
  flex: 0 0 auto;
  width: clamp(2.4rem, 4vw, 3.2rem);
  height: clamp(2.4rem, 4vw, 3.2rem);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.08);
  color: var(--text-bright);
  cursor: pointer;
  transition: all 0.3s ease;
}

.navbar.oneetsako-nav .theme-toggle:hover {
  background: rgba(212, 175, 55, 0.25);
  border-color: var(--gold-accent);
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.35);
}


/* =========================================================
   STORY CONTAINER & RETURN BUTTON
   ========================================================= */

.story-container {
  width: min(100%, 960px);
  margin: 0 auto;
  position: relative;
  z-index: 1;
  min-width: 0;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: clamp(0.5rem, 1vw, 0.75rem);
  color: var(--gold-accent);
  font-family: "Share Tech Mono", monospace;
  font-size: var(--mono-small);
  letter-spacing: clamp(0.08em, 0.16vw, 0.18em);
  text-transform: uppercase;
  margin-bottom: var(--breath-medium);
  padding: clamp(0.6rem, 1.1vw, 0.8rem) clamp(0.9rem, 1.6vw, 1.4rem);
  border: 1px solid var(--border-color);
  border-radius: clamp(3px, 0.5vw, 6px);
  background: rgba(212, 175, 55, 0.04);
  transition: all 0.3s ease;
}

.back-btn:hover {
  background: var(--gold-accent);
  color: #040608;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.45);
  transform: translateX(-4px);
}


/* =========================================================
   HEADER & TELEMETRY
   ========================================================= */

header {
  width: 100%;
  text-align: center;
  margin-bottom: var(--breath-large);
}

.kicker {
  display: block;
  font-family: "Share Tech Mono", monospace;
  font-size: var(--mono-small);
  color: var(--astro-blue);
  text-transform: uppercase;
  letter-spacing: clamp(0.1em, 0.22vw, 0.25em);
  margin-bottom: var(--breath-xs);
  line-height: 1.5;
  text-shadow: 0 0 14px rgba(56, 189, 248, 0.35);
}

h1 {
  font-family: "Cinzel Decorative", serif;
  font-size: var(--heading-h1);
  font-weight: 400;
  color: var(--text-bright);
  letter-spacing: clamp(0.02em, 0.08vw, 0.07em);
  margin-bottom: clamp(1rem, 2.2vw, 1.6rem);
  line-height: 1.25;
  text-shadow: 0 0 24px rgba(255, 255, 255, 0.18);
}

.subtitle {
  font-family: "Playfair Display", serif;
  font-style: italic;
  color: var(--text-soft);
  font-size: clamp(1.05rem, 1.4vw, 1.35rem);
  font-weight: 400;
  line-height: 1.8;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9);
}


/* =========================================================
   DIAGRAM CONTAINER & LABELS
   ========================================================= */

.diagram-container {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: clamp(4px, 0.8vw, 8px);
  padding: clamp(1.4rem, 3.2vw, 2.2rem) clamp(1rem, 2.5vw, 1.8rem);
  margin: var(--breath-medium) 0;
  background: linear-gradient(180deg, var(--card-glow) 0%, var(--card-bg) 100%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  position: relative;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65);
  overflow: hidden;
}

.diagram-label {
  position: absolute;
  top: clamp(8px, 1.2vw, 14px);
  right: clamp(10px, 1.6vw, 20px);
  font-family: "Share Tech Mono", monospace;
  font-size: var(--mono-small);
  color: var(--astro-blue);
  letter-spacing: clamp(0.08em, 0.14vw, 0.16em);
  text-transform: uppercase;
  line-height: 1.5;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.svg-diagram {
  display: block;
  width: 100%;
  height: auto;
  min-width: 0;
  margin: 0 auto;
}


/* =========================================================
   ARTICLE & HIGH-VISIBILITY PARAGRAPH SYSTEM
   ========================================================= */

article {
  width: 100%;
  min-width: 0;
}

article section {
  width: 100%;
  min-width: 0;
  margin-bottom: var(--breath-large);
}

article section + section {
  margin-top: var(--breath-small);
}

article h3 {
  display: inline-block;
  font-family: "Cinzel Decorative", serif;
  font-size: var(--heading-h3);
  font-weight: 400;
  color: var(--gold-light);
  margin-bottom: clamp(1.2rem, 2.4vw, 2rem);
  padding-bottom: clamp(0.4rem, 0.8vw, 0.75rem);
  border-bottom: 1px solid var(--border-color);
  letter-spacing: clamp(0.03em, 0.06vw, 0.08em);
  line-height: 1.4;
  text-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
}

/* Enhanced Body Paragraph Visibility */
article p,
article section p {
  width: 100%;
  font-family: "Montserrat", sans-serif;
  font-size: var(--body-large);
  font-weight: 400;
  color: #ffffff !important;
  line-height: var(--body-lh);
  letter-spacing: clamp(0.01em, 0.02vw, 0.025em);
  margin-bottom: clamp(1.6rem, 3.2vw, 2.8rem);
  opacity: 1 !important;
  text-align: left;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85), 0 0 2px rgba(0, 0, 0, 0.9);
}

article strong,
article b {
  color: var(--gold-light);
  font-weight: 600;
  text-shadow: 0 0 10px rgba(254, 240, 138, 0.25);
}


/* =========================================================
   BLOCKQUOTE & CULTURAL CHANT
   ========================================================= */

blockquote {
  border-left: clamp(2px, 0.4vw, 4px) solid var(--gold-accent);
  padding-left: clamp(1.2rem, 3.2vw, 2.4rem);
  margin: var(--breath-small) 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.1rem, 1.8vw, 1.45rem);
  font-style: italic;
  color: var(--text-bright);
  line-height: 1.8;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

.chant-box {
  width: 100%;
  text-align: center;
  padding: var(--breath-medium) var(--page-side);
  background: radial-gradient(circle at center, rgba(212, 175, 55, 0.1) 0%, transparent 75%);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin: var(--breath-large) 0;
}

.chant-title {
  font-family: "Cinzel Decorative", serif;
  font-size: clamp(0.85rem, 1.1vw, 1.15rem);
  color: var(--gold-light);
  margin-bottom: var(--breath-xs);
  letter-spacing: clamp(0.1em, 0.2vw, 0.22em);
  font-weight: 400;
}

.chant-text {
  font-size: var(--chant-size);
  letter-spacing: clamp(0.08em, 0.2vw, 0.28em);
  color: var(--text-bright);
  font-weight: 300;
  text-transform: uppercase;
  line-height: 1.4;
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
  overflow-wrap: anywhere;
}


/* =========================================================
   FOOTER
   ========================================================= */

#footer-placeholder {
  width: 100%;
  margin-top: var(--breath-massive);
}

footer {
  width: 100%;
  margin-top: var(--breath-massive);
  padding: clamp(2.2rem, 5.5vw, 4.5rem) var(--page-side) clamp(1.8rem, 4.5vw, 3.5rem);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
  z-index: 2;
  color: #cbd5e1;
  font-family: "Share Tech Mono", monospace;
  font-size: var(--mono-small);
  font-weight: 400;
  letter-spacing: clamp(0.05em, 0.12vw, 0.12em);
  line-height: 1.8;
}

footer::before {
  content: "";
  display: block;
  width: clamp(3.5rem, 14vw, 10rem);
  height: 1px;
  margin: 0 auto clamp(1.4rem, 3.2vw, 2.2rem);
  background: rgba(212, 175, 55, 0.5);
  opacity: 0.85;
}

footer p,
.story-container footer p {
  width: 100%;
  margin: 0;
  padding: 0 clamp(0.5rem, 2vw, 1.5rem);
  color: var(--text-soft) !important;
  font-family: "Share Tech Mono", monospace;
  font-size: var(--mono-small) !important;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: clamp(0.06em, 0.14vw, 0.2em);
  text-align: center;
  opacity: 1 !important;
  overflow-wrap: anywhere;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}


/* =========================================================
   CONTAINER & FLEX SAFETY
   ========================================================= */

h1, h2, h3, h4, h5, h6 {
  max-width: 100%;
  font-weight: 400;
  overflow-wrap: anywhere;
}

body,
.story-container,
article,
article section,
.diagram-container,
.chant-box,
#footer-placeholder,
footer,
.story-container > *,
article > *,
article section > *,
.navbar.oneetsako-nav * {
  max-width: 100%;
  min-width: 0;
}