/* --- RESET & VARIABLES --- */
:root {
    /* Neon Teal Theme */
    --bg-main: #f0fdfa;
    --bg-card: #ffffff;
    --bg-card-hover: #f0fdfa;

    /* Brighter, Neon Accents */
    --accent-teal-dark: #0f766e;
    --accent-teal-neon: #14b8a6;

    /* Main Brand Color */
    --accent-cyan: #06b6d4;

    /* Glowing Cyan & Orange */
    --accent-orange: #f97316;
    --accent-orange-glow: #fdba74;

    --text-main: #111827;
    --text-muted: #4b5563;

    /* Glassmorphism Settings */
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-blur: 20px;

    --border-color: rgba(6, 182, 212, 0.3);

    --font-display: 'Inter', system-ui, -apple-system, sans-serif;
    --radius-large: 24px;
    --radius-pill: 100px;

    --glow-shadow-cyan: 0 0 20px rgba(6, 182, 212, 0.3);
    --glow-shadow-orange: 0 0 20px rgba(249, 115, 22, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

/* --- SCROLL OFFSET FOR FIXED NAV --- */
section[id] {
    scroll-margin-top: 120px;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-display);
    line-height: 1.5;
    overflow-x: hidden;
    transition: opacity 0.3s ease;
}

/* --- TYPOGRAPHY --- */
h1,
h2,
h3,
h4 {
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #0f172a;
}

h1 {
    font-weight: 900;
}

/* --- LAYOUT UTILITIES --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

.section-padding {
    padding: 100px 0;
}

/* --- HEADER / NAV --- */
nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1100px;
    padding: 8px 24px;
    z-index: 1000;

    /* Enhanced Glassmorphism */
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));

    /* Dual Tone Border */
    border: 2px solid transparent;
    background-clip: padding-box;
    box-shadow: 0 10px 40px -10px rgba(6, 182, 212, 0.15);
    border-radius: var(--radius-pill);
    border-color: rgba(255, 255, 255, 0.8);

    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 20%;
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), var(--accent-orange), transparent);
    opacity: 0.7;
    pointer-events: none;
}

.logo {
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--accent-teal-dark);
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.logo-img {
    width: 80px;
    height: 50px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo:hover .logo-img {
    transform: rotate(10deg) scale(1.05);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover {
    color: var(--accent-orange);
    text-shadow: 0 0 10px rgba(249, 115, 22, 0.3);
}

.lang-switch {
    background: #e2e8f0;
    border-radius: 20px;
    padding: 4px;
    display: flex;
    cursor: pointer;
    position: relative;
}

.lang-opt {
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.lang-opt.active {
    background: white;
    color: var(--accent-teal-neon);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* --- HERO SECTION --- */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    padding-top: 100px;
    padding-bottom: 60px;
}

/* RIPPLE ANIMATION */
.ripple-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid;
    border-radius: 50%;
    opacity: 0;
    animation: ripplePulse 8s infinite linear;
}

.r-1 {
    width: 300px;
    height: 300px;
    animation-delay: 0s;
    border-color: var(--accent-cyan);
    box-shadow: inset 0 0 20px rgba(6, 182, 212, 0.2);
}

.r-2 {
    width: 600px;
    height: 600px;
    animation-delay: 2s;
    border-color: var(--accent-orange);
    box-shadow: inset 0 0 20px rgba(249, 115, 22, 0.2);
}

.r-3 {
    width: 900px;
    height: 900px;
    animation-delay: 4s;
    border-color: var(--accent-cyan);
}

.r-4 {
    width: 1200px;
    height: 1200px;
    animation-delay: 6s;
    border-color: var(--accent-orange);
}

@keyframes ripplePulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }

    20% {
        opacity: 0.4;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.4);
        opacity: 0;
    }
}

/* Hero Typography */
.podcast-badge {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-orange);
    margin-bottom: 16px;
    display: inline-block;
    border: 1px solid var(--accent-orange-glow);
    padding: 6px 16px;
    border-radius: 50px;
    background: rgba(249, 115, 22, 0.05);
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 16px;
    position: relative;
    background: linear-gradient(135deg, #0f172a 30%, var(--accent-teal-dark) 70%, var(--accent-orange) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-tagline {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-teal-dark);
    margin-bottom: 32px;
    display: block;
    letter-spacing: -0.01em;
}

/* --- CHARACTER AVATARS --- */
.character-row {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    justify-content: center;
}

.char-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: white;
    border: 3px solid white;
    box-shadow: var(--glow-shadow-cyan);
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease;
}

.char-avatar:hover {
    transform: translateY(-5px) scale(1.1);
    border-color: var(--accent-orange);
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.5);
}

.char-svg {
    width: 100%;
    height: 100%;
}

.hero p.description {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 650px;
    margin-bottom: 40px;
    font-weight: 400;
}

.pill-label {
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    margin-bottom: 24px;
    color: var(--accent-teal-dark);
    font-weight: 700;
    border: 1px solid var(--accent-cyan);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
    display: inline-block;
    backdrop-filter: blur(4px);
}

.cta-group {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1rem;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent-teal-neon);
    color: #ffffff;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(20, 184, 166, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: var(--accent-cyan);
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
    color: var(--text-main);
    border: 2px solid var(--accent-orange);
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.1);
}

.btn-secondary:hover {
    background: #fff7ed;
    color: var(--accent-orange);
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.3);
    transform: translateY(-2px);
}

/* --- BENTO GRID --- */
.grid-section {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
    grid-auto-rows: minmax(200px, auto);
}

/* Base Card Style: Now defaults to Cyan Border */
.bento-card {
    background: var(--bg-card);
    /* Permanent Cyan Border */
    border: 2px solid var(--accent-cyan);
    border-radius: var(--radius-large);
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.bento-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -10px rgba(6, 182, 212, 0.15);
    /* Border color remains matched to card type on hover */
}

/* Orange Card Variant: Permanent Orange Border */
.card-orange {
    border-color: var(--accent-orange);
}

.card-orange:hover {
    border-color: var(--accent-orange);
    box-shadow: 0 20px 40px -10px rgba(249, 115, 22, 0.15);
}

.card-icon-large {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 140px;
    height: 140px;
    opacity: 0.1;
    transform: rotate(15deg);
    pointer-events: none;
    color: currentColor;
}

.card-icon-large svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.bento-card:hover .card-icon-large {
    opacity: 0.15;
}

.bento-card h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    font-weight: 700;
    position: relative;
    z-index: 2;
}

.bento-card p {
    color: var(--text-muted);
    font-size: 1rem;
    position: relative;
    z-index: 2;
    line-height: 1.6;
}

.span-4 {
    grid-column: span 4;
}

.span-6 {
    grid-column: span 6;
}

.span-8 {
    grid-column: span 8;
}

.span-12 {
    grid-column: span 12;
}

.row-2 {
    grid-row: span 2;
}

.card-feature {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(204, 251, 241, 0.8) 100%);
    border: 2px solid var(--accent-teal-neon);
    color: var(--accent-teal-dark);
}

/* Dark Card: Permanent Dark Teal Border */
.card-dark {
    background: #0f172a;
    color: white;
    border: 2px solid var(--accent-teal-dark);
}

.card-dark:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.2);
}

.card-orange-tint {
    color: var(--accent-orange);
}

.card-teal-tint {
    color: var(--accent-teal-dark);
}

/* --- EPISODE TILES --- */
.episode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 60px;
}

.episode-card {
    background: var(--bg-card);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: var(--radius-large);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.episode-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-orange);
}

.episode-img-box {
    height: 180px;
    background: linear-gradient(135deg, #e0f2fe 0%, #f0fdfa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-teal-dark);
    font-size: 3rem;
    position: relative;
}

.episode-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.episode-date {
    font-size: 0.8rem;
    color: var(--accent-orange);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.episode-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.3;
    color: #0f172a;
}

.episode-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    flex-grow: 1;
}

.play-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--accent-teal-dark);
    text-decoration: none;
    font-size: 0.9rem;
    transition: gap 0.2s ease;
}

.play-link:hover {
    gap: 12px;
    color: var(--accent-orange);
}

/* --- ABOUT SECTION --- */
.about-section {
    background: #ffffff;
    position: relative;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

/* --- FOOTER --- */
footer {
    border-top: 1px solid #e2e8f0;
    padding: 80px 0;
    margin-top: 60px;
    text-align: center;
    background: #ffffff;
    position: relative;
    z-index: 2;
}

/* --- LANGUAGE DISPLAY LOGIC --- */
[data-lang="cy"] {
    display: none;
}

body.welsh-mode [data-lang="en"] {
    display: none;
}

body.welsh-mode [data-lang="cy"] {
    display: block;
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .hero h1 {
        font-size: 3rem;
    }

    .grid-section {
        display: flex;
        flex-direction: column;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .nav-links {
        display: none;
    }

    .nav-right {
        gap: 12px;
    }

    .hero {
        padding-top: 120px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-tagline {
        font-size: 1.1rem;
    }

    .hero p.description {
        font-size: 1rem;
    }

    .bento-card {
        padding: 24px;
        min-height: auto;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .cta-group {
        flex-direction: column;
        width: 100%;
        padding: 0 20px;
    }

    .logo span {
        font-size: 0.9rem;
    }
}
