/* ============================================================
   STOCKWISE SOFTWARE — styles.css
   Contains: shared structural CSS (nav, footer, reveal, utils)
   Each page declares its own colour tokens in a <style> block.
   ============================================================ */

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { display: block; max-width: 100%; }

/* ── LAYOUT ── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 28px; }
section { padding: 108px 0; }

/* ── REVEAL — starts visible, JS upgrades to animated ── */
.reveal { opacity: 1; transform: none; }
.reveal.animated { opacity: 0; transform: translateY(20px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.animated.visible { opacity: 1; transform: none; }

/* ── SHARED NAV STRUCTURE ── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
  border-bottom: 1px solid transparent;
}
.nav-inner { display: flex; align-items: center; height: 66px; gap: 20px; }
.nav-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1rem; flex-shrink: 0; }
.nav-logo-icon { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; flex-shrink: 0; }
.nav-logo-icon svg { width: 15px; height: 15px; }
.nav-links { display: flex; align-items: center; gap: 2px; margin-left: 16px; }
.nav-links a { font-size: 0.875rem; font-weight: 500; padding: 6px 13px; border-radius: 7px; transition: color 0.18s, background 0.18s; }
.nav-spacer { flex: 1; }
.nav-btn { font-size: 0.85rem; font-weight: 600; padding: 8px 18px; border-radius: 8px; transition: all 0.18s; }

.hamburger { display: none; flex-direction: column; gap: 5px; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 7px; }
.hamburger span { display: block; width: 20px; height: 1.5px; border-radius: 2px; transition: all 0.28s; }
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

#mobile-drawer {
  position: fixed; top: 66px; left: 0; right: 0; z-index: 899;
  padding: 16px 24px 28px;
  display: flex; flex-direction: column; gap: 3px;
  transform: translateY(-8px); opacity: 0; pointer-events: none;
  transition: transform 0.24s ease, opacity 0.24s ease;
}
#mobile-drawer.open { transform: none; opacity: 1; pointer-events: all; }
#mobile-drawer a { padding: 11px 14px; font-size: 0.95rem; font-weight: 500; border-radius: 9px; transition: all 0.18s; }
.drawer-divider { height: 1px; margin: 10px 0; }
.drawer-cta { font-weight: 700 !important; text-align: center; margin-top: 4px; }

/* ── SHARED FOOTER STRUCTURE ── */
footer { border-top: 1px solid; padding: 60px 0 36px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 44px; margin-bottom: 44px; }
.footer-logo { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 0.96rem; margin-bottom: 12px; }
.footer-logo-icon { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; }
.footer-logo-icon svg { width: 14px; height: 14px; }
.footer-tagline { font-size: 0.84rem; line-height: 1.62; margin-bottom: 14px; max-width: 240px; }
.footer-meta { font-size: 0.76rem; line-height: 1.6; }
.footer-col h5 { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; margin-bottom: 14px; }
.footer-col ul { display: flex; flex-direction: column; gap: 9px; }
.footer-col a { font-size: 0.84rem; transition: color 0.18s; }
.footer-bottom { padding-top: 26px; border-top: 1px solid; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-bottom-copy { font-size: 0.78rem; }
.footer-bottom-links { display: flex; gap: 18px; }
.footer-bottom-links a { font-size: 0.78rem; transition: color 0.18s; }

/* ── LEGAL PAGE STRUCTURE ── */
.legal-hero { padding: 130px 0 64px; border-bottom: 1px solid; }
.legal-hero-eyebrow { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 12px; }
.legal-hero-h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; letter-spacing: -0.03em; margin-bottom: 10px; }
.legal-hero-meta { font-size: 0.84rem; }
.legal-body { padding: 64px 0 100px; }
.legal-layout { display: grid; grid-template-columns: 200px 1fr; gap: 60px; align-items: start; }
.legal-toc { position: sticky; top: 88px; }
.legal-toc h6 { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 12px; }
.legal-toc ul { display: flex; flex-direction: column; gap: 4px; }
.legal-toc a { font-size: 0.82rem; padding: 4px 8px; border-radius: 5px; display: block; transition: all 0.18s; border-left: 2px solid transparent; }
.legal-content { max-width: 680px; }
.legal-content h2 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.02em; margin: 40px 0 12px; padding-top: 16px; border-top: 1px solid; }
.legal-content h2:first-child { margin-top: 0; border-top: none; padding-top: 0; }
.legal-content p { font-size: 0.9rem; line-height: 1.75; margin-bottom: 14px; }
.legal-content ul, .legal-content ol { list-style: disc; padding-left: 22px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 7px; }
.legal-content ol { list-style: decimal; }
.legal-content li { font-size: 0.9rem; line-height: 1.65; }
.legal-content a { text-decoration: underline; text-underline-offset: 3px; }
.legal-content strong { font-weight: 600; }
.legal-back { display: inline-flex; align-items: center; gap: 6px; font-size: 0.84rem; font-weight: 600; margin-top: 40px; transition: color 0.18s; }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .nav-links, .nav-btn { display: none; }
  .hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .legal-layout { grid-template-columns: 1fr; }
  .legal-toc { display: none; }
}
@media (max-width: 600px) {
  section { padding: 72px 0; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal.animated { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
