/* 
 * EarnWhileGaming.ca - Shared Stylesheet
 * Common styles for homepage and legal pages
 */

/* CSS Variables */
:root {
  --bg: #0b1220;
  --bg-soft: #0e1627;
  --card: #101a2f;
  --muted: #96a2b4;
  --text: #ebf4ff;
  --accent: #00e1ff;
  --accent-2: #4dffb3;
  --danger: #ff5c7a;
  --ring: rgba(0, 225, 255, .35);
  --divider-space: 32px;
}

/* Base Reset */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv05", "cv09";
  background: radial-gradient(140% 120% at 50% -20%, #13213b 0%, rgba(19, 33, 59, .6) 45%, rgba(11, 18, 32, 1) 80%), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-size: 17px;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* Typography */
h1 {
  font-size: clamp(28px, 5vw, 40px);
  margin: 6px 0 6px;
}

h2 {
  font-size: 22px;
  margin: 28px 0 12px;
  color: #fff;
}

h3 {
  font-size: 18px;
  margin: 20px 0 10px;
  color: #d9ecff;
}

p {
  margin: 0 0 1.2em;
}

/* Container */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 28px 48px;
}

/* Header & Brand */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

@keyframes brandReveal {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  animation: brandReveal .45s ease-out .05s forwards;
}

.brand-logo {
  width: 36px;
  height: 36px;
  background: transparent;
  box-shadow: none;
  display: grid;
  place-items: center;
}

.brand-logo .brand-icon {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.brand b {
  font-family: 'Pixellari', 'Silkscreen', 'Courier New', monospace;
  font-size: 22px;
  letter-spacing: .5px;
  color: #36F6C3;
  text-transform: uppercase;
}

.brand a {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons - Consistent Professional Style */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: 16px 28px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--accent), #00b7d1);
  color: #001b2b;
  font-weight: 700;
  transition: .2s all ease;
  font-size: 17px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
  border: 1px solid rgba(255, 255, 255, .10);
  cursor: pointer;
  text-align: center;
  min-height: 52px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .35);
  border-color: rgba(0, 225, 255, .28);
}

.btn:active {
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

.btn.secondary {
  background: rgba(0, 225, 255, .08);
  color: var(--accent);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
  border: 1px solid rgba(255, 255, 255, .12);
  font-size: 16px;
  padding: 15px 32px;
}

.btn.secondary:hover {
  box-shadow: 0 12px 26px rgba(0, 0, 0, .32);
  background: rgba(0, 225, 255, .12);
  transform: translateY(-2px);
  border-color: rgba(0, 225, 255, .22);
}

.btn-home {
  padding: 9px 16px;
  font-size: 13.5px;
  min-height: auto;
  font-weight: 600;
}

/* Utility Classes */
.subtitle {
  color: var(--muted);
}

.proof-caption {
  color: var(--muted);
  font-size: 12.5px;
}

/* Card Component */
.card {
  background: linear-gradient(180deg, var(--card), #0d172a);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 16px;
  padding: 28px 32px;
}

/* Footer */
footer {
  margin: 60px 0 100px;
  color: var(--muted);
  text-align: center;
}

footer .proof-caption {
  margin-top: var(--divider-space);
  padding-top: var(--divider-space);
  border-top: 1px solid rgba(255, 255, 255, .05);
}

footer nav.legal {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  font-size: 13px;
}

footer nav.legal a {
  color: var(--muted);
}

footer nav.legal a:hover,
footer nav.legal a:focus-visible {
  outline: none;
  text-decoration: underline;
}

footer nav.legal .sep {
  opacity: .5;
}

/* Section Rhythm */
section + section {
  margin-top: 80px;
}

section {
  position: relative;
}

section + section::before {
  content: '';
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  max-width: 400px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .08), transparent);
}

/* Example offer spacing */
.sample-task strong:last-of-type {
  display: inline-block;
  margin-top: 8px;
}

/* Table of Contents */
.toc {
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  padding: 22px 24px;
  margin: 28px 0 40px;
}

.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.toc li {
  margin: 0;
}

.toc a {
  color: var(--text);
  text-decoration: none;
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all .2s ease;
  font-size: 15px;
  border-left: 2px solid transparent;
}

.toc a:hover,
.toc a:focus {
  background: rgba(255, 255, 255, .05);
  border-left-color: var(--accent);
  color: var(--accent);
  padding-left: 16px;
}

.toc a.toc-sub {
  padding-left: 24px;
  opacity: .85;
  font-size: 14px;
}

.toc a.toc-sub:hover,
.toc a.toc-sub:focus {
  padding-left: 28px;
  opacity: 1;
}

/* Smooth scrolling with offset for anchored headings */
.content h2,
.content h3 {
  scroll-margin-top: 24px;
}

html {
  scroll-behavior: smooth;
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
  body {
    font-size: 16px;
  }

  .container {
    padding: 24px 18px 40px;
  }

  .brand b {
    font-size: 17px;
  }

  header {
    padding: 14px 0;
  }

  .btn {
    padding: 15px 24px;
    font-size: 16px;
    min-height: 50px;
  }

  .btn-home {
    padding: 7px 14px;
    font-size: 12.5px;
  }

  section + section {
    margin-top: 64px;
  }
}

/* Desktop: Two-column TOC layout */
@media (min-width: 768px) {
  .toc ul {
    grid-template-columns: 1fr 1fr;
    gap: 8px 20px;
  }
}
