/* deepmeditate.com home, on top of dm.css */

/* Hero: a night sky over soft hills, the moon, and a few favourites drifting by */

.hero {
    overflow: hidden;
    padding: clamp(48px, 8vw, 96px) 0 0;
}

.hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero__copy .display {
    margin-top: 18px;
}

.hero__copy .lead {
    margin-top: 22px;
    max-width: 520px;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.hero__proof {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 26px;
    font-size: 15px;
    color: var(--faint);
}

.hero__stars {
    flex: none;
    white-space: nowrap;
    color: var(--gold);
    letter-spacing: 0.2em;
    font-size: 12px;
}

.hero__scene {
    position: relative;
    height: clamp(420px, 46vw, 560px);
}

.moon {
    position: absolute;
    top: 2%;
    right: 5%;
    width: clamp(150px, 16vw, 210px);
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        radial-gradient(circle at 34% 62%, rgba(132, 148, 224, 0.4) 0 11%, transparent 11.5%),
        radial-gradient(circle at 64% 34%, rgba(132, 148, 224, 0.35) 0 6.5%, transparent 7%),
        radial-gradient(circle at 36% 34%, #ffffff 0%, var(--moon) 34%, #a9b6f2 72%, #8494e0 100%);
}

/* The glow is a gradient, not a shadow: big blurred shadows can render as a lit square on phones */
.moon::before {
    content: "";
    position: absolute;
    inset: -70%;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(220, 227, 255, 0.32) 0%, rgba(140, 158, 255, 0.14) 32%, rgba(140, 158, 255, 0) 66%);
    pointer-events: none;
}

.float-card {
    position: absolute;
    width: clamp(168px, 17vw, 226px);
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--night-mid);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: drift 9s ease-in-out infinite;
}

.float-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.float-card__label {
    display: grid;
    gap: 2px;
    padding: 10px 14px 13px;
    background: rgba(12, 22, 64, 0.92);
}

.float-card__label span {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
}

.float-card__label strong {
    font-size: 15px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.float-card--1 {
    top: 36%;
    left: 0;
    transform: rotate(-5deg);
    animation-delay: -2s;
}

.float-card--2 {
    top: 52%;
    right: 3%;
    transform: rotate(4deg);
    animation-delay: -5s;
}

.float-card--3 {
    top: 1%;
    left: 9%;
    width: clamp(132px, 12vw, 164px);
    transform: rotate(3deg);
    opacity: 0.94;
    animation-delay: -7s;
}

@keyframes drift {
    0%,
    100% {
        translate: 0 0;
    }

    50% {
        translate: 0 -14px;
    }
}

.firefly {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 12px 3px rgba(255, 207, 115, 0.7);
    animation: glow 4s ease-in-out infinite;
}

.firefly--1 {
    top: 72%;
    left: 12%;
}

.firefly--2 {
    top: 18%;
    left: 8%;
    animation-delay: -1.3s;
}

.firefly--3 {
    top: 88%;
    left: 64%;
    animation-delay: -2.6s;
}

.firefly--4 {
    top: 40%;
    left: 52%;
    width: 4px;
    height: 4px;
    animation-delay: -3.4s;
}

@keyframes glow {
    0%,
    100% {
        opacity: 0.15;
        translate: 0 0;
    }

    50% {
        opacity: 1;
        translate: 6px -10px;
    }
}

.hills {
    display: block;
    position: relative;
    width: 100%;
    height: clamp(90px, 12vw, 180px);
    margin-top: -40px;
}

@media (max-width: 900px) {
    .hero__grid {
        grid-template-columns: 1fr;
    }

    .hero__scene {
        height: 360px;
        max-width: 520px;
        width: 100%;
        margin: 8px auto 0;
    }

    .float-card {
        width: 172px;
    }

    .float-card--1 {
        top: 46%;
    }

    .float-card--3 {
        width: 140px;
    }
}

@media (max-width: 480px) {
    .hero__actions .btn {
        width: 100%;
    }

    .hero__scene {
        height: 330px;
    }

    .float-card {
        width: 150px;
    }

    .float-card--1 {
        top: 46%;
    }

    .float-card--2 {
        top: 56%;
        right: 0;
    }

    .float-card--3 {
        width: 118px;
        top: 0;
        left: 4%;
    }

    .moon {
        width: 116px;
        right: 2%;
    }

    .float-card__label {
        padding: 8px 11px 10px;
    }

    .float-card__label span {
        font-size: 10px;
        letter-spacing: 0.05em;
        white-space: nowrap;
    }

    .float-card__label strong {
        font-size: 13.5px;
    }
}

/* What's inside */

.features__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: clamp(26px, 3.5vw, 40px);
    overflow: hidden;
    color: var(--ink);
    text-decoration: none;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature::before {
    content: "";
    position: absolute;
    inset: auto -30% -60% auto;
    width: 70%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, var(--glow) 0%, transparent 65%);
    opacity: 0.5;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.feature:hover {
    border-color: rgba(140, 158, 255, 0.4);
}

.feature:hover::before {
    opacity: 0.85;
}

.feature--meditate {
    --glow: rgba(123, 43, 255, 0.55);
    --tint: var(--lavender);
}

.feature--sleep {
    --glow: rgba(61, 79, 214, 0.6);
    --tint: var(--moon);
}

.feature--music {
    --glow: rgba(111, 180, 255, 0.45);
    --tint: var(--sky);
}

.feature--breathe {
    --glow: rgba(255, 207, 115, 0.35);
    --tint: var(--gold);
}

.feature__icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 8px;
    border-radius: 16px;
    background: var(--panel-strong);
    color: var(--tint);
    box-shadow: inset 0 0 0 1px var(--hairline);
}

.feature__icon svg {
    width: 26px;
    height: 26px;
}

.feature .eyebrow {
    color: var(--tint);
}

.feature__title {
    display: block;
}

.feature__copy {
    color: var(--haze);
    max-width: 440px;
}

.feature .link-arrow {
    margin-top: auto;
    padding-top: 8px;
}

@media (max-width: 760px) {
    .features__grid {
        grid-template-columns: 1fr;
    }
}

/* Rows from the library */

.library .shelf + .shelf {
    margin-top: clamp(40px, 6vw, 64px);
}

.library .section-head .eyebrow + .h3 {
    margin-top: 8px;
}

/* A breath, right on the page */

.breathe-teaser {
    background:
        radial-gradient(60% 70% at 25% 50%, rgba(61, 79, 214, 0.22) 0%, rgba(7, 12, 36, 0) 70%);
}

.breathe-teaser__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: clamp(32px, 6vw, 80px);
    align-items: center;
}

.breathe-teaser .h2 {
    margin-top: 12px;
}

.breathe-teaser .lead {
    margin-top: 18px;
}

.breathe-teaser__patterns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0 30px;
}

.orb {
    position: relative;
    display: grid;
    place-items: center;
    width: min(100%, 380px);
    aspect-ratio: 1;
    margin: 0 auto;
}

.orb__ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(140, 158, 255, 0.25);
    background: radial-gradient(circle, rgba(140, 158, 255, 0.1) 0%, rgba(140, 158, 255, 0) 70%);
}

.orb__core {
    position: absolute;
    width: 46%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 32%, #ffffff 0%, var(--moon) 22%, var(--accent) 62%, var(--accent-deep) 100%);
    box-shadow: 0 0 60px 10px rgba(140, 158, 255, 0.35), 0 0 140px 50px rgba(123, 43, 255, 0.18);
    animation: orb-breathe 10s ease-in-out infinite;
}

.orb__words {
    position: relative;
    display: grid;
    font-family: var(--serif);
    font-size: clamp(24px, 3vw, 30px);
    font-style: italic;
    color: var(--night);
}

.orb__words span {
    grid-area: 1 / 1;
    text-align: center;
    animation: words-in 10s ease-in-out infinite;
}

.orb__words span + span {
    animation-name: words-out;
}

@keyframes orb-breathe {
    0%,
    100% {
        transform: scale(0.72);
    }

    45%,
    55% {
        transform: scale(1.55);
    }
}

@keyframes words-in {
    0%,
    42% {
        opacity: 1;
    }

    50%,
    92% {
        opacity: 0;
    }
}

@keyframes words-out {
    0%,
    42% {
        opacity: 0;
    }

    50%,
    92% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@media (max-width: 800px) {
    .breathe-teaser__grid {
        grid-template-columns: 1fr;
    }

    .orb {
        width: min(80%, 320px);
    }
}

/* A fresh ritual, every day */

.ritual .section-head .lead {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

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

.ritual__card {
    position: relative;
    overflow: hidden;
    padding: 0 26px 26px;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(242, 244, 255, 0.06) 0%, rgba(242, 244, 255, 0.02) 100%);
}

.ritual__sky {
    position: relative;
    height: 120px;
    margin: 0 -26px 22px;
    background: var(--sky-gradient);
}

.ritual__sky span {
    position: absolute;
    left: 50%;
    bottom: -26px;
    width: 72px;
    height: 72px;
    margin-left: -36px;
    border-radius: 50%;
    background: var(--orb);
    box-shadow: 0 0 40px 8px var(--orb-glow);
}

.ritual__card--morning {
    --sky-gradient: linear-gradient(180deg, #2a2f7a 0%, #8f6ac6 55%, #f2a97f 100%);
    --orb: radial-gradient(circle at 40% 35%, #fff4d6, #ffcf73);
    --orb-glow: rgba(255, 207, 115, 0.55);
}

.ritual__card--afternoon {
    --sky-gradient: linear-gradient(180deg, #1d4fa8 0%, #4f8de0 60%, #9fd0ff 100%);
    --orb: radial-gradient(circle at 40% 35%, #ffffff, #fff1c1);
    --orb-glow: rgba(255, 241, 193, 0.6);
}

.ritual__card--evening {
    --sky-gradient: linear-gradient(180deg, #0c1640 0%, #2b2a8a 60%, #7b2bff 100%);
    --orb: radial-gradient(circle at 36% 34%, #ffffff, var(--moon) 40%, #a9b6f2);
    --orb-glow: rgba(220, 227, 255, 0.45);
}

.ritual__card .h3 {
    margin-top: 6px;
}

.ritual__card > p {
    margin-top: 8px;
    color: var(--haze);
    font-size: 16px;
}

.ritual__items {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.ritual__items a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: var(--radius-sm);
    background: var(--panel);
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.ritual__items a:hover {
    background: var(--panel-strong);
}

.ritual__thumb {
    flex: none;
    width: 52px;
    height: 52px;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--night-top), var(--night-mid));
}

.ritual__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ritual__items strong {
    display: block;
    font-size: 15.5px;
    line-height: 1.3;
}

.ritual__items small {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    color: var(--faint);
}

@media (max-width: 900px) {
    .ritual__grid {
        grid-template-columns: 1fr;
        max-width: 520px;
        margin: 0 auto;
    }
}

/* Numbers */

.stats-band__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 28px;
    padding: clamp(28px, 4vw, 44px) 0;
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
    text-align: center;
}

.stats-band__list strong {
    display: block;
    font-family: var(--serif);
    font-size: clamp(44px, 5vw, 60px);
    font-weight: 600;
    line-height: 1;
    color: var(--moon);
}

.stats-band__list span {
    display: block;
    margin-top: 8px;
    color: var(--haze);
}

/* Questions */

.questions__grid {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: clamp(32px, 6vw, 80px);
    align-items: start;
}

.questions .h2 {
    margin-top: 12px;
}

.questions .lead {
    margin-top: 18px;
}

.questions .lead a {
    color: var(--accent);
}

@media (max-width: 860px) {
    .questions__grid {
        grid-template-columns: 1fr;
    }
}

.also-on {
    margin: -12px 0 48px;
    text-align: center;
    font-size: 14px;
    color: var(--faint);
}

.also-on a {
    color: var(--haze);
}

@media (prefers-reduced-motion: reduce) {
    .orb__core {
        transform: scale(1.1);
    }

    .orb__words span + span {
        display: none;
    }
}
