/* Site theme tokens */
:root {
  --bg-page: #0E0E0E;
  --bg-section: #181818;
  --bg-card: #2A2A2A;
  --bg-elevated: #3D3D3D;
  --bg-footer: #0A0A0A;
  --bg-header: rgba(20, 20, 20, 0.98);
  --border: #454545;
  --border-subtle: #525252;
  --text-heading: #F5F5F5;
  --text-body: #A3A3A3;
  --text-muted: #737373;
  --accent: #FB923C;
  --accent-deep: #F97316;
  --accent-green: #22C55E;
  --accent-gold: #FACC15;
  --grad-dl: linear-gradient(135deg, #F97316, #EA580C);
  --grad-login: linear-gradient(135deg, #22C55E, #16A34A);
  --grad-reg: linear-gradient(135deg, #FACC15, #EAB308);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.5);
  --shadow-cta: 0 4px 16px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 6px 20px rgba(249, 115, 22, 0.2);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  color: var(--text-heading);
  line-height: 1.7;
  overflow-x: hidden;
  background: var(--bg-page);
  min-height: 100vh;
  padding-top: 56px;
}

body.fx-layout {
  padding-top: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

header,
body > header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

body > header {
  z-index: 500;
}

.sm6afe-hw {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  position: relative;
  gap: 12px;
}

.sm6afe-hw > a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 700;
  min-width: 0;
}

.sm6afe-hw > a img {
  height: auto;
  width: auto;
  max-height: clamp(28px, 9vw, 48px);
  max-width: min(42vw, 200px);
  object-fit: contain;
  border-radius: 10px;
  flex-shrink: 0;
}

.sm6afe-hw > a span {
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--accent);
}

#nav {
  display: none;
}

#nav a {
  text-decoration: none;
  color: var(--text-body);
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}

#nav a:hover,
#nav a[aria-current="page"] {
  color: var(--accent);
}

#nav a[aria-current="page"] {
  font-weight: 700;
}

#nav.open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 56px;
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

#mbt {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 4px;
  cursor: pointer;
}

#mbt span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: 0.2s;
}

#mbt.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

#mbt.active span:nth-child(2) {
  opacity: 0;
}

#mbt.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.sm6afe-hw-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.sm6afe-hw-auth {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.sm6afe-hw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
  white-space: nowrap;
  transition: opacity 0.2s, transform 0.15s;
  line-height: 1.2;
}

.sm6afe-hw-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.sm6afe-hw-btn-login {
  color: #fff !important;
  background: var(--grad-login);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.35);
}

.sm6afe-hw-btn-reg {
  color: #fff !important;
  background: var(--grad-reg);
  box-shadow: 0 2px 8px rgba(234, 179, 8, 0.35);
}

.sm6afe-cta-dl,
.sm6afe-cta-login,
.sm6afe-cta-reg {
  display: block;
  padding: 18px 24px;
  color: #fff !important;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.3s;
  box-shadow: var(--shadow-cta);
}

.sm6afe-cta-dl {
  background: var(--grad-dl);
}

.sm6afe-cta-login {
  background: var(--grad-login);
}

.sm6afe-cta-reg {
  background: var(--grad-reg);
}

.sm6afe-cta-link {
  display: block;
  padding: 12px 24px;
  color: var(--accent) !important;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s;
  opacity: 0.85;
}

main {
  max-width: 768px;
  margin: 0 auto;
}

body.fx-layout main {
  max-width: none !important;
  margin: 0;
  padding: 0;
}

body.fx-layout main > section,
body.fx-layout main > article,
body.fx-layout main > aside {
  max-width: none;
}

main > section,
main > article,
main > aside {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 16px;
}

section[data-s="hero"] {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

section[data-s="hero"] img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  margin: 0 auto;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.sm6afe-hero-tagline {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-heading);
  padding: 12px 16px 0;
  line-height: 1.4;
}

section[data-s="featured"] {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 32px 16px 40px;
  text-align: center;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

body.fx-layout section[data-s="featured"] {
  max-width: var(--fx-max, 1120px);
  width: 100%;
  margin: 0 auto 32px;
  padding: 32px var(--fx-gutter, 24px) 40px;
  text-align: left;
  background: transparent;
  border: none;
}

section[data-s="featured"] h2 {
  font-size: 22px;
  margin: 0 0 6px;
  color: var(--text-heading);
  font-weight: 800;
  letter-spacing: 0.3px;
}

.sm6afe-ball-sub,
.sm6afe-section-sub {
  font-size: 13px;
  color: var(--text-body);
  margin: 0 auto 18px;
  max-width: 560px;
  line-height: 1.6;
  padding: 0 12px;
}

section[data-s="cta-buttons"] {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

section[data-s="catalog"] p a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

section[data-s="catalog"] p a:hover {
  text-decoration: underline;
}

section[data-s="legal"] h1 {
  color: var(--text-heading);
}

section[data-s="legal"] small {
  color: var(--text-body);
}

section[data-s="legal"] p a,
.sm6afe-legal-content a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

footer {
  padding: 20px 16px;
  text-align: center;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: var(--bg-footer);
  margin-top: 8px;
}

@media (min-width: 768px) {
  body {
    padding-top: 64px;
  }

  .sm6afe-hw {
    height: 64px;
    padding: 0 24px;
  }

  .sm6afe-hw > a img {
    max-height: clamp(30px, 4.5vw, 42px);
    max-width: min(32vw, 180px);
  }

  .sm6afe-hw > a span {
    font-size: 18px;
  }

  #nav {
    display: flex;
    gap: 20px;
    align-items: center;
  }

  #nav a {
    border: 0;
    padding: 4px 0;
  }

  #nav a[aria-current="page"] {
    box-shadow: inset 0 -2px 0 var(--accent);
  }

  #mbt {
    display: none;
  }
}

@media (max-width: 600px) {
  main > section,
  main > article,
  main > aside {
    padding: 18px 12px;
  }

  section[data-s="hero"] {
    padding: 12px 12px 4px;
  }

  section[data-s="hero"] img,
  .sm6afe-carousel {
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
  }

  section[data-s="hero"] img,
  .sm6afe-carousel img {
    height: auto;
    object-fit: contain;
  }

  .sm6afe-hero-tagline {
    font-size: 16px;
    padding: 10px 12px 0;
    line-height: 1.35;
  }

  section[data-s="cta-buttons"] {
    padding: 12px 12px 10px;
    gap: 10px;
  }

  .sm6afe-cta-dl,
  .sm6afe-cta-login,
  .sm6afe-cta-reg {
    padding: 14px 20px;
    font-size: 16px;
  }

  section[data-s="featured"] {
    padding: 20px 12px 28px;
  }

  .sm6afe-hw-btn {
    padding: 6px 10px;
    font-size: 11px;
  }
}
