/* ================================================
Autism Deconstructed — Production Stylesheet
================================================ */

/* Reset */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Source Serif 4", serif;
    line-height: 1.85;
    color: #222;
    text-rendering: optimizeLegibility;
    font-feature-settings: "liga", "kern";
    background: linear-gradient(120deg, #faf8f4, #f4f0e9, #faf8f4);
    background-size: 300% 300%;
    animation: ambientShift 80s ease infinite;
    overflow-x: hidden;
}

/* Global Links */
a {
    color: #222;
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: #555;
}

p a {
    text-decoration: underline;
    text-decoration-color: #d1cbc2;
    text-underline-offset: 3px;
}

p a:hover {
    text-decoration-color: #222;
}

/* Layout */
.container {
    max-width: 740px;
    margin: auto;
    padding: 0 25px;
}

/* Hero */
.hero {
    text-align: center;
    padding: 20px 0 10px;
    position: relative;
}

.logo {
    width: 320px;
    max-width: 70%;
    display: block;
    margin: 20px auto 20px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 500;
    letter-spacing: -.02em;
    margin-bottom: 10px;
}

.tagline {
    font-family: "Inter", sans-serif;
    font-size: 18px;
    color: #555;
}

/* Navigation */
.main-nav {
    text-align: center;
    margin: 20px 0 40px;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.main-nav a {
    color: #555;
    position: relative;
    padding: 0 6px;
}

.main-nav span {
    color: #ccc;
    padding: 0 5px;
}

.main-nav a:hover {
    color: #222;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 1px;
    background: #4a5d4e; /* Accent color */
    transition: width .2s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

/* Sections */
section {
    margin: 50px 0;
}

h2 {
    font-size: 32px;
    font-weight: 500;
}

h3 {
    font-size: 24px;
    font-weight: 500;
}

/* Feature Section */
.feature {
    background: #f3efe8;
    padding: 40px 30px;
    border: 1px solid #e8e3dc;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,.03);
}

.player {
    margin: 25px 0;
}

.player iframe {
    border: none; /* Removes the misaligned bounding box */
    border-radius: 12px; /* Matches Spotify's native rounded corners just in case */
    width: 100%;
    display: block; /* Removes the tiny invisible text-descender gap below iframes */
}

.listen-link a {
    font-family: "Inter", sans-serif;
    display: inline-block;
    font-weight: 500;
    font-size: 15px;
    color: #4a5d4e; /* Grounding Sage Accent */
    border-bottom: 2px solid #a3b0a6;
    padding-bottom: 2px;
}

.listen-link a:hover {
    color: #2b382e;
    border-bottom-color: #4a5d4e;
    text-decoration: none;
}

/* =================================================
   Pillars Section
================================================= */
.pillars-section {
    margin: 30px 0;
    padding-top: 20px;
}

.pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 45px;
     /*justify-items: left; */   
    align-items: stretch; 
}

.pillar {
    width: 100%;
    max-width: 360px; /* Slightly wider to prevent awkward breaking */
    margin: 0 auto;   /* This ensures the individual box stays centered in its grid cell */
    text-align: center;
    padding: 15px 10px 20px;
    border-top: 1px solid #ece7df;
    border-bottom: 1px solid #ece7df;
    transition: transform .18s ease;
    display: flex;
    flex-direction: column;
    align-items: justify; /* This forces the content (icons/text) to stay horizontally centered */
}

.pillar:hover {
    transform: translateY(-4px);
}

.pillar-icon {
    margin-bottom: 0px;
    color: #b1a99c; /* Soft contrasting tone */
}

.pillar-icon svg {
    width: 28px;
    height: 28px;
}

.pillar h2 {
    font-size: 28px;
    line-height: 1.;
    letter-spacing: -0.01em;
    margin-top: 0;
    margin-bottom: 12px;
    min-height: 100px;         
}

.pillar p {
    font-size: 17px;
    line-height: 1.6;
    color: #444;
    margin-top: 0;
    margin-bottom: auto;
    
    /* These two lines make the paragraph shape much more uniform */
    text-wrap: pretty;
}

.pillar a {
    font-family: "Inter", sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #555;
    margin-top: auto; 
}

.pillar a:hover {
    color: #4a5d4e;
}

/* =================================================
   Concepts Grid
================================================= */
.concepts h2 {
    text-align: center;
    margin-bottom: 40px;
}

.concept-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.concept-grid a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #fff;
    border: 1px solid #ece7df;
    border-radius: 8px; /* Softened corners */
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,.02);
}

.concept-grid a:hover {
    border-color: #d1cbc2;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.04);
    color: #4a5d4e;
}

/* =================================================
   Episodes List
================================================= */
.episodes {
    text-align: center;
    margin-top: 120px;
}

.episodes ul {
    list-style: none;
    padding: 0;
    max-width: 600px;
    margin: 40px auto;
    text-align: left;
}

.episodes li {
    padding: 20px 15px;
    border-bottom: 1px solid #ece7df;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.episodes li:last-child {
    border-bottom: none;
}

.episodes li:hover {
    background-color: rgba(0,0,0,0.02); /* Clean hover row highlight */
}

.episodes a {
    font-size: 20px;
    font-weight: 500;
}

.episodes li:hover a {
    color: #4a5d4e;
}

.episode-meta {
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #888;
}

/* =================================================
   Footer
================================================= */
footer {
    font-family: "Inter", sans-serif;
    text-align: center;
    margin-top: 60px;
    padding-bottom: 40px;
    color: #777;
    font-size: 14px;
    line-height: 1.6;
}

/* =================================================
   Background Animations
================================================= */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(170,170,170,.18) 1px, transparent 1px);
    background-size: 45px 45px;
    animation: dustDriftSlow 90s linear infinite;
    opacity: .35;
    pointer-events: none;
    z-index: -1;
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(170,170,170,.12) 1px, transparent 1px);
    background-size: 70px 70px;
    animation: dustDriftFar 140s linear infinite;
    opacity: .25;
    pointer-events: none;
    z-index: -1;
}

@keyframes dustDriftSlow {
    0% { transform: translateY(0); }
    100% { transform: translateY(-45px); }
}

@keyframes dustDriftFar {
    0% { transform: translateY(0); }
    100% { transform: translateY(-70px); }
}

@keyframes ambientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* =================================================
   Responsive Mobile Adjustments
================================================= */
@media (max-width: 900px) {
    .hero h1 {
        font-size: 38px;
    }

    .feature {
        padding: 40px 30px;
    }

    .pillars {
        grid-template-columns: 1fr;
    }

    .pillar h2 {
        min-height: auto; 
    }

    .concept-grid {
        grid-template-columns: 1fr;
    }
}

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

    body, body::before, body::after {
        animation: none !important;
        background-position: 0% 50% !important;
    }
}

.about-content {
    margin: 80px 0;
}

.about-content h1 {
    font-size: 42px;
    margin-bottom: 60px;
    letter-spacing: -0.02em;
}

.about-content h2 {
    font-size: 26px;
    margin-top: 50px;
    margin-bottom: 20px;
    color: #4a5d4e; /* Use your new Sage accent color for headings */
}

.about-content p {
    margin-bottom: 24px;
    font-size: 19px;
    line-height: 1.8;
}

/* =================================================
Episodes Page
================================================= */

.episodes-index{
margin-top:40px;
}

.episode-card{

margin-bottom:80px;

padding-bottom:40px;

border-bottom:1px solid #ece7df;

}

.episode-card h3{

font-size:28px;

margin-bottom:8px;

}

.episode-card p{

font-size:18px;

line-height:1.75;

}

.episode-links{

margin-top:15px;

font-size:16px;

}

.episode-links a{

text-decoration:none;

color:#333;

}

.episode-links a:hover{
text-decoration:underline;
}

.episodes-archive{

margin-top:100px;

}

.archive-list{

list-style:none;

padding:0;

max-width:600px;

margin-top:30px;

}

.archive-list li{

padding:14px 0;

border-bottom:1px solid #ece7df;

}

.archive-list a{

text-decoration:none;

font-size:20px;

color:#222;

}

.archive-list span{

display:block;

font-size:14px;

color:#777;

margin-top:4px;

}
