:root {
    --primary: #0F6E56;
    --secondary: #085041;
    --accent: #8F5A0E;
    --accent-strong: #7A4A0B;
    --background: #F1EFE8;
    --surface: #FFFFFF;
    --text-primary: #2C2C2A;
    --text-muted: #5F5E5A;
    --border: #D3D1C7;
    --hover-overlay: rgba(15,110,86,0.08);
    --shadow: 0 2px 8px rgba(44,44,42,0.08);
    --shadow-elevated: 0 6px 16px rgba(44,44,42,0.14);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100%;
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text-primary);
    background:
        radial-gradient(circle at top left, rgba(15, 110, 86, 0.16), transparent 34rem),
        linear-gradient(135deg, rgba(15, 110, 86, 0.14) 0, rgba(15, 110, 86, 0.05) 42rem, var(--background) 100%);
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    content: "";
    background-image:
        linear-gradient(30deg, rgba(15, 110, 86, 0.03) 12%, transparent 12.5%, transparent 87%, rgba(15, 110, 86, 0.03) 87.5%, rgba(15, 110, 86, 0.03)),
        linear-gradient(150deg, rgba(15, 110, 86, 0.03) 12%, transparent 12.5%, transparent 87%, rgba(15, 110, 86, 0.03) 87.5%, rgba(15, 110, 86, 0.03));
    background-size: 64px 112px;
    opacity: 0.22;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
}

.header-container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: center;
    width: min(100%, 1200px);
    min-height: 72px;
    padding: 12px 64px;
    margin: 0 auto;
}

.brand {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    font-family: "Poppins", sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--secondary);
    white-space: nowrap;
}

.brand-mark {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    color: var(--surface);
    background: var(--primary);
    border-radius: 50%;
}

.group-identity {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    justify-content: center;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-muted);
}

.group-identity span:not(:last-child)::after {
    margin-left: 12px;
    color: var(--border);
    content: "·";
}

.mode-toggle {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: var(--shadow);
}

.mode-button {
    min-width: 76px;
    min-height: 44px;
    padding: 8px 14px;
    font: 600 16px/1 "Inter", sans-serif;
    color: var(--text-muted);
    cursor: pointer;
    background: transparent;
    border: 0;
    border-radius: 999px;
    transition: color 150ms ease-out, background 150ms ease-out, box-shadow 150ms ease-out;
}

.mode-button:hover {
    color: var(--primary);
    background: var(--hover-overlay);
}

.mode-button.is-active {
    color: var(--primary);
    background: rgba(15, 110, 86, 0.12);
    box-shadow: inset 0 0 0 1px rgba(15, 110, 86, 0.28);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
    gap: 64px;
    align-items: center;
    width: min(100%, 1200px);
    min-height: calc(100vh - 72px);
    padding: 64px;
    margin: 0 auto;
}

.hero-content {
    max-width: 620px;
}

.eyebrow {
    margin: 0 0 16px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--accent);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-family: "Poppins", sans-serif;
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

.hero-copy {
    max-width: 560px;
    margin: 24px 0 0;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin-top: 32px;
}

.primary-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    color: var(--surface);
    background: var(--primary);
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: background 150ms ease-out, box-shadow 150ms ease-out, transform 150ms ease-out;
}

.primary-cta::after {
    margin-left: 8px;
    content: "›";
}

.primary-cta:hover {
    background: var(--secondary);
    box-shadow: var(--shadow-elevated);
    transform: translateY(-1px);
}

.video-cta {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    min-height: 44px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #FFFFFF;
    background: #CC0000;
    border: 0;
    border-radius: 8px;
    text-decoration: none;
    transition: background 150ms ease-out;
}
.video-cta:hover {
    background: #990000;
}

.active-mode-badge {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(186, 117, 23, 0.18);
    border: 1px solid rgba(186, 117, 23, 0.45);
    border-radius: 999px;
    transition: opacity 200ms ease-out, transform 200ms ease-out;
}

.active-mode-badge.is-changing {
    opacity: 0;
    transform: translateY(4px);
}

.trust-badge {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 24px 0 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-muted);
}

.trust-badge span {
    display: grid;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    place-items: center;
    color: var(--surface);
    background: var(--primary);
    border-radius: 50%;
}

.hero-visual {
    animation: heroIn 400ms ease-out both;
}

.prayer-card {
    position: relative;
    display: grid;
    min-height: 440px;
    overflow: hidden;
    place-items: center;
    background: linear-gradient(180deg, #FFFFFF 0%, #F8F5EC 100%);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.prayer-photo {
    width: 100%;
    height: 100%;
    min-height: 440px;
    object-fit: cover;
}

.visual-caption {
    position: absolute;
    right: 24px;
    bottom: 24px;
    margin: 0;
    padding: 4px 10px;
    font-size: 13px;
    color: var(--text-muted);
    background: rgba(255,255,255,0.85);
    border-radius: 6px;
    backdrop-filter: blur(4px);
}

.movement-page {
    width: min(100%, 1200px);
    padding: 32px 16px 48px;
    margin: 0 auto;
}

.movement-intro {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
}

.movement-copy {
    max-width: 640px;
    margin: 16px 0 0;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-muted);
}

.movement-shell {
    min-height: 320px;
}

.movement-grid {
    display: grid;
    gap: 16px;
    opacity: 1;
    transition: opacity 200ms ease-in-out;
}

.movement-grid.is-changing {
    opacity: 0.35;
}

.movement-card {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 16px;
    align-items: center;
    min-height: 120px;
    padding: 16px;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: box-shadow 150ms ease-out, transform 150ms ease-out, background 150ms ease-out;
}

.movement-card:hover {
    background: var(--surface);
    box-shadow: var(--shadow-elevated);
    transform: translateY(-2px);
}

.movement-card:active {
    transform: scale(0.98);
    transition-duration: 100ms;
}

.movement-thumb {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: #ffffff;
    border-radius: 10px;
}

.movement-card-body {
    display: grid;
    gap: 8px;
}

/* WCAG contrast: var(--background) on var(--accent-strong) = 6.49:1 */
.movement-order {
    display: inline-grid;
    width: 28px;
    height: 28px;
    place-items: center;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    color: var(--background);
    background: var(--accent-strong);
    border-radius: 999px;
}

.movement-name {
    margin: 0;
    font-family: "Poppins", sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.movement-description {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-muted);
}

.movement-chevron {
    font-size: 24px;
    line-height: 1;
    color: var(--text-muted);
}

.movement-state {
    display: grid;
    min-height: 320px;
    padding: 32px;
    place-items: center;
    text-align: center;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.56);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.movement-state strong {
    display: block;
    margin-bottom: 8px;
    font-family: "Poppins", sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.movement-state-icon {
    margin-bottom: 16px;
    font-size: 40px;
    color: var(--text-muted);
}

.skeleton-card {
    min-height: 120px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.skeleton-card,
.skeleton-thumb,
.skeleton-line {
    position: relative;
    overflow: hidden;
}

.skeleton-card::after,
.skeleton-thumb::after,
.skeleton-line::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(90deg, transparent, #F1EFE8, transparent);
    animation: shimmer 1.2s linear infinite;
    transform: translateX(-100%);
}

.skeleton-layout {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 16px;
    align-items: center;
}

.skeleton-thumb {
    width: 80px;
    height: 80px;
    background: #E8E6DE;
    border-radius: 10px;
}

.skeleton-content {
    display: grid;
    gap: 10px;
}

.skeleton-line {
    height: 14px;
    background: #E8E6DE;
    border-radius: 999px;
}

.skeleton-line.short {
    width: 40%;
}

.skeleton-line.medium {
    width: 72%;
}

@keyframes shimmer {
    to {
        transform: translateX(100%);
    }
}

@keyframes heroIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 1025px) {
    .movement-page {
        padding: 48px 64px 64px;
    }

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

    .movement-card,
    .skeleton-layout {
        grid-template-columns: 1fr;
    }

    .movement-thumb,
    .skeleton-thumb {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .movement-chevron {
        justify-self: end;
    }
}

@media (max-width: 1024px) {
    .header-container {
        grid-template-columns: 1fr auto;
        padding: 12px 32px;
    }

    .group-identity {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: flex-start;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 32px;
    }

    .hero-visual {
        order: -1;
    }

    .prayer-card {
        min-height: 320px;
    }

    .movement-page {
        padding: 32px;
    }

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

    .movement-card,
    .skeleton-layout {
        grid-template-columns: 1fr;
    }

    .movement-thumb,
    .skeleton-thumb {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .movement-chevron {
        justify-self: end;
    }
}

@media (max-width: 480px) {
    body[data-page="detail-gerakan"] {
        padding-bottom: 88px;
    }

    .header-container {
        gap: 12px;
        padding: 8px 16px;
    }

    .brand {
        font-size: 16px;
    }

    .group-identity {
        display: block;
        overflow: hidden;
        font-size: 12px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .group-identity span:not(:first-child) {
        display: none;
    }

    .group-identity span::after {
        display: none;
    }

    .mode-toggle {
        width: 100%;
        grid-column: 1 / -1;
    }

    .mode-button {
        flex: 1;
    }

    .hero {
        min-height: auto;
        padding: 24px 16px 32px;
    }

    .movement-page {
        padding: 24px 16px 32px;
    }

    .movement-intro {
        display: grid;
    }

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

    .movement-card,
    .skeleton-layout {
        grid-template-columns: 80px 1fr auto;
    }

    .movement-thumb,
    .skeleton-thumb {
        width: 80px;
        height: 80px;
        aspect-ratio: auto;
    }

    .movement-description {
        display: none;
    }

    .prayer-card {
        min-height: 260px;
    }

    .prayer-photo {
        min-height: 260px;
    }

    .hero-actions {
        margin-top: 24px;
    }

    .primary-cta {
        position: fixed;
        right: 16px;
        bottom: 16px;
        left: 16px;
        z-index: 9;
        width: auto;
    }
}
