/* =========================
   Basic Styles
========================= */

:root {
    --green-dark: #123c2f;
    --green: #14532d;
    --green-light: #6f8f78;
    --green-pale: #edf4ef;

    --background: #f7f8f5;
    --surface: #ffffff;

    --text: #1f2937;
    --text-soft: #727c77;

    --border: #dfe5e1;
    --border-soft: #edf0ee;

    --shadow-card: 0 18px 50px rgba(18, 60, 47, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background-color: var(--background);
    color: var(--text);
    font-family: "Nunito", sans-serif;
}

button,
input,
select {
    font: inherit;
}

a {
    color: inherit;
}

.container {
    width: min(100% - 40px, 1160px);
    margin-inline: auto;
}

.numeric {
    font-family: "DM Mono", monospace;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* =========================
   Navbar
========================= */

.navbar {
    position: relative;
    z-index: 10;
    background-color: var(--green-dark);
}

.navbar-container {
    width: min(100% - 40px, 1160px);
    min-height: 72px;
    margin-inline: auto;

    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
}

.logo {
    justify-self: start;

    display: inline-flex;
    align-items: center;
    gap: 10px;

    color: white;
    text-decoration: none;
    font-size: 20px;
    font-weight: 800;
}

.logo-mark {
    display: none;
}

.main-navigation {
    justify-self: center;

    display: flex;
    align-items: center;
    gap: 34px;
}

.main-navigation a {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition:
        color 160ms ease,
        opacity 160ms ease;
}

.main-navigation a:hover {
    color: white;
}

.navbar-spacer {
    justify-self: end;
    width: 1px;
}


/* =========================
   Hero
========================= */

.hero {
    padding: 78px 0 175px;
    background-color: var(--background);
    text-align: center;
}

.hero h1 {
    max-width: 790px;
    margin: 0 auto 22px;

    color: var(--green-dark);
    font-family: "Nunito", serif;
    font-size: clamp(36px, 4.8vw, 54px);
    font-weight: 700;
    line-height: 0.98;
    letter-spacing: -0.045em;
}
.hero-first-line,
.hero-second-line {
    display: block;
}

.hero-first-line {
    color: var(--green-dark);
}

.hero-second-line {
    color: var(--green-light);
}

.hero-description {
    max-width: 590px;
    margin: 0 auto;

    color: var(--text-soft);
    font-size: 17px;
    line-height: 1.65;
}
#hero-word {
    display: inline-block;
    min-width: 130px;
    color: inherit;
    transition: opacity 0.35s ease;
}

#hero-word.fade-out {
    opacity: 0;
}

.hero-accent {
    color: var(--green-light);
}

.supported-destinations {
    margin-top: 20px;

    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
}

.destination-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    color: var(--green-dark);
    font-size: 14px;
    font-weight: 700;
}

.destination-flag {
    width: 24px;
    height: 24px;
}

/* =========================
   Calculator section
========================= */

.comparison-section {
    position: relative;
    z-index: 2;
    margin-top: -120px;
}

.calculator-card {
    width: min(100%, 480px);
    margin-inline: auto;
    padding: 32px;

    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow-card);
}

.transfer-field {
    width: 100%;
}

.transfer-field label {
    display: block;
    margin-bottom: 9px;

    color: #54605a;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.currency-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 138px;
    align-items: stretch;
}

.amount-input {
    width: 100%;
    height: 68px;
    padding: 0 18px;

    border: 1px solid var(--border);
    border-right: 0;
    border-radius: 14px 0 0 14px;
    outline: none;

    background-color: white;
    color: var(--green-dark);

    font-size: 29px;
    font-weight: 500;

    transition:
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.amount-input:focus {
    position: relative;
    z-index: 1;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(20, 83, 45, 0.10);
}

.amount-input[readonly] {
    background-color: #fbfcfb;
    color: #44524b;
}

.currency-selector {
    height: 68px;
    padding: 0 12px;

    display: flex;
    align-items: center;
    gap: 9px;

    border: 1px solid var(--border);
    border-radius: 0 14px 14px 0;
    background-color: #fbfcfb;
}

.flag {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;

    border: 1px solid rgba(18, 60, 47, 0.10);
    border-radius: 50%;

    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;

    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.10);
}

.flag-se {
    background-image:
        linear-gradient(
            90deg,
            transparent 0 30%,
            #f6c500 30% 43%,
            transparent 43% 100%
        ),
        linear-gradient(
            transparent 0 43%,
            #f6c500 43% 57%,
            transparent 57% 100%
        ),
        linear-gradient(#1769aa, #1769aa);
}

.flag-et {
    background-image:
        linear-gradient(
            to bottom,
            #078930 0 33.33%,
            #fcd116 33.33% 66.66%,
            #da121a 66.66% 100%
        );
}

.flag-er {
    background-image:
        linear-gradient(
            to bottom,
            #3c8d2f 0 33.33%,
            #d81e34 33.33% 66.66%,
            #2c6eb5 66.66% 100%
        );
}

.flag-so {
    background-image:
        radial-gradient(
            circle at center,
            white 0 18%,
            transparent 19%
        ),
        linear-gradient(#4189dd, #4189dd);
}

.flag-in {
    background-image:
        radial-gradient(
            circle at center,
            #1a4d8f 0 8%,
            transparent 9%
        ),
        linear-gradient(
            to bottom,
            #ff9933 0 33.33%,
            white 33.33% 66.66%,
            #138808 66.66% 100%
        );
}

.currency-selector select {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0 24px 0 0;

    border: 0;
    outline: 0;
    background-color: transparent;

    color: var(--green-dark);
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
}

.transfer-divider {
    position: relative;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.transfer-divider::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 50%;
    height: 1px;
    background-color: var(--border-soft);
}

.transfer-divider span {
    position: relative;
    z-index: 1;

    width: 30px;
    height: 30px;

    display: grid;
    place-items: center;

    border: 1px solid var(--border);
    border-radius: 50%;
    background-color: white;
    color: var(--green-dark);

    font-size: 15px;
    font-weight: 800;
}


/* =========================
   Results
========================= */

.results {
    padding: 78px 0 96px;
}

.results-heading {
    margin-bottom: 24px;
}

.results h2 {
    margin: 0 0 6px;

    color: var(--green-dark);
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.results-intro {
    margin: 0;
    color: var(--text-soft);
    font-size: 15px;
}

.results-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.results-updated {
    margin: 0;

    color: var(--green);

    font-size: 14px;
    font-weight: 700;
}

.table-card {
    overflow: hidden;

    background-color: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 12px 36px rgba(18, 60, 47, 0.07);
}

.table-scroll {
    max-height: 520px;
    overflow-x: auto;
}

table {
    width: 100%;
    min-width: 930px;
    border-collapse: collapse;
}

thead {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: #f3f6f4;
}

th {
    padding: 16px 20px;

    color: #68736d;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

td {
    padding: 21px 20px;

    border-top: 1px solid var(--border-soft);
    color: #435049;
    font-size: 14px;
    vertical-align: middle;
    white-space: nowrap;
}

/* Recipient gets column */

td:nth-child(2) strong {
    font-size: 18px;
    font-weight: 900;
    color: var(--green-dark);
}

tbody tr.best-option td:nth-child(2) strong {
    font-size: 21px;
}

tbody tr {
    transition: background-color 150ms ease;
}

tbody tr:hover {
    background-color: #fafcfb;
}

tbody tr.best-option {
    background-color: var(--green-pale);
}

tbody tr.best-option:hover {
    background-color: #e7f0e9;
}

.provider-name {
    display: flex;
    align-items: center;
    gap: 12px;
}

.provider-name strong {
    color: var(--green-dark);
    font-size: 15px;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 9px;

    border-radius: 999px;
    background-color: var(--green-dark);
    color: white;

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.provider-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    color: var(--green-dark);
    font-weight: 800;
    text-decoration: none;
}

.provider-link:hover {
    text-decoration: underline;
}


/* =========================
   Temporary sections
========================= */

.placeholder-section {
    padding: 70px 0;
    background-color: white;
    border-top: 1px solid var(--border-soft);
}

.placeholder-section h2 {
    margin: 0;
    color: var(--green-dark);
}


/* =========================
   Mobile
========================= */

@media (max-width: 760px) {
    .container,
    .navbar-container {
        width: min(100% - 28px, 1160px);
    }

    .navbar-container {
        min-height: 68px;
        grid-template-columns: 1fr auto;
    }

    .main-navigation {
        justify-self: end;
        gap: 16px;
    }

    .main-navigation a {
        font-size: 12px;
    }

    .navbar-spacer {
        display: none;
    }

    .hero {
        padding: 62px 0 150px;
    }

    .hero h1 {
        font-size: clamp(38px, 11vw, 55px);
        line-height: 1.02;
    }

    .hero-description {
        font-size: 16px;
    }

.supported-destinations {
    gap: 12px;
}

.destination-chip {
    font-size: 13px;
}

.destination-flag {
    width: 22px;
    height: 22px;
}

    .comparison-section {
        margin-top: -100px;
    }

    .calculator-card {
        padding: 22px;
        border-radius: 20px;
    }

    .currency-row {
        grid-template-columns: minmax(0, 1fr) 124px;
    }

    .amount-input {
        height: 62px;
        font-size: 24px;
    }

    .currency-selector {
        height: 62px;
    }

    .flag {
        width: 27px;
        height: 27px;
    }

    .results {
        padding-top: 60px;
    }
}

@media (max-width: 540px) {

    .navbar-container {
        display: flex;
        justify-content: center;
    }

    .logo {
        justify-self: center;
    }

    .main-navigation {
        display: none;
    }

    .hero {
        padding-top: 52px;
    }

    .hero h1 {
        font-size: 40px;
    }

    .calculator-card {
        padding: 18px;
    }

    .currency-row {
        grid-template-columns: minmax(0, 1fr) 112px;
    }

    .amount-input {
        padding-inline: 13px;
        font-size: 21px;
    }

    .currency-selector {
        padding-inline: 9px;
        gap: 7px;
    }

    .currency-selector select {
        font-size: 14px;
    }

    .flag {
        width: 25px;
        height: 25px;
    }
}

.provider-logo-wrapper {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    overflow: hidden;
    display: grid;
    place-items: center;
}

.provider-logo {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 36px;
    max-height: 36px;
    object-fit: contain;
}

.provider-logo-fallback {
    display: none;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 9px;
    background-color: #f6f8f7;
    color: var(--green-dark);
    font-size: 10px;
    font-weight: 800;
}

/* =========================
   Mobile card for results
========================= */

@media (max-width: 760px) {
    .table-card {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .table-scroll {
        max-height: none;
        overflow: visible;
    }

    table {
        min-width: 0;
        border-collapse: separate;
    }

    thead {
        display: none;
    }

    tbody {
        display: grid;
        gap: 16px;
    }

    tbody tr {
        display: block;
        overflow: hidden;

        background-color: white;
        border: 1px solid var(--border);
        border-radius: 18px;
        box-shadow: 0 10px 28px rgba(18, 60, 47, 0.07);
    }

    tbody tr.best-option {
        background-color: white;
        border-color: rgba(18, 60, 47, 0.28);
    }

    tbody tr:hover,
    tbody tr.best-option:hover {
        background-color: white;
    }

    td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px;

        padding: 13px 18px;
        border-top: 1px solid var(--border-soft);
        white-space: normal;
        text-align: right;
    }

    td:first-child {
        padding-top: 18px;
        padding-bottom: 18px;
        border-top: 0;
    }

    td::before {
        content: attr(data-label);
        color: var(--text-soft);
        font-family: "Nunito", sans-serif;
        font-size: 12px;
        font-weight: 700;
        text-align: left;
    }

    td:first-child::before,
    td:last-child::before {
        display: none;
    }

    .provider-name {
        width: 100%;
    }

    td:nth-child(2) {
        padding-top: 18px;
        padding-bottom: 18px;
        background-color: var(--green-pale);
    }

    td:nth-child(2)::before {
        color: var(--green-dark);
        font-weight: 800;
    }

    td:nth-child(2) strong,
    tbody tr.best-option td:nth-child(2) strong {
        color: var(--green-dark);
        font-size: 22px;
        font-weight: 900;
    }

    td:last-child {
        padding: 0;
        border-top: 0;
    }

    .provider-link {
        width: 100%;
        min-height: 52px;
        padding: 0 18px;

        justify-content: center;

        background-color: var(--green-dark);
        color: white;
        text-decoration: none;
    }

    .provider-link:hover {
        background-color: var(--green);
        text-decoration: none;
    }
}

/* =========================
   About
========================= */

#about {
    padding: 96px 0;
}

.about-intro {
    max-width: 720px;
}

.section-label {
    margin: 0 0 10px;

    color: var(--green-light);
    font-size: clamp(25px, 3vw, 34px);
    font-weight: 900;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

#about h2 {
    margin: 0 0 18px;

    color: var(--green-dark);
    font-family: "Nunito", sans-serif;
    font-size: clamp(25px, 3vw, 34px);
    font-weight: 650;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.about-lead {
    margin: 0 0 14px;

    color: var(--green-dark);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.5;
}

.about-intro > p:last-child {
    margin: 0;

    color: var(--text-soft);
    font-size: 16px;
    line-height: 1.7;
}

.about-principles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;

    margin-top: 42px;
}

.about-principles article {
    padding: 24px;

    border: 1px solid var(--border);
    border-radius: 16px;
    background-color: white;
}

.about-principles h3 {
    margin: 0 0 10px;

    color: var(--green-dark);
    font-size: 18px;
}

.about-principles p {
    margin: 0;

    color: var(--text-soft);
    line-height: 1.65;
}

@media (max-width: 760px) {
    .about-principles {
        grid-template-columns: 1fr;
    }
}

/* =========================
   FAQ
========================= */

.faq-section {
    padding: 96px 0;
}

.faq-section h2 {
    margin-bottom: 32px;

    color: var(--green-dark);
    font-family: "Nunito", serif;
    font-size: clamp(25px, 3vw, 34px);
}

.faq-section details {
    margin-bottom: 16px;

    border: 1px solid var(--border);
    border-radius: 14px;
    background: white;
}

.faq-section summary {
    padding: 20px 24px;

    cursor: pointer;
    list-style: none;

    font-weight: 700;
    color: var(--green-dark);
}

.faq-section summary::-webkit-details-marker {
    display: none;
}

.faq-section summary::after {
    content: "+";
    float: right;

    font-size: 22px;
    font-weight: 400;
}

.faq-section details[open] summary::after {
    content: "−";
}

.faq-section details p {
    margin: 0;
    padding: 0 24px 24px;

    color: var(--text-soft);
    line-height: 1.7;
}

/* =========================
   Footer
========================= */

.site-footer {
    margin-top: 80px;
    padding: 60px 0 40px;

    background: var(--green-dark);
    color: white;
}

.footer-top {
    max-width: 600px;
}

.footer-top h2 {
    margin: 0 0 12px;

    font-size: 32px;
    font-family: "Nunito", serif;
}

.footer-top p {
    margin: 0;

    color: rgba(255,255,255,.75);
    line-height: 1.7;
}

.footer-links {
    display: flex;
    gap: 24px;

    margin: 36px 0;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-weight: 700;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-disclaimer {
    padding: 28px 0;

    border-top: 1px solid rgba(255,255,255,.15);
    border-bottom: 1px solid rgba(255,255,255,.15);
}

.footer-disclaimer p {
    color: rgba(255,255,255,.72);
    line-height: 1.7;
}

.footer-bottom {
    margin-top: 30px;

    color: rgba(255,255,255,.55);
    font-size: 14px;
}
/* =========================
   Information pages
========================= */

.info-page {
    padding: 72px 0 96px;
}

.info-content {
    max-width: 780px;
    margin-inline: auto;
}

.info-content h1 {
    margin: 0 0 16px;

    color: var(--green-dark);
    font-size: clamp(34px, 5vw, 48px);
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.info-updated {
    margin: 0 0 40px;
    color: var(--text-soft);
    font-size: 14px;
}

.info-content section {
    margin-top: 36px;
}

.info-content h2 {
    margin: 0 0 12px;

    color: var(--green-dark);
    font-size: 23px;
    line-height: 1.3;
}

.info-content p,
.info-content li {
    color: var(--text-soft);
    font-size: 16px;
    line-height: 1.75;
}

.info-content p {
    margin: 0 0 16px;
}

.info-content ul {
    margin: 0 0 16px;
    padding-left: 24px;
}

.info-content a {
    color: var(--green);
    font-weight: 700;
}

@media (max-width: 760px) {
    .info-page {
        padding: 52px 0 72px;
    }

    .info-content section {
        margin-top: 30px;
    }
}
/* =========================
   Unavailable providers
========================= */

.unavailable-option {
    opacity: 0.68;
}

.unavailable-text {
    color: var(--text-soft);
    font-family: "Nunito", sans-serif;
    font-size: 14px;
    font-weight: 700;
}

.provider-unavailable {
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 700;
}