/* welcome.css
   About page, contact form, landing and welcome pages, app language.
   Part of the old features.css, split in load order: see index.html. */

/* ---------- about page ---------- */

#view-about {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

#view-about > * {
    max-width: 1100px;
    width: 100%;
}

#view-about .page-intro {
    margin-bottom: 0;
}

.about-heading {
    margin-bottom: -8px;
    font-size: 18px;
}

.about-modes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.about-mode {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.about-mode-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.about-mode-head .practice-icon {
    font-size: 26px;
    line-height: 1;
}

.about-mode-head h4 {
    font-size: 17px;
}

.about-mode-summary {
    margin-bottom: 14px;
    color: var(--ink-2);
    font-size: 14px;
    line-height: 1.5;
}

.about-steps {
    margin: 0 0 14px;
    padding-left: 20px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.about-steps li + li {
    margin-top: 6px;
}

.about-steps strong,
.about-tip strong,
.about-more strong {
    color: var(--ink);
    font-weight: bold;
}

.about-tip {
    margin-top: auto;
    padding: 10px 12px;
    background: rgba(18, 124, 181, 0.12);
    border-left: 3px solid var(--primary);
    border-radius: 6px;
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.5;
}

.about-more {
    margin: 0;
    max-width: 900px;
}

.about-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.about-columns-tight {
    gap: 24px;
}

.about-columns h4,
.about-data h4 {
    margin-bottom: 8px;
    font-size: 14px;
}

.about-list {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.about-list li + li {
    margin-top: 6px;
}

.info-card .about-list {
    margin-top: 4px;
}

.about-data-note {
    margin: 16px 0 0;
}

/* contact form */

.contact-form {
    max-width: 640px;
    margin-top: 6px;
}

.contact-form label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 13px;
}

.contact-form select,
.contact-form textarea {
    width: 100%;
    margin-bottom: 14px;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink);
    font-family: inherit;
    font-size: 15px;
}

.contact-form select {
    max-width: 320px;
}

.contact-form textarea {
    resize: vertical;
    line-height: 1.5;
}

.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.contact-form .custom-actions {
    margin-bottom: 6px;
}

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

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


/* ---------- speak / write switch on Home ---------- */

.home-channel {
    align-self: center;
    margin-bottom: 14px;
}

.home-channel .channel-btn {
    padding: 8px 18px;
}

/* Spam trap field in the contact form: off screen, never seen by people */
.contact-trap {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.over-limit {
    color: var(--danger-ink);
    font-weight: bold;
}

#placement-results {
    margin-top: 14px;
}

/* ---------- language you're learning ---------- */

.home-language {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 13px;
}

.home-language select {
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
}

.home-language select:focus {
    outline: none;
    border-color: var(--primary);
}

#target-options .setting-btn {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

/* ---------- brand link (top left) ---------- */

.nav-brand {
    color: var(--ink);
    text-decoration: none;
}

.nav-brand:hover h1 {
    color: var(--primary-ink);
}


/* ---------- home page (landing) ---------- */

#view-home {
    padding: 48px 56px;
}

.landing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 56px;
    align-items: center;
    max-width: 1180px;
}

#view-home .landing-title {
    margin-bottom: 22px;
    font-size: 54px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.landing-lead {
    max-width: 500px;
    margin-bottom: 30px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.6;
}

.landing-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 26px;
}

.landing-primary,
.landing-secondary {
    display: inline-block;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
}

.landing-primary {
    background: var(--primary);
    color: var(--on-color);
}

.landing-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.landing-secondary {
    border: 1px solid var(--line);
    color: var(--ink);
}

.landing-secondary:hover {
    border-color: var(--primary);
}

.landing-status {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 20px;
    color: var(--muted);
    font-size: 14px;
}

.landing-status .flag {
    margin: 0;
}

/* conversation card */

.landing-demo {
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.demo-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}

.demo-live {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 0 rgba(34, 168, 102, 0.6);
    animation: demo-pulse 2s ease-out infinite;
}

@keyframes demo-pulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 168, 102, 0.55); }
    70% { box-shadow: 0 0 0 8px rgba(34, 168, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 168, 102, 0); }
}

.demo-title {
    font-weight: bold;
}

.demo-lang {
    padding: 2px 9px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--muted);
    font-size: 12px;
}

.demo-wave {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 20px;
    margin-left: auto;
}

.demo-wave i {
    display: block;
    width: 3px;
    height: 6px;
    border-radius: 2px;
    background: var(--primary);
    animation: demo-wave 1.1s ease-in-out infinite;
}

.demo-wave i:nth-child(2) { animation-delay: 0.1s; }
.demo-wave i:nth-child(3) { animation-delay: 0.25s; }
.demo-wave i:nth-child(4) { animation-delay: 0.4s; }
.demo-wave i:nth-child(5) { animation-delay: 0.2s; }
.demo-wave i:nth-child(6) { animation-delay: 0.35s; }
.demo-wave i:nth-child(7) { animation-delay: 0.05s; }

@keyframes demo-wave {
    0%, 100% { height: 5px; }
    50% { height: 18px; }
}

.demo-line {
    max-width: 85%;
    margin-bottom: 12px;
}

.demo-text {
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 15px;
    line-height: 1.45;
}

.demo-tutor .demo-text {
    background: var(--surface);
    border-bottom-left-radius: 4px;
}

.demo-translation {
    margin-top: 6px;
    padding: 0 4px;
    color: var(--muted);
    font-size: 13px;
}

.demo-you {
    margin-left: auto;
}

.demo-you .demo-text {
    background: var(--primary);
    border-bottom-right-radius: 4px;
}

.demo-fix {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 16px;
    padding: 12px 14px;
    border-left: 3px solid var(--success);
    border-radius: 6px;
    background: rgba(34, 168, 102, 0.08);
    font-size: 14px;
}

.demo-fix-label {
    color: var(--success-ink);
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.demo-fix s {
    color: var(--danger-ink);
}

.demo-fix b {
    color: var(--success-ink);
}

/* three plain columns under the hero */

.landing-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    max-width: 1180px;
    margin-top: 64px;
}

.landing-feature {
    display: block;
    padding-top: 20px;
    border-top: 2px solid var(--line);
    color: var(--ink);
    text-decoration: none;
    transition: border-color 0.2s;
}

.landing-feature:hover {
    border-top-color: var(--primary);
}

.landing-feature h3 {
    margin-bottom: 8px;
    font-size: 19px;
}

.landing-feature p {
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

.landing-more {
    color: var(--success-ink);
    font-size: 14px;
    font-weight: bold;
}

@media (max-width: 1100px) {
    #view-home {
        padding: 32px;
    }

    .landing-hero {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    #view-home .landing-title {
        font-size: 42px;
    }
}

@media (max-width: 800px) {
    #view-home {
        padding: 24px 18px;
    }

    #view-home .landing-title {
        font-size: 34px;
    }

    .landing-lead {
        font-size: 16px;
    }

    .landing-features {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 40px;
    }
}

/* ---------- language of the app (navbar) ---------- */

.ui-lang {
    position: relative;
}

.ui-lang-button {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink);
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.ui-lang-button:hover,
.ui-lang-button[aria-expanded="true"] {
    border-color: var(--primary);
}

.ui-lang-button .flag {
    margin: 0;
}

.ui-lang-caret {
    color: var(--muted);
    font-size: 11px;
}

.ui-lang-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 500;
    min-width: 160px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

.ui-lang-option {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 9px 10px;
    border: none;
    border-radius: 8px;
    background: none;
    color: var(--ink);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}

.ui-lang-option:hover {
    background: var(--surface-3);
}

.ui-lang-option.active {
    background: var(--primary-tint);
}

.ui-lang-option .flag,
.auth-lang .flag {
    margin: 0;
}

/* language choice on the login screen */

.auth-langs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
}

.auth-lang {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: none;
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
}

.auth-lang:hover {
    color: var(--ink);
}

.auth-lang.active {
    border-color: var(--line);
    color: var(--ink);
}

/* ---------- Write page header (same switch as Speak) ---------- */

.write-title .write-channel {
    margin-bottom: 10px;
}

.write-channel .channel-btn {
    padding: 8px 18px;
}

.write-actions {
    align-items: center;
}

.write-mode-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.write-mode-picker select {
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
}

.write-mode-picker select:focus {
    outline: none;
    border-color: var(--primary);
}

/* ---------- welcome page (before logging in) ---------- */

.welcome {
    position: fixed;
    inset: 0;
    z-index: 1000;
    overflow-y: auto;
    background: var(--surface);
    color: var(--ink);
}

.welcome-bar {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 40px;
    background: var(--glass);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.welcome-brand {
    font-size: 22px;
    font-weight: bold;
}

.welcome-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* The flag sits inside the box, before the language name */
.welcome-lang-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.welcome-lang-flag {
    position: absolute;
    left: 10px;
    width: 20px;
    height: 15px;
    border-radius: 2px;
    object-fit: cover;
    pointer-events: none;
}

.welcome-lang {
    padding: 8px 10px 8px 36px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
}

.welcome-login {
    padding: 10px 14px;
    border: none;
    background: none;
    color: var(--ink-2);
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
}

.welcome-login:hover {
    color: var(--ink);
}

.welcome .landing-primary,
.welcome .landing-secondary {
    border: none;
    font-family: inherit;
    cursor: pointer;
}

.welcome .landing-secondary {
    border: 1px solid var(--line);
    background: transparent;
}

.welcome-cta {
    padding: 10px 18px;
    font-size: 15px;
}

.welcome-main {
    max-width: 1180px;
    margin: 0 auto;
    padding: 72px 40px 40px;
}

.welcome .landing-title {
    margin-bottom: 22px;
    font-size: 56px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.welcome-section {
    margin-top: 96px;
}

.welcome-h2 {
    margin-bottom: 26px;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.welcome .landing-features {
    margin-top: 0;
}

.welcome .landing-feature {
    cursor: default;
}

.welcome-modes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.welcome-modes > div {
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
}

.welcome-modes h3 {
    margin-bottom: 6px;
    font-size: 17px;
}

.welcome-modes p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.welcome-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.welcome-flags span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 15px;
}

.welcome-flags .flag {
    margin: 0;
}

.welcome-note {
    max-width: 640px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.6;
}

.welcome-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.welcome-steps li {
    counter-increment: step;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 20px;
    border-top: 2px solid var(--line);
}

.welcome-steps li::before {
    content: counter(step);
    color: var(--success-ink);
    font-size: 15px;
    font-weight: bold;
}

.welcome-steps b {
    font-size: 19px;
}

.welcome-steps span {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
}

.welcome-final {
    margin-top: 96px;
    padding: 48px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    text-align: center;
}

.welcome-final h2 {
    margin-bottom: 22px;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.welcome-footer {
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 40px 48px;
    color: var(--faint);
    font-size: 13px;
    line-height: 1.5;
}

/* back link on the login card */

.auth-back {
    margin-bottom: 14px;
    padding: 0;
    border: none;
    background: none;
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
}

.auth-back:hover {
    color: var(--ink);
}

@media (max-width: 1100px) {
    .welcome .landing-title {
        font-size: 44px;
    }

    .welcome-modes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .welcome-bar {
        padding: 12px 16px;
    }

    .welcome-brand {
        font-size: 18px;
    }

    .welcome-login {
        display: none;
    }

    .welcome-main {
        padding: 40px 18px 24px;
    }

    .welcome .landing-title {
        font-size: 34px;
    }

    .welcome-section,
    .welcome-final {
        margin-top: 64px;
    }

    .welcome-h2,
    .welcome-final h2 {
        font-size: 24px;
    }

    .welcome-modes,
    .welcome-steps {
        grid-template-columns: 1fr;
    }

    .welcome-final {
        padding: 32px 20px;
    }

    .welcome-footer {
        padding: 24px 18px 36px;
    }
}

/* home page: four columns now that Speak and Write are separate */

.landing-features-four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

#view-home .landing-secondary {
    border: 1px solid var(--line);
    background: transparent;
    font-family: inherit;
    cursor: pointer;
}

#landing-level-link {
    margin-left: 6px;
    font-size: 14px;
}

@media (max-width: 1100px) {
    .landing-features-four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .landing-features-four {
        grid-template-columns: 1fr;
    }
}

/* Welcome page opened from the logo while logged in */
.welcome:not(.is-signed-in) .only-member,
.welcome.is-signed-in .only-guest {
    display: none !important;
}

.welcome a.landing-primary {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}


/* ---------- landing: trust points under the hero ---------- */

.landing-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 26px;
    max-width: 1180px;
    margin: 56px auto 0;
    padding: 18px 20px;
    list-style: none;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 15px;
    font-weight: 600;
}

.landing-trust li {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---------- landing: "See it in action" phone screens ---------- */

.showcase {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    max-width: 1180px;
}

.showcase-item {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.showcase-phone {
    min-height: 330px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 26px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
    font-size: 14px;
}

.showcase-phone .demo-line {
    max-width: 92%;
}

.showcase-phone .demo-tutor .demo-text {
    background: var(--bg);
}

.showcase-phone .demo-you .demo-text {
    color: #fff;
}

.showcase-phone .demo-text {
    font-size: 14px;
    padding: 10px 13px;
}

.showcase-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    font-weight: 700;
}

.showcase-count {
    margin-left: auto;
    color: var(--muted);
    font-weight: 600;
}

.showcase-question {
    margin: 4px 0 0;
    font-size: 17px;
    font-weight: 700;
}

.showcase-answer {
    margin: 14px 0 0;
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg);
    min-height: 64px;
}

.showcase-review {
    margin-bottom: 10px;
    padding: 12px 13px;
    border-radius: 12px;
    background: var(--bg);
}

.showcase-review p {
    margin: 0 0 4px;
}

.showcase-review s {
    color: var(--danger-ink);
}

.showcase-review b {
    color: var(--success-ink);
}

.showcase-review span {
    color: var(--muted);
    font-size: 13px;
}

.showcase-stat {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 16px;
    color: var(--muted);
}

.showcase-stat b {
    color: var(--success-ink);
    font-size: 28px;
}

.showcase-item figcaption {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 6px;
}

.showcase-item figcaption b {
    font-size: 18px;
}

.showcase-item figcaption span {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
}

.landing-faq {
    max-width: 820px;
}

@media (max-width: 900px) {
    .showcase {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin: 0 auto;
    }

    .showcase-phone {
        min-height: 0;
    }

    .landing-trust {
        justify-content: flex-start;
        gap: 10px 18px;
        font-size: 14px;
    }
}
