/* SwapLingo marketing site — modern light aesthetic */
/* Tokens mirror mobile/src/theme/tokens.ts (T) — teal primary, Nunito, soft cards. */

:root {
    /* Surfaces */
    --bg:            #F4F6F8;
    --surface:       #FFFFFF;
    --surface-sunken:#EEF1F4;
    --overlay:       rgba(17, 20, 24, 0.55);

    /* Brand — teal carries over the retro cyan heritage */
    --primary:       #0FB5AE;
    --primary-dark:  #0B8F89;
    --primary-ghost: rgba(15, 181, 174, 0.12);

    /* Status */
    --success:       #16A34A;
    --danger:        #EF4444;
    --warning:       #F59E0B;
    --online:        #22C55E;

    /* Text */
    --text:          #15181E;
    --text-secondary:#5B6472;
    --text-muted:    #98A1B0;
    --text-inverse:  #FFFFFF;

    /* Lines */
    --border:        #E4E7EC;
    --border-strong: #D0D5DD;

    /* Soft pastel tints (grouped cards) */
    --tint-amber-bg:  #FBEFD6; --tint-amber-accent:  #9A6B1E;
    --tint-indigo-bg: #E6E8FB; --tint-indigo-accent: #4B4FB2;
    --tint-green-bg:  #E3F1E8; --tint-green-accent:  #2E7D52;
    --tint-rose-bg:   #FBE3E6; --tint-rose-accent:   #B23A48;

    /* Radii */
    --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-pill: 999px;

    /* Shadows */
    --shadow-1: 0 2px 8px rgba(11, 18, 32, 0.06);
    --shadow-2: 0 6px 16px rgba(11, 18, 32, 0.10);
    --shadow-3: 0 16px 40px rgba(11, 18, 32, 0.14);

    --maxw: 1120px;
}

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

html, body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: var(--primary-dark);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--primary);
}

img {
    max-width: 100%;
}

/* === HEADER === */

.title-bar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.title-bar__brand {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-bar__brand a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -0.5px;
}

.title-bar__brand a:hover {
    color: var(--text);
}

.title-bar__logo {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: block;
    box-shadow: var(--shadow-1);
}

.title-bar__nav {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
    align-items: center;
}

.title-bar__nav a {
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 600;
}

.title-bar__nav a:hover {
    color: var(--primary-dark);
}

.lang-select {
    background: var(--surface-sunken);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    padding: 6px 12px;
    cursor: pointer;
    letter-spacing: 0.5px;
}

.lang-select:focus {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
}

/* === LAYOUT === */

.container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 32px 24px;
}

section {
    padding: 72px 0;
}

h1, h2, h3 {
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.15;
    color: var(--text);
}

h1 {
    font-size: 52px;
    margin-bottom: 20px;
    white-space: pre-line;
}

h2 {
    font-size: 34px;
    margin-bottom: 16px;
}

h3 {
    font-size: 21px;
    margin-bottom: 8px;
}

p {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-secondary);
    max-width: 62ch;
}

.section-head {
    text-align: center;
    margin-bottom: 48px;
}

.section-head h2 {
    margin-bottom: 0;
}

/* === HERO === */

.hero {
    text-align: center;
    padding: 80px 0 64px;
    max-width: 860px;
    margin: 0 auto;
}

.hero__tagline {
    display: inline-block;
    color: var(--primary-dark);
    background: var(--primary-ghost);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 7px 16px;
    border-radius: var(--r-pill);
    margin-bottom: 24px;
}

.hero h1 {
    font-size: 60px;
    background: linear-gradient(135deg, var(--text) 35%, var(--primary-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero__subtitle {
    color: var(--text-secondary);
    font-size: 21px;
    margin: 0 auto 36px;
    max-width: 60ch;
}

.hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    margin-bottom: 14px;
}

.hero__cta-note {
    color: var(--text-muted);
    font-size: 15px;
    margin: 0 auto;
}

/* === BUTTONS === */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary);
    color: var(--text-inverse);
    border: 2px solid transparent;
    border-radius: var(--r-pill);
    padding: 14px 28px;
    font-family: inherit;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.2px;
    cursor: pointer;
    box-shadow: var(--shadow-1);
    transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
    background: var(--primary-dark);
    color: var(--text-inverse);
    transform: translateY(-2px);
    box-shadow: var(--shadow-2);
}

.btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-1);
}

.btn[aria-disabled="true"] {
    background: var(--surface-sunken);
    color: var(--text-muted);
    box-shadow: none;
    cursor: default;
    pointer-events: none;
}

/* Secondary / outline (the "yellow" slot becomes the solid primary CTA) */
.btn--yellow {
    background: var(--surface);
    color: var(--primary-dark);
    border-color: var(--border-strong);
}

.btn--yellow:hover {
    background: var(--surface);
    color: var(--primary-dark);
    border-color: var(--primary);
}

.btn--badge {
    font-size: 16px;
    padding: 13px 24px;
}

/* === HOW IT WORKS === */

.how__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    counter-reset: step;
}

.how__step {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 32px 28px 28px;
    box-shadow: var(--shadow-1);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.how__step:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-2);
}

.how__step::before {
    counter-increment: step;
    content: counter(step, decimal-leading-zero);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--r-md);
    background: var(--primary-ghost);
    color: var(--primary-dark);
    font-weight: 800;
    font-size: 20px;
    margin-bottom: 18px;
}

.how__step h3 {
    color: var(--text);
    font-size: 19px;
    margin-bottom: 10px;
}

.how__step p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 0;
}

/* === FEATURES === */

.features__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.feature {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 26px 24px;
    box-shadow: var(--shadow-1);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.feature:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-2);
}

.feature h3 {
    font-size: 18px;
    color: var(--text);
    margin-bottom: 8px;
}

.feature p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 0;
}

/* tint accents for variety across feature cards */
.features__grid .feature:nth-child(4n+1) { border-top: 3px solid var(--primary); }
.features__grid .feature:nth-child(4n+2) { border-top: 3px solid var(--tint-indigo-accent); }
.features__grid .feature:nth-child(4n+3) { border-top: 3px solid var(--tint-amber-accent); }
.features__grid .feature:nth-child(4n+4) { border-top: 3px solid var(--tint-green-accent); }

/* === SCREENS (app gallery) === */

.screens__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 28px;
    align-items: start;
    justify-items: center;
}

.screen-mockup {
    text-align: center;
    width: 100%;
    max-width: 200px;
}

.screen-mockup img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--r-xl);
    border: 1px solid var(--border);
    background: var(--surface);
    cursor: zoom-in;
    box-shadow: var(--shadow-1);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.screen-mockup img:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-3);
}

.screens__note {
    color: var(--text-muted);
    text-align: center;
    margin: 40px auto 0;
    font-size: 16px;
    max-width: none;
}

/* === LIGHTBOX === */

.lightbox {
    position: fixed;
    inset: 0;
    background: var(--overlay);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 32px;
    cursor: zoom-out;
}

.lightbox.is-open {
    display: flex;
}

.lightbox__img {
    max-width: 90vw;
    max-height: 88vh;
    width: auto;
    height: auto;
    border-radius: var(--r-xl);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
    cursor: default;
}

.lightbox__btn {
    position: absolute;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    border: none;
    border-radius: var(--r-pill);
    font-family: inherit;
    font-size: 24px;
    font-weight: 700;
    width: 52px;
    height: 52px;
    cursor: pointer;
    box-shadow: var(--shadow-2);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    transition: background 0.15s ease, transform 0.12s ease;
}

.lightbox__btn:hover {
    background: #fff;
    transform: scale(1.05);
}

.lightbox__btn:active { transform: scale(0.96); }

.lightbox__btn--prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox__btn--next { right: 24px; top: 50%; transform: translateY(-50%); }
.lightbox__btn--close { top: 24px; right: 24px; }

.lightbox__btn--prev:hover,
.lightbox__btn--next:hover { transform: translateY(-50%) scale(1.05); }

.lightbox__counter {
    position: absolute;
    top: 28px;
    left: 24px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: var(--r-pill);
    padding: 7px 16px;
}

@media (max-width: 720px) {
    .lightbox { padding: 12px; }
    .lightbox__btn { width: 44px; height: 44px; font-size: 20px; }
    .lightbox__btn--prev { left: 8px; }
    .lightbox__btn--next { right: 8px; }
    .lightbox__btn--close { top: 8px; right: 8px; }
    .lightbox__counter { top: 12px; left: 8px; font-size: 13px; padding: 6px 12px; }
}

/* === CTA === */

.cta-block {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--r-xl);
    padding: 64px 32px;
    text-align: center;
    box-shadow: var(--shadow-2);
    margin: 16px 0;
}

.cta-block h2 {
    color: var(--text-inverse);
    margin-bottom: 12px;
}

.cta-block p {
    color: rgba(255, 255, 255, 0.92);
    margin: 0 auto 28px;
    max-width: 52ch;
}

.cta-block .hero__cta {
    justify-content: center;
    margin-bottom: 0;
}

/* On the teal block, flip button colours for contrast */
.cta-block .btn {
    background: #fff;
    color: var(--primary-dark);
}

.cta-block .btn:hover {
    background: #fff;
    color: var(--primary-dark);
}

.cta-block .btn[aria-disabled="true"] {
    background: rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.7);
}

.cta-block .btn--yellow {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.6);
}

.cta-block .btn--yellow:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: #fff;
}

/* === FOOTER === */

footer {
    border-top: 1px solid var(--border);
    padding: 40px 0 64px;
    color: var(--text-muted);
    font-size: 15px;
    background: var(--surface);
}

footer .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
}

footer p { margin-bottom: 4px; color: var(--text-secondary); font-size: 15px; }

footer nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

footer nav a {
    color: var(--text-secondary);
    font-weight: 600;
}

/* === LEGAL / TEXT PAGES === */

.text-page {
    max-width: 760px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 48px 44px;
    box-shadow: var(--shadow-1);
}

.text-page h1 {
    color: var(--text);
    font-size: 38px;
    margin-bottom: 6px;
}

.text-page__updated {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 32px;
}

/* Policy sections must not inherit the landing-page section padding (72px). */
.text-page section {
    padding: 0;
}

.text-page h3 {
    color: var(--primary-dark);
    margin-top: 28px;
    margin-bottom: 8px;
    font-size: 20px;
}

.text-page__section {
    font-size: 24px;
    color: var(--text);
    margin-top: 40px;
    margin-bottom: 10px;
}

.text-page p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.55;
    max-width: none;
}

.text-page p .para { display: block; }
.text-page p .para + .para { margin-top: 12px; }

/* === SUPPORT === */

.support__contact {
    background: var(--primary-ghost);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 28px;
    margin: 24px 0 40px;
}

.support__contact a {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary-dark);
}

.support__contact .response {
    color: var(--text-muted);
    font-size: 15px;
    margin-top: 8px;
}

.faq-item {
    border-top: 1px solid var(--border);
    padding: 22px 0;
}

.faq-item:first-child {
    border-top: none;
}

.faq-item h3 {
    font-size: 19px;
    margin-bottom: 8px;
    color: var(--text);
}

.faq-item p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 0;
}

/* === RESPONSIVE === */

@media (max-width: 720px) {
    body { font-size: 16px; }
    h1 { font-size: 36px; }
    .hero h1 { font-size: 38px; }
    h2 { font-size: 27px; }
    h3 { font-size: 18px; }
    p { font-size: 17px; }
    .hero { padding: 48px 0 40px; }
    .hero__subtitle { font-size: 18px; }
    .hero__cta { flex-direction: column; align-items: stretch; }
    .hero__cta .btn { width: 100%; }
    .container { padding: 24px 18px; }
    section { padding: 48px 0; }
    .section-head { margin-bottom: 32px; }
    .title-bar { padding: 10px 16px; }
    .title-bar__brand a { font-size: 19px; }
    .title-bar__logo { width: 30px; height: 30px; }
    .title-bar__nav { gap: 14px; }
    .title-bar__nav a { font-size: 15px; }
    .cta-block { padding: 44px 22px; }
    .text-page { padding: 32px 22px; }
    footer .container { flex-direction: column; align-items: flex-start; }
}

/* === RTL (Arabic) === */
html[dir="rtl"] body { direction: rtl; }
html[dir="rtl"] .hero,
html[dir="rtl"] .section-head { text-align: center; }
html[dir="rtl"] .hero h1 {
    background: linear-gradient(225deg, var(--text) 35%, var(--primary-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
