/* Mara Hymns gateway: a glass-style page that lets visitors pick the website
   or the Android app. */

:root {
    --bg: #0c1a24;
    --gold: #e3b765;
    --gold-strong: #f0c97c;
    --ink: #ffffff;
    --soft: rgba(255, 255, 255, .74);
    --edge: rgba(255, 255, 255, .24);
    --glass: rgba(255, 255, 255, .09);
    --navy: #162b3a;
    --focus: rgba(240, 201, 124, .9);
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
    position: relative;
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    min-height: 100dvh;
    color: var(--ink);
    font-family: Arial, sans-serif;
    background: var(--bg);
    overflow-x: hidden;
}

/* Soft coloured light behind the glass, so the blur has something to refract. */
.backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: linear-gradient(160deg, #0f2230 0%, #0c1a24 60%, #0a1620 100%);
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .75;
    animation: drift 26s ease-in-out infinite alternate;
}

.blob-gold {
    top: -12%;
    left: -8%;
    width: min(60vw, 560px);
    height: min(60vw, 560px);
    background: radial-gradient(circle, #c99138 0%, transparent 68%);
}

.blob-teal {
    right: -12%;
    bottom: -16%;
    width: min(70vw, 680px);
    height: min(70vw, 680px);
    background: radial-gradient(circle, #2f7fa3 0%, transparent 68%);
    animation-duration: 32s;
}

.blob-rose {
    top: 38%;
    left: 42%;
    width: min(40vw, 380px);
    height: min(40vw, 380px);
    background: radial-gradient(circle, #8a4f7d 0%, transparent 70%);
    opacity: .4;
    animation-duration: 38s;
}

@keyframes drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(5%, 7%, 0) scale(1.12); }
}

.stage {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(100%, 1040px);
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    padding: clamp(28px, 6vw, 64px) 20px 24px;
}

/* ---- Heading ---- */

.hero {
    max-width: 640px;
    margin: 0 auto clamp(26px, 4vw, 44px);
    text-align: center;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--gold-strong);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

h1 {
    margin: 0 0 14px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 5.4vw, 3.2rem);
    font-weight: normal;
    line-height: 1.12;
    letter-spacing: .005em;
}

.lede {
    margin: 0;
    color: var(--soft);
    font-size: clamp(1rem, 2vw, 1.12rem);
    line-height: 1.55;
}

/* ---- Two choices ---- */

.choices {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    align-items: stretch;
}

.panel {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 30px 28px 28px;
    border: 1px solid var(--edge);
    border-radius: 30px;
    background:
        linear-gradient(150deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .05) 60%),
        rgba(30, 58, 76, .4);
    -webkit-backdrop-filter: blur(26px) saturate(170%);
    backdrop-filter: blur(26px) saturate(170%);
    box-shadow:
        0 30px 70px rgba(3, 12, 18, .45),
        inset 0 1px 0 rgba(255, 255, 255, .42),
        inset 0 -1px 0 rgba(255, 255, 255, .07);
}

/* Browsers without backdrop-filter get a solid panel so text stays readable. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .panel { background: #22394a; }
}

.hint {
    position: absolute;
    top: 18px;
    right: 18px;
    padding: 5px 11px;
    border: 1px solid rgba(240, 201, 124, .55);
    border-radius: 999px;
    background: rgba(240, 201, 124, .16);
    color: var(--gold-strong);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.hint[hidden] { display: none; }

/* On an app card the tag sits inline above the app name instead of in a corner. */
.hint-app {
    position: static;
    align-self: flex-start;
    margin-bottom: 12px;
    white-space: nowrap;
}

.hint-app[hidden] { display: none; }

.panel-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 18px;
    border: 1px solid var(--edge);
    border-radius: 16px;
    background: rgba(255, 255, 255, .12);
}

.panel-icon svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: var(--gold-strong);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.panel-label {
    margin: 0 0 6px;
    color: var(--soft);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

h2 {
    margin: 0 0 10px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.45rem, 3vw, 1.8rem);
    font-weight: normal;
    line-height: 1.2;
}

.panel-text {
    margin: 0 0 18px;
    color: var(--soft);
    font-size: .96rem;
    line-height: 1.55;
}

.ticks {
    flex: 1 1 auto;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.ticks li {
    position: relative;
    padding: 6px 0 6px 28px;
    font-size: .94rem;
}

.ticks li::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 50%;
    width: 7px;
    height: 12px;
    border: solid var(--gold-strong);
    border-width: 0 2px 2px 0;
    transform: translateY(-62%) rotate(40deg);
}

/* ---- Buttons ---- */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 24px;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .2s ease;
}

.button-solid {
    background: #ffffff;
    color: var(--navy);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .3);
}

.button-solid:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, .38);
}

.button-solid:hover svg { transform: translateX(3px); }

/* ---- App cards ---- */

.apps {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.app {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px;
    border: 1px solid var(--edge);
    border-radius: 22px;
    background: var(--glass);
}

.app-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.app-icon {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: #000;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .38);
}

.app-title { min-width: 0; }

.app-name {
    margin: 0 0 8px;
    font-family: Arial, sans-serif;
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.25;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.chips li {
    padding: 3px 10px;
    border: 1px solid rgba(240, 201, 124, .5);
    border-radius: 999px;
    background: rgba(240, 201, 124, .13);
    color: var(--gold-strong);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
}

.app-desc {
    margin: 0 0 14px;
    color: var(--ink);
    font-size: .95rem;
    line-height: 1.55;
}

.app-features {
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}

.app-features li {
    position: relative;
    padding: 5px 0 5px 22px;
    color: var(--soft);
    font-size: .88rem;
    line-height: 1.45;
}

.app-features li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: .95em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold-strong);
}

.app-note {
    flex: 1 1 auto;
    margin: 0 0 18px;
    padding-top: 12px;
    border-top: 1px solid var(--edge);
    color: var(--soft);
    font-size: .8rem;
    line-height: 1.5;
}

.play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 14px;
    background: #ffffff;
    color: var(--navy);
    font-size: .94rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .28);
    transition: transform .2s ease, box-shadow .2s ease;
}

.play:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, .36);
}

.play svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---- Footer ---- */

.footer {
    margin-top: auto;
    padding-top: 36px;
    color: var(--soft);
    font-size: .82rem;
    text-align: center;
}

.footer a { color: inherit; text-underline-offset: 3px; }
.footer a:hover { color: var(--ink); }

a:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

/* ---- Wide screens: website banner on top, the two apps side by side ---- */

@media (min-width: 861px) {
    .choices { gap: 22px; }

    .panel-web {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        column-gap: 40px;
        align-items: start;
    }

    .panel-web > * { grid-column: 1; }

    .panel-web .button {
        grid-column: 2;
        grid-row: 1 / span 6;
        align-self: center;
        min-width: 230px;
    }

    .panel-web .panel-text { max-width: 46em; }

    .panel-web .ticks {
        display: flex;
        flex-wrap: wrap;
        gap: 4px 26px;
        margin-bottom: 0;
    }

    .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- Small screens ---- */

@media (max-width: 860px) {
    /* On an Android phone the app is the likelier choice: show it first. */
    .is-android .panel-app { order: -1; }

    .ticks { flex: 0 0 auto; }
}

@media (max-width: 520px) {
    .stage { padding: 28px 14px 20px; }
    .panel { padding: 26px 18px 20px; border-radius: 26px; }
    .hint { top: 14px; right: 14px; }
    .app { padding: 16px; }
    .button,
    .play { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .blob { animation: none; }
    .play,
    .button,
    .button svg { transition: none; }
    .play:hover,
    .button-solid:hover { transform: none; }
}
