/* Central Styles - Core, Typography & Shared Components */

/* ==========================================================================
   CSS VARIABLES
   ========================================================================== */
:root {
    --base-font-size: 16px;
    --text-color: #666666;
    --accent-color: #0000FF;
    --background-cream: #FFF8F0;
    --background-mint: #e8ffef;
}

/* ==========================================================================
   RESET
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Synonym Font Face Declarations */
@font-face {
    font-family: 'Synonym';
    src: url('./fonts/Synonym-Variable.woff2') format('woff2'),
         url('./fonts/Synonym-Variable.woff') format('woff'),
         url('./fonts/Synonym-Variable.ttf') format('truetype'),
         url('./fonts/Synonym-Variable.eot') format('embedded-opentype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: 'Synonym', sans-serif;
    font-size: var(--base-font-size);
    line-height: 1.2;
    transition: opacity 0.2s ease;
    background: var(--accent-color);
    color: var(--text-color);
    overflow-x: hidden;
    overflow-y: auto;
    letter-spacing: 0.01em;
}

/* Header Styles - Normalized to Body Size */
h1, h2, h3, h4, h5, h6 {
    font-size: var(--base-font-size);
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 0.5rem 0;
}

h3 {
    margin: 3rem 0 1rem 0;
}

h3:first-of-type {
    margin-top: 2rem;
}

/* Header Color */
.text-dark, h1, h2, h3, h4, h5, h6 {
    color: #333333;
}

/* Text Utilities */
.text-bold {
    font-weight: 600;
}

/* Text Size Utilities */
.text-xs {
    font-size: calc(var(--base-font-size) * 0.75);  /* ~13.5px */
}

.text-sm {
    font-size: calc(var(--base-font-size) * 0.875); /* ~15.75px */
}

.text-base {
    font-size: var(--base-font-size);               /* ~18px */
}

.text-lg {
    font-size: calc(var(--base-font-size) * 1.125); /* ~20.25px */
}

.text-xl {
    font-size: calc(var(--base-font-size) * 1.25);  /* ~22.5px */
}

.text-2xl {
    font-size: calc(var(--base-font-size) * 1.5);   /* ~27px */
}

.text-3xl {
    font-size: calc(var(--base-font-size) * 1.875); /* ~33.75px */
}

.text-4xl {
    font-size: calc(var(--base-font-size) * 2.25);  /* ~40.5px */
}

.text-5xl {
    font-size: calc(var(--base-font-size) * 3);     /* ~54px */
}

/* Links */
a {
    text-decoration: underline;
    text-decoration-style: dotted;
    position: relative;
    font-weight: 500;
    color: var(--text-color);
    transition: color 0.2s ease;
}

a:visited {
    color: var(--text-color);
}

a:hover {
    color: var(--accent-color);
}

/* Paragraphs */
p {
    margin-bottom: 2.5rem;
    font-weight: 400;
    line-height: 1.5;
}

/* Lists */
ul {
    margin-bottom: 2rem;
    padding-left: 0;
    list-style: none;
}

li {
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* ==========================================================================
   SHARED COMPONENTS
   ========================================================================== */

/* Logo Component */
.logo {
    width: 80px;
    height: 80px;
    background: var(--accent-color);
    border-radius: 50%;
    position: fixed;
    top: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 255, 0.1);
}

/* Add background extension for mobile */
@supports (-webkit-touch-callout: none) {
    .logo::before {
        content: '';
        position: fixed;
        top: -100px; /* Extend well above the viewport */
        left: 0;
        right: 0;
        height: calc(2rem + 100px); /* Cover area above logo */
        background: #0000FF;
        z-index: -1;
    }
}

.logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.logo .moon-container {
    font-size: calc(var(--base-font-size) * 2.08); /* ~50px */
    line-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.2);
    animation: logoZoom 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    transition: transform 0.3s ease;
}

.logo .moon {
    width: 60px;
    height: 60px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

/* Hover effect for moon */
.logo a:hover .moon {
    transform: scale(1.5);
}

/* Footer Component */
.footer {
    text-align: center;
    padding: 5rem 0;
    font-size: calc(var(--base-font-size) * 0.875);
    color: var(--text-color);
    opacity: 0.8;
    font-weight: 400;
}

/* UI Elements */
.pill {
    font-size: calc(var(--base-font-size) * 0.583);
    border: 1px solid #0000FF;
    padding: 6px 16px;
    border-radius: 100px;
    margin-left: 12px;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    color: #0000FF;
    transition: all 0.2s ease;
    font-weight: 500;
    background: transparent;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blink {
    50% { opacity: 0; }
}

@keyframes logoZoom {
    from {
        opacity: 0;
        transform: scale(0.2);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 768px) {
    :root {
        --base-font-size: 16px;
    }
    
    /* Improve paragraph spacing on mobile */
    p {
        margin-bottom: 1.5rem;
    }
    
    /* Reduce header margins for better mobile flow */
    h1, h2, h3, h4, h5, h6 {
        margin: 0 0 0.75rem 0;
    }
    
    h3 {
        margin: 2rem 0 0.75rem 0;
    }
    
    h3:first-of-type {
        margin-top: 1rem;
    }
    
    /* Improve list spacing */
    li {
        margin-bottom: 1rem;
    }
    
    ul {
        margin-bottom: 1.5rem;
    }
    
    /* Reduce footer padding */
    .footer {
        padding: 3rem 0;
    }
    
    /* Add mobile-specific body padding */
    body {
        padding: 2rem 1rem 0;
    }
}
