/* Base styles & variables */
:root {
  --color-bg: #0f0e0b;
  --color-surface: #1a1814;
  --color-text: #e0dedb;
  --color-muted: #9b958c;
  --color-primary: #eab308;
  --color-primary-dark: #ca8a04;
  --color-border: #ca8a04;

  --font-base: system-ui, -apple-system, blinkmacsystemfont, 'Segoe UI', roboto, 'Helvetica Neue', arial, sans-serif;
  --font-mono: ui-monospace, menlo, monaco, consolas, "Liberation Mono", "Courier New", monospace;
}

/* Reset / normalization */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-base);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100vw;
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: -9999px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: #0b0f0c;
  padding: 8px 16px;
  z-index: 9999;
}

.skip-link:focus {
  top: 10px;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.8;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* Layout classes */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(11, 15, 12, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-surface);
  z-index: 100;
}

body {
  padding-top: 60px;
}

/* fixed header compensation */
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-weight: bold;
  text-transform: uppercase;
  color: #fff;
}

.element-icon {
  /* Reusable */
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: rgba(234, 179, 8, 0.1);
  border: 2px solid var(--color-border);
  position: relative;
  color: var(--color-primary);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.element-icon:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(234, 179, 8, 0.4);
}

.element-icon.sm {
  width: 32px;
  height: 32px;
  border-width: 1px;
}

.element-icon.sm .symbol {
  font-size: 14px;
  font-weight: bold;
}

.logo-text {
  font-size: 14px;
  margin-left: 8px;
}

@media (max-width: 480px) {
  .logo-text {
    display: none;
  }
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 16px;
  align-items: center;
}

.nav-links a {
  color: var(--color-text);
  font-size: 14px;
  font-weight: 500;
}

.lang-switch {
  border: 1px solid var(--color-primary);
  padding: 4px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-weight: bold;
  font-size: 12px !important;
  color: var(--color-primary) !important;
  transition: all 0.2s;
}

.lang-switch:hover {
  background-color: var(--color-primary);
  color: var(--color-bg) !important;
  box-shadow: 0 0 8px rgba(234, 179, 8, 0.4);
}

/* Sections */
section {
  padding: 60px 0;
}

@media (min-width: 768px) {
  section {
    padding: 80px 0;
  }
}

h1,
h2,
h3 {
  font-family: var(--font-mono);
  color: #fff;
  line-height: 1.2;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.highlight {
  color: var(--color-primary);
  animation: slight-flicker 4s infinite alternate;
}

@keyframes slight-flicker {

  0%,
  100% {
    text-shadow: 0 0 4px rgba(234, 179, 8, 0.2);
  }

  50% {
    text-shadow: 0 0 16px rgba(234, 179, 8, 0.8);
  }
}

/* Hero */
.hero {
  text-align: center;
  padding: 80px 0 40px;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(234, 179, 8, 0.15), transparent 70%),
    url("data:image/svg+xml,%3Csvg width='160' height='160' viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 60L80 60L95 86L80 112L50 112L35 86Z' fill='none' stroke='%23eab308' stroke-width='3' stroke-opacity='0.15'/%3E%3Cpath d='M95 86L125 86L140 112L125 138L95 138L80 112' fill='none' stroke='%23eab308' stroke-width='3' stroke-opacity='0.15'/%3E%3Cpath d='M125 86L140 60M50 60L35 34' fill='none' stroke='%23eab308' stroke-width='3' stroke-opacity='0.15'/%3E%3Cpath d='M55 68L75 68' fill='none' stroke='%23eab308' stroke-width='3' stroke-opacity='0.15'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M40 30L60 30L70 47L60 64L40 64L30 47Z' fill='none' stroke='%23eab308' stroke-width='2' stroke-opacity='0.1'/%3E%3Cpath d='M43 35L57 35M60 64L70 82' fill='none' stroke='%23eab308' stroke-width='2' stroke-opacity='0.1'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 20L50 20L60 37L50 54L30 54L20 37Z' fill='none' stroke='%23eab308' stroke-width='2' stroke-opacity='0.12'/%3E%3Cpath d='M25 38L31 48M60 37L75 37' fill='none' stroke='%23eab308' stroke-width='2' stroke-opacity='0.12'/%3E%3C/svg%3E");
  background-size: 100% 100%, 160px 160px, 120px 120px, 100px 100px;
  background-position: 50% 0%, 5% 15%, 85% 65%, 75% 10%;
  background-repeat: no-repeat;
  animation: float-bg 20s ease-in-out infinite alternate;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 40%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 40%, rgba(0, 0, 0, 0) 100%);
}

@keyframes float-bg {
  0% {
    background-position: 50% 0%, 5% 15%, 85% 65%, 75% 10%;
  }

  100% {
    background-position: 50% 0%, 8% 22%, 80% 80%, 82% 5%;
  }
}

@media (min-width: 768px) {
  .hero {
    padding: 120px 0 60px;
  }
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

@media (min-width: 768px) {
  .hero h1 {
    font-size: 3.5rem;
  }
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--color-muted);
  max-width: 600px;
  margin: 0 auto 32px;
}

@media (min-width: 768px) {
  .hero-subtitle {
    font-size: 1.1rem;
  }
}

.cta {
  margin-top: 32px;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  font-family: var(--font-mono);
  font-weight: bold;
  border-radius: 4px;
  text-transform: uppercase;
  border: 2px solid var(--color-primary);
  min-width: 44px;
  /* a11y tap target */
  min-height: 44px;
  text-align: center;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #0b0f0c;
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--color-primary);
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.4);
}

/* About / Rules */
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-list li {
  background: var(--color-surface);
  padding: 20px;
  border-left: 4px solid var(--color-primary);
}

/* Supplements card */
.supplements-title {
  text-align: center;
}

.supplement-card {
  background-color: var(--color-surface);
  border: 1px solid #2a2516;
  margin-bottom: 32px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.supplement-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-primary-dark);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

@media (min-width: 768px) {
  .supplement-card {
    flex-direction: row;
  }
}

.card-header {
  padding: 24px;
  background-color: #090806;
  border-bottom: 1px solid #2a2516;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 240px;
}

@media (min-width: 768px) {
  .card-header {
    border-bottom: none;
    border-right: 1px solid #2a2516;
  }
}

.card-header .element-icon {
  width: 80px;
  height: 80px;
  border-width: 3px;
  margin-bottom: 16px;
}

.card-header .atomic-weight {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 10px;
  color: var(--color-muted);
  font-family: var(--font-mono);
}

.card-header .name {
  font-size: 8px;
  margin-top: 4px;
  text-transform: uppercase;
}

.card-header .symbol {
  font-size: 32px;
  font-weight: bold;
}

.card-header h3 {
  font-size: 1.2rem;
  margin: 0;
}

.card-body {
  padding: 24px;
  flex-grow: 1;
}

.card-body .summary {
  font-weight: bold;
  margin-bottom: 16px;
  color: var(--color-text);
}

.card-body ul {
  list-style: none;
  margin-bottom: 24px;
}

.card-body li {
  margin-bottom: 12px;
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .card-body li {
    flex-direction: row;
  }
}

.card-body li strong {
  display: block;
  color: var(--color-primary);
  min-width: 120px;
  flex-shrink: 0;
  margin-bottom: 4px;
}

@media (min-width: 768px) {
  .card-body li strong {
    margin-bottom: 0;
  }
}

.research-quote {
  padding: 16px;
  font-style: italic;
  color: var(--color-muted);
  border-top: 1px dashed #2a2516;
  font-size: 0.9rem;
}

.research-quote cite {
  display: block;
  margin-top: 8px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--color-primary-dark);
  font-style: normal;
}

/* FAQ */
details {
  background: var(--color-surface);
  margin-bottom: 16px;
  border-radius: 4px;
  overflow: hidden;
}

summary {
  padding: 20px;
  font-weight: bold;
  cursor: pointer;
  font-family: var(--font-mono);
  color: var(--color-primary);
  min-height: 44px;
  /* tap target */
}

.faq-content {
  padding: 0 20px 20px 20px;
  color: var(--color-text);
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 40px 0;
  border-top: 1px solid var(--color-surface);
  color: var(--color-muted);
  font-size: 0.9rem;
}

.footer-links {
  margin-top: 16px;
}

/* Scroll Reveal animations */
.reveal-ready {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal-ready {
    transition: none;
    transform: none;
    opacity: 1;
  }
}