/* CSS Variables */
:root {
    --primary: #283d3b;
    --sage: #c5d1c9;
    --accent: #ffd883;
    
    --white: #ffffff;
    
    /* No rounded corners - Sharp edges only */
    --radius: 0px;
}

/* Global Reset for Sharp Edges */
* {
    border-radius: 0 !important;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--primary);
    color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography Scale */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border: 2px solid var(--primary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Selection */
::selection {
    background-color: var(--accent);
    color: var(--primary);
}

/* Ensure proper text colors on dark backgrounds */
.text-on-dark {
    color: var(--white);
}

.text-on-accent {
    color: var(--primary);
}

/* Focus States for Accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* Link Styles */
a {
    transition: color 0.3s ease;
}

/* Button Base */
button {
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Form Elements */
input,
textarea {
    border-radius: 0;
    transition: border-color 0.3s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
}

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

/* Grid & Layout Utilities */
.container-sharp {
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container-sharp {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container-sharp {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

@media (min-width: 1280px) {
    .container-sharp {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

/* Hover Transitions */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 8px 8px 0px var(--primary);
}

/* Text Utilities */
.text-balance {
    text-wrap: balance;
}

/* Line Clamp */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Mobile Menu Animation */
#mobile-menu {
    transition: all 0.3s ease-in-out;
    transform-origin: top;
}

#mobile-menu.hidden {
    display: none;
}

#mobile-menu:not(.hidden) {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header Scroll State */
header.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    background-color: rgba(197, 209, 201, 1);
}

/* Episode Card Hover Effects */
.episode-card {
    transition: all 0.3s ease;
}

.episode-card:hover {
    transform: translateY(-4px);
    box-shadow: 8px 8px 0px var(--primary);
}

/* Clip Card Play Button Pulse */
@keyframes pulse-play {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.group:hover .play-button {
    animation: pulse-play 0.6s ease-in-out;
}

/* Gradient Overlays */
.gradient-overlay {
    background: linear-gradient(to top, var(--primary) 0%, transparent 100%);
}

/* Noise Texture for Hero (Optional) */
.noise-bg {
    position: relative;
}

.noise-bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Form Submit Button Loading State */
button[type="submit"].loading {
    opacity: 0.7;
    cursor: not-allowed;
}

button[type="submit"].loading::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}

/* Dark theme card backgrounds */
.card-dark {
    background-color: rgba(255, 255, 255, 0.95);
    color: var(--primary);
}

.card-dark:hover {
    background-color: #ffffff;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Typography Adjustments */
@media (max-width: 640px) {
    h1 {
        font-size: 2.5rem !important;
        line-height: 0.95;
    }
    
    h2 {
        font-size: 2rem !important;
    }
}

/* Print Styles */
@media print {
    header,
    footer,
    #contact {
        display: none;
    }
    
    body {
        color: black;
        background: white;
    }
    
    a {
        text-decoration: underline;
        color: black;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}