:root {
    color-scheme: light;
    --paper: #fbf4f1;
    --stone: #f2dfd6;
    --ink: #3d2c32;
    --muted: #6b5961;
    --sunset: #e39b8f;
    --leaf: #7aa08b;
    --accent: #c77a92;
    --bs-body-bg: var(--paper);
    --bs-body-color: var(--ink);
    --bs-primary: var(--accent);
    --bs-primary-rgb: 199, 122, 146;
    --bs-dark: #4a3439;
    --bs-dark-rgb: 74, 52, 57;
}

body {
    font-family: "Work Sans", sans-serif;
    background: radial-gradient(circle at top, #fff8f5 0%, var(--paper) 48%, #f1e2da 100%);
    color: var(--ink);
    min-height: 100vh;
}

p:not(.card-text):not(.tile-soft p):not(.step-soft p),
.lead {
    text-align: justify;
}

.card-body p,
.tile-soft p,
.step-soft p {
    text-align: left;
}

.font-display {
    font-family: "Cormorant Garamond", serif;
}

.bg-cream {
    background-color: var(--paper);
}

.text-ink {
    color: var(--ink);
}

.bg-sand {
    background-color: var(--stone);
}

.bg-olive {
    background-color: rgba(122, 160, 139, 0.14);
}

.ambient-shape {
    position: fixed;
    border-radius: 999px;
    opacity: 0.55;
    pointer-events: none;
    mix-blend-mode: multiply;
    animation: float 16s ease-in-out infinite;
    z-index: 0;
}

.ambient-shape--one {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(227, 155, 143, 0.45), transparent 70%);
    top: -80px;
    left: -80px;
}

.ambient-shape--two {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(122, 160, 139, 0.35), transparent 70%);
    bottom: -120px;
    right: -120px;
    animation-delay: -6s;
}

.accent-label {
    color: var(--accent);
    letter-spacing: 0.18em;
    font-weight: 600;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(18px);
    }
}

.skip-link {
    position: absolute;
    left: 16px;
    top: 10px;
    background: var(--ink);
    color: var(--paper);
    padding: 8px 14px;
    border-radius: 999px;
    transform: translateY(-200%);
    transition: transform 0.2s ease;
    z-index: 10;
}

.skip-link:focus {
    transform: translateY(0);
}

/* Focus states for accessibility */
a:focus,
button:focus,
.btn:focus,
.nav-link:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(199, 122, 146, 0.25);
}

.card-soft:focus-within {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.section-divider {
    position: relative;
}

.section-divider::after {
    content: "";
    display: block;
    height: 1px;
    margin-top: 28px;
    background: linear-gradient(90deg, transparent 0%, rgba(199, 122, 146, 0.35) 45%, transparent 100%);
}

.border-warning-subtle {
    border-color: rgba(199, 122, 146, 0.25) !important;
}

.card-soft {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-soft:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 35px rgba(61, 44, 50, 0.12);
}

.tile-soft,
.step-soft {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.devocional-figure {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    box-shadow: 0 18px 35px rgba(61, 44, 50, 0.12);
}

.devocional-image {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 10px 24px rgba(61, 44, 50, 0.14);
    object-fit: cover;
}

.tile-soft:hover,
.step-soft:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 30px rgba(61, 44, 50, 0.12);
}

.btn-primary {
    --bs-btn-bg: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-bg: #b86b84;
    --bs-btn-hover-border-color: #b86b84;
    --bs-btn-active-bg: #a95f76;
    --bs-btn-active-border-color: #a95f76;
    --bs-btn-focus-shadow-rgb: 199, 122, 146;
    color: #fff;
}

.btn-outline-primary {
    --bs-btn-color: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-bg: var(--accent);
    --bs-btn-hover-border-color: var(--accent);
    --bs-btn-active-bg: #b86b84;
    --bs-btn-active-border-color: #b86b84;
    --bs-btn-focus-shadow-rgb: 199, 122, 146;
}

.footer-soft {
    background: linear-gradient(120deg, #6a4b56 0%, #8a6371 50%, #9b7281 100%);
    color: #fdf8f6;
}

.text-soft {
    color: rgba(253, 248, 246, 0.75);
}

.footer-link {
    color: #fdf8f6;
    font-weight: 600;
    text-decoration: underline;
}

.footer-link:hover {
    color: #ffe6ee;
}

.btn-youtube {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e36b86;
    color: #fff;
    border: 1px solid #e36b86;
    padding: 10px 18px;
    font-weight: 600;
    text-decoration: none;
}

.btn-youtube:hover {
    background: #d05f78;
    border-color: #d05f78;
    color: #fff;
}

.reveal {
    opacity: 0;
    transform: translateY(12px);
    animation: reveal 0.8s ease forwards;
}

.reveal:nth-of-type(1) {
    animation-delay: 0.05s;
}

.reveal:nth-of-type(2) {
    animation-delay: 0.1s;
}

.reveal:nth-of-type(3) {
    animation-delay: 0.15s;
}

.reveal:nth-of-type(4) {
    animation-delay: 0.2s;
}

.reveal:nth-of-type(5) {
    animation-delay: 0.25s;
}

@keyframes reveal {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 767.98px) {
    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    header>section {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    main section {
        padding-bottom: 3rem !important;
    }

    .display-5 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .card-body,
    .tile-soft,
    .step-soft {
        padding: 1.25rem;
    }

    .devocional-figure {
        padding: 1.25rem !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ambient-shape {
        animation: none;
    }

    .card-soft,
    .tile-soft,
    .step-soft {
        transition: none;
    }

    .reveal {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top:hover {
    background-color: var(--ink);
    transform: translateY(0) scale(1.1);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}