/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: 'Noto Sans SC', 'Helvetica Neue', Arial, sans-serif; font-size: 1rem; line-height: 1.6; color: var(--text-primary); background-color: var(--bg-dark); min-height: 100vh; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

:root {
  --color-orange: #E67E22;
  --color-dark: #2C3E50;
  --color-silver: #95A5A6;
  --bg-dark: #1A252F;
  --bg-light: #F8F9FA;
  --text-primary: #FFFFFF;
  --text-secondary: #BDC3C7;
  --cta-highlight: #F39C12;
  --font-heading: 'Montserrat', 'Noto Sans SC', sans-serif;
  --font-body: 'Noto Sans SC', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Source Code Pro', 'Consolas', monospace;
  --radius: 12px;
  --radius-sm: 6px;
  --transition: 0.3s ease;
  --max-width: 1200px;
  --header-h: 70px;
}

/* Focus */
:focus-visible { outline: 3px solid var(--color-orange); outline-offset: 2px; border-radius: var(--radius-sm); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* Container */
.container { max-width: var(--max-width); margin: 0 auto; padding-left: 20px; padding-right: 20px; }

/* Skip link */
.skip-link { position: absolute; top: -1000px; left: 0; background: var(--color-orange); color: #fff; padding: 8px 16px; z-index: 10000; border-radius: 0 0 var(--radius-sm) 0; font-weight: bold; }
.skip-link:focus { top: 0; }

/* Header */
.site-header { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; background: var(--bg-dark); border-bottom: 2px solid var(--color-orange); height: var(--header-h); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.logo { font-family: var(--font-heading); font-weight: 900; font-size: 1.5rem; color: var(--color-orange); text-transform: uppercase; letter-spacing: 1px; white-space: nowrap; }
.logo:hover { color: var(--cta-highlight); }

/* Navigation */
.nav__list { display: flex; gap: 8px; }
.nav__item { }
.nav__link { display: inline-block; padding: 8px 20px; border-radius: 999px; font-size: 0.95rem; font-weight: 500; color: var(--text-primary); background: transparent; transition: background var(--transition), color var(--transition), box-shadow var(--transition); border: 1px solid transparent; }
.nav__link:hover { background: rgba(230,126,34,0.15); color: var(--color-orange); }
.nav__link[aria-current="page"] { background: var(--color-orange); color: #fff; box-shadow: 0 2px 12px rgba(230,126,34,0.4); }
.nav__link:focus-visible { border-color: var(--color-orange); box-shadow: 0 0 0 3px var(--color-orange); }

/* Nav toggle button */
.nav-toggle { display: none; flex-direction: column; justify-content: center; width: 32px; height: 32px; background: none; border: none; cursor: pointer; gap: 5px; padding: 4px; }
.nav-toggle__line { display: block; height: 3px; background: var(--text-primary); border-radius: 3px; transition: transform var(--transition); }
.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav { position: absolute; top: var(--header-h); left: 0; width: 100%; background: var(--bg-dark); border-bottom: 2px solid var(--color-orange); max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
  .nav[data-open] { max-height: 500px; }
  .nav__list { flex-direction: column; padding: 16px 20px; gap: 4px; }
  .nav__link { display: block; padding: 12px 20px; border-radius: var(--radius); }
}

/* Footer */
.site-footer { background: var(--bg-dark); border-top: 2px solid var(--color-orange); padding: 40px 0 20px; color: var(--text-secondary); }
.footer-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.footer-brand { grid-column: 1 / -1; }
.footer-trust { margin-top: 8px; font-size: 0.9rem; color: var(--text-secondary); }
.footer__links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer__links a { color: var(--color-orange); transition: color var(--transition); }
.footer__links a:hover { color: var(--cta-highlight); text-decoration: underline; }
.footer__info { display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.85rem; }
.footer__info a { color: var(--color-orange); }
.footer__icp { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; color: var(--text-secondary); border-top: 1px solid var(--color-dark); padding-top: 16px; margin-top: 10px; }
.footer__copyright { }

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; gap: 20px; }
  .footer__icp { flex-direction: column; gap: 8px; text-align: center; }
}

/* Common components */
.btn { display: inline-block; padding: 12px 28px; border-radius: 999px; background: var(--color-orange); color: #fff; font-family: var(--font-body); font-weight: 600; border: none; cursor: pointer; transition: background var(--transition), transform var(--transition), box-shadow var(--transition); text-align: center; }
.btn:hover { background: var(--cta-highlight); transform: translateY(-2px); box-shadow: 0 4px 15px rgba(230,126,34,0.3); }
.btn:focus-visible { outline: 3px solid var(--color-orange); outline-offset: 2px; }

.section-title { font-family: var(--font-heading); font-weight: 900; font-size: clamp(1.5rem, 4vw, 2.5rem); color: var(--text-primary); margin-bottom: 20px; position: relative; padding-left: 60px; }
.section-title::before { content: attr(data-index); font-family: var(--font-mono); font-size: 0.8em; color: var(--color-orange); position: absolute; left: 0; top: 0.1em; letter-spacing: -1px; }

/* Grid */
.grid { display: grid; gap: 30px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* Card */
.card { background: rgba(44,62,80,0.6); border-radius: var(--radius); padding: 24px; border: 1px solid transparent; transition: border-color var(--transition), background var(--transition), transform var(--transition); }
.card:hover { border-color: var(--color-orange); background: rgba(44,62,80,0.8); transform: translateY(-4px); }

/* Scroll top button (injected by JS) */
.scroll-top { position: fixed; bottom: 30px; right: 30px; width: 48px; height: 48px; border-radius: 50%; background: var(--color-orange); color: #fff; border: none; cursor: pointer; display: none; align-items: center; justify-content: center; font-size: 1.5rem; box-shadow: 0 4px 12px rgba(0,0,0,0.2); transition: opacity var(--transition), transform var(--transition); z-index: 999; }
.scroll-top[data-visible] { display: flex; }
.scroll-top:hover { transform: scale(1.1); background: var(--cta-highlight); }
.scroll-top:focus-visible { outline: 3px solid var(--color-orange); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .scroll-top { display: none !important; } }

/* Helper to push content below header */
.main-content { padding-top: calc(var(--header-h) + 20px); }
