/*
 * Nails Era — simple brand skin (default homepage design).
 * Loaded last on index.php in place of the opt-in 3D / glass / neumorphism layers
 * (scene-3d.css, glass-ui.css, neo-glass.css — still available with ?ui=3d).
 * Goals: calm, phone-first, fast to paint. Brand palette only — no new colours.
 */
:root {
    --ne-forest: #154b34;
    --ne-forest-dark: #0f2f22;
    --ne-forest-soft: #1f6b4a;
    --ne-accent: #3d9b6e;
    --ne-mint: #d8f3e7;
    --ne-mint-2: #eaf7f1;
    --ne-gold: #c9a227;
    --ne-gold-light: #e8d48b;
    --ne-surface-1: #e6ebe8;
    --ne-surface-2: #eef2ef;
    --ne-surface-3: #f4f6f5;
    --ne-ink: #1a2e26;
    --ne-muted: #5a6b63;
    --ne-card-shadow: var(--ne-shadow-1, 0 4px 14px -6px rgba(15, 47, 34, .14));
}

/* ---------- Page base: one quiet surface, readable type ---------- */
body.public-site {
    background: var(--ne-surface-3);
    color: var(--ne-ink);
    text-rendering: optimizeLegibility;
}
body.public-site .section-title,
body.public-site .section-heading,
body.public-site h2.section-title {
    color: var(--ne-ink);
    letter-spacing: -0.01em;
    text-shadow: none;
}
body.public-site .section-subtitle,
body.public-site .section-lead {
    color: var(--ne-muted);
}

/* ---------- Cards: flat surface + one soft shadow, no tilt / glare / glass ---------- */
body.public-site .h-card-service,
body.public-site .h-card-review,
body.public-site .h-card-why,
body.public-site .h-card-blog,
body.public-site .studio-product-card,
body.public-site #faq details {
    background: #fff;
    border: 1px solid var(--ne-surface-1);
    box-shadow: var(--ne-card-shadow);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
@media (hover: hover) {
    body.public-site .h-card-blog:hover,
    body.public-site .studio-product-card:hover {
        border-color: var(--ne-mint);
    }
}

/* ---------- Services: 3D coverflow rail (assets/js/card-coverflow.js + home-polish.css), same card feel
   as the previous design — rounded white card, fine gold edge, layered forest shadow, soft-lift button ---------- */
body.public-site .h-card-service,
body.public-site #servicesContainer .service-card {
    background: #fff;
    border: 1px solid rgba(201, 162, 39, .18);
    border-radius: 22px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .9),
        0 1px 2px rgba(15, 47, 34, .05),
        0 8px 18px -8px rgba(15, 47, 34, .16),
        0 20px 34px -18px rgba(15, 47, 34, .18);
}
body.public-site #servicesContainer .service-book-btn,
body.public-site #servicesContainer .btn {
    border-radius: 12px;
    box-shadow: 0 8px 16px -10px rgba(15, 47, 34, .45);
}
body.public-site .service-filter-btn {
    border-radius: 999px;
    border: 1.5px solid var(--ne-surface-1);
    background: #fff;
    color: var(--ne-ink);
    box-shadow: 0 6px 14px -8px rgba(15, 47, 34, .25);
}
body.public-site .service-filter-btn.active,
body.public-site .service-filter-btn[aria-pressed="true"] {
    background: var(--ne-forest);
    border-color: var(--ne-forest);
    color: #fff;
    box-shadow: 0 10px 20px -10px rgba(15, 47, 34, .6);
}

/* ---------- Primary actions: solid forest pill, gold only as an accent ---------- */
body.public-site .service-book-btn,
body.public-site .btn-primary,
body.public-site .hero-cta-primary {
    background: var(--ne-forest);
    border-color: var(--ne-forest);
    color: #fff;
    box-shadow: none;
}
body.public-site .service-book-btn:hover,
body.public-site .btn-primary:hover,
body.public-site .hero-cta-primary:hover {
    background: var(--ne-forest-soft);
    border-color: var(--ne-forest-soft);
    color: #fff;
}
body.public-site .hero-cta-primary {
    background: var(--ne-accent);
    border-color: var(--ne-accent);
}
body.public-site .hero-cta-primary:hover {
    background: var(--ne-forest-soft);
    border-color: var(--ne-forest-soft);
}
body.public-site :focus-visible {
    outline: 2px solid var(--ne-gold);
    outline-offset: 2px;
}

/* ---------- Hero: keep the photo/colour, drop the extra moving light layers ---------- */
body.public-site .hero-overlay-sheen,
body.public-site .hero-overlay-spot {
    display: none;
}
body.public-site .hero-lcp-img {
    animation: none !important;
    will-change: auto;
}

/* ---------- Motion: short fades only; nothing for reduced-motion visitors ---------- */
@media (prefers-reduced-motion: reduce) {
    body.public-site *,
    body.public-site *::before,
    body.public-site *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- Sign in: Google as the recommended path (was only styled by neo-glass.css) ---------- */
#authModal .auth-method-btn--google { color: var(--ne-forest); box-shadow: 0 0 0 2px var(--ne-gold-light); }
#authModal .auth-method-btn--google.is-active { box-shadow: 0 0 0 2px var(--ne-gold); }
#authModal .auth-google-panel {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .6rem;
    text-align: center;
}
#authModal .auth-google-panel[hidden] { display: none !important; }
#authModal .auth-google-reco {
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .28rem .75rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--ne-forest-dark);
    background: var(--ne-mint-2);
    border: 1px solid var(--ne-gold-light);
}
#authModal .auth-google-btn--main {
    min-height: 3.25rem;
    margin: .1rem 0 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: var(--ne-ink) !important;
    background: #fff !important;
    border: 1px solid var(--ne-surface-1) !important;
    border-radius: 999px !important;
    box-shadow: 0 0 0 2px var(--ne-gold-light), var(--ne-card-shadow) !important;
}
#authModal .auth-google-btn--main:active { transform: scale(.98); }
#authModal .auth-google-logo { width: 1.4rem; height: 1.4rem; flex: 0 0 auto; }
#authModal .auth-google-btn--main.is-loading { pointer-events: none; }
#authModal .auth-google-btn--main.is-loading > span { opacity: .55; }
#authModal .auth-google-btn--main.is-loading .auth-google-logo { animation: neSimpleSpin .9s linear infinite; }
#authModal .auth-google-note { margin: 0; font-size: .8rem; line-height: 1.4; color: var(--ne-muted); }
@keyframes neSimpleSpin { to { transform: rotate(360deg); } }

/* ---------- Guest account sheet perks (was only styled by glass-ui.css) ---------- */
.account-guest-perks {
    padding: 16px 16px 6px;
    border-radius: 18px;
    background: var(--ne-mint-2);
    border: 1px solid var(--ne-mint);
}
.account-guest-perks-title {
    margin: 0 0 10px;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--ne-forest);
    line-height: 1.2;
}
.account-guest-perks-title span {
    display: block;
    margin-top: 4px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--ne-muted);
}
.account-guest-perks-list { list-style: none; margin: 0; padding: 0; }
.account-guest-perks-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-size: .92rem;
    color: var(--ne-ink);
}
.account-guest-perks-list li + li { border-top: 1px solid var(--ne-mint); }
.account-guest-perks-list i {
    flex: 0 0 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--ne-forest);
    color: var(--ne-gold-light);
    font-size: .85rem;
}
.account-profile-guest-guide {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto;
    padding: 6px 12px;
    border: 0;
    background: none;
    color: var(--ne-forest);
    font-size: .88rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--ne-gold);
    cursor: pointer;
}
.account-profile-guest-guide i { color: var(--ne-gold); }

/* ---------- Services carousel: clean coverflow (overrides home-polish.css .ne-cf for this rail) ----------
   Stays inside its column (no 100vw bleed), no 3D perspective/rotation and no blur, so every card's
   text is crisp. Desktop/tablet: exactly three cards fit, so the centred card's neighbours are fully
   visible. Phone: one card with a soft peek of the next. Side cards only scale down and fade a little. */
#services .site-content { container-type: inline-size; }
#servicesContainer.ne-cf.ne-cf {
    --cf-gap: 16px;
    --cf-w: min(300px, 76cqw);
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 16px calc(50cqw - var(--cf-w) / 2) 88px !important;
    margin-bottom: -72px !important;
    overflow-y: hidden;
    scroll-padding-inline: 0;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%) !important;
    mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%) !important;
}
@media (min-width: 768px) and (max-width: 1099.98px) {
    #servicesContainer.ne-cf.ne-cf {
        --cf-gap: 22px;
        --cf-w: calc((100cqw - 2 * var(--cf-gap)) / 3);
        -webkit-mask-image: none !important;
        mask-image: none !important;
    }
}
#servicesContainer.ne-cf.ne-cf > * {
    transform: scale(calc(1 - var(--cf-a, 0) * .05));
    filter: none;
    opacity: calc(1 - min(var(--cf-a, 0), 1) * .22);
    will-change: auto;
    transition: transform .25s ease-out, opacity .25s ease-out;
}
#servicesContainer.ne-cf.ne-cf > * > img.service-thumb { transform: none; will-change: auto; }
/* Less dead space under the carousel before the next section */
#appShell > #services.app-section { padding-bottom: clamp(1.25rem, 3vw, 2.25rem) !important; min-height: 0 !important; }

/* ---------- Desktop (>=1100px): five-card coverflow ----------
   Rail widens past the text column (still inside the page) so five cards fit:
   centre = slightly zoomed with a deeper shadow; inner pair = sharp, a little smaller;
   outer pair = smaller, tilted back in 3D and softly blurred. Driven by --cf-d / --cf-a
   from assets/js/card-coverflow.js (signed / absolute distance from centre, |a| capped at 1.6). */
@media (min-width: 1100px) {
    #servicesContainer.ne-cf.ne-cf {
        --rail-w: min(1320px, calc(100vw - 72px));
        --cf-start: 2;
        --cf-gap: 14px;
        --cf-w: calc((var(--rail-w) - 4 * var(--cf-gap)) / 5);
        width: var(--rail-w) !important;
        max-width: none !important;
        margin-left: calc(50% - var(--rail-w) / 2) !important;
        margin-right: 0 !important;
        padding: 30px calc(var(--rail-w) / 2 - var(--cf-w) / 2) 100px !important;
        margin-bottom: -70px !important;
        -webkit-mask-image: none !important;
        mask-image: none !important;
    }
    #servicesContainer.ne-cf.ne-cf > * {
        /* inner = 0..1 (centre -> neighbour), outer = 0..1 (neighbour -> far card) */
        --cf-in: clamp(0, var(--cf-a, 0), 1);
        --cf-out: clamp(0, (var(--cf-a, 0) - 1) / .6, 1);
        --cf-side: clamp(-1, calc(var(--cf-d, 0) - clamp(-1, var(--cf-d, 0), 1)), 1);
        transform:
            perspective(1100px)
            rotateY(calc(var(--cf-side) * -30deg))
            scale(calc(1.08 - var(--cf-in) * .16 - var(--cf-out) * .08));
        filter: blur(calc(var(--cf-out) * 2.4px));
        opacity: calc(1 - var(--cf-out) * .3);
        z-index: 1;
        /* Positions follow the scroll every frame (JS sets --cf-d/--cf-a), so transform/filter must not
           also transition — that made cards lag and jump. Only the centre shadow eases in. */
        transition: box-shadow .35s ease-out;
    }
    #servicesContainer.ne-cf.ne-cf > .is-cf-center {
        z-index: 3;
    }
}

/* Services carousel: stay invisible until card-coverflow.js has placed every card (adds .is-cf-ready),
   then fade in — no flash of un-arranged cards or an empty side on first load. */
#servicesContainer.ne-cf.ne-cf:not(.is-cf-ready) > * { opacity: 0 !important; transition: none !important; }
#servicesContainer.ne-cf.ne-cf.is-cf-ready { animation: neCfReveal .35s ease-out; }
@keyframes neCfReveal { from { opacity: 0; } to { opacity: 1; } }
/* Phone / tablet rail: same rule — no transform/opacity lag behind the scroll */
#servicesContainer.ne-cf.ne-cf > * { transition-property: box-shadow; }

/* ---------- Soft, uncut shadows (tokens live in style.css: --ne-shadow-1/2/3) ----------
   Carousel depth: centre = strongest, every other card = soft (the outer pair reads lighter still because
   it is faded + blurred). The rail's padding above leaves room so no shadow is clipped by the scroller. */
#servicesContainer.ne-cf.ne-cf > * { box-shadow: var(--ne-shadow-2) !important; }
#servicesContainer.ne-cf.ne-cf > .is-cf-center { box-shadow: var(--ne-shadow-3) !important; }
body.public-site .h-card-service:not(.ne-cf > *) { box-shadow: var(--ne-shadow-1) !important; }
/* Category chips scroll row: give chip shadows room instead of cutting them at the row's edge */
#servicesFiltersScroll {
    padding: 6px 8px 14px !important;
    margin: -6px -8px -14px !important;
}
body.public-site .service-filter-btn { box-shadow: 0 1px 2px rgba(15, 47, 34, .05), 0 3px 8px -3px rgba(15, 47, 34, .1) !important; }
body.public-site .service-filter-btn.active,
body.public-site .service-filter-btn[aria-pressed="true"] { box-shadow: 0 1px 2px rgba(15, 47, 34, .08), 0 5px 12px -5px rgba(15, 47, 34, .3) !important; }
