/**
 * PostWizard Base Styles
 *
 * CSS Reset, Typography, and Base Elements
 */

/* ========================
   CSS RESET
   ======================== */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--color-neutral-900);
    background-color: var(--color-background);
    min-height: 100vh;
    overflow-x: hidden;
}

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

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

button {
    cursor: pointer;
    background: none;
    border: none;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

/* ========================
   TYPOGRAPHY
   ======================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    color: var(--color-neutral-900);
    text-wrap: balance;
}

h1, .text-5xl {
    font-size: var(--text-5xl);
    font-weight: var(--font-extrabold);
    letter-spacing: var(--tracking-tight);
}

h2, .text-4xl {
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    letter-spacing: var(--tracking-tight);
}

h3, .text-3xl {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
}

h4, .text-2xl {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
}

h5, .text-xl {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
}

h6, .text-lg {
    font-size: var(--text-lg);
    font-weight: var(--font-medium);
}

p {
    color: var(--color-neutral-600);
    max-width: 65ch;
}

.text-sm {
    font-size: var(--text-sm);
}

.text-xs {
    font-size: var(--text-xs);
}

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

/* Text Colors */
.text-primary {
    color: var(--color-primary-500);
}

.text-muted {
    color: var(--color-neutral-500);
}

.text-white {
    color: var(--color-white);
}

.text-gradient {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================
   LAYOUT UTILITIES
   ======================== */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-padding);
}

.container-narrow {
    max-width: 900px;
}

.container-wide {
    max-width: 1440px;
}

/* Flex Utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.gap-10 { gap: var(--space-10); }
.gap-12 { gap: var(--space-12); }

/* Grid */
.grid {
    display: grid;
}

/* Text Alignment */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

/* Margin Utilities */
.mx-auto {
    margin-inline: auto;
}

.mt-auto {
    margin-top: auto;
}

.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

/* ========================
   VISIBILITY & DISPLAY
   ======================== */

.hidden {
    display: none;
}

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

/* ========================
   ANIMATION UTILITIES
   ======================== */

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity var(--transition-slower),
        transform var(--transition-slower);
    transition-timing-function: var(--ease-out);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* Float animation for hero elements */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(1deg);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Pulse animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Gradient shift animation */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

/* ========================
   RESPONSIVE BREAKPOINTS
   ======================== */

/* Mobile First Approach */

/* Small screens and up (640px) */
@media (min-width: 640px) {
    .sm\:flex {
        display: flex;
    }

    .sm\:hidden {
        display: none;
    }

    .sm\:text-left {
        text-align: left;
    }
}

/* Medium screens and up (768px) */
@media (min-width: 768px) {
    .md\:flex {
        display: flex;
    }

    .md\:hidden {
        display: none;
    }

    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large screens and up (1024px) */
@media (min-width: 1024px) {
    .lg\:flex {
        display: flex;
    }

    .lg\:hidden {
        display: none;
    }

    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Extra large screens and up (1280px) */
@media (min-width: 1280px) {
    .xl\:flex {
        display: flex;
    }
}
