/* ============================================
   JOURNAL DE RÊVES — Dedicated Stylesheet
   Inspired by quarterlife.app design language
   Optimized mobile-first
   ============================================ */

/* --- Fonts --- */
.journal-page {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #faf8f5;
    color: #1a1a2e;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

.journal-page h1,
.journal-page h2,
.journal-page h3 {
    font-family: 'DM Serif Display', 'Georgia', serif;
    font-weight: 400;
    color: #1a1a2e;
}

/* --- Scroll Animation Base --- */
[data-animate] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-animate].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================
   NAVIGATION
   ============================ */
.journal-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(250, 248, 245, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 1rem 1.5rem;
}

.journal-nav .container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: row !important;
    justify-content: space-between;
    align-items: center;
}

.journal-nav__right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* ============================
   HERO
   ============================ */
.journal-hero {
    padding: 8rem 1.5rem 4rem;
    background: linear-gradient(180deg, #faf8f5 0%, #f3efe8 100%);
    position: relative;
    overflow: hidden;
}

.journal-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(199, 178, 153, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.journal-hero__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 4rem;
}

.journal-hero__content {
    flex: 1;
    min-width: 0;
}

.journal-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 980px;
    padding: 0.4rem 1rem 0.4rem 0.4rem;
    margin-bottom: 2rem;
    animation: journalFadeIn 0.8s ease-out;
}

.journal-hero__icon {
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.journal-hero__badge span {
    font-size: 0.9rem;
    font-weight: 500;
    color: #1a1a2e;
}

.journal-hero__title {
    font-size: clamp(2.5rem, 5.5vw, 4.2rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    animation: journalFadeIn 0.8s ease-out 0.1s both;
}

.journal-hero__title em {
    font-style: italic;
    color: #b8977e;
}

.journal-hero__subtitle {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: #6b6b80;
    max-width: 480px;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    animation: journalFadeIn 0.8s ease-out 0.2s both;
}

.journal-hero__visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: journalFadeIn 1s ease-out 0.3s both;
}

.journal-hero__illustration-wrapper {
    position: relative;
    max-width: 420px;
    width: 100%;
}

.journal-hero__illustration-wrapper::before {
    content: '';
    position: absolute;
    inset: -10%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(199, 178, 153, 0.12) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.journal-hero__illustration {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 12px 40px rgba(166, 142, 116, 0.18));
    animation: journalFloat 6s ease-in-out infinite;
}

@keyframes journalFloat {

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

    50% {
        transform: translateY(-12px);
    }
}

@keyframes journalFadeIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

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

/* --- Hero Actions --- */
.journal-hero__actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    animation: journalFadeIn 0.8s ease-out 0.35s both;
}

.journal-store-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: #1a1a2e;
    color: #fff;
    padding: 0.65rem 1.2rem;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.journal-store-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26, 26, 46, 0.2);
}

.journal-store-btn:active {
    transform: translateY(0) scale(0.98);
}

.journal-store-btn--light {
    background: #fff;
    color: #1a1a2e;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.journal-store-btn--light:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.journal-store-btn__text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.journal-store-btn__text span:first-child {
    font-size: 0.6rem;
    font-weight: 400;
    opacity: 0.8;
}

.journal-store-btn__name {
    font-size: 1rem;
    font-weight: 600;
}

/* ============================
   STATS / SOCIAL PROOF
   ============================ */
.journal-stats {
    padding: 4rem 1.5rem;
    background: #fff;
}

.journal-stats__grid {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
}

.journal-stats__item {
    text-align: center;
    flex: 1;
}

.journal-stats__number {
    display: block;
    font-family: 'DM Serif Display', serif;
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    color: #b8977e;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.journal-stats__label {
    font-size: 0.85rem;
    color: #6b6b80;
    line-height: 1.4;
}

.journal-stats__divider {
    width: 1px;
    height: 60px;
    background: rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

/* ============================
   STEPS
   ============================ */
.journal-steps {
    padding: 5rem 1.5rem;
    background: #faf8f5;
}

.journal-section-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: -0.015em;
}

.journal-section-subtitle {
    text-align: center;
    max-width: 560px;
    margin: 0 auto 3.5rem;
    font-size: 1.05rem;
    color: #6b6b80;
    line-height: 1.6;
}

.journal-steps__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.journal-steps__card {
    background: #fff;
    border-radius: 20px;
    padding: 2rem 1.5rem;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.4s ease;
}

.journal-steps__card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.06);
}

.journal-steps__number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c7b299 0%, #b8977e 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'DM Serif Display', serif;
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
}

.journal-steps__card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.journal-steps__card p {
    font-size: 0.9rem;
    color: #6b6b80;
    line-height: 1.55;
}

/* ============================
   FEATURES
   ============================ */
.journal-features {
    padding: 5rem 1.5rem;
    background: #fff;
}

.journal-features__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.journal-features__card {
    background: #faf8f5;
    border-radius: 20px;
    padding: 2.25rem 2rem;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.4s ease;
}

.journal-features__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
}

.journal-features__icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(184, 151, 126, 0.12) 0%, rgba(184, 151, 126, 0.06) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    color: #b8977e;
}

.journal-features__card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.journal-features__card p {
    font-size: 0.95rem;
    color: #6b6b80;
    line-height: 1.55;
}

/* ============================
   SHOWCASE (phone mockups)
   ============================ */
.journal-showcase {
    padding: 5rem 1.5rem;
    background: #faf8f5;
}

.journal-showcase--alt {
    background: #fff;
}

.journal-showcase__row {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 4rem;
}

.journal-showcase__row--reverse {
    flex-direction: row-reverse;
}

.journal-showcase__phone {
    flex: 0 0 auto;
}

.journal-phone-frame {
    position: relative;
    background: #1a1a2e;
    border-radius: 36px;
    box-shadow:
        0 0 0 2px #2a2a3e,
        0 24px 60px -12px rgba(0, 0, 0, 0.3);
    display: inline-block;
    overflow: hidden;
    line-height: 0;
    max-width: 260px;
}

.journal-phone-frame img {
    border-radius: 34px;
    display: block;
    width: 100%;
    height: auto;
}

.journal-showcase__content {
    flex: 1;
    min-width: 0;
}

.journal-showcase__label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #b8977e;
    background: rgba(184, 151, 126, 0.1);
    padding: 0.35rem 0.9rem;
    border-radius: 980px;
    margin-bottom: 1.25rem;
}

.journal-showcase__content h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    margin-bottom: 1.25rem;
    letter-spacing: -0.01em;
}

.journal-showcase__content p {
    font-size: 1.05rem;
    color: #6b6b80;
    line-height: 1.65;
    max-width: 480px;
}

/* ============================
   CTA
   ============================ */
.journal-cta {
    padding: 5rem 1.5rem;
    background: #faf8f5;
}

.journal-cta__inner {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2b4e 100%);
    border-radius: 28px;
    padding: 4rem 2.5rem;
    position: relative;
    overflow: hidden;
}

.journal-cta__inner::before {
    content: '';
    position: absolute;
    top: -40%;
    left: -30%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(184, 151, 126, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.journal-cta__inner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -20%;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(184, 151, 126, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.journal-cta__inner h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: #fff;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.journal-cta__inner p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto 2rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.journal-cta__inner .journal-hero__actions {
    justify-content: center;
    position: relative;
    z-index: 1;
}

/* ============================
   LEGAL
   ============================ */
.journal-legal {
    padding: 3rem 1.5rem 1rem;
    background: #faf8f5;
}

.journal-legal__links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.journal-legal__link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 1.4rem;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 980px;
    color: #1a1a2e;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    -webkit-tap-highlight-color: transparent;
}

.journal-legal__link:hover {
    background: #1a1a2e;
    color: #fff;
    border-color: #1a1a2e;
}

/* ============================
   FOOTER
   ============================ */
.journal-footer {
    background: #f3efe8;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 3rem 1.5rem 2rem;
    text-align: center;
    margin-top: 0;
}

.journal-footer__brand {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 1.5rem;
}

.journal-footer__brand strong {
    font-family: 'DM Serif Display', serif;
    font-size: 1.15rem;
    color: #1a1a2e;
    font-weight: 400;
}

.journal-footer__brand span {
    font-size: 0.85rem;
    color: #6b6b80;
}

.journal-footer__links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.journal-footer__links a {
    color: #6b6b80;
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.3s ease;
}

.journal-footer__links a:hover {
    color: #1a1a2e;
}

.journal-footer__copy {
    font-size: 0.8rem;
    color: #9b9baa;
}

/* ============================
   RESPONSIVE — MOBILE FIRST
   ============================ */

/* --- Small screens (< 640px) --- */
@media (max-width: 640px) {
    .journal-hero {
        padding: 6.5rem 1.25rem 2.5rem;
    }

    .journal-hero__inner {
        flex-direction: column;
        gap: 2.5rem;
        text-align: center;
    }

    .journal-hero__badge {
        margin-left: auto;
        margin-right: auto;
    }

    .journal-hero__subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .journal-hero__actions {
        justify-content: center;
    }

    .journal-hero__illustration-wrapper {
        max-width: 280px;
    }

    .journal-stats__grid {
        flex-direction: column;
        gap: 1.5rem;
    }

    .journal-stats__divider {
        width: 60px;
        height: 1px;
    }

    .journal-steps__grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .journal-features__grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .journal-showcase__row,
    .journal-showcase__row--reverse {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .journal-showcase__content p {
        margin-left: auto;
        margin-right: auto;
    }

    .journal-phone-frame {
        max-width: 200px;
    }

    .journal-cta__inner {
        padding: 3rem 1.5rem;
        border-radius: 20px;
    }

    .journal-legal__links {
        flex-direction: column;
        align-items: center;
    }

    .journal-footer__links {
        flex-direction: column;
        gap: 0.75rem;
    }

    .journal-store-btn {
        width: 100%;
        justify-content: center;
    }
}

/* --- Medium screens (641px — 900px) --- */
@media (min-width: 641px) and (max-width: 900px) {
    .journal-hero__inner {
        flex-direction: column;
        gap: 3rem;
        text-align: center;
    }

    .journal-hero__badge {
        margin-left: auto;
        margin-right: auto;
    }

    .journal-hero__subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .journal-hero__actions {
        justify-content: center;
    }

    .journal-hero__illustration-wrapper {
        max-width: 340px;
    }

    .journal-steps__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .journal-showcase__row,
    .journal-showcase__row--reverse {
        flex-direction: column;
        text-align: center;
        gap: 2.5rem;
    }

    .journal-showcase__content p {
        margin-left: auto;
        margin-right: auto;
    }
}

/* --- Large screens (> 900px) --- */
@media (min-width: 901px) {
    .journal-hero {
        padding: 10rem 2rem 6rem;
    }

    .journal-stats {
        padding: 5rem 2rem;
    }

    .journal-steps {
        padding: 6rem 2rem;
    }

    .journal-features {
        padding: 6rem 2rem;
    }

    .journal-showcase {
        padding: 6rem 2rem;
    }

    .journal-cta {
        padding: 6rem 2rem;
    }
}

/* --- Touch optimizations --- */
@media (hover: none) and (pointer: coarse) {

    .journal-steps__card:hover,
    .journal-features__card:hover,
    .journal-store-btn:hover {
        transform: none;
        box-shadow: none;
    }

    .journal-store-btn:active {
        transform: scale(0.97);
    }

    .journal-steps__card,
    .journal-features__card {
        -webkit-tap-highlight-color: transparent;
    }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    [data-animate] {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .journal-hero__illustration {
        animation: none;
    }

    .journal-hero__badge,
    .journal-hero__title,
    .journal-hero__subtitle,
    .journal-hero__visual,
    .journal-hero__actions {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* --- Content-visibility for performance --- */
.journal-steps,
.journal-features,
.journal-showcase,
.journal-cta {
    content-visibility: auto;
    contain-intrinsic-size: auto 600px;
}

/* ============================
   LANGUAGE SWITCHER
   ============================ */
.lang-switcher {
    position: relative;
    margin-left: 1rem;
    z-index: 1001;
}

.lang-switcher__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 980px;
    padding: 0.4rem 0.85rem;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1a1a2e;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    -webkit-tap-highlight-color: transparent;
}

.lang-switcher__toggle:hover {
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.lang-switcher__flag {
    font-size: 1rem;
    line-height: 1;
}

.lang-switcher__chevron {
    transition: transform 0.3s ease;
    opacity: 0.5;
}

.lang-switcher.open .lang-switcher__chevron {
    transform: rotate(180deg);
}

.lang-switcher__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.96);
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    min-width: 140px;
}

.lang-switcher.open .lang-switcher__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.lang-switcher__option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.7rem 1rem;
    border: none;
    background: none;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: #6b6b80;
    text-align: left;
    transition: all 0.2s ease;
}

.lang-switcher__option:hover {
    background: #faf8f5;
    color: #1a1a2e;
}

.lang-switcher__option.active {
    color: #b8977e;
    font-weight: 600;
    background: rgba(184, 151, 126, 0.06);
}

.lang-switcher__option+.lang-switcher__option {
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.lang-switcher__option span {
    font-size: 1.1rem;
    line-height: 1;
}

@media (max-width: 640px) {
    .lang-switcher {
        margin-left: 0.5rem;
    }

    .lang-switcher__label {
        display: none;
    }

    .lang-switcher__toggle {
        padding: 0.35rem 0.6rem;
    }
}

/* --- Safe areas (notched phones) --- */
@supports (padding: env(safe-area-inset-bottom)) {
    .journal-footer {
        padding-bottom: calc(2rem + env(safe-area-inset-bottom));
    }

    .journal-nav {
        padding-top: calc(1rem + env(safe-area-inset-top));
    }
}