*, *::before, *::after {
    box-sizing: border-box;
}

body, html, * {
    margin: 0;
    padding: 0;
}

:root {
    --blue: #0D83C8;
    --gray: #474B4F;
    --bg: #ffffff;
    --text: #222;
    --muted: #6b7280;
    --blue-light: #4FC3F7;
}

@font-face {
    font-family: 'Lato';
    src: url('../fonts/lato/Lato-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lato';
    src: url('../fonts/lato/Lato-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lato';
    src: url('../fonts/lato/Lato-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lato';
    src: url('../fonts/lato/Lato-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lato';
    src: url('../fonts/lato/Lato-Thin.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Lato', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

main {
    padding: 0;
}

hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 24px 0;
}

.accent {
    color: var(--blue);
}

.signup-title {
    text-align: center;
    color: #000;
    margin: 48px 0 24px;
    font-size: clamp(1.4rem, 2.8vw, 1.8rem);
    font-weight: 100;
    line-height: 1.15;
}

.arrow-toggle {
    appearance: none;
    background: #fff;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    display: grid;
    place-items: center;
    padding: 0;
    width: 55px;
    height: 55px;
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(0,0,0,.12);
    position: absolute;
    bottom: -27.5px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.arrow-toggle img {
    width: 22px;
    height: 22px;
    opacity: .85;
    transition: transform .25s ease, opacity .2s ease;
}

.arrow-toggle:hover img {
    opacity: 1;
}

.arrow-toggle.rotated img {
    transform: rotate(180deg);
}

.collapsible {
    display: block;
    transition: opacity .35s ease;
    opacity: 1;
}

.collapsible.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.collapsible.is-hidden-final {
    display: none;
}

hr.signup-hr {
    display: block;
    transition: opacity .35s ease;
    opacity: 1;
}

hr.signup-hr.is-hidden {
    opacity: 0;
    pointer-events: none;
}

hr.signup-hr.is-hidden-final {
    display: none;
}

header {
    background: transparent;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 20px 20px;
}

header picture {
    display: flex;
    align-items: center;
    height: 135px;
}
header picture img {
    height: 100%;
    width: auto;
    margin: 0;
    object-fit: contain;
}

@media (min-width: 1024px) {
    header {
        height: clamp(10vh, 10vh, 12vh);
        justify-content: flex-start;
        padding: 90px 40px 20px;
        padding-left: clamp(10px, 10vw, 250px);
    }
    header picture {
        height: clamp(135px, 13.5vh, 225px);
    }
    header img,
    header picture img {
        height: 100%;
        width: auto;
        max-height: none;
    }
}

.main-men-background {
    background: url(../IMG/background.png);
    background-size: cover;
    background-position: 70% center;
    min-height: 400px;
    height: 50vh;
    max-height: 600px;
    display: grid;
    align-content: center;
    justify-items: center;
    text-align: center;
    color: #000;
    position: relative;
}

.main-men-background::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: none;
}

@media (max-width: 1023px) {
    .main-men-background::after {
        display: block;
    }
    
    .main-men-background p {
        position: relative;
        z-index: 1;
        color: #fff;
    }
    
    .accent {
        color: #fff;
    }
    
    .acc-9, .acc-comma, .acc-5, .acc-pct {
        color: var(--blue-light);
    }
    
    header {
        justify-content: center;
    }
}

.main-men-background p {
    margin: 0;
}

.main-men-first-paragraph {
    font-weight: 700;
    font-size: clamp(2rem, 6vw, 3.5rem);
    text-shadow: 0 2px 6px rgba(0,0,0,.35);
}

.main-men-second-paragraph {
    font-weight: 300;
    font-size: clamp(2rem, 6vw, 3.5rem);
    line-height: 0.5;
    opacity: .95;
    text-shadow: 0 3px 10px rgba(0,0,0,.35);
}

.sign-up-form {
    max-width: 560px;
    margin: 16px auto 0;
    display: grid;
    gap: 16px;
}

.sign-up-form p {
    margin: 0;
}

.sign-up-form input, .sign-up-form button {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--blue);
    font-size: 1rem;
}

.sign-up-form input:focus {
    outline: 2px solid var(--blue);
    outline-offset: 1px;
}

.sign-up-form button {
    background: var(--blue);
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.sign-up-form button:hover {
    filter: brightness(1.05);
}

.steps {
    padding: 8px 0;
    margin-top: 0;
    color: #000;
    transition: margin-top 0.35s ease;
}

.steps h2 {
    text-align: center;
    font-size: clamp(1.65rem, 4.8vw, 2.4rem);
    margin-bottom: 16px;
    font-weight: 100;
}

.steps h2 strong {
    font-weight: 700;
}
.steps-flex {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.step {
    background: transparent;
    border: none;
    padding: 16px;
    text-align: center;
}

.step img {
    width: 110px;
    height: 110px;
    margin: 0 auto 6px;
}

.step h3 {
    margin: 8px 0;
    font-size: 1.6rem;
    font-weight: 600;
}

.pointer-right {
    display: none;
    align-self: center;
}

.pointer-down {
    display: flex;
    justify-content: center;
    margin: 8px 0;
}

.pointer-down img {
    width: 28px;
    height: auto;
    opacity: .6;
    transform: rotate(90deg);
}

.exchange, .exchange p {
    color: #000;
}

.exchange-form > p {
    margin-top: 25px;
}

.exchange-flex {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.how-works h1 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    margin-bottom: 30px;
    font-weight: 100;
    text-shadow: 0 2px 6px rgba(0,0,0,.25);
    text-align: center;
}

.how-works img {
    border-radius: 12px;
}

.exchange-form form {
    display: grid;
    gap: 12px;
}

.exchange-form input, .exchange-form select, .exchange-form button {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--blue);
    font-size: 1rem;
}

.exchange-form button {
    background: var(--blue);
    color: #fff;
    border: none;
    font-weight: 600;
    cursor: pointer;
}

.exchange-form button:hover {
    filter: brightness(1.05);
}

.currency-converter {
    width: 100%;
    max-width: 380px;
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin: 60px auto 0;
}

.currency-box {
    margin-bottom: 15px;
}

.currency-box label {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 5px;
    display: block;
    text-align: right;
}

.input-container {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.currency-select {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: #f9f9f9;
    border: none;
    border-right: 1px solid #ddd;
    cursor: pointer;
    font-size: 1rem;
    min-width: 120px;
    justify-content: space-between;
}

.currency-select .flag {
    font-size: 1.5rem;
    margin-right: 10px;
}

.currency-select .code {
    font-weight: bold;
    margin-right: 5px;
}

.currency-select .arrow {
    font-size: 0.7rem;
    color: #777;
    margin-left: auto;
}

.input-container input[type="number"] {
    flex-grow: 1;
    border: none;
    padding: 15px;
    font-size: 1.2rem;
    text-align: right;
    width: 100%;
    -moz-appearance: textfield;
}

input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
    -webkit-appearance: none; 
    margin: 0; 
}

.swap-button {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0 0 0;
    background: #e0e0e0;
    border: 1px solid #bbb;
    border-radius: 50%;
    width: 40px !important;
    height: 40px;
    max-width: 40px;
    min-width: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    color: #555;
    z-index: 2;
    position: relative;
    padding: 0;
    box-sizing: border-box;
}

.swap-button:hover {
    background: #e0e0e0;
    border-color: #bbb;
}

.currency-dropdown {
    position: absolute;
    width: 350px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 10;
    margin-top: 5px;
}

.currency-dropdown.hidden {
    display: none;
}

.currency-dropdown .search-currency {
    width: calc(100% - 22px);
    padding: 10px;
    margin: 10px 10px 5px 10px;
    border: 1px solid #eee;
    border-radius: 4px;
    box-sizing: border-box;
}

.currency-dropdown ul {
    list-style: none;
    padding: 0;
    margin: 0 0 10px 0;
    max-height: 200px;
    overflow-y: auto;
}

.currency-dropdown li {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
}

.currency-dropdown li:hover {
    background: #f5f5f5;
}

.currency-dropdown li .flag {
    font-size: 1.5rem;
    margin-right: 15px;
}

footer {
    text-align: center;
    padding: 24px 16px;
    color: var(--muted);
}

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-to-top img {
    width: 20px;
    height: 20px;
    transform: rotate(180deg);
}

.scroll-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.scroll-to-top.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.steps, .exchange, .sign-up-form, .signup-title {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
}

.exchange {
    padding-left: 40px;
    padding-right: 40px;
}

.steps, .exchange {
    padding-top: 16px;
}

@media (min-width: 768px) {
    .steps-flex {
        flex-direction: row;
        align-items: stretch;
    }
    
    .step {
        flex: 1 1 0;
    }
    
    .pointer-right {
        display: flex;
    }
    
    .pointer-right img {
        width: 28px;
        height: auto;
        opacity: .6;
    }
    
    .pointer-down {
        display: none;
    }

    .sign-up-form {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        max-width: 900px;
    }
    
    .sign-up-form p:last-child {
        grid-column: 1 / -1;
        justify-self: center;
    }
    
    .sign-up-form button {
        width: auto;
        padding-left: 24px;
        padding-right: 24px;
    }
}

@media (min-width: 1024px) {
    .main-men-background {
        justify-items: start;
        text-align: left;
        padding-left: clamp(40px, 8vw, 120px);
    }
    
    .exchange-flex {
        flex-direction: row;
    }
    
    .how-works, .exchange-form {
        flex: 1 1 0;
    }
    
    .exchange-form form p:nth-child(2) {
        display: flex;
        gap: 10px;
        align-items: center;
    }
    
    .exchange-form form p:nth-child(2) select {
        flex: 1;
    }
    
    .exchange-form form p:nth-child(2) span {
        flex: 0 0 auto;
        opacity: .7;
    }
    
    .steps-flex .step:first-child {
        margin-left: 10%;
    }
    
    .steps-flex .step:last-child {
        margin-right: 10%;
    }
    
    .signup-title {
        font-size: clamp(1.5rem, 2.4vw, 2.25rem);
    }
}

body.signup-collapsed .steps {
    margin-top: 48px;
}

@media (max-width: 1290px) {
    .acc-pct {
        color: var(--blue-light);
    }
}

@media (max-width: 1225px) {
    .acc-5 {
        color: var(--blue-light);
    }
}

@media (max-width: 1180px) {
    .acc-comma {
        color: var(--blue-light);
    }
}

@media (max-width: 1150px) {
    .acc-9 {
        color: var(--blue-light);
    }
}