/* Base Theme Styles & Tokens */
:root {
  --tn-color-dark: #15101f;
  --tn-color-bg: #1a1424;
  --tn-color-accent: #8b3ffb;
  --tn-color-bright: #f5f2fb;
  --tn-color-text: #ece7f5;
  --tn-color-muted: #a598bd;
  --tn-font-body: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --tn-font-heading: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --tn-radius: 0.65rem;
  --tn-transition: cubic-bezier(0.4, 0, 0.2, 1) 0.25s;
  --tn-header-height: 80px;
}

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

body {
  margin: 0;
  padding: 0;
  background-color: var(--tn-color-bg);
  color: var(--tn-color-text);
  font-family: var(--tn-font-body);
  line-height: 1.6;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

/* Header Layout */
.tn-header-outer {
  background-color: var(--tn-color-dark);
  border-bottom: 1px solid rgba(139, 63, 251, 0.2);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.tn-header-container {
  max-width: 1440px;
  height: var(--tn-header-height);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Logo */
.tn-header-logo-zone {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.tn-logo {
  display: inline-flex;
  align-items: center;
  height: 44px;
  text-decoration: none;
  transition: transform var(--tn-transition);
}

.tn-logo:hover {
  transform: scale(1.02);
}

.tn-logo img {
  height: 100%;
  max-height: 44px;
  width: auto;
  object-fit: contain;
}

/* Interactive Zones */
.tn-header-nav-zone {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.tn-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Brand CTA Buttons */
.tn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--tn-font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.8rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--tn-radius);
  text-decoration: none;
  transition: all var(--tn-transition);
  white-space: nowrap;
  cursor: pointer;
}

.tn-cta--primary {
  background-color: var(--tn-color-accent);
  color: var(--tn-color-bright);
  box-shadow: 0 4px 14px rgba(139, 63, 251, 0.4);
  border: 1px solid var(--tn-color-accent);
}

.tn-cta--primary:hover {
  background-color: #9c5cff;
  box-shadow: 0 6px 20px rgba(139, 63, 251, 0.6);
  transform: translateY(-1px);
}

.tn-cta--secondary {
  background-color: rgba(139, 63, 251, 0.08);
  color: var(--tn-color-text);
  border: 1px solid rgba(139, 63, 251, 0.4);
}

.tn-cta--secondary:hover {
  background-color: rgba(139, 63, 251, 0.16);
  border-color: var(--tn-color-accent);
  color: var(--tn-color-bright);
  transform: translateY(-1px);
}

/* Compact Inline Language Switcher */
.tn-lang {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.2rem;
  border-radius: 0.5rem;
}

.tn-lang__item {
  display: block;
}

.tn-lang__link {
  display: block;
  font-family: var(--tn-font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--tn-color-muted);
  text-decoration: none;
  padding: 0.35rem 0.6rem;
  border-radius: 0.35rem;
  transition: all var(--tn-transition);
}

.tn-lang__link:hover {
  color: var(--tn-color-bright);
  background-color: rgba(139, 63, 251, 0.15);
}

.tn-lang__link--active {
  color: var(--tn-color-bright);
  background-color: var(--tn-color-accent);
  box-shadow: 0 2px 8px rgba(139, 63, 251, 0.3);
}

/* NAVIGATION SYSTEM - 17 items, persistent Drawer Burger */
.tn-nav {
  display: flex;
  align-items: center;
}

/* Burger Trigger Icon Always Visible due to collapse_menu_to_burger: true */
.tn-nav__toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 44px;
  height: 44px;
  padding: 13px;
  cursor: pointer;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(139, 63, 251, 0.2);
  transition: all var(--tn-transition);
  z-index: 1010;
  position: relative;
}

.tn-nav__toggle:hover {
  background-color: rgba(139, 63, 251, 0.15);
  border-color: var(--tn-color-accent);
  box-shadow: 0 0 10px rgba(139, 63, 251, 0.3);
}

.tn-nav__toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--tn-color-text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s, background-color 0.3s;
}

/* Sibling backdrop using modern :has selector */
.tn-nav:has(.tn-nav__checkbox:checked)::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 10, 31, 0.85);
  backdrop-filter: blur(5px);
  z-index: 999;
}

/* Persistent Off-canvas Drawer Navigation list */
.tn-nav__list {
  position: fixed;
  top: 0;
  right: -360px;
  width: 360px;
  max-width: 85vw;
  height: 100vh;
  background-color: #0f0a17;
  border-left: 1px solid rgba(139, 63, 251, 0.25);
  margin: 0;
  padding: 6.5rem 2rem 3rem 2rem;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 1000;
  overflow-y: auto;
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.7);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Side glowing vertical bar */
.tn-nav__list::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--tn-color-accent), transparent);
}

/* Checkbox control interaction */
.tn-nav__checkbox:checked ~ .tn-nav__list {
  transform: translateX(-360px);
}

.tn-nav__checkbox:checked ~ .tn-nav__toggle .tn-nav__toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
  background-color: var(--tn-color-bright);
}

.tn-nav__checkbox:checked ~ .tn-nav__toggle .tn-nav__toggle-bar:nth-child(2) {
  opacity: 0;
}

.tn-nav__checkbox:checked ~ .tn-nav__toggle .tn-nav__toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
  background-color: var(--tn-color-bright);
}

/* Navigation items details */
.tn-nav__item {
  position: relative;
  width: 100%;
}

.tn-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--tn-font-heading);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--tn-color-muted);
  text-decoration: none;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: color var(--tn-transition), padding-left var(--tn-transition);
}

.tn-nav__link:hover,
.tn-nav__link--active {
  color: var(--tn-color-bright);
  padding-left: 0.5rem;
}

.tn-nav__link--active {
  border-bottom-color: var(--tn-color-accent);
  text-shadow: 0 0 8px var(--tn-color-accent);
}

/* Multi-level nested drop-down inside Drawer */
.tn-nav__item--has-children > .tn-nav__link::after {
  content: '+';
  font-size: 1.1rem;
  color: var(--tn-color-accent);
  font-weight: normal;
}

.tn-nav__submenu {
  list-style: none;
  padding: 0.4rem 0 0.4rem 1.2rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  border-left: 1px solid rgba(139, 63, 251, 0.2);
}

.tn-nav__submenu .tn-nav__link {
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: normal;
  padding: 0.4rem 0;
  border: none;
}

/* Breadcrumbs */
.tn-breadcrumbs-bar {
  background-color: var(--tn-color-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding: 0.85rem 1.5rem;
}

.tn-breadcrumbs-container {
  max-width: 1440px;
  margin: 0 auto;
}

.tn-breadcrumbs {
  display: block;
}

.tn-breadcrumbs ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0.5rem;
}

.tn-breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  font-family: var(--tn-font-heading);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tn-color-muted);
}

.tn-breadcrumbs__item:not(:last-child)::after {
  content: '/';
  margin-left: 0.5rem;
  margin-right: 0.15rem;
  color: rgba(139, 63, 251, 0.4);
  font-weight: 700;
}

.tn-breadcrumbs__link {
  color: var(--tn-color-muted);
  text-decoration: none;
  transition: color var(--tn-transition);
}

.tn-breadcrumbs__link:hover {
  color: var(--tn-color-bright);
}

.tn-breadcrumbs__item[aria-current="page"],
.tn-breadcrumbs__item:last-child {
  color: var(--tn-color-bright);
  font-weight: 600;
}

/* Main container spacing */
.tn-main-container {
  flex: 1 0 auto;
  width: 100%;
  position: relative;
  background: radial-gradient(circle at 80% 15%, rgba(139, 63, 251, 0.07) 0%, transparent 55%);
}

/* Footer layout */
.tn-footer-outer {
  background-color: var(--tn-color-dark);
  border-top: 1px solid rgba(139, 63, 251, 0.25);
  padding: 4.5rem 1.5rem 2rem 1.5rem;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.tn-footer-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--tn-color-accent), transparent);
  box-shadow: 0 0 22px 3px rgba(139, 63, 251, 0.8);
  opacity: 0.7;
}

.tn-footer-container {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  position: relative;
  z-index: 2;
}

@media (min-width: 768px) {
  .tn-footer-container {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}

.tn-footer-brand-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tn-footer-logo-substitute {
  font-family: var(--tn-font-heading);
  font-weight: 900;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  color: var(--tn-color-bright);
}

.tn-accent-dot {
  color: var(--tn-color-accent);
}

.tn-footer-disclaimer-text {
  font-size: 0.9rem;
  color: var(--tn-color-muted);
  line-height: 1.6;
  margin: 0;
  max-width: 440px;
}

.tn-footer-section-title {
  font-family: var(--tn-font-heading);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tn-color-bright);
  font-weight: 700;
  margin: 0 0 1.25rem 0;
  position: relative;
  padding-bottom: 0.4rem;
}

.tn-footer-section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 25px;
  height: 2px;
  background-color: var(--tn-color-accent);
}

/* Footer Secondary Menu */
.tn-footer-nav__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.tn-footer-nav__item {
  display: block;
}

.tn-footer-nav__link {
  font-size: 0.85rem;
  color: var(--tn-color-muted);
  text-decoration: none;
  transition: color var(--tn-transition), transform var(--tn-transition);
  display: inline-block;
}

.tn-footer-nav__link:hover {
  color: var(--tn-color-bright);
  transform: translateX(3px);
}

/* Footer CTAs styling */
.tn-footer-action-section {
  display: flex;
  flex-direction: column;
}

.tn-footer-ctas {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 280px;
  width: 100%;
}

.tn-footer-ctas .tn-cta {
  width: 100%;
}

/* Bottom legal area */
.tn-footer-bottom {
  max-width: 1440px;
  margin: 3.5rem auto 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 2;
}

.tn-footer-bottom-container {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tn-copyright {
  font-size: 0.8rem;
  color: var(--tn-color-muted);
  margin: 0;
}

.tn-warning-text {
  font-size: 0.75rem;
  color: rgba(165, 152, 189, 0.5);
  font-style: italic;
  margin: 0;
}

/* Responsive Layout Fixes */
@media (max-width: 576px) {
  .tn-header-actions {
    display: none; /* Safely collapse header actions on tiny devices to prevent wrapping */
  }
  .tn-header-container {
    padding: 0 1rem;
  }
}