/* =====================================================
   HOMEPAGE — TWO FLAGSHIP GAMES
   Loaded by index.html only. Does not change shared styles.css.
   Letter Frenzy accent: teal #20dcff. Puzzle Frenzy accent: gold #ffbf3f.
===================================================== */

/* =====================================================
   INTRO
===================================================== */

.fx-intro{
    margin:6px auto 26px;
    text-align:center;
}

/* Brand statement: "ONE FRENZY BRAND." (white) over the dominant
   "TWO FLAGSHIP GAMES." (gold). Sizes scale with the viewport so a
   longer count ("THREE ...") still fits on one line at 320px. */

.fx-brand{
    margin:0;

    font-family:Montserrat,Arial,sans-serif;
    font-weight:700;
    text-transform:uppercase;
}

.fx-brand-one,
.fx-brand-two{
    display:block;
}

.fx-brand-one{
    color:white;

    font-size:clamp(16px,4.6vw,42px);
    line-height:1.15;
    letter-spacing:.06em;
}

.fx-brand-two{
    margin-top:.12em;

    color:#ffbf3f;

    font-size:clamp(20px,6.6vw,64px);
    line-height:1.08;
    letter-spacing:.02em;
}

/* Gold line with a central diamond; same construction as the
   Puzzle Frenzy headline rule. */

.fx-brand-rule{
    display:block;
    position:relative;
    width:min(240px,60%);
    height:14px;
    margin:16px auto 18px;
}

.fx-brand-rule::before{
    content:"";
    position:absolute;
    left:0;
    right:0;
    top:50%;
    height:2px;
    background:#ffbf3f;
    transform:translateY(-50%);
}

.fx-brand-rule::after{
    content:"";
    position:absolute;
    left:50%;
    top:50%;
    width:9px;
    height:9px;
    background:#ffbf3f;
    transform:translate(-50%,-50%) rotate(45deg);
}

.fx-intro h1{
    margin:0;

    color:white;

    font-family:Montserrat,Arial,sans-serif;
    font-size:clamp(19px,calc(12.7px + 1.62vw),36px);
    font-weight:700;
    line-height:1.08;
    letter-spacing:-.4px;

    text-shadow:0 4px 14px rgba(0,0,0,.35);
}

.fx-gold{
    color:#ffbf3f;
}

.fx-intro-lead{
    max-width:560px;
    margin:12px auto 0;

    color:rgba(255,255,255,.84);

    font-size:18px;
    line-height:1.5;
}

/* =====================================================
   FLAGSHIP CARDS
===================================================== */

.fx-flagships{
    display:grid;
    grid-template-columns:1fr;
    gap:22px;
}

.fx-app{
    position:relative;

    display:flex;
    flex-direction:column;
    align-items:center;

    min-width:0;
    padding:28px 24px 30px;
    overflow:hidden;

    text-align:center;

    border:1px solid rgba(32,220,255,.32);
    border-radius:28px;

    background:
        radial-gradient(
            ellipse 70% 42% at 50% 64%,
            rgba(32,220,255,.20),
            transparent 70%
        ),
        linear-gradient(
            160deg,
            rgba(4,41,91,.92),
            rgba(0,15,39,.97)
        );

    box-shadow:
        0 18px 46px rgba(0,0,0,.28),
        inset 0 1px 0 rgba(255,255,255,.07);
}

.fx-app::before{
    content:"";
    position:absolute;
    left:12%;
    right:12%;
    top:0;
    height:3px;

    border-radius:0 0 4px 4px;
    background:linear-gradient(90deg,transparent,#20dcff,transparent);
}

.fx-app-puzzle{
    border-color:rgba(255,191,63,.36);

    background:
        radial-gradient(
            ellipse 70% 42% at 50% 64%,
            rgba(255,191,63,.15),
            transparent 70%
        ),
        linear-gradient(
            160deg,
            rgba(4,41,91,.92),
            rgba(0,15,39,.97)
        );
}

.fx-app-puzzle::before{
    background:linear-gradient(90deg,transparent,#ffbf3f,transparent);
}

.fx-app-name{
    margin:0 0 14px;
    line-height:0;
}

.fx-app-icon-link{
    display:inline-block;
    border-radius:24%;
}

.fx-app-icon{
    display:block;
    width:112px;
    height:112px;

    border-radius:24%;

    box-shadow:
        0 0 0 3px rgba(32,220,255,.85),
        0 0 26px 4px rgba(32,220,255,.45),
        0 12px 26px rgba(0,0,0,.45);
}

.fx-app-puzzle .fx-app-icon{
    box-shadow:
        0 0 0 3px rgba(255,191,63,.85),
        0 0 26px 4px rgba(255,191,63,.35),
        0 12px 26px rgba(0,0,0,.45);
}

.fx-app-icon-link:focus-visible{
    outline:2px solid white;
    outline-offset:8px;
}

.fx-status{
    margin:0 0 14px;
}

.fx-headline{
    margin:0;

    font-family:Montserrat,Arial,sans-serif;
    font-size:clamp(25px,2.6vw,32px);
    font-weight:700;
    line-height:1.16;
    letter-spacing:-.3px;
}

.fx-headline span{
    display:block;
}

.fx-line-white{
    color:white;
}

.fx-line-gold{
    color:#ffbf3f;
}

.fx-subline{
    margin:10px 0 0;

    color:rgba(255,255,255,.80);

    font-size:16px;
    line-height:1.45;
}

.fx-subline-teal{
    color:#20dcff;

    font-family:Montserrat,Arial,sans-serif;
    font-weight:700;
}

/* Two overlapping phones, equal height for both apps. */

.fx-phones{
    position:relative;

    display:block;
    width:min(100%,420px);
    height:400px;
    margin:22px auto 4px;
}

.fx-phone{
    position:absolute;
    top:0;

    height:380px;
    width:auto;

    filter:drop-shadow(0 18px 20px rgba(0,8,28,.55));

    transition:transform .2s ease;
}

.fx-phone-back{
    left:calc(50% - 176px);
    z-index:1;
    transform:rotate(-6deg);
}

.fx-phone-front{
    left:calc(50% - 22px);
    top:14px;
    z-index:2;
    transform:rotate(6deg);
}

.fx-phones:hover .fx-phone-back,
.fx-phones:focus-visible .fx-phone-back{
    transform:rotate(-8deg) translateX(-6px);
}

.fx-phones:hover .fx-phone-front,
.fx-phones:focus-visible .fx-phone-front{
    transform:rotate(8deg) translateX(6px);
}

.fx-phones:focus-visible{
    outline:2px solid white;
    outline-offset:6px;
    border-radius:18px;
}

.fx-actions{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:center;
    gap:14px 24px;

    width:100%;
    margin-top:auto;
    padding-top:18px;
}

.fx-cta{
    min-width:240px;
    min-height:50px;

    font-size:14px;
}

.fx-more{
    display:inline-flex;
    align-items:center;
    min-height:44px;
}

/* =====================================================
   INSIDE THE GAMES
===================================================== */

.fx-showcase{
    margin-top:58px;
}

.fx-row{
    margin:26px 0 0;
    padding:22px 24px 26px;

    border:1px solid rgba(255,255,255,.12);
    border-left:3px solid #20dcff;
    border-radius:24px;

    background:rgba(1,20,52,.46);
}

.fx-row-puzzle{
    border-left-color:#ffbf3f;
}

.fx-row-head{
    display:flex;
    align-items:center;
    gap:16px;

    margin:0 0 20px;

    text-align:left;
}

.fx-row-icon{
    flex:0 0 auto;

    width:56px;
    height:56px;

    border-radius:24%;

    box-shadow:0 6px 14px rgba(0,0,0,.4);
}

.fx-row-copy{
    flex:1 1 auto;
    min-width:0;
}

.fx-row-copy h3{
    margin:0;

    font-family:Montserrat,Arial,sans-serif;
    font-size:21px;
    font-weight:700;
}

.fx-row-copy p{
    margin:3px 0 0;

    color:rgba(255,255,255,.76);

    font-size:15px;
    line-height:1.4;
}

.fx-row-link{
    flex:0 0 auto;
    display:inline-flex;
    align-items:center;
    min-height:44px;
    white-space:nowrap;
}

.fx-strip{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:20px;

    margin:0;
    padding:0;

    list-style:none;
}

.fx-strip li{
    display:flex;
    flex-direction:column;
    align-items:center;

    min-width:0;
}

.fx-strip img{
    display:block;
    width:auto;
    height:auto;
    max-width:100%;
    max-height:380px;

    filter:drop-shadow(0 12px 16px rgba(0,8,28,.5));
}

.fx-strip p{
    margin:12px 0 0;

    color:rgba(255,255,255,.80);

    font-size:14px;
    line-height:1.4;
}

.fx-strip strong{
    display:block;
    margin-bottom:2px;

    color:white;

    font-family:Montserrat,Arial,sans-serif;
    font-size:16px;
}

/* =====================================================
   FREE TO START
===================================================== */

.fx-membership{
    margin-top:56px;
}

.fx-plans{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:18px;

    max-width:760px;
    margin:22px auto 0;
}

.fx-plan{
    padding:20px 22px;

    border:1px solid rgba(32,220,255,.40);
    border-radius:20px;

    background:rgba(0,20,48,.40);
}

.fx-plan-puzzle{
    border-color:rgba(255,191,63,.46);
}

.fx-plan h3{
    margin:0 0 6px;

    color:#20dcff;

    font-family:Montserrat,Arial,sans-serif;
    font-size:14px;
    font-weight:700;
    letter-spacing:1.4px;
    text-transform:uppercase;
}

.fx-plan-puzzle h3{
    color:#ffbf3f;
}

.fx-plan p{
    margin:0;

    font-family:Montserrat,Arial,sans-serif;
    font-size:18px;
    font-weight:700;
    line-height:1.35;
}

.fx-membership-note{
    max-width:620px;
    margin:16px auto 0;

    color:rgba(255,255,255,.74);

    font-size:15px;
    line-height:1.5;
}

/* =====================================================
   FAMILY — tighter on the two-flagship homepage
===================================================== */

.home-page .portfolio-section{
    padding-top:48px;
}

/* =====================================================
   DESKTOP: flagships side by side
===================================================== */

@media(min-width:860px){

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

    .fx-app{
        padding:32px 28px 32px;
    }

    .home-page .portfolio-grid{
        grid-template-columns:repeat(3,minmax(0,1fr));
        max-width:1000px;
        gap:22px;
    }

    .home-page .portfolio-card{
        min-height:230px;
    }

    .home-page .portfolio-status{
        white-space:nowrap;
    }

    .home-page .portfolio-status::before,
    .home-page .portfolio-status::after{
        width:22px;
    }

}

@media(min-width:860px) and (max-width:1060px){

    .fx-phones{
        height:340px;
    }

    .fx-phone{
        height:320px;
    }

    .fx-phone-back{
        left:calc(50% - 150px);
    }

    .fx-phone-front{
        left:calc(50% - 16px);
    }

    .fx-cta{
        min-width:0;
    }

}

/* =====================================================
   TABLET: showcase as 2 x 2
===================================================== */

@media(max-width:859px){

    .fx-strip{
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:26px 20px;
        max-width:560px;
        margin:0 auto;
    }

    .fx-strip img{
        max-height:360px;
    }

}

/* =====================================================
   MOBILE
===================================================== */

@media(max-width:560px){

    .fx-intro{
        margin-bottom:20px;
    }

    .fx-intro-lead{
        font-size:16px;
    }

    .fx-app{
        padding:26px 18px 26px;
        border-radius:24px;
    }

    .fx-app-icon{
        width:96px;
        height:96px;
    }

    .fx-phones{
        height:330px;
        margin-top:18px;
    }

    .fx-phone{
        height:310px;
    }

    .fx-phone-back{
        left:calc(50% - 142px);
    }

    .fx-phone-front{
        left:calc(50% - 18px);
    }

    .fx-actions{
        flex-direction:column;
        gap:6px;
    }

    .fx-cta{
        width:100%;
        max-width:300px;
        min-width:0;
    }

    .fx-showcase{
        margin-top:44px;
    }

    .fx-row{
        padding:18px 14px 20px;
    }

    .fx-row-head{
        flex-wrap:wrap;
        gap:12px 14px;
    }

    .fx-row-icon{
        width:48px;
        height:48px;
    }

    .fx-row-copy h3{
        font-size:19px;
    }

    .fx-row-link{
        width:100%;
        padding-left:62px;
    }

    /* Swipeable strip: one and a half phones in view. */
    .fx-strip{
        display:flex;
        gap:16px;
        max-width:none;

        margin:0 -14px;
        padding:0 14px 6px;

        overflow-x:auto;
        overscroll-behavior-x:contain;
        scroll-snap-type:x mandatory;
        scroll-padding:0 14px;
        -webkit-overflow-scrolling:touch;
    }

    .fx-strip li{
        flex:0 0 62%;
        scroll-snap-align:start;
    }

    .fx-strip img{
        max-height:none;
    }

    .fx-strip{
        scrollbar-width:thin;
        scrollbar-color:rgba(32,220,255,.55) transparent;
    }

    .home-page .section-title span{
        width:28px;
    }

    .fx-membership{
        margin-top:44px;
    }

    .fx-plans{
        grid-template-columns:1fr;
        gap:12px;
    }

    .fx-plan p{
        font-size:17px;
    }

    .home-page .portfolio-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
        max-width:none;
        gap:12px;
    }

    .home-page .portfolio-card{
        min-height:0;
        padding:18px 10px 16px;
    }

    .home-page .portfolio-card img{
        max-width:110px;
    }

    .home-page .portfolio-status{
        margin-top:12px;

        font-size:10px;
        letter-spacing:1px;
        line-height:1.35;
        text-align:center;
    }

    .home-page .portfolio-status::before,
    .home-page .portfolio-status::after{
        display:none;
    }

}

@media(max-width:389px){

    .fx-intro h1{
        font-size:18px;
    }

    .fx-headline{
        font-size:23px;
    }

    .fx-phones{
        height:300px;
    }

    .fx-phone{
        height:282px;
    }

    .fx-phone-back{
        left:calc(50% - 130px);
    }

    .fx-phone-front{
        left:calc(50% - 16px);
    }

}

@media(prefers-reduced-motion:reduce){

    .fx-phone{
        transition:none;
    }

}
