* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --mint:       #eaf1ed;
    --mint-deep:  #dde7e1;
    --teal:       #0f9e95;
    --teal-deep:  #0b817a;
    --navy:       #0c2530;
    --navy-soft:  #1a3a47;
    --muted:      #6b7b7a;
    --line:       #d4ded7;
    --white:      #ffffff;
    --shadow-card: 0 30px 70px rgba(12, 37, 48, 0.12), 0 12px 24px rgba(12, 37, 48, 0.06);
    --shadow-cc:   0 24px 50px rgba(15, 158, 149, 0.4), 0 10px 20px rgba(12, 37, 48, 0.15);
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--mint);
    color: var(--navy);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.back-link {
    position: fixed;
    bottom: 0.75rem;
    left: 0.75rem;
    z-index: 1000;
    color: var(--navy);
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    padding: 0.45rem 0.9rem;
    background: var(--white);
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(12, 37, 48, 0.08);
    opacity: 0.85;
    transition: opacity 0.3s, transform 0.3s;
}
.back-link:hover { opacity: 1; transform: translateY(-2px); }

/* =========================================================
   LOADER — credit card scan + counter
   ========================================================= */
.loader {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: var(--mint);
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.loader__card {
    position: relative;
    width: 340px;
    height: 210px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-deep) 100%);
    padding: 1.6rem 1.5rem;
    color: var(--white);
    overflow: hidden;
    box-shadow: var(--shadow-cc);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.loader__card::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -30%;
    width: 200%;
    height: 220%;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.16) 0%, transparent 60%);
    pointer-events: none;
}

.loader__card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}
.loader__card-chip {
    width: 46px; height: 34px;
    border-radius: 6px;
    background: linear-gradient(135deg, #f3d57a, #c89a3a);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1px;
    padding: 3px;
}
.loader__card-chip span {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 1px;
}
.loader__card-wifi { width: 24px; height: 24px; opacity: 0.9; }
.loader__card-wifi svg { width: 100%; height: 100%; }

.loader__card-number {
    display: flex;
    gap: 0.9rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.15rem;
    letter-spacing: 0.1em;
    position: relative;
    z-index: 2;
}
.loader__card-number span:last-child {
    font-variant-numeric: tabular-nums;
}

.loader__card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    font-weight: 600;
    position: relative;
    z-index: 2;
}
.loader__card-brand {
    font-family: 'Inter', sans-serif;
    font-style: italic;
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: -0.04em;
}

.loader__card-scan {
    position: absolute;
    top: 0;
    left: -20%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.5) 50%, transparent 100%);
    transform: skewX(-15deg);
    pointer-events: none;
    z-index: 3;
}

.loader__card-check {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(11, 129, 122, 0.85);
    color: var(--white);
    opacity: 0;
    backdrop-filter: blur(4px);
    z-index: 4;
}
.loader__card-check svg { width: 80px; height: 80px; }

.loader__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 340px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--navy);
}
.loader__counter {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--teal-deep);
}

.loader__bar {
    width: 340px;
    height: 4px;
    background: var(--mint-deep);
    border-radius: 999px;
    overflow: hidden;
}
.loader__bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--teal) 0%, var(--teal-deep) 100%);
    border-radius: inherit;
}

/* =========================================================
   FINTECH SECTION
   ========================================================= */
.fintech {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 780px;
    overflow: hidden;
    background: var(--mint);
}

.fintech__bg {
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        -60deg,
        transparent 0,
        transparent 80px,
        rgba(12, 37, 48, 0.025) 80px,
        rgba(12, 37, 48, 0.025) 81px
    );
    pointer-events: none;
}

/* ---------- Top nav ---------- */
.topnav {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    padding: 1.5rem 3rem;
    gap: 1.5rem;
}

.topnav__logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--navy);
}
.topnav__logo-mark { width: 28px; height: 28px; }
.topnav__logo-mark svg { width: 100%; height: 100%; display: block; }
.topnav__logo-text {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
}

.topnav__links {
    display: flex;
    gap: 2.25rem;
    margin-left: 3rem;
}
.topnav__links a {
    color: var(--navy);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding-bottom: 0.2rem;
    transition: color 0.3s;
}
.topnav__links a::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 2px;
    background: var(--teal);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}
.topnav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

.topnav__actions {
    margin-left: auto;
    display: flex;
    gap: 0.75rem;
}
.topnav__btn {
    padding: 0.6rem 1.4rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.topnav__btn--ghost {
    color: var(--navy);
    border: 1px solid var(--line);
}
.topnav__btn--ghost:hover { background: var(--white); }
.topnav__btn--solid {
    background: var(--teal);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(15, 158, 149, 0.3);
}
.topnav__btn--solid:hover { background: var(--teal-deep); transform: translateY(-2px); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 3rem 4rem 4rem;
    align-items: center;
    min-height: calc(100vh - 100px);
}

/* Left column */
.hero__left { max-width: 560px; }

.hero__title {
    font-size: clamp(2.4rem, 4.4vw, 4rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--navy);
    margin-bottom: 1.75rem;
}
.hero__line {
    display: block;
    overflow: hidden;
    padding-bottom: 0.05em;
}
.hero__line-inner {
    display: inline-block;
    transform: translateY(110%);
    will-change: transform;
}

.hero__desc {
    font-size: 1.05rem;
    line-height: 1.55;
    color: var(--muted);
    margin-bottom: 2rem;
}

.hero__form {
    display: flex;
    align-items: center;
    background: var(--white);
    border-radius: 999px;
    padding: 0.45rem;
    max-width: 440px;
    margin-bottom: 2.5rem;
    box-shadow: 0 8px 24px rgba(12, 37, 48, 0.06);
}
.hero__input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--navy);
    outline: none;
}
.hero__input::placeholder { color: var(--muted); }
.hero__submit {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--teal);
    color: var(--white);
    border: none;
    border-radius: 999px;
    padding: 0.75rem 1.4rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.25s, transform 0.25s;
}
.hero__submit svg { width: 16px; height: 16px; }
.hero__submit:hover { background: var(--teal-deep); transform: translateX(2px); }

.hero__logos {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    flex-wrap: wrap;
}
.hero__logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.02em;
    opacity: 0.8;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.hero__logo em { color: var(--teal); font-style: normal; }
.hero__logo--2 { font-weight: 600; }
.hero__logo--3 svg { width: 18px; height: 18px; color: var(--navy); }

/* Right column — payment card + credit card */
.hero__right {
    position: relative;
    min-height: 580px;
}

/* Credit card overlay */
.cc {
    position: absolute;
    top: -10px;
    right: -40px;
    width: 340px;
    height: 210px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-deep) 100%);
    padding: 1.5rem;
    color: var(--white);
    box-shadow: var(--shadow-cc);
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    will-change: transform;
}
.cc::before {
    content: '';
    position: absolute;
    top: -80%; right: -40%;
    width: 220%; height: 260%;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.16) 0%, transparent 60%);
    pointer-events: none;
}
.cc__label {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    opacity: 0.9;
    font-weight: 500;
    position: relative; z-index: 2;
}
.cc__number {
    display: flex;
    gap: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.3rem;
    letter-spacing: 0.1em;
    position: relative; z-index: 2;
}
.cc__wifi {
    position: absolute;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 28px; height: 28px;
    z-index: 2;
}
.cc__wifi svg { width: 100%; height: 100%; }
.cc__brand {
    font-style: italic;
    font-weight: 800;
    font-size: 1.8rem;
    letter-spacing: -0.04em;
    position: relative; z-index: 2;
}

/* White payment card */
.pay {
    position: absolute;
    top: 40px;
    right: 60px;
    width: 380px;
    background: var(--white);
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: var(--shadow-card);
    z-index: 2;
    will-change: transform;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pay__profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
}
.pay__avatar {
    width: 44px; height: 44px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--teal);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pay__avatar img { width: 100%; height: 100%; object-fit: cover; }
.pay__name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--navy);
}
.pay__email {
    font-size: 0.8rem;
    color: var(--muted);
}

.pay__invoice {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1rem 1.25rem;
}
.pay__invoice-label {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.25rem;
}
.pay__invoice-amount {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    margin-bottom: 0.25rem;
}
.pay__invoice-date {
    font-size: 0.78rem;
    color: var(--muted);
}

.pay__method {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    transition: border-color 0.25s ease, background 0.25s ease;
    cursor: pointer;
}
.pay__method.is-active {
    border-color: var(--teal);
    background: rgba(15, 158, 149, 0.03);
}
.pay__method-icon { width: 22px; height: 22px; color: var(--navy); flex-shrink: 0; }
.pay__method-icon svg { width: 100%; height: 100%; }
.pay__method-label {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--navy);
}
.pay__method-radio {
    width: 18px; height: 18px;
    border-radius: 50%;
    border: 1.5px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.25s ease;
}
.pay__method-radio span {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--teal);
    transform: scale(0);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pay__method.is-active .pay__method-radio {
    border-color: var(--teal);
}
.pay__method.is-active .pay__method-radio span {
    transform: scale(1);
}

.pay__btn {
    margin-top: 0.25rem;
    background: var(--navy);
    color: var(--white);
    border: none;
    border-radius: 12px;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: background 0.25s, transform 0.2s;
}
.pay__btn:hover { background: var(--navy-soft); transform: translateY(-1px); }
.pay__btn::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-20deg);
    transition: none;
}
.pay__btn.is-shimmer::after {
    animation: shimmerSweep 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes shimmerSweep {
    0%   { left: -100%; }
    100% { left: 220%; }
}

/* ---------- Hidden initial states ---------- */
[data-nav], [data-fade], [data-logo], [data-cc], [data-pay] { opacity: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .topnav { padding: 1.25rem 2rem; }
    .topnav__links { display: none; }
    .hero { grid-template-columns: 1fr; padding: 2rem 2rem 3rem; gap: 2rem; }
    .hero__right { min-height: 480px; }
    .pay { right: 20px; width: 340px; }
    .cc { right: 0; width: 300px; }
}
@media (max-width: 640px) {
    .hero__logos { gap: 1.25rem; }
    .hero__logo { font-size: 1.1rem; }
    .pay { right: 50%; transform: translateX(50%); width: 90%; max-width: 360px; }
    .cc { right: 50%; transform: translateX(40%); width: 280px; top: -20px; }
}
