/* =====================================
   Variables: Cyber-Bronze Mythic Theme
   ===================================== */
:root {
  color-scheme: dark;

  /* Core palette */
  --color-bg: #0b0f13;           /* dark steel */
  --color-surface: #12171d;      /* base surface */
  --color-elevated: #18212a;     /* elevated panels */
  --color-border: #24323e;       /* cool steel border */

  /* Accents */
  --color-primary: #1fe4e4;      /* neon teal */
  --color-gold: #ffd166;         /* neon gold */
  --color-bronze-300: #b38a58;   /* warm bronze highlight */
  --color-bronze-500: #8c6b3d;   /* bronze core */
  --color-bronze-700: #6e512a;   /* deep bronze */

  /* Semantic */
  --color-success: #2ecc71;
  --color-warning: #f6ad55;
  --color-danger:  #ff4d4f;

  /* Neutrals (blue-gray leaning to match steel vibe) */
  --gray-50:  #f2f5f8;
  --gray-100: #e6ebf1;
  --gray-200: #cfd8e2;
  --gray-300: #b5c3cf;
  --gray-400: #9aabbc;
  --gray-500: #7f90a1;
  --gray-600: #667889;
  --gray-700: #4e5e6e;
  --gray-800: #364552;
  --gray-900: #1f2a33;

  /* Text */
  --color-text: #e6edf3;
  --color-text-muted: #9fb0bf;

  /* Typography */
  --font-sans: "Inter", "Segoe UI", Roboto, system-ui, -apple-system, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --font-display: "Orbitron", "Rajdhani", "Bank Gothic", "Eurostile", "Aldrich", var(--font-sans);
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  --text-xs: 0.75rem;  /* 12 */
  --text-sm: 0.875rem; /* 14 */
  --text-base: 1rem;   /* 16 */
  --text-lg: 1.125rem; /* 18 */
  --text-xl: 1.25rem;  /* 20 */
  --text-2xl: 1.5rem;  /* 24 */
  --text-3xl: 1.875rem;/* 30 */
  --text-4xl: 2.25rem; /* 36 */
  --text-5xl: 3rem;    /* 48 */

  --leading-tight: 1.2;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;

  /* Spacing scale (0–96px) */
  --space-0: 0px;
  --space-2: 2px;
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-40: 40px;
  --space-48: 48px;
  --space-56: 56px;
  --space-64: 64px;
  --space-72: 72px;
  --space-80: 80px;
  --space-96: 96px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 24px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 6px 14px rgba(0, 0, 0, 0.45), 0 2px 4px rgba(0,0,0,0.5);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.5), 0 8px 16px rgba(0,0,0,0.5);
  --shadow-glow-teal: 0 0 0 2px rgba(31, 228, 228, 0.2), 0 0 24px rgba(31, 228, 228, 0.35);
  --shadow-glow-gold: 0 0 0 2px rgba(255, 209, 102, 0.18), 0 0 24px rgba(255, 209, 102, 0.32);

  /* Transitions */
  --duration-fast: 120ms;
  --duration-normal: 220ms;
  --duration-slow: 400ms;
  --ease-emphasized: cubic-bezier(0.2, 0.8, 0.2, 1);

  /* Layout */
  --container-max: 1200px;
  --container-pad: var(--space-16);

  /* Other */
  accent-color: var(--color-primary);
}

/* =====================================
   Reset / Normalize
   ===================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
  margin: 0;
}

ul[role="list"], ol[role="list"] { list-style: none; }

body {
  min-height: 100vh;
  text-rendering: optimizeLegibility;
}

img, svg, video, canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

iframe { max-width: 100%; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

/* Remove default button styles inconsistencies */
button { background: none; border: none; padding: 0; }

/* =====================================
   Base Styles
   ===================================== */
body {
  background: radial-gradient(1200px 800px at 20% -10%, rgba(31, 228, 228, 0.06), transparent 60%), radial-gradient(1000px 700px at 120% 10%, rgba(255, 209, 102, 0.05), transparent 50%), var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  overflow-x: hidden;
}

::selection {
  background: rgba(31, 228, 228, 0.25);
  color: #0b0f13;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: 0.02em;
  color: var(--color-text);
}

h1 { font-size: clamp(2rem, 1.25rem + 3vw, 3.5rem); margin-block: var(--space-32) var(--space-16); }
h2 { font-size: clamp(1.75rem, 1rem + 2vw, 2.5rem); margin-block: var(--space-32) var(--space-16); }
h3 { font-size: clamp(1.5rem, 0.875rem + 1.25vw, 2rem); margin-block: var(--space-24) var(--space-12); }
h4 { font-size: var(--text-2xl); margin-block: var(--space-20) var(--space-8); }
h5 { font-size: var(--text-xl); margin-block: var(--space-16) var(--space-8); }
h6 { font-size: var(--text-lg); margin-block: var(--space-12) var(--space-8); }

p { margin-block: 0 var(--space-16); color: var(--color-text); }

small { font-size: var(--text-sm); color: var(--color-text-muted); }

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-normal) var(--ease-emphasized), text-shadow var(--duration-fast) var(--ease-emphasized);
}

a:hover { color: #b7ffff; text-shadow: 0 0 12px rgba(31, 228, 228, 0.5); }

a:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  margin-block: var(--space-24);
}

code, pre, kbd, samp { font-family: var(--font-mono); }

pre {
  background: var(--color-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-16);
  overflow: auto;
}

/* =====================================
   Utilities
   ===================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

@media (min-width: 768px) {
  :root { --container-pad: var(--space-24); }
}

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-8 { gap: var(--space-8); }
.gap-16 { gap: var(--space-16); }

.grid { display: grid; gap: var(--space-16); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); padding: 0; list-style: none; }

/* Screen reader only */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* Subtle neon edge for accenting elements */
.glow-teal { box-shadow: var(--shadow-glow-teal); }
.glow-gold { box-shadow: var(--shadow-glow-gold); }

/* =====================================
   Components
   ===================================== */
/* Button */
.btn {
  --btn-bg: var(--color-elevated);
  --btn-fg: var(--color-text);
  --btn-border: var(--color-border);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-fg);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform var(--duration-fast) var(--ease-emphasized), box-shadow var(--duration-normal) var(--ease-emphasized), background-color var(--duration-normal) var(--ease-emphasized), border-color var(--duration-normal) var(--ease-emphasized), color var(--duration-normal) var(--ease-emphasized);
  cursor: pointer;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; pointer-events: none; }

.btn-primary {
  --btn-bg: linear-gradient(180deg, rgba(31, 228, 228, 0.15), rgba(31, 228, 228, 0.05) 60%), var(--color-elevated);
  --btn-border: rgba(31, 228, 228, 0.35);
  --btn-fg: var(--color-text);
  box-shadow: inset 0 0 0 1px rgba(31, 228, 228, 0.25);
}
.btn-primary:hover { box-shadow: var(--shadow-glow-teal); }
.btn-primary:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

.btn-secondary {
  --btn-bg: linear-gradient(180deg, rgba(255, 209, 102, 0.16), rgba(255, 209, 102, 0.06) 60%), var(--color-elevated);
  --btn-border: rgba(255, 209, 102, 0.35);
  --btn-fg: var(--color-text);
  box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.25);
}
.btn-secondary:hover { box-shadow: var(--shadow-glow-gold); }
.btn-secondary:focus-visible { outline: 2px solid var(--color-gold); outline-offset: 2px; }

.btn-success { --btn-bg: rgba(46, 204, 113, 0.12); --btn-border: rgba(46, 204, 113, 0.35); }
.btn-warning { --btn-bg: rgba(246, 173, 85, 0.12); --btn-border: rgba(246, 173, 85, 0.35); }
.btn-danger  { --btn-bg: rgba(255, 77, 79, 0.12);  --btn-border: rgba(255, 77, 79, 0.35); }

/* Inputs */
.input, input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="number"], input[type="url"], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.08)), var(--color-elevated);
  color: var(--color-text);
  transition: border-color var(--duration-normal) var(--ease-emphasized), box-shadow var(--duration-normal) var(--ease-emphasized), background-color var(--duration-normal) var(--ease-emphasized);
}

.input::placeholder, input::placeholder, textarea::placeholder { color: var(--color-text-muted); }

.input:focus, input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(31, 228, 228, 0.6);
  box-shadow: 0 0 0 3px rgba(31, 228, 228, 0.25);
}

fieldset { border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-16); }
legend { padding-inline: var(--space-8); color: var(--color-text-muted); }

/* Card */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.015), rgba(0,0,0,0.08)), var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-24);
}

.card--elevated { background: linear-gradient(180deg, rgba(31, 228, 228, 0.04), rgba(255, 209, 102, 0.03)), var(--color-elevated); box-shadow: var(--shadow-lg); }

/* Link buttons inside cards */
.card a { text-decoration: none; }
.card a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* =====================================
   Accessibility & Motion
   ===================================== */
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

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

/* =====================================
   Responsive tweaks (lightweight)
   ===================================== */
@media (min-width: 1024px) {
  h1 { margin-block: var(--space-40) var(--space-20); }
}

/* =====================================
   Optional adornments (subtle cyber bronze)
   ===================================== */
.border-bronze { border-color: rgba(179, 138, 88, 0.5) !important; }
.text-muted { color: var(--color-text-muted) !important; }
.bg-elevated { background: var(--color-elevated) !important; }
.shadow-glow-teal { box-shadow: var(--shadow-glow-teal) !important; }
.shadow-glow-gold { box-shadow: var(--shadow-glow-gold) !important; }
