/**
 * Base Styles
 * 
 * Reset, typography, and layout foundations
 *
 * @package BadassNetwork
 */

/* ===================================
   Background Pattern & Floating Shapes
   =================================== */

/* Grid Background Pattern */
.bg-pattern {
    position: fixed;
    inset: 0;
    background-image: 
        linear-gradient(rgba(0,0,0,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* Floating Shapes Container */
.floating-shapes {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Individual Shapes */
.floating-shape {
    position: absolute;
    border: 3px solid var(--color-border);
    opacity: 0.12;
}

.floating-shape--1 {
    width: 200px;
    height: 200px;
    background: var(--color-electric);
    top: 10%;
    left: -50px;
    transform: rotate(15deg);
    animation: floatShape1 20s ease-in-out infinite;
}

.floating-shape--2 {
    width: 150px;
    height: 150px;
    background: var(--color-hot);
    top: 60%;
    right: -30px;
    transform: rotate(-10deg);
    animation: floatShape2 25s ease-in-out infinite;
}

.floating-shape--3 {
    width: 100px;
    height: 100px;
    background: var(--color-sun);
    bottom: 20%;
    left: 10%;
    transform: rotate(45deg);
    animation: floatShape3 18s ease-in-out infinite;
}

.floating-shape--4 {
    width: 80px;
    height: 80px;
    background: var(--color-mint);
    top: 30%;
    right: 15%;
    animation: floatShape1 22s ease-in-out infinite reverse;
}

/* Floating Animations */
@keyframes floatShape1 {
    0%, 100% { transform: rotate(15deg) translateY(0); }
    50% { transform: rotate(20deg) translateY(-30px); }
}

@keyframes floatShape2 {
    0%, 100% { transform: rotate(-10deg) translateX(0); }
    50% { transform: rotate(-5deg) translateX(-20px); }
}

@keyframes floatShape3 {
    0%, 100% { transform: rotate(45deg) translateY(0); }
    50% { transform: rotate(50deg) translateY(-25px); }
}

/* Ensure main content stays above background */
#page,
.site {
    position: relative;
    /* Note: z-index removed to avoid creating a stacking context 
       that would trap the header below the mobile nav overlay */
}

/* ===================================
   Reset & Base Styles
   =================================== */

/* Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* HTML & Body */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-main);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 900;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: -1px;
}

h1 {
    font-size: clamp(var(--text-5xl), 8vw, var(--text-7xl));
    letter-spacing: -3px;
}

h2 {
    font-size: clamp(var(--text-4xl), 6vw, var(--text-6xl));
    letter-spacing: -2px;
}

h3 {
    font-size: var(--text-2xl);
}

h4 {
    font-size: var(--text-xl);
}

h5 {
    font-size: var(--text-lg);
}

h6 {
    font-size: var(--text-base);
}

p {
    margin-bottom: 1em;
}

p:last-child {
    margin-bottom: 0;
}

/* Links - base styles already defined in container section */

/* Strong */
strong, b {
    font-weight: 700;
}

/* Emphasis */
em, i {
    font-style: italic;
}

/* Small */
small {
    font-size: var(--text-sm);
}

/* Lists */
ul, ol {
    margin-bottom: 1em;
    padding-left: 1.5em;
}

li {
    margin-bottom: 0.5em;
}

/* Blockquote */
blockquote {
    background: var(--color-bg);
    border: var(--border);
    border-left-width: 6px;
    border-left-color: var(--color-electric);
    padding: var(--space-2xl) var(--space-3xl);
    margin: var(--space-3xl) 0;
    font-size: var(--text-lg);
    font-style: italic;
}

blockquote p:last-child {
    margin-bottom: 0;
}

/* Code */
code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    padding: 2px 8px;
}

pre {
    background: var(--color-text);
    color: white;
    border: var(--border);
    padding: var(--space-2xl);
    margin: var(--space-3xl) 0;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    line-height: 1.5;
}

pre code {
    background: none;
    border: none;
    padding: 0;
    color: var(--color-mint);
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

figure {
    margin: var(--space-3xl) 0;
}

figcaption {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--color-text-soft);
    margin-top: var(--space-md);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
}

th, td {
    padding: var(--space-lg) var(--space-xl);
    text-align: left;
    border-bottom: var(--border);
}

th {
    background: var(--color-text);
    color: white;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 1px;
}

tr:hover td {
    background: var(--color-bg);
}

/* Forms */
input,
textarea,
select,
button {
    font-family: inherit;
    font-size: inherit;
}

/* Selection */
::selection {
    background: var(--color-sun);
    color: var(--color-text);
}

/* Focus */
:focus {
    outline: 3px solid var(--color-electric);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

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

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

.container--wide {
    max-width: var(--container-wide);
}

.container--narrow {
    max-width: var(--container-narrow);
}

/* Links in content - matching original HTML */
a {
    color: var(--color-electric);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    text-decoration: underline;
}

/* Screen Reader Text */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--color-surface);
    border: var(--border);
    box-shadow: var(--shadow);
    clip: auto !important;
    clip-path: none;
    color: var(--color-text);
    display: block;
    font-size: var(--text-sm);
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: var(--z-tooltip);
}

/* Skip Link */
.skip-link {
    background: var(--color-electric);
    color: white;
    padding: var(--space-lg) var(--space-2xl);
    position: fixed;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-tooltip);
    border: var(--border);
    box-shadow: var(--shadow);
    font-weight: 700;
    text-transform: uppercase;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: var(--space-lg);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }

.font-mono { font-family: var(--font-mono); }
.font-main { font-family: var(--font-main); }

.hidden { display: none !important; }
.visible { visibility: visible; }
.invisible { visibility: hidden; }

/* Clearfix */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

