:root {
    --bg: #0b1220;
    --surface: #121c31;
    --surface-2: #1c2740;
    --text: #f4f8ff;
    --muted: #a9b3cc;
    --primary: #3dd6c3;
    --primary-dark: #7ed4ff;
    --accent: #c9a7ff;
    --radius: 1rem;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    --font-heading: "Poppins", "Montserrat", sans-serif;
    --font-body: "Inter", "Montserrat", sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.6;
}
body.player-open {
    overflow: hidden;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    line-height: 1.25;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover {
    transform: translateY(-2px);
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #06131f;
    box-shadow: 0 10px 25px rgba(111, 216, 199, 0.25);
}
/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 2rem;
    background: rgba(11, 17, 32, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.brand {
    text-decoration: none;
    display: flex;
    align-items: center;
}
.brand-logo {
    width: clamp(10rem, 20vw, 14rem);
    height: auto;
}
.site-nav {
    display: flex;
    gap: 1.5rem;
}
.site-nav a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}
.site-nav a:hover {
    color: var(--text);
}
/* ---------- Hero ---------- */
.hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 3rem;
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.eyebrow {
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1.25rem;
}
.lede {
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 42ch;
    margin-bottom: 2rem;
}
.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.hero-art {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    aspect-ratio: 4 / 3;
}
.hero-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- Sections ---------- */
main section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}
main section h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.core-message {
    padding-top: 2rem;
    padding-bottom: 2rem;
}
.core-message__inner {
    max-width: 880px;
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 3.5rem);
    text-align: center;
    background: linear-gradient(145deg, rgba(28, 39, 64, 0.94), rgba(18, 28, 49, 0.94));
    border: 1px solid rgba(61, 214, 195, 0.2);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.core-message__inner .eyebrow {
    margin-bottom: 0.75rem;
}
.core-message__inner h2 {
    max-width: 24ch;
    margin-inline: auto;
}
.core-message__inner p:not(.eyebrow) {
    max-width: 66ch;
    margin: 0.85rem auto 0;
    color: var(--muted);
}
.core-message__inner .core-message__closing {
    margin-top: 1.35rem;
    color: var(--text);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.05rem;
}
.section-intro {
    max-width: 66ch;
    margin: -0.5rem auto 2rem;
    color: var(--muted);
    text-align: center;
}

/* ---------- Category chips & catalog ---------- */
.chip-row {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2rem;
}
.chip {
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}
.chip:hover {
    color: var(--text);
    border-color: var(--primary);
}
.chip.is-active {
    background: var(--primary);
    color: #06131f;
    border-color: var(--primary);
    font-weight: 600;
}
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
    max-width: 860px;
    margin-inline: auto;
}
.catalog-loading {
    color: var(--muted);
    text-align: center;
    grid-column: 1 / -1;
}
.meditation-card {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.meditation-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}
.meditation-card__image {
    height: 140px;
    overflow: hidden;
}
.meditation-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.meditation-card__body {
    padding: 1.1rem 1.25rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}
.meditation-card__tag {
    font-size: 0.75rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}
.meditation-card__title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
}
.meditation-card__desc {
    color: var(--muted);
    font-size: 0.9rem;
    flex: 1;
}
.meditation-card__lock {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(0, 0, 0, 0.55);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    max-width: calc(100% - 1.5rem);
}

/* ---------- Support & footer ---------- */
.support {
    padding-top: 4rem;
    padding-bottom: 5rem;
}
.support-card {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(1.25rem, 3vw, 2.5rem);
    max-width: 920px;
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    overflow: hidden;
    background: linear-gradient(145deg, rgba(28, 39, 64, 0.72), rgba(18, 28, 49, 0.9));
    border: 1px solid rgba(61, 214, 195, 0.14);
    border-radius: var(--radius);
}
.support-mark {
    position: relative;
    width: 3.5rem;
    aspect-ratio: 1;
    border: 1px solid rgba(61, 214, 195, 0.35);
    border-radius: 50%;
}
.support-mark::before,
.support-mark::after {
    content: "";
    position: absolute;
    background: var(--primary);
    opacity: 0.75;
}
.support-mark::before {
    width: 1.35rem;
    height: 0.7rem;
    left: 0.75rem;
    top: 1.15rem;
    border-radius: 100% 0 100% 0;
    transform: rotate(-28deg);
}
.support-mark::after {
    width: 1px;
    height: 1.25rem;
    left: 1.7rem;
    top: 1.35rem;
    transform: rotate(32deg);
}
.support-copy .eyebrow {
    margin-bottom: 0.4rem;
}
.support-copy h2 {
    margin-bottom: 0.65rem;
    text-align: left;
    font-size: clamp(1.25rem, 2.4vw, 1.6rem);
}
.support-copy > p:not(.eyebrow) {
    color: var(--muted);
    max-width: 58ch;
}
.support-copy .support-note {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}
.btn-support {
    flex-shrink: 0;
    color: var(--text);
    background: rgba(61, 214, 195, 0.08);
    border-color: rgba(61, 214, 195, 0.45);
    white-space: nowrap;
}
.btn-support:hover,
.btn-support:focus-visible {
    background: rgba(61, 214, 195, 0.16);
    border-color: var(--primary);
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem clamp(1.25rem, 4vw, 2rem);
    color: var(--muted);
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.site-footer > p {
    max-width: 56ch;
}
.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.site-footer .footer-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 2.75rem;
    padding: 0.5rem 0.85rem;
    color: var(--primary);
    border: 1px solid rgba(61, 214, 195, 0.22);
    border-radius: 999px;
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.footer-icon {
    display: block;
    width: 1.35rem;
    height: 1.35rem;
    flex: 0 0 auto;
    background: currentColor;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
}
.footer-icon--youtube {
    -webkit-mask-image: url("../icons/youtube.png");
    mask-image: url("../icons/youtube.png");
}
.footer-icon--matcha {
    -webkit-mask-image: url("../icons/coffee.png");
    mask-image: url("../icons/coffee.png");
}
.footer-link__arrow {
    color: var(--muted);
    font-size: 0.8rem;
    transition: color 0.2s ease, transform 0.2s ease;
}
.site-footer .footer-link:hover,
.site-footer .footer-link:focus-visible {
    color: var(--text);
    background: rgba(61, 214, 195, 0.08);
    border-color: rgba(61, 214, 195, 0.55);
    transform: translateY(-2px);
}
.footer-link:hover .footer-link__arrow,
.footer-link:focus-visible .footer-link__arrow {
    color: var(--primary);
    transform: translate(1px, -1px);
}

/* ---------- Player overlay (built on the original circular-timer design) ---------- */
.player-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(4, 8, 16, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.player-overlay[hidden] {
    display: none;
}
.player-overlay .player-panel {
    position: relative;
    width: min(560px, 100%);
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    overflow-x: hidden;
    overflow-y: auto;
    isolation: isolate;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.player-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 2;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    width: 44px;
    height: 44px;
    cursor: pointer;
    font-size: 1rem;
}
.player-title {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 3rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Time-select pills let the user choose a session length before playing */
#time-select {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}
#time-select button {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 999px;
    min-height: 44px;
    padding: 0.5rem 0.9rem;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}
#time-select button:hover,
#time-select button.is-active {
    color: #06131f;
    background: var(--primary);
    border-color: var(--primary);
}
/* The circular timer sits centered inside the player panel */
.player-container {
    position: relative;
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    z-index: 1;
}
.timer-ring {
    position: relative;
    display: grid;
    place-items: center;
    width: clamp(10rem, 48vw, 14rem);
    aspect-ratio: 1;
    flex: 0 0 auto;
}
.timer-ring svg {
    position: absolute;
    inset: 0;
    height: 100%;
    width: 100%;
    transform: rotate(-90deg);
    pointer-events: none;
}
.timer-ring svg circle {
    transition: all 0.2s ease-in-out;
}
.time-display {
    color: var(--text);
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: clamp(1.5rem, 7vw, 2rem);
    font-weight: 600;
    font-family: var(--font-heading);
    line-height: 1.15;
}
.time-label {
    margin-top: 0.25rem;
    color: var(--muted);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.transport-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}
.player-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    background: rgba(4, 8, 16, 0.72);
    cursor: pointer;
}
.player-control img {
    pointer-events: none;
    object-fit: contain;
}
.player-play {
    width: 64px;
    height: 64px;
}
.player-play__icon {
    position: relative;
    display: block;
    width: 30px;
    height: 30px;
}
.player-play__icon::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 7px;
    width: 0;
    height: 0;
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
    border-left: 18px solid #fff;
}
.player-play.is-playing .player-play__icon::before {
    top: 4px;
    left: 5px;
    width: 6px;
    height: 22px;
    border: 0;
    background: #fff;
    box-shadow: 14px 0 0 #fff;
}
.player-replay {
    width: 52px;
    height: 52px;
}
.player-replay img {
    width: 26px;
    height: 26px;
}
.player-close:hover,
.player-close:focus-visible,
.player-control:hover,
.player-control:focus-visible,
#time-select button:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}
.player-error {
    width: min(100%, 30rem);
    padding: 0.65rem 0.8rem;
    border-radius: 0.5rem;
    background: rgba(90, 8, 8, 0.82);
    color: #ffe1e1;
    text-align: center;
    font-size: 0.9rem;
}
/* Decorative backdrop image behind the player controls */
.player-completion {
    width: min(100%, 28rem);
    padding: 1rem 1.15rem;
    text-align: center;
    background: rgba(4, 8, 16, 0.68);
    border: 1px solid rgba(61, 214, 195, 0.22);
    border-radius: 0.75rem;
}
.player-completion__rest {
    color: var(--text);
    font-family: var(--font-heading);
    font-weight: 600;
}
.player-completion__support {
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.82rem;
}
.player-completion__link {
    display: inline-block;
    margin-top: 0.6rem;
    color: var(--primary);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    text-underline-offset: 0.22em;
}
.player-completion[hidden] {
    display: none;
}

.player-panel .backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.35;
    pointer-events: none;
}
.player-panel .backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 3rem 1.5rem;
    }
    .hero-art {
        order: -1;
    }
}
@media (max-width: 640px) {
    .site-header {
        padding: 1rem;
    }
    .site-nav {
        display: none;
    }
    .support-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .support-mark {
        margin-inline: auto;
    }
    .support-copy h2 {
        text-align: center;
    }
    .btn-support {
        justify-self: center;
    }
    .site-footer {
        justify-content: center;
        text-align: center;
    }
    .footer-links {
        width: 100%;
    }
    main section {
        padding: 2.5rem 1.25rem;
    }
    .player-overlay {
        align-items: flex-start;
        padding: max(0.75rem, env(safe-area-inset-top)) 0.75rem max(0.75rem, env(safe-area-inset-bottom));
    }
    .player-overlay .player-panel {
        max-height: calc(100vh - 1.5rem);
        max-height: calc(100dvh - 1.5rem);
        padding: 1rem 0.75rem;
        gap: 0.75rem;
    }
    .player-title {
        font-size: 1.05rem;
        padding-inline: 2.75rem;
    }
}
@media (max-height: 620px) {
    .player-overlay .player-panel {
        gap: 0.5rem;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
    .timer-ring {
        width: clamp(7.5rem, 28vh, 10rem);
    }
    .player-play {
        width: 52px;
        height: 52px;
    }
    .player-play img {
        width: 32px;
        height: 32px;
    }
}

