/* =============================================
   xe8 TERMS & CONDITIONS — style.css
   Nav: WHITE | Footer: LIGHT GREY (designer spec)
   Legal document — maximum readability
   ============================================= */

:root {
  --navy:        #1a2461;
  --navy-mid:    #022a99;
  --blue-acc:    #022a99;
  --orange:      #ff7f00;
  --orange-dark: #d96b00;
  --white:       #ffffff;
  --off-white:   #f5f6fa;
  --footer-bg:   #eef0f5;
  --grey-light:  #e2e4ed;
  --grey-mid:    #8a90a8;
  --grey-dark:   #555a6e;
  --text-dark:   #111827;
  --text-body:   #374151;
  --text-legal:  #1f2937;   /* slightly darker for legal body text */

  /* Nav */
  --nav-bg:     #ffffff;
  --nav-border: #e2e4ed;
  --nav-text:   #374151;

  --radius-sm:  6px;
  --radius-md:  12px;
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.07);
  --shadow-md:  0 6px 24px rgba(0,0,0,0.10);
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body  { font-family: 'Barlow', sans-serif; font-size: 16px; color: var(--text-body); background: var(--white); line-height: 1.75; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img   { max-width: 100%; height: auto; display: block; }
a     { color: var(--blue-acc); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { padding-left: 0; list-style: none; }

h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 900;
  line-height: 1.05;
  color: var(--text-dark);
}
h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(28px, 4.5vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-dark);
}
h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(20px, 2.8vw, 28px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-dark);
}
h4 {
  font-family: 'Barlow', sans-serif;
  font-size: clamp(16px, 2vw, 18px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-dark);
}
p {
  font-size: clamp(15px, 1.8vw, 17px);
  line-height: 1.75;
}

.label-text { font-size: clamp(12px, 1.4vw, 14px); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; line-height: 1.3; color: var(--grey-mid); }

.container    { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.container-md { width: 100%; max-width: 860px;  margin: 0 auto; padding: 0 20px; }
.section-pad  { padding: 60px 0; }

/* =============================================
   NAVIGATION — White background
   ============================================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo-xe { font-size: 1.55rem; font-weight: 900; color: var(--navy); letter-spacing: -0.03em; line-height: 1; }
.logo-8  { font-size: 1.55rem; font-weight: 900; color: var(--orange); letter-spacing: -0.03em; line-height: 1; }

.nav-links { display: none; gap: 4px; align-items: center; }
.nav-links a {
  color: var(--nav-text);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: color var(--transition);
  text-decoration: none;
}
.nav-links a:hover  { color: var(--orange); }
.nav-links a.active { color: var(--orange); }

.nav-item { position: relative; }
.nav-item > a {
  display: block; color: var(--nav-text); font-size: 0.82rem; font-weight: 600;
  padding: 6px 11px; border-radius: var(--radius-sm);
  letter-spacing: 0.02em; text-transform: uppercase;
  transition: color var(--transition); text-decoration: none;
}
.nav-item > a:hover  { color: var(--orange); }
.nav-item > a.active { color: var(--orange); }
.nav-item.has-dropdown > a::after {
  content: ''; display: inline-block;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  margin-left: 5px; vertical-align: middle; opacity: 0.6;
  transition: transform var(--transition);
}
.dropdown {
  display: none; position: absolute; top: calc(100% + 4px); left: 0;
  background: var(--white); border: 1px solid var(--grey-light);
  border-radius: var(--radius-md); min-width: 210px;
  box-shadow: var(--shadow-md); z-index: 300; overflow: hidden;
}
.nav-item.has-dropdown:hover .dropdown,
.nav-item.has-dropdown.open  .dropdown { display: block; }
.dropdown a {
  display: block; padding: 11px 16px; font-size: 0.82rem; font-weight: 600;
  color: var(--text-body); border-bottom: 1px solid var(--grey-light);
  transition: color var(--transition), background var(--transition);
  text-decoration: none; text-transform: none; letter-spacing: 0;
}
.dropdown a:last-child { border-bottom: none; }
.dropdown a:hover { color: var(--orange); background: var(--off-white); }

.nav-right { display: none; align-items: center; gap: 10px; }

.nav-login {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid rgba(13,27,75,0.35);
  border-radius: 6px;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.nav-login:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

@keyframes register-pulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(255,127,0,0.4), 0 0 0 0 rgba(255,127,0,0.25); }
  50%       { box-shadow: 0 4px 14px rgba(255,127,0,0.4), 0 0 0 8px rgba(255,127,0,0); }
}
.nav-register {
  display: inline-flex;
  align-items: center;
  padding: 9px 22px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  border-radius: 6px;
  white-space: nowrap;
  animation: register-pulse 2.5s ease-in-out infinite;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}
.nav-register:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(255,127,0,0.6);
  animation: none;
  color: var(--white);
}

.hamburger { display: flex; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px; background: none; border: none; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--navy); border-radius: 2px; transition: all 0.25s ease; }

.mobile-menu { display: none; background: var(--white); border-top: 1px solid var(--nav-border); box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; color: var(--text-dark); font-size: 0.9rem; font-weight: 600; padding: 13px 24px; border-bottom: 1px solid var(--grey-light); text-transform: uppercase; letter-spacing: 0.03em; transition: color var(--transition), background var(--transition); text-decoration: none; }
.mobile-menu a:hover  { color: var(--orange); background: var(--off-white); }
.mobile-menu a.active { color: var(--orange); }
.mobile-sub { background: var(--off-white); border-bottom: 1px solid var(--grey-light); }
.mobile-sub a {
  display: block; color: var(--grey-dark); font-size: 0.85rem; font-weight: 600;
  padding: 10px 24px 10px 36px; border-bottom: 1px solid var(--grey-light);
  transition: color var(--transition); text-decoration: none; text-transform: none;
}
.mobile-sub a:last-child { border-bottom: none; }
.mobile-sub a:hover { color: var(--orange); }
.mobile-menu-actions {
  display: flex;
  gap: 10px;
  padding: 16px 20px 20px;
}
.mobile-menu-actions a {
  flex: 1;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 13px 10px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s, filter 0.2s;
}
.mobile-login {
  color: var(--navy);
  border: 2px solid rgba(13,27,75,0.35);
}
.mobile-login:hover {
  background: var(--navy);
  color: var(--white);
}
.mobile-register {
  color: var(--white);
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  box-shadow: 0 4px 12px rgba(255,127,0,0.35);
}
.mobile-register:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 18px rgba(255,127,0,0.5);
}

/* =============================================
   BREADCRUMB
   ============================================= */
.breadcrumb { background: var(--off-white); border-bottom: 1px solid var(--grey-light); padding: 10px 0; }
.breadcrumb-inner { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 0.8rem; color: var(--grey-mid); }
.breadcrumb-inner a { color: var(--blue-acc); text-decoration: none; }
.breadcrumb-inner a:hover { text-decoration: underline; }
.breadcrumb-inner .current { color: var(--text-dark); font-weight: 600; }

/* =============================================
   PAGE HERO — Legal / trust style
   ============================================= */
.terms-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #022a99 60%, #1a2461 100%);
  padding: 48px 0 44px;
  text-align: center;
}
.terms-hero h1       { color: var(--white); margin-bottom: 12px; }
.terms-hero .version {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.85);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 16px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.terms-hero p {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* =============================================
   LAYOUT: Sidebar TOC + Main content
   ============================================= */
.terms-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
  padding: 48px 0 60px;
}

/* ---- TABLE OF CONTENTS (sidebar on desktop) ---- */
.toc-wrap {
  background: var(--off-white);
  border: 1px solid var(--grey-light);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  box-shadow: var(--shadow-sm);
}

.toc-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey-mid);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--grey-light);
}

.toc-list { list-style: none; padding: 0; }
.toc-list li { margin-bottom: 2px; }

.toc-list a {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-body);
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
  line-height: 1.4;
}
.toc-list a:hover { background: var(--grey-light); color: var(--navy); }
.toc-list .toc-num { color: var(--orange); margin-right: 6px; font-weight: 700; }

.toc-legal-note {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--grey-light);
  font-size: 14px;
  color: var(--grey-mid);
  line-height: 1.6;
}

/* ---- MAIN CONTENT ---- */
.terms-content { min-width: 0; }

/* Intro / preamble */
.terms-preamble {
  background: var(--off-white);
  border-left: 4px solid var(--navy-mid);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 22px;
  margin-bottom: 40px;
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.75;
}
.terms-preamble strong { color: var(--text-dark); }

/* Each numbered section */
.terms-section {
  margin-bottom: 44px;
  scroll-margin-top: 80px; /* offset for sticky nav */
}

.terms-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--grey-light);
}

.section-num {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  background: var(--navy);
  color: var(--white);
  font-weight: 900;
  font-size: 0.9rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.terms-section h2 {
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  color: var(--navy);
  margin: 0;
}

/* Sub-sections */
.terms-subsection { margin-bottom: 22px; }

.terms-subsection h3 {
  font-size: 0.97rem;
  color: var(--text-dark);
  margin-bottom: 10px;
  font-weight: 700;
}

.terms-subsection h3 .sub-num {
  color: var(--orange);
  margin-right: 6px;
}

/* Legal body text */
.terms-body {
  font-size: 0.9rem;
  color: var(--text-legal);
  line-height: 1.8;
  margin-bottom: 10px;
}

.terms-body strong { color: var(--text-dark); }

/* Clause list (numbered within sections) */
.clause-list { list-style: none; padding: 0; margin: 0; }

.clause-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 0 8px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: var(--text-legal);
  line-height: 1.8;
}

.clause-num {
  font-weight: 700;
  color: var(--grey-mid);
  font-size: 0.82rem;
  padding-top: 2px;
  white-space: nowrap;
}

.clause-text strong { color: var(--text-dark); }

/* Sub-clause list (a, b, c) */
.sub-clause-list { list-style: none; padding: 0; margin: 10px 0 0 0; }

.sub-clause-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 0 6px;
  margin-bottom: 8px;
  font-size: 0.88rem;
  color: var(--text-legal);
  line-height: 1.75;
}

.sub-clause-label { font-weight: 700; color: var(--grey-mid); }

/* Condition list (bullet style) */
.condition-list { list-style: none; padding: 0; margin: 10px 0; }
.condition-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-legal);
  line-height: 1.75;
}
.condition-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  margin-top: 9px;
}

/* Placeholder highlight */
.placeholder {
  background: #fff3e0;
  border: 1px solid #ff7f0055;
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 0.82rem;
  color: #c96300;
  font-weight: 600;
}

/* Important callout box */
.terms-callout {
  background: var(--off-white);
  border: 1px solid var(--grey-light);
  border-left: 4px solid var(--orange);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px;
  margin: 14px 0;
  font-size: 0.875rem;
  color: var(--text-body);
  line-height: 1.7;
}
.terms-callout strong { color: var(--navy); }

/* Legal review banner */
.legal-review-banner {
  background: #fff3e0;
  border: 1.5px solid #ff7f0066;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 36px;
  font-size: 0.875rem;
  color: #7a4000;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  line-height: 1.65;
}
.legal-review-icon {
  flex-shrink: 0;
  font-size: 1.1rem;
  line-height: 1.4;
}

/* =============================================
   FOOTER — Light grey per designer spec
   ============================================= */
.footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--grey-light);
  padding: 52px 0 0;
  color: var(--text-body);
}
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 36px; padding-bottom: 40px; }

.footer-logo { display: flex; align-items: center; gap: 0; margin-bottom: 14px; }
.footer-logo .logo-xe { font-size: 1.6rem; }
.footer-logo .logo-8  { font-size: 1.6rem; }

.footer-desc { font-size: 0.875rem; color: var(--grey-dark); line-height: 1.7; margin-bottom: 18px; max-width: 280px; }
.footer-social { display: flex; gap: 10px; }
.social-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  transition: background var(--transition), transform var(--transition);
  text-decoration: none;
}
.social-btn:hover { background: var(--orange); transform: translateY(-2px); }

.footer-col h4 { font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dark); margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: 0.875rem; color: var(--grey-dark); transition: color var(--transition); text-decoration: none; }
.footer-col ul li a:hover { color: var(--orange); }

.footer-contact h4 { font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dark); margin-bottom: 12px; }
.footer-contact-item { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px; font-size: 13px; color: var(--grey-dark); line-height: 1.5; }
.footer-contact-item svg { flex-shrink: 0; margin-top: 2px; color: var(--orange); }
.footer-contact-item a { color: var(--grey-dark); transition: color 0.2s; }
.footer-contact-item a:hover { color: var(--orange); }
.footer-map { margin-top: 14px; border-radius: 8px; overflow: hidden; border: 1px solid var(--grey-light); }
.footer-map iframe { display: block; width: 100%; height: 130px; border: 0; }



.footer-bottom { border-top: 1px solid var(--grey-light); padding: 18px 0; text-align: center; font-size: 0.78rem; color: var(--grey-mid); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (min-width: 768px) {
  .hamburger   { display: none; }
  .nav-links   { display: flex; }
  .nav-right   { display: flex; }
  .mobile-menu { display: none !important; }

  .footer-grid { grid-template-columns: 1.8fr 1fr 1fr 1.4fr; }
}

@media (min-width: 960px) {
  /* Two-column layout: sticky TOC sidebar + content */
  .terms-layout {
    grid-template-columns: 260px 1fr;
    gap: 48px;
    padding: 56px 0 80px;
  }

  .toc-wrap {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
  }
}

/* Site logo image */
.site-logo-img {
  height: 36px;
  width: auto;
  display: block;
}
.footer-logo .site-logo-img,
.footer-brand .site-logo-img {
  height: 30px;
}

/* ── Scroll-to-top button ── */
#scroll-top {
  position: fixed;
  bottom: 28px;
  right: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #ff7f00;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.2s;
  z-index: 999;
}
#scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
#scroll-top:hover { background: #d96b00; }
#scroll-top:focus-visible { outline: 3px solid #ff7f00; outline-offset: 3px; }
