/*
  Modernized theme with Half-Life orange accent
  - Uses CSS variables for consistent theming
  - Subtle motion, improved spacing, and focus states
  - Keeps existing class names so HTML does not need changes
*/

/* Base & Tokens */
* { box-sizing: border-box }
html { scroll-behavior: smooth }
:root {
  /* Color system (dark) */
  --bg: #0f0f10;
  --surface: #151517;
  --surface-2: #1b1c1f;
  --border: #2a2a32;
  --muted: #2f3136;
  --text: #e5e7eb;
  --text-dim: #b0b2b8;

  /* Half-Life Orange */
  --primary-400: #ff8a4c;
  --primary-500: #f36c21; /* core */
  --primary-600: #d65f1d;
  --primary-700: #b35217;

  /* Layout */
  --container: 1120px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;

  /* Effects */
  --shadow-1: 0 1px 2px rgba(0,0,0,.25), 0 6px 18px rgba(0,0,0,.25);
  --shadow-2: 0 1px 3px rgba(0,0,0,.3), 0 10px 28px rgba(0,0,0,.35);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #0f0f10; /* keep dark aesthetic for brand */
  }
}

body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(1200px 600px at 10% -10%, rgba(243,108,33,.08), transparent 50%),
              radial-gradient(1000px 500px at 110% 10%, rgba(243,108,33,.06), transparent 40%),
              var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: rgba(243,108,33,.35); color: #fff }

/* Links */
a { color: var(--primary-500); text-decoration: none; transition: color .2s ease }
a:hover { color: var(--primary-400) }

img { max-width: 100%; height: auto }

/* Focus styles */
:where(a, button, [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 2px solid var(--primary-400);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(16,16,18,.7);
  backdrop-filter: blur(8px) saturate(120%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 0 0 1px rgba(255,255,255,.02) inset, 0 8px 24px rgba(0,0,0,.35);
}

.nav { max-width: var(--container); margin: 0 auto }

.nav-inner {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1rem;
}

.brand { display: flex; align-items: center; gap: .5rem; color: var(--primary-500) }
.brand-text { color: #fff; font-weight: 700; letter-spacing: .2px }

.menu-toggle {
  margin-left: auto; background: none; border: 0; color: #fff; cursor: pointer;
  padding: .4rem; border-radius: var(--radius-sm);
}
.menu-toggle:hover { background: rgba(255,255,255,.04) }

.menu {
  display: none; gap: .25rem; text-transform: uppercase; letter-spacing: .5px;
}

.menu-item {
  display: flex; align-items: center; gap: .375rem;
  color: #d1d5db; padding: .45rem .6rem; border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .15s ease;
}

.menu-item:hover {
  color: #fff;
  background: linear-gradient(180deg, rgba(243,108,33,.08), rgba(243,108,33,.04));
  border-color: rgba(243,108,33,.25);
}

.icon { display: inline-flex }

@media (min-width: 1024px) {
  .menu-toggle { display: none }
  .menu { display: flex; margin-left: auto }
}

/* Hero */
.hero { position: relative; max-width: var(--container); margin: 0 auto; padding: 1rem }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.45) 85%);
}
.hero-img {
  width: 100%; min-height: 16rem; border-radius: var(--radius-lg); object-fit: cover;
  box-shadow: var(--shadow-1);
  filter: saturate(1.05) contrast(1.02);
}
.hero-title {
  position: absolute; left: 2rem; bottom: 2rem; margin: 0;
  font-size: clamp(1.5rem, 1.2rem + 1.8vw, 3rem);
  text-transform: uppercase; font-weight: 700; letter-spacing: .6px;
  text-shadow: 0 2px 16px rgba(0,0,0,.6);
}

/* CTA */
.cta { max-width: var(--container); margin: 1rem auto; padding: 0 1rem; display: grid; grid-template-columns: 1fr; gap: 1rem }

.cta-card {
  display: flex; align-items: center; gap: .75rem;
  padding: 1rem 1.1rem; border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
  transition: transform .18s ease, background-color .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.cta-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2) }

.cta-discord {
  background: linear-gradient(135deg, #434dc9 0%, #5865f2 60%);
  border-color: rgba(88,101,242,.5);
}
.cta-discord:hover { background: linear-gradient(135deg, #4b55d8 0%, #6270ff 60%) }

.cta-mail {
  background: linear-gradient(135deg, rgba(243,108,33,.15), rgba(243,108,33,.08));
  border-color: rgba(243,108,33,.35);
}
.cta-mail:hover { background: linear-gradient(135deg, rgba(243,108,33,.22), rgba(243,108,33,.12)) }

.cta-icon { transform: scale(.95) }
.cta-text h2 { margin: 0; font-weight: 700 }
.cta-text p { margin: .25rem 0 0 0; color: var(--text-dim) }

@media (min-width: 1024px) { .cta { grid-template-columns: repeat(2, minmax(0, 1fr)) } }

/* Articles */
.section-title { max-width: var(--container); margin: 0 auto .75rem auto; padding: 0 1rem }

.articles { padding-bottom: 1.25rem }

.grid { max-width: var(--container); margin: 0 auto; display: grid; gap: 1rem; padding: 0 1rem }
@media (min-width: 740px) { .grid { grid-template-columns: repeat(2, 1fr) } }
@media (min-width: 1180px) { .grid { grid-template-columns: repeat(3, 1fr) } }

.card {
  position: relative; display: block; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0));
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(243,108,33,.35);
  box-shadow: var(--shadow-2);
}

.card-title {
  position: absolute; left: 0; bottom: 0; margin: 0; padding: .6rem 1rem;
  border-left: 4px solid var(--primary-400);
  background: linear-gradient(90deg, rgba(0,0,0,.6), rgba(0,0,0,.2));
}

/* Footer */
.site-footer { max-width: var(--container); margin: 2rem auto; padding: 0 1rem }
.site-footer hr { border-color: var(--border) }
.footer-inner { display: flex; flex-direction: column; gap: .6rem; align-items: flex-end; justify-content: space-between }

.brut-link { display: flex; align-items: center; gap: .75rem }
.copy p { margin: .25rem 0 }
.designer { color: var(--text-dim); font-size: .8rem }
.designer-link { color: var(--text-dim); transition: color .2s ease }
.designer-link:hover { color: var(--text) }

/* Utilities */
.hidden { display: none }
.show { display: flex }

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important }
}
