/*
Theme Name: Letters from the Ice
Description: A vintage-modern hockey theme for player correspondence with AI-powered visual effects
Version: 1.4
Author: Letters from the Ice Team (Built by Claude AI in collaboration with MyCelf Intelligence)
*/

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Courier+Prime:ital,wght@0,400;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* CSS Variables for Color Scheme */
:root {
    --deep-navy: #1a2b4c;
    --ice-white: #f4f6f8;
    --vintage-red: #b52d2b;
    --wood-tone: #d4a574;
    --wood-tone-light: #e8c89c;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --border-light: rgba(26, 43, 76, 0.1);
    --shadow-subtle: rgba(26, 43, 76, 0.08);
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--ice-white);
    background-image: 
        radial-gradient(circle at 1px 1px, rgba(26, 43, 76, 0.03) 1px, transparent 0);
    background-size: 20px 20px;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    color: var(--deep-navy);
    margin-top: 0;
}

h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.2;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    line-height: 1.3;
}

.letter-content {
    font-family: 'Courier Prime', monospace;
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-primary);
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header */
.site-header {
    background: linear-gradient(135deg, var(--deep-navy) 0%, #2c4a75 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 4px 20px var(--shadow-subtle);
}

/* Hockey-themed site title with high specificity */
.site-header .site-title,
.site-header .site-title a {
    font-family: 'Inter', sans-serif !important;
    font-size: clamp(2rem, 4vw, 3rem) !important;
    font-weight: 900 !important;
    margin: 0 !important;
    text-align: center !important;
    color: white !important;
    text-transform: uppercase !important;
    letter-spacing: 3px !important;
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.3),
        0 0 20px rgba(173, 216, 230, 0.4),
        0 0 30px rgba(173, 216, 230, 0.2),
        2px 2px 4px rgba(0, 0, 0, 0.3) !important;
    position: relative !important;
    background: linear-gradient(45deg, #ffffff, #e6f3ff, #ffffff) !important;
    background-size: 200% 200% !important;
    background-clip: text !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    animation: ice-shimmer 3s ease-in-out infinite, hockey-glow 2s ease-in-out infinite alternate !important;
    text-decoration: none !important;
}

.site-title::before {
    content: "🏒" !important;
    position: absolute !important;
    left: -40px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 0.8em !important;
    opacity: 0.8 !important;
    animation: puck-slide 4s ease-in-out infinite !important;
    z-index: 10 !important;
}

.site-title::after {
    content: "🥅" !important;
    position: absolute !important;
    right: -40px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 0.8em !important;
    opacity: 0.8 !important;
    animation: puck-slide 4s ease-in-out infinite reverse !important;
    z-index: 10 !important;
}

@keyframes ice-shimmer {
    0%, 100% { 
        background-position: 0% 50%; 
        filter: brightness(1);
    }
    50% { 
        background-position: 100% 50%; 
        filter: brightness(1.2);
    }
}

@keyframes hockey-glow {
    0% { 
        text-shadow: 
            0 0 10px rgba(255, 255, 255, 0.3),
            0 0 20px rgba(173, 216, 230, 0.4),
            0 0 30px rgba(173, 216, 230, 0.2),
            2px 2px 4px rgba(0, 0, 0, 0.3);
    }
    100% { 
        text-shadow: 
            0 0 15px rgba(255, 255, 255, 0.5),
            0 0 25px rgba(173, 216, 230, 0.6),
            0 0 35px rgba(173, 216, 230, 0.4),
            2px 2px 6px rgba(0, 0, 0, 0.4);
    }
}

@media (max-width: 768px) {
    .site-title::before,
    .site-title::after {
        display: none;
    }
    
    .site-title {
        letter-spacing: 2px;
        animation: hockey-glow 2s ease-in-out infinite alternate;
    }
}

.site-description {
    text-align: center;
    margin: 10px 0 0;
    font-style: italic;
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Navigation */
.main-navigation {
    background: rgba(26, 43, 76, 0.95);
    padding: 15px 0;
    backdrop-filter: blur(10px);
}

.nav-menu {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-menu a:hover {
    background: var(--vintage-red);
    transform: translateY(-2px);
}

/* Letter Header - Custom Letterhead */
.letter-header {
    background: linear-gradient(135deg, white 0%, #fefefe 100%);
    border: 2px solid var(--wood-tone);
    border-radius: 12px;
    padding: 30px;
    margin: 40px 0;
    position: relative;
    box-shadow: 0 8px 32px var(--shadow-subtle), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    overflow: hidden;
}

.letter-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(212, 165, 116, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(181, 45, 43, 0.05) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4a574' fill-opacity='0.03'%3E%3Cpath d='M30 25c2.761 0 5 2.239 5 5s-2.239 5-5 5-5-2.239-5-5 2.239-5 5-5zm0 2c-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3-1.343-3-3-3z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.letter-meta {
    position: relative;
    z-index: 2;
    text-align: center;
}

.letter-from-to {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: var(--deep-navy);
    margin-bottom: 15px;
    font-weight: 600;
}

.letter-era {
    font-family: 'Courier Prime', monospace;
    color: var(--vintage-red);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.letter-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--wood-tone), transparent);
    margin: 20px auto;
    width: 200px;
    border-radius: 2px;
}

/* Letter Content Styling */
.letter-post {
    background: white;
    border-radius: 16px;
    padding: 50px;
    margin: 40px 0;
    box-shadow: 0 12px 48px rgba(26, 43, 76, 0.1);
    border: 1px solid var(--border-light);
    position: relative;
}

.letter-post::before {
    content: "";
    position: absolute;
    top: 0;
    left: 40px;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, 
        transparent 50px,
        var(--vintage-red) 50px,
        var(--vintage-red) calc(100% - 50px),
        transparent calc(100% - 50px)
    );
}

.letter-title {
    font-family: 'Playfair Display', serif;
    color: var(--deep-navy);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin-bottom: 30px;
    text-align: center;
    position: relative;
}

.letter-content p {
    margin-bottom: 24px;
    text-indent: 2em;
}

.letter-content p:first-of-type {
    text-indent: 0;
}

/* Signature Styling */
.letter-signature {
    text-align: right;
    margin-top: 40px;
    font-style: italic;
    color: var(--deep-navy);
    font-weight: 600;
}

/* Taxonomy Display */
.letter-taxonomies {
    background: var(--ice-white);
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
    border-left: 4px solid var(--vintage-red);
}

.taxonomy-group {
    margin-bottom: 15px;
}

.taxonomy-label {
    font-weight: 600;
    color: var(--deep-navy);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    display: block;
}

.taxonomy-terms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.taxonomy-term {
    background: white;
    color: var(--deep-navy);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid var(--border-light);
    text-decoration: none;
    transition: all 0.3s ease;
}

.taxonomy-term:hover {
    background: var(--wood-tone-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow-subtle);
}

/* Archive and List Styling */
.letters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.letter-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 32px var(--shadow-subtle);
    border: 1px solid var(--border-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.letter-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 64px rgba(26, 43, 76, 0.15);
}

.letter-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--deep-navy);
}

.letter-card-meta {
    font-family: 'Courier Prime', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.letter-card-excerpt {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.read-more {
    color: var(--vintage-red);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.read-more:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-wrapper {
        padding: 20px 15px;
    }
    
    .letter-post {
        padding: 30px 25px;
        margin: 20px 0;
    }
    
    .letter-header {
        padding: 20px;
        margin: 20px 0;
    }
    
    .letter-from-to {
        font-size: 1.2rem;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .letters-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .letter-content {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .letter-post {
        padding: 20px;
        border-radius: 12px;
    }
    
    .letter-post::before {
        left: 20px;
    }
    
    .letter-header {
        padding: 15px;
    }
    
    .letter-content p {
        text-indent: 1em;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .main-navigation,
    .letter-taxonomies {
        display: none;
    }
    
    .letter-post {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .letter-content {
        font-size: 12pt;
        line-height: 1.6;
    }
}

/* Hockey-themed Decorative Elements */
.hockey-puck-decoration {
    position: relative;
}

.hockey-puck-decoration::before {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--deep-navy);
    border-radius: 50%;
    border: 2px solid var(--wood-tone);
    top: 50%;
    left: -30px;
    transform: translateY(-50%);
}

.ice-texture {
    background-image: 
        linear-gradient(90deg, rgba(244, 246, 248, 0.5) 1px, transparent 1px),
        linear-gradient(rgba(244, 246, 248, 0.5) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Animated Hockey Elements */
@keyframes puck-slide {
    0% { transform: translateX(-10px); opacity: 0.7; }
    50% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(10px); opacity: 0.7; }
}

.puck-animation {
    animation: puck-slide 3s ease-in-out infinite;
}

/* Enhanced Card Hover Effects */
.letter-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(26, 43, 76, 0.02) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
    pointer-events: none;
}

.letter-card:hover::before {
    opacity: 1;
}

/* Decorative Section Dividers */
.section-divider {
    position: relative;
    text-align: center;
    margin: 60px 0;
}

.section-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}

.section-divider-content {
    display: inline-block;
    background: var(--ice-white);
    padding: 0 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
}

/* Hockey Stick Border Elements */
.hockey-stick-border {
    position: relative;
    padding-left: 20px;
}

.hockey-stick-border::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--wood-tone) 0%, var(--vintage-red) 100%);
    border-radius: 2px;
}

/* Enhanced Typography with Text Shadows */
.vintage-text {
    text-shadow: 1px 1px 2px rgba(26, 43, 76, 0.1);
}

.letterhead-text {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Loading Animation for Letters */
@keyframes letter-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.letter-post {
    animation: letter-fade-in 0.8s ease-out;
}

.letter-card {
    animation: letter-fade-in 0.6s ease-out;
}

/* Staggered Animation for Grid Items */
.letter-card:nth-child(1) { animation-delay: 0.1s; }
.letter-card:nth-child(2) { animation-delay: 0.2s; }
.letter-card:nth-child(3) { animation-delay: 0.3s; }
.letter-card:nth-child(4) { animation-delay: 0.4s; }
.letter-card:nth-child(5) { animation-delay: 0.5s; }
.letter-card:nth-child(6) { animation-delay: 0.6s; }

/* Enhanced Button Styles */
.hockey-button {
    position: relative;
    overflow: hidden;
    background: var(--vintage-red);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(181, 45, 43, 0.3);
}

.hockey-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.hockey-button:hover::before {
    left: 100%;
}

.hockey-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(181, 45, 43, 0.4);
}

/* Ice Rink Lines Effect */
.ice-lines {
    position: relative;
}

.ice-lines::after {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        var(--vintage-red) 0px,
        var(--vintage-red) 5px,
        transparent 5px,
        transparent 15px
    );
    opacity: 0.3;
    transform: translateX(-50%);
}

/* Vintage Paper Texture */
.vintage-paper {
    background-image: 
        radial-gradient(circle at 100% 50%, transparent 20%, rgba(189, 134, 86, 0.02) 21%, rgba(189, 134, 86, 0.02) 34%, transparent 35%, transparent),
        linear-gradient(0deg, rgba(189, 134, 86, 0.01) 50%, transparent 50%),
        radial-gradient(ellipse at top, rgba(26, 43, 76, 0.02) 0%, transparent 50%);
}

/* Enhanced Mobile Animations */
@media (max-width: 768px) {
    .letter-card {
        animation-duration: 0.4s;
    }
    
    .hockey-button:hover {
        transform: none;
    }
    
    .puck-animation {
        animation: none;
    }
}