/*
 * Global styles for the modern Idiotoon site
 *
 * Defines colour palette, typography and reusable components.  Each page
 * can add its own stylesheet for layout specifics, but should inherit
 * these base rules to maintain a consistent look and feel.
 */

/* CSS reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
    'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

/* Colour palette */
:root {
  --color-bg: #050a1f;        /* deep navy */
  --color-surface: #0d1333;   /* slightly lighter navy for cards */
  --color-primary: #7f5af0;   /* purple accent */
  --color-secondary: #00e0ff; /* neon cyan accent */
  --color-accent: #00ffb6;    /* neon green accent */
  --color-muted: #6b7a99;     /* muted text for descriptions */
  --color-text: #f5f5f5;      /* primary text */
  --radius-large: 50%;
  --radius-medium: 12px;
}

/* Utility classes */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.text-center {
  text-align: center;
}

/* General headings */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.3;
}

h1 {
  font-size: 1rem;
  margin-bottom: 0.1rem;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  position: relative;
}


/* Links */
a {
  color: var(--color-secondary);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease, font-weight 0.15s ease;
}

a:hover,
a:focus {
  color: rgba(127, 90, 240, 0.85); /* very light purple */
  font-weight: 600;
}

.page-content.gym-exercises a,
.page-content.gym-exercises a:hover,
.page-content.gym-exercises a:focus {
  color: var(--color-text);
}

/* Navigation orbs (used on each page) */
.orb-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.orb {
  position: relative;
  width: 140px;
  height: 140px;
  background: var(--color-surface);
  border-radius: var(--radius-large);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.orb:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 20px rgba(0, 255, 182, 0.3), 0 0 30px rgba(127, 90, 240, 0.2);
}

/* Active state for navigation orb */
.orb.active {
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}
.orb.active svg {
  fill: var(--color-bg);
}
.orb.active span {
  color: var(--color-bg);
}

.orb svg {
  width: 32px;
  height: 32px;
  margin-bottom: 0.5rem;
  fill: var(--color-secondary);
}

.orb span {
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 500;
  text-transform: capitalize;
}

/* Floating animation for orbs on home page */
.orb.floating {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}


/* Buttons */
.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-medium);
  font-weight: 600;
  color: var(--color-bg);
  /* updated gradient using neon green accent for a fresher, modern look */
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.btn:hover {
  transform: translateY(-2px);
}

/* Footer */
footer {
  padding: 2rem 0;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.9rem;
}

footer .social-icons {
  margin-bottom: 1rem;
}
footer .social-icons a {
  margin: 0 0.5rem;
  display: inline-block;
}

/* Mini navigation for inner pages (small glassy buttons near the Home link) */
.mini-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1rem;
}

.mini-nav a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1rem;
  /* subtle dark glass background */
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--color-secondary);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mini-nav a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}

.mini-nav a.active {
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  color: var(--color-bg);
}
.page-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 2rem auto;
}
.page-nav .nav-orb {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-large);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* glassy orb background: translucent gradient with blur */
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--color-text);
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* highlight on nav orb */
.page-nav .nav-orb::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(120px 120px at 50% 20%, rgba(255,255,255,0.25), transparent 50%);
  mix-blend-mode: screen;
  opacity: 0.6;
}
.page-nav .nav-orb:hover {
  transform: translateY(-4px);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6);
}
.page-nav .nav-orb svg {
  width: 28px;
  height: 28px;
  margin-bottom: 4px;
  fill: var(--color-accent);
}
.page-nav .nav-orb span {
  font-size: 0.7rem;
}
footer .social-icons svg {
  width: 28px;
  height: 28px;
  fill: var(--color-secondary);
  transition: transform 0.2s ease;
}
footer .social-icons a:hover svg {
  transform: translateY(-3px);
}

/* =============================================================
   Overlay navigation orbs for inner pages
   These reproduce the floating glass buttons from the prototype.
   Each page includes a <div class="overlay-nav"> with anchor
   elements for Home, Watch, Idioms, Gym, Shop and About.
   ============================================================= */
.overlay-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 20;
}
.overlay-nav .nav-orb {
  --orb-size: 80px;
  width: var(--orb-size);
  height: var(--orb-size);
  border-radius: 50%;
  position: absolute;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 4px;
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.05));
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  color: var(--color-text);
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  pointer-events: auto;
}
.overlay-nav .nav-orb:hover {
  transform: translateY(-6px) scale(1.05);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}
.overlay-nav .nav-orb::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(120px 120px at 50% 20%, rgba(184,154,255,0.35), transparent 45%);
  mix-blend-mode: screen;
  opacity: 0.6;
}
.overlay-nav .nav-orb .icon {
  font-size: 24px;
  line-height: 1;
}
.overlay-nav .nav-orb .label {
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}
.overlay-nav .nav-orb.active {
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  color: var(--color-bg);
}
.overlay-nav .nav-orb.active::after {
  background: none;
}
/* Position classes for overlay nav orbs */
/* Updated positions to minimise overlap with page content */
.overlay-nav .home { bottom: 5%; left: 50%; transform: translateX(-50%); }
.overlay-nav .watch { top: 8%; left: 6%; }
.overlay-nav .idioms { top: 8%; right: 6%; }
.overlay-nav .gym { bottom: 18%; left: 6%; }
.overlay-nav .shop { bottom: 18%; right: 6%; }
.overlay-nav .about { top: 40%; right: 6%; transform: translateY(-50%); }



/* =============================================
   GLOBAL PREMIUM PAGE CONTAINER (ALL PAGES)
============================================== */
.page-content {
  /* ultra-light transparent glass */
  background: rgba(255,255,255,0.015);

  /* soft white rim */
  border: 1px solid rgba(255,255,255,0.14);

  border-radius: 26px;

  /* TRUE luxury glass effect */
  box-shadow:
    /* outer floating depth */
    0 18px 38px rgba(0,0,0,0.55),
    0 4px 12px rgba(0,0,0,0.35),

    /* bright outer glow (halo) */
    0 0 18px rgba(255,255,255,0.08),
    0 0 6px rgba(255,255,255,0.06),

    /* inner highlights (curved glass effect) */
    inset 0 0 22px rgba(255,255,255,0.06),
    inset 0 0 4px rgba(255,255,255,0.20);

  max-width: 1150px;
  margin: 3rem auto;
  padding: 2.8rem;

  transition: transform .25s ease, box-shadow .35s ease;
}

.page-content:hover {
  transform: translateY(-1px);

  box-shadow:
    0 10px 22px rgba(0,0,0,0.35),
    inset 0 0 12px rgba(255,255,255,0.035);
}

/* =====================================================
   PAGE HEADER — ALL PAGES EXCEPT FRONT
===================================================== */

/* ===== PAGE HEADER — FINAL, CORRECT ===== */

body:not(.home):not(.front-page) .page-header {
  max-width: 1100px;
  margin: 2rem auto 1rem;
  padding: 0 1rem;

  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* ✅ allows title to drop as a block */
}

/* LEFT — Home */
body:not(.home):not(.front-page) .close-btn {
  padding: 0.45rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: none;
  flex: 0 0 auto;
  z-index: 2;
}

/* CENTER — locked to page center, never moves */
body:not(.home):not(.front-page) .mini-nav {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  display: flex;
  gap: 0.5rem;
  margin: 0;
  z-index: 1;
}

/* RIGHT — Title (smart behavior) */
body:not(.home):not(.front-page) .page-header h1 {
  flex: 1 1 auto;
  min-width: 0;

  font-size: clamp(1.4rem, 2vw, 2rem);
  line-height: 1.2;

  text-align: right;

  /* 🔒 typography rules */
  white-space: normal;        /* allow line break */
  word-break: keep-all;       /* never split letters */
  overflow-wrap: normal;      /* no anywhere wrapping */

  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* RIGHT — UI title wrapper (gives flex width) */
body:not(.home):not(.front-page) .page-title-wrap {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  justify-content: flex-end;
  padding-right: 10px;
}

/* RIGHT — UI title (exact same look as old h1) */
body:not(.home):not(.front-page) .page-title-ui {
  font-size: clamp(1.4rem, 2vw, 2rem);
  line-height: 1.2;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;

  background: linear-gradient(
    90deg,
    var(--color-primary),
    var(--color-accent)
  );
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}


/* =====================================
   Global Scrollbar (Idiotoon palette)
===================================== */
* {
  scrollbar-width: thin;
  scrollbar-color: #6a5cff #0b1020;
}

::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #0b1020;
}

::-webkit-scrollbar-thumb {
  background: #6a5cff;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #7b6dff;
}


/* Ensure single LCP candidate */
.hero-premium[data-below-fold] {
  content-visibility: auto;
  contain-intrinsic-size: 1000px;
}


/* =====================================
 hidden h1
===================================== */

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



/* =========================
   GLOBAL BACKLINK (NEUTRAL)
========================= */

.backlink {
  display: block;
  margin: 2.5rem auto 0;
  text-align: center;

  font-size: 0.95rem;
  line-height: 1.4;
  font-weight: 500;

  
  opacity: 0.7;
  text-decoration: none;

  transition: opacity .2s ease, transform .2s ease;
}

.backlink::after {
  content: ' →';
}

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




