/* ============================================================
   PREMIUM LAYER — refined "expensive" look for TrustCard
   Loaded after style.css. Overrides tokens + polishes surfaces.
   ============================================================ */

/* ---------- 1. Refined design tokens ---------- */
.landing {
    --bg-primary: #f7f7fb;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f2f8;
    --text-primary: #0b0d1a;
    --text-secondary: #565a72;
    --text-muted: #9498ac;
    --border: #e7e8f0;
    --border-light: #f0f1f7;

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-sm: 0 1px 2px rgba(16, 18, 46, .05);
    --shadow-md: 0 6px 16px -4px rgba(16, 18, 46, .09), 0 2px 6px -2px rgba(16, 18, 46, .06);
    --shadow-lg: 0 18px 40px -12px rgba(16, 18, 46, .14), 0 6px 16px -8px rgba(16, 18, 46, .10);
    --shadow-xl: 0 40px 80px -20px rgba(16, 18, 46, .22), 0 16px 32px -16px rgba(16, 18, 46, .12);
    --ring: rgba(46, 43, 240, .16);
}

/* ---------- 2. Premium canvas: warm mesh + fine grain ----------
   NOTE: painted as plain background layers on .landing itself.
   Do NOT use fixed full-viewport overlays or mix-blend-mode here —
   a blend layer over the 3D/perspective hero card forces the browser
   to flatten it into an intermediate buffer, which blurs the card. */
.landing {
    background-color: #f7f7fb;
    background-image:
        radial-gradient(58% 42% at 84% 4%, rgba(108, 91, 255, .13) 0%, rgba(108, 91, 255, 0) 60%),
        radial-gradient(50% 38% at 10% 2%, rgba(46, 43, 240, .10) 0%, rgba(46, 43, 240, 0) 58%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.02'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat, repeat;
    background-position: 0 0, 0 0, 0 0;
    background-size: 100% 900px, 100% 900px, 160px 160px;
}

/* ---------- 3. Typography refinements ---------- */
.landing {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "cv11", "ss01", "kern";
}

.hero-title {
    letter-spacing: -.038em;
    font-weight: 750;
    line-height: 1.06;
}

.section-title {
    letter-spacing: -.035em;
    font-weight: 740;
    line-height: 1.12;
}

.hero-desc, .section-desc {
    color: var(--text-secondary);
    letter-spacing: -.006em;
}

/* refined gradient ink where the design already uses it */
.title-gradient {
    background: linear-gradient(120deg, #2E2BF0 0%, #4B3BFF 45%, #6C5BFF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---------- 4. Glass header ---------- */
.header {
    /* mostly-opaque bg + light blur: keeps the glass look but repaints
       far cheaper per scroll frame (heavy backdrop-blur was the main jank) */
    background: rgba(247, 247, 251, .9);
    border-bottom: 1px solid rgba(16, 18, 46, .06);
    -webkit-backdrop-filter: blur(10px) saturate(130%);
    backdrop-filter: blur(10px) saturate(130%);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 8px 24px -18px rgba(16, 18, 46, .35);
    transform: translateZ(0);
    will-change: transform;
}

/* dark "Get Started" pill — refined depth */
.header-cta, .btn-dark {
    box-shadow: 0 1px 0 rgba(255, 255, 255, .14) inset, 0 8px 20px -8px rgba(11, 13, 26, .5) !important;
    letter-spacing: -.01em;
}

/* ---------- 5. Promo banner — deep & classy, less neon ---------- */
.promo-banner {
    background: linear-gradient(115deg, #1a18b8 0%, #2E2BF0 42%, #4B3BFF 78%, #6C5BFF 100%);
    box-shadow: 0 10px 34px -14px rgba(46, 43, 240, .5);
    overflow: hidden;
}
.promo-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(40% 120% at 88% 0%, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 70%),
        linear-gradient(0deg, rgba(0, 0, 0, .10), rgba(0, 0, 0, 0));
}

/* ---------- 6. Buttons ---------- */
.btn-primary {
    background: linear-gradient(135deg, #4B3BFF 0%, #2E2BF0 55%, #1E1BC4 100%);
    border-radius: 14px;
    letter-spacing: -.01em;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .28) inset,
        0 -1px 0 rgba(0, 0, 0, .14) inset,
        0 12px 26px -10px rgba(46, 43, 240, .6),
        0 4px 10px -4px rgba(46, 43, 240, .42);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .3) inset,
        0 -1px 0 rgba(0, 0, 0, .16) inset,
        0 20px 38px -12px rgba(46, 43, 240, .68),
        0 8px 16px -6px rgba(46, 43, 240, .5);
}

.btn-secondary {
    border-radius: 14px;
    border: 1px solid rgba(16, 18, 46, .12);
    background: rgba(255, 255, 255, .6);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    letter-spacing: -.01em;
    box-shadow: var(--shadow-sm);
    transition: all .25s cubic-bezier(.4, 0, .2, 1);
}
.btn-secondary:hover {
    border-color: rgba(46, 43, 240, .35);
    background: #ffffff;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

/* ---------- 7. Chips / badges ---------- */
.hero-badge, .section-tag {
    background: linear-gradient(180deg, rgba(46, 43, 240, .10), rgba(46, 43, 240, .05));
    border: 1px solid rgba(46, 43, 240, .18);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, var(--shadow-sm);
    letter-spacing: -.005em;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

/* ---------- 8. Feature / content cards ---------- */
.feature-card {
    background: linear-gradient(180deg, #ffffff 0%, #fbfbfe 100%);
    border: 1px solid rgba(16, 18, 46, .07);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform .35s cubic-bezier(.22, 1, .36, 1), box-shadow .35s ease, border-color .35s ease;
}
.feature-card:hover {
    transform: translateY(-6px);
    border-color: rgba(46, 43, 240, .22);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    background: linear-gradient(150deg, #4B3BFF 0%, #2E2BF0 60%, #1E1BC4 100%);
    border-radius: 15px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .3) inset,
        0 10px 22px -8px rgba(46, 43, 240, .55);
}

/* ---------- 9. Credit card depth (hero + premium sections) ---------- */
.credit-card-surface {
    border-radius: 16px;
    box-shadow:
        inset 0 1px rgba(255, 255, 255, .14),
        inset 0 -1px rgba(0, 0, 0, .3),
        0 0 0 1px rgba(255, 255, 255, .06),
        0 40px 70px -24px rgba(11, 16, 48, .55),
        0 18px 36px -18px rgba(11, 16, 48, .4);
}
.credit-card:hover .credit-card-surface {
    box-shadow:
        inset 0 1px rgba(255, 255, 255, .18),
        inset 0 -1px rgba(0, 0, 0, .32),
        0 0 0 1px rgba(255, 255, 255, .08),
        0 55px 90px -28px rgba(11, 16, 48, .6),
        0 24px 46px -20px rgba(11, 16, 48, .45);
}

/* ===== Reference rebrand: 3-card fan, glossy blue Visa card ===== */

/* glossy blue front card sheen (bright diagonal swoosh) */
.credit-card--themed .credit-card-surface,
.credit-card--night .credit-card-surface {
    position: relative;
    overflow: hidden;
}
.credit-card--themed .credit-card-surface::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    background:
        linear-gradient(114deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.10) 43%, rgba(150,195,255,.42) 50%, rgba(255,255,255,.12) 57%, rgba(255,255,255,0) 72%),
        radial-gradient(75% 60% at 78% 92%, rgba(90,150,255,.35) 0%, rgba(90,150,255,0) 60%),
        radial-gradient(60% 50% at 20% 0%, rgba(255,255,255,.16) 0%, rgba(255,255,255,0) 60%);
}
/* subtle sheen on the black back card */
.credit-card--night .credit-card-surface::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    background:
        linear-gradient(120deg, rgba(255,255,255,0) 38%, rgba(255,255,255,.10) 50%, rgba(255,255,255,0) 62%),
        radial-gradient(60% 50% at 22% 0%, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 60%);
}

/* whiter, cleaner white card */
.credit-card--silver .credit-card-surface {
    background: linear-gradient(150deg, #ffffff 0%, #f1f2f6 40%, #e4e6ee 70%, #f6f7fb 100%) !important;
}

/* card header: logo left, contactless right */
.credit-card-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
}
.card-contactless { color: rgba(255,255,255,.85); display: flex; }
.credit-card--silver .card-contactless { color: rgba(20,24,60,.42); }

/* Visa wordmark */
.credit-card-footer { align-items: flex-end !important; }
.card-visa {
    font-family: Arial, Helvetica, sans-serif;
    font-style: italic;
    font-weight: 800;
    font-size: 27px;
    letter-spacing: -1.5px;
    line-height: 1;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,.28);
}
.credit-card--silver .card-visa { color: #1a2050; text-shadow: none; }

/* ---------- The 3-card fan ---------- */
.cards-showcase-new {
    position: relative;
    height: 420px !important;
}
.card-fan { z-index: 1; }
.card-fan .card-position { transition: transform .45s cubic-bezier(.22,1,.36,1); }

.card-fan .card-position-front  { z-index: 3; top: -8px;  left: -70px; transform: rotate(-13deg); }
.card-fan .card-position-back   { z-index: 2; top: 58px;  left: 14px;  transform: rotate(-2deg); }
.card-fan .card-position-back2  { z-index: 1; top: 110px; left: 58px;  transform: rotate(7deg); }

.card-fan .card-position-front:hover { transform: rotate(-13deg) translateY(-14px) scale(1.03); z-index: 10; }
.card-fan .card-position-back:hover  { transform: rotate(-2deg) translateY(-14px) scale(1.03); z-index: 10; }
.card-fan .card-position-back2:hover { transform: rotate(7deg) translateY(-14px) scale(1.03); z-index: 10; }

/* glowing light pad under the fan (instead of a solid podium) */
.cards-showcase-new::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 8px;
    width: 560px;
    height: 210px;
    transform: translateX(-46%);
    background:
        radial-gradient(ellipse 46% 46% at 50% 50%, rgba(150,175,255,.40) 0%, rgba(150,175,255,.14) 42%, rgba(150,175,255,0) 70%);
    filter: blur(3px);
    z-index: 0;
}
.cards-showcase-new::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 40px;
    width: 380px;
    height: 46px;
    transform: translateX(-42%);
    background: radial-gradient(ellipse at 50% 50%, rgba(18,26,54,.30) 0%, rgba(18,26,54,0) 70%);
    filter: blur(8px);
    z-index: 0;
}

/* ---------- Hero perks (left column chips) ---------- */
.hero-perks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, max-content));
    gap: 18px 34px;
    margin-top: 4px;
}
.perk { display: flex; align-items: center; gap: 12px; }
.perk-icon {
    width: 44px;
    height: 44px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--accent);
    background: linear-gradient(180deg, rgba(46,43,240,.10), rgba(46,43,240,.05));
    border: 1px solid rgba(46,43,240,.16);
    box-shadow: 0 1px 0 rgba(255,255,255,.6) inset;
}
.perk-text { display: flex; flex-direction: column; line-height: 1.2; }
.perk-title { font-size: 15px; font-weight: 650; letter-spacing: -.01em; color: var(--text-primary); }
.perk-sub { font-size: 13px; color: var(--text-secondary); }

@media (max-width: 560px) {
    .hero-perks { grid-template-columns: 1fr; }
}

/* punchy short headline */
.hero-title { font-size: 60px !important; line-height: 1.0 !important; }
@media (max-width: 900px) { .hero-title { font-size: 46px !important; } }

/* ---------- First screen fills the viewport regardless of the banner ----------
   The banner + hero are wrapped in .first-screen. It clears the fixed header
   and fills the rest of the viewport; the hero flexes to fill whatever the
   banner leaves, so closing the banner never opens a gap at the bottom. */
.first-screen {
    margin-top: 73px;                /* clear the fixed header */
    min-height: calc(100dvh - 73px); /* dvh = stable height, no jump when mobile bars toggle */
    display: flex;
    flex-direction: column;
}
.promo-banner { margin-top: 0 !important; } /* header already cleared by wrapper */
.promo-inner { padding-top: 6px !important; padding-bottom: 6px !important; }

.hero {
    padding-top: 26px !important;
    padding-bottom: 26px !important;
    flex: 1 1 auto;                 /* fill remaining space in .first-screen */
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column;
}
.hero-inner { flex: 1 1 auto; align-content: center; }
.hero-feature-bar { margin-top: auto !important; }
.hero-badge { margin-bottom: 16px !important; }
.hero-title { margin-bottom: 16px !important; }
.hero-desc { font-size: 17px !important; line-height: 1.55 !important; margin-bottom: 20px !important; max-width: 480px; }
.hero-actions { margin-bottom: 20px !important; }
.hero-perks { gap: 14px 32px !important; margin-top: 0 !important; }
.perk-icon { width: 42px !important; height: 42px !important; }

/* larger, more present card fan */
.cards-showcase-new { height: 420px !important; }
.card-fan { transform: scale(0.98); transform-origin: center 46%; }
.card-fan .card-position-front  { top: -6px !important;  left: -70px !important; transform: rotate(-12deg); }
.card-fan .card-position-back   { top: 46px !important;  left: 8px !important;   transform: rotate(-2deg); }
.card-fan .card-position-back2  { top: 88px !important;  left: 50px !important;  transform: rotate(6deg); }

.hfb-item { padding: 20px 28px !important; }
.hfb-stat { font-size: 23px !important; }
/* longer labels (e.g. "Apple & Google Pay") shrink to fit the cell */
.hfb-stat--sm { font-size: 17px !important; line-height: 1.15; }

/* bigger headline */
.hero-title { font-size: 66px !important; line-height: 1.0 !important; }
@media (max-width: 1100px) { .hero-title { font-size: 52px !important; } }

/* ---------- 10. Floating hero badges ----------
   Target the actual badge chips only. Do NOT add backdrop-filter to the
   .floating-* wrapper containers — they are large transparent boxes that
   fully overlap the 3D card, so blurring their backdrop blurs the card. */
.stat-card, .payment-badge, .audited-badge {
    box-shadow: var(--shadow-lg) !important;
    border: 1px solid rgba(16, 18, 46, .07) !important;
}

/* ---------- 11. Footer polish ---------- */
.footer {
    border-top: 1px solid rgba(16, 18, 46, .07);
    background: linear-gradient(180deg, rgba(247, 247, 251, 0) 0%, rgba(241, 242, 248, .8) 100%);
}

/* ---------- 12. Reward progress bars ---------- */
.rewards [class*="track"], .rewards [class*="progress"] {
    border-radius: 100px;
    overflow: hidden;
}
.rewards [class*="fill"], .rewards [class*="bar"] > [style*="width"] {
    background: linear-gradient(90deg, #2E2BF0 0%, #4B3BFF 60%, #6C5BFF 100%) !important;
    box-shadow: 0 2px 10px -2px rgba(46, 43, 240, .5);
    border-radius: 100px;
}

/* ---------- 14. Hero feature bar (reference bottom strip) ---------- */
.hero-feature-bar {
    max-width: 1160px;
    margin: 60px auto 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: #ffffff;
    border: 1px solid rgba(16, 18, 46, .06);
    border-radius: 22px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.hfb-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 26px 30px;
    border-right: 1px solid rgba(16, 18, 46, .07);
}
.hfb-item:last-child { border-right: none; }
.hfb-icon {
    width: 46px;
    height: 46px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    color: var(--accent);
    background: linear-gradient(180deg, rgba(46, 43, 240, .10), rgba(46, 43, 240, .05));
    border: 1px solid rgba(46, 43, 240, .14);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset;
}
.hfb-text { display: flex; flex-direction: column; line-height: 1.15; }
.hfb-stat {
    font-size: 24px;
    font-weight: 750;
    letter-spacing: -.02em;
    color: var(--text-primary);
}
.hfb-label {
    font-size: 13.5px;
    color: var(--text-secondary);
    margin-top: 2px;
}
@media (max-width: 900px) {
    .hero-feature-bar { grid-template-columns: repeat(2, 1fr); }
    .hfb-item:nth-child(2n) { border-right: none; }
    .hfb-item:nth-child(1), .hfb-item:nth-child(2) { border-bottom: 1px solid rgba(16, 18, 46, .07); }
}
@media (max-width: 520px) {
    .hero-feature-bar { grid-template-columns: 1fr; }
    .hfb-item { border-right: none; border-bottom: 1px solid rgba(16, 18, 46, .07); }
    .hfb-item:last-child { border-bottom: none; }
}

/* ---------- Card fan entrance animation (on page load) ---------- */
@keyframes cardRise {
    from { opacity: 0; transform: translateY(56px) scale(.9); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
/* animate the wrapper (rotation stays on .card-position, so hover still works) */
.card-fan .credit-card-wrapper {
    animation: cardRise .85s cubic-bezier(.22, 1, .36, 1) both;
}
.card-fan .card-position-back2 .credit-card-wrapper { animation-delay: .10s; } /* black first */
.card-fan .card-position-back  .credit-card-wrapper { animation-delay: .24s; } /* white */
.card-fan .card-position-front .credit-card-wrapper { animation-delay: .38s; } /* blue on top last */

/* card footer: cardholder + valid-thru side by side in the bottom-left */
.card-foot-fields { display: flex; gap: 28px; align-items: flex-end; }
.credit-card-info--exp .credit-card-value { letter-spacing: 1px; }

/* the details "write on" just after the blue card lands (premium detail) */
@keyframes footRise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.card-fan .card-position-front .credit-card-footer {
    animation: footRise .55s cubic-bezier(.22, 1, .36, 1) 1.2s both;
}

/* one-time glossy light sweep across the blue card after it lands */
@keyframes cardShineSweep {
    0%   { transform: translateX(-130%) skewX(-16deg); opacity: 0; }
    12%  { opacity: .9; }
    100% { transform: translateX(260%) skewX(-16deg); opacity: 0; }
}
.credit-card--themed .credit-card-surface::before {
    content: "";
    position: absolute;
    top: -12%;
    bottom: -12%;
    left: 0;
    width: 42%;
    z-index: 4;
    pointer-events: none;
    background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, .10) 34%, rgba(255, 255, 255, .5) 50%, rgba(255, 255, 255, .10) 66%, transparent 100%);
    transform: translateX(-130%) skewX(-16deg);
    animation: cardShineSweep 1.5s cubic-bezier(.4, 0, .2, 1) 1.4s 1 both;
}

/* ---------- 15. Smooth scrolling (laptop + mobile) ---------- */
/* no horizontal jitter from the overflowing card fan */
html, body { overflow-x: hidden; max-width: 100%; }
.landing { overflow-x: clip; }

/* On phones: let the hero be natural height. Forcing 100vh makes the layout
   jump every time the mobile address bar shows/hides during scroll. */
@media (max-width: 820px) {
    .first-screen { min-height: 0 !important; }
    .hero { display: block !important; }
    .hero-feature-bar { margin-top: 28px !important; }
    /* drop the heaviest ambient paint on small screens */
    .header {
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
        background: rgba(247, 247, 251, .94);
    }
}
/* ---------- 16. Mobile hero: compact, left-aligned, premium ---------- */
@media (max-width: 640px) {
    .hero { padding: 16px 20px 26px !important; }

    /* left-aligned, tighter text (note: runtime JS mangles .hero-content -> use survivors) */
    .hero-content-animate { text-align: left !important; align-items: flex-start !important; }
    .hero-badge { margin: 0 0 14px !important; }
    .hero-title { font-size: 37px !important; line-height: 1.03 !important; text-align: left !important; margin-bottom: 12px !important; }
    .hero-desc { font-size: 15px !important; line-height: 1.5 !important; text-align: left !important; margin: 0 0 18px !important; max-width: 100% !important; }

    /* full-width stacked buttons, not too tall */
    .hero-actions { flex-direction: column; align-items: stretch !important; gap: 11px; margin-bottom: 6px !important; }
    .hero-actions > * { width: 100% !important; justify-content: center !important; padding: 14px 20px !important; }

    /* cards right after the buttons: kill the big grid gap, pin fan to top */
    .hero-inner { row-gap: 6px !important; gap: 6px !important; }
    .hero-visual { margin-top: 0 !important; }
    .cards-showcase-new { height: 205px !important; align-items: flex-start !important; }
    .card-fan { transform: scale(.72) !important; transform-origin: center center; }
    .cards-showcase-new::before { bottom: 40px; width: 300px; height: 70px; }
    .cards-showcase-new::after { display: none; }
    .floating-stats, .floating-payments, .audited-badge { display: none !important; }

    /* feature bar: compact single-column rows */
    .hero-feature-bar { margin-top: 20px !important; border-radius: 18px; }
    .hfb-item { padding: 14px 18px !important; gap: 13px; }
    .hfb-icon { width: 40px; height: 40px; border-radius: 11px; }
    .hfb-stat { font-size: 19px !important; }
    .hfb-label { font-size: 12.5px; }
}

/* respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- 13. Focus states (accessibility + polish) ---------- */
.landing a:focus-visible,
.landing button:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--ring), var(--shadow-md);
}
