/* Landing page. Loaded after main.css so it can replace the screenshot layout. */
:root {
    --brand: #2f74e0;
    --brand-2: #1d4e9c;
    --accent: #e56b8c;
    --ink: #1c2b4a;
    --muted: #5c6d86;
    --line: #e3eef6;
    --card: #ffffff;
    --hero-a: #d4ecfb;
    --hero-b: #f8d5e4;
    --hero-c: #ffe4c4;
    --cta-end: #f0946a;
    --page: #f5f9fc;
}

body {
    font-family: "Be Vietnam Pro", "Noto Sans JP", "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(900px 420px at 8% -10%, var(--hero-b), transparent 60%),
        radial-gradient(800px 380px at 100% 0%, var(--hero-c), transparent 55%),
        linear-gradient(180deg, var(--hero-a) 0%, var(--page) 420px);
    margin: 0;
}

body[data-app="jpro"] {
    --brand: #2a6fe0;
    --brand-2: #1c4f9a;
    --accent: #e23d4f;
    --hero-a: #d4ecfb;
    --hero-b: #f8d0e2;
    --hero-c: #ffe4c4;
    --cta-end: #f0916a;
}

body[data-app="venglish"] {
    --brand: #2b74e8;
    --brand-2: #1a56c4;
    --accent: #e6a817;
    --hero-a: #d4ebff;
    --hero-b: #fff1b8;
    --hero-c: #ffe0c2;
    --cta-end: #f6b73c;
}

a { color: inherit; }

header.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    height: auto;
    padding: 10px 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 var(--line);
}

header.site-header .container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 16px;
}

.app-picker {
    display: contents;
}

.app-switcher { order: 1; }

.header-tools { order: 2; }

.app-switcher { margin: 0; white-space: nowrap; }

.app-switcher .app-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 6px 0 0;
    padding: 6px 12px 6px 6px;
    border: 1px solid #d5e1ef;
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    vertical-align: middle;
}

.app-switcher .app-tab img {
    width: 22px;
    height: 22px;
    margin: 0;
    border-radius: 6px;
    object-fit: cover;
}

.app-switcher .app-tab.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 32%, transparent);
}

.app-switcher .app-tab:focus {
    outline: none;
}

.app-switcher .app-tab:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--brand) 70%, white);
    outline-offset: 3px;
}

.header-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

header.site-header .lang {
    float: none;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

header.site-header .lang a img { max-width: 22px; display: block; }

header.site-header .lang select,
footer .lang select {
    height: 32px;
    line-height: 32px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-size: 13px;
    font-family: inherit;
}

header.site-header .main-nav {
    float: none;
    display: flex;
    margin: 0;
    padding: 0;
}

header.site-header .main-nav li { float: none; margin: 0; }

header.site-header .main-nav li a {
    padding: 0 12px;
    line-height: 36px;
    font-size: 14px;
    font-weight: 600;
    text-transform: none;
    border-radius: 999px;
    color: var(--ink);
}

header.site-header .main-nav li a.active,
header.site-header .main-nav li a.selected,
header.site-header .main-nav li:hover a {
    background: var(--brand);
    color: #fff;
}

header.site-header .nav-bar { display: none; }

#get-involved {
    margin-top: 0 !important;
    height: auto !important;
    background: transparent;
}

.hero-stage {
    width: min(1080px, calc(100% - 32px));
    margin: 10px auto 0;
}

.hero-slider {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    box-shadow: 0 22px 50px rgba(47, 116, 224, 0.16);
    background: var(--hero-a);
}

.hero-track {
    display: flex;
    align-items: flex-start;
    width: 100%;
}

.hero-slide {
    display: block;
    flex: 0 0 100%;
    width: 100%;
    height: auto;
    vertical-align: top;
}

#hero-bg-next { display: none; }

.hero-track.is-animating {
    transition: transform 0.7s ease;
    transform: translateX(-100%);
}

.hero-track.is-animating #hero-bg-next { display: block; }

.hero-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 8px 0 0;
}

.hero-dots button {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 99px;
    background: color-mix(in srgb, var(--brand) 28%, white);
    cursor: pointer;
}

.hero-dots button.active {
    width: 26px;
    background: var(--brand);
}

@media (prefers-reduced-motion: reduce) {
    .hero-track.is-animating { transition: none; }
}

.hero-panel {
    width: min(1080px, calc(100% - 32px));
    margin: 10px auto 0;
    padding: 16px 28px 14px;
    position: relative;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid color-mix(in srgb, var(--brand) 16%, white);
    border-radius: 24px;
    box-shadow: 0 18px 50px rgba(23, 32, 51, 0.08);
    text-align: center;
}

.hero-panel.is-in {
    animation: heroIn 0.45s ease;
}

@keyframes heroIn {
    from { opacity: 0.4; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.hero-logo {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(23, 32, 51, 0.12);
    flex: none;
}

.hero-panel h1 {
    margin: 2px 0 0;
    font-size: clamp(20px, 2.4vw, 28px);
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.app-choices {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 12px;
    text-align: left;
}

.app-choice {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
}

.app-choice.active {
    border-color: var(--brand);
    background: color-mix(in srgb, var(--brand) 7%, white);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 28%, transparent);
}

.app-choice-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.app-choice-main img {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    flex: none;
}

.app-choice-main span {
    flex: 1;
    min-width: 0;
}

.app-choice-main strong {
    display: block;
    font-size: 15px;
    line-height: 1.2;
}

.app-choice-main em {
    display: block;
    margin-top: 2px;
    font-style: normal;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.35;
    color: #e23d4f;
}

.app-langs {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 3px;
    color: #1d4e9c;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.app-langs .fa { font-size: 13px; }

.app-choice-stores {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.app-free {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--hero-a) 78%, white);
    color: var(--brand-2);
    border: 1px solid color-mix(in srgb, var(--brand) 28%, white);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.app-choice-stores a { line-height: 0; }
.app-choice-stores img { height: 34px; width: auto; }

.app-try {
    margin-left: auto;
    align-self: flex-start;
    margin-top: 1px;
    flex: none;
    color: var(--brand);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
}

.app-try:hover,
.app-try:focus-visible { color: var(--brand-2); }

.hero-desc {
    max-width: 640px;
    margin: 6px auto 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.45;
}

.app-desc-item { display: none; }
.app-desc-item.active { display: inline; }

.store-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
}

.store-row a {
    display: inline-block;
    line-height: 0;
    transition: transform 0.15s ease;
}

.store-row a:hover { transform: translateY(-2px); }

.store-row a img { height: 46px; width: auto; }

.level-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 0;
}

.level-row span {
    min-width: 52px;
    padding: 8px 12px;
    border-radius: 12px;
    background: var(--brand);
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.02em;
}

.level-row span:nth-child(1) { background: #2f9e6b; }
.level-row span:nth-child(2) { background: #2f74e0; }
.level-row span:nth-child(3) { background: #f08a2a; }
.level-row span:nth-child(4) { background: #e4544a; }
.level-row span:nth-child(5) { background: #e56b8f; }

body[data-app="venglish"] .level-row span:nth-child(1) { background: #4f93e0; }
body[data-app="venglish"] .level-row span:nth-child(2) { background: #2b74e8; }
body[data-app="venglish"] .level-row span:nth-child(3) { background: #1a56c4; }
body[data-app="venglish"] .level-row span:nth-child(4) { background: #e6a817; }
body[data-app="venglish"] .level-row span:nth-child(5) { background: #f08a3c; }
body[data-app="venglish"] .level-row span:nth-child(6) { background: #3aa0e8; }
body[data-app="venglish"] .level-row span:nth-child(7) { background: #5b6cb8; }

.chip-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.chip-row span {
    padding: 7px 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--hero-b) 42%, white);
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}

body[data-app="venglish"] .demo-ja { display: none; }
body:not([data-app="venglish"]) .demo-en { display: none; }

#features {
    width: min(1080px, calc(100% - 32px));
    margin: 28px auto 8px;
}

#features .container { width: 100%; padding: 0; }

#features h2 {
    margin: 0;
    text-align: center;
    color: var(--ink);
    font-family: inherit;
    font-size: clamp(22px, 2.4vw, 28px);
    font-weight: 800;
    letter-spacing: -0.03em;
}

#features-lead {
    max-width: 640px;
    margin: 8px auto 16px;
    text-align: center;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
}

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

.feature-card {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    column-gap: 10px;
    row-gap: 4px;
    align-items: start;
    margin: 0;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(23, 32, 51, 0.05);
}

.feature-card .mark {
    grid-column: 1;
    grid-row: 1;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    margin: 0;
    align-self: center;
}

.feature-card .mark svg { width: 22px; height: 22px; display: block; }

.feature-card:nth-child(6n+1) .mark { color: #2f74e0; background: #e7f1ff; }
.feature-card:nth-child(6n+2) .mark { color: #e23d4f; background: #fdecee; }
.feature-card:nth-child(6n+3) .mark { color: #d9842b; background: #fff1dc; }
.feature-card:nth-child(6n+4) .mark { color: #1f8a4c; background: #e5f6ee; }
.feature-card:nth-child(6n+5) .mark { color: #3aa0e8; background: #e7f5ff; }
.feature-card:nth-child(6n+6) .mark { color: #d4537e; background: #fde8ef; }

body[data-app="venglish"] .feature-card:nth-child(6n+2) .mark { color: #c48a08; background: #fff4d6; }
body[data-app="venglish"] .feature-card:nth-child(6n+3) .mark { color: #2b74e8; background: #e7f1ff; }

.feature-card h3 {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    align-self: center;
    color: var(--ink);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.3;
}

.feature-card p {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

#preview {
    width: min(1080px, calc(100% - 32px));
    margin: 8px auto 36px;
}

#preview .container { width: 100%; padding: 0; }

#preview h2 {
    margin: 0;
    text-align: center;
    color: var(--ink);
    font-family: inherit;
    font-size: clamp(22px, 2.4vw, 28px);
    font-weight: 800;
    letter-spacing: -0.03em;
}

#preview-lead,
#preview-more {
    max-width: 640px;
    margin: 8px auto 0;
    text-align: center;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
}

#preview-more { margin-top: 18px; color: var(--ink); font-weight: 600; }

.preview-body { margin-top: 18px; }

#preview-words-title {
    margin: 0 0 12px;
    text-align: center;
    font-size: 16px;
    font-weight: 800;
}

.preview-words {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.preview-word {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    margin: 0;
    padding: 10px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(23, 32, 51, 0.05);
}

.preview-photo {
    width: 84px;
    height: 84px;
    border-radius: 14px;
    overflow: hidden;
    background: #eef5fc;
}

.preview-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.preview-word-copy { min-width: 0; }

.preview-word-body {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.preview-word-body > div { flex: 1; min-width: 0; }

.preview-word h3 {
    margin: 0;
    font-family: "Noto Sans JP", "Be Vietnam Pro", sans-serif;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
}

.preview-read {
    margin: 0;
    color: var(--brand);
    font-size: 13px;
    font-weight: 700;
}

.preview-mean { margin: 2px 0 0; color: var(--ink); font-weight: 700; font-size: 15px; }

.preview-example {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 0;
    padding: 8px 8px 8px 10px;
    border-radius: 12px;
    background: #f4f7fb;
}

.preview-example > div { flex: 1; min-width: 0; }
.preview-ex { margin: 0; color: var(--ink); font-size: 14px; line-height: 1.45; font-weight: 600; }
.preview-tr { margin: 2px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }

.preview-hear {
    display: grid;
    place-items: center;
    flex: none;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--brand);
    box-shadow: 0 4px 12px rgba(23, 32, 51, 0.14);
    cursor: pointer;
}

.preview-hear-ex {
    flex: none;
    background: var(--brand);
    color: #fff;
}

.preview-hear:hover,
.preview-hear:focus-visible {
    transform: scale(1.06);
}

.preview-stores { margin-top: 14px; }

.app-choice-proof {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 8px;
}

.app-choice .proof-count {
    font-size: 14px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.proof-unit,
.proof-score {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
}

.proof-unit { display: block; }

.proof-rate {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.star-row {
    position: relative;
    display: inline-block;
    margin-right: 6px;
    font-size: 15px;
    letter-spacing: 1px;
    line-height: 1;
    vertical-align: -1px;
}

.star-base { color: #e7e0d2; }

.star-fill {
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden;
    color: #f5b400;
    white-space: nowrap;
}

.foot-top { padding: 28px 0 22px; }
.foot-top .container {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 32px;
    align-items: flex-start;
}
.foot-top .container > div {
    float: none !important;
    width: auto !important;
    flex: 1 1 220px;
    padding: 0;
}
.foot-top h2,
.foot-top h5,
.foot-top > div h2,
.foot-top > div h5 {
    margin: 0 0 8px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
}
.foot-top .touch-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 0;
}
.fb-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #1877f2;
    color: #fff;
    flex: none;
}
.fb-link svg { width: 16px; height: 16px; display: block; }
.fb-link:hover { background: #0d65d9; }
.foot-top p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #c5d0dc;
}
.foot-top a { color: #d7e3f0; text-decoration: none; }
.foot-top a:hover { color: #fff; }
.foot-bot { padding: 14px 0 !important; }
.foot-bot .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.foot-bot .pull-left, .foot-bot .pull-right { float: none; }
p.copy-right { display: block !important; color: #9aabbd; margin: 0; padding: 0 !important; font-size: 13px; }
footer .lang { margin: 0; }

@media (max-width: 992px) {
    header.site-header { padding: 8px 0 10px; }
    header.site-header .container {
        flex-wrap: wrap;
        align-items: center;
        padding-left: 12px;
        padding-right: 12px;
        gap: 8px 10px;
    }
    header.site-header .lang,
    footer .lang {
        position: static;
        top: auto;
        right: auto;
        display: flex;
        align-items: center;
        gap: 6px;
    }
    header.site-header .lang a,
    footer .lang a {
        display: flex;
        align-items: center;
    }
    header.site-header .lang a img,
    footer .lang a img {
        width: 22px;
        max-width: 22px;
        height: auto;
        margin: 0;
        display: block;
    }
    .header-tools {
        order: 1;
        flex: 1 1 auto;
        width: auto;
        margin-left: 44px;
        justify-content: flex-end;
    }
    .app-switcher {
        order: 2;
        flex: 1 1 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        white-space: normal;
    }
    .app-switcher .app-tab { margin: 0; }
    header.site-header .nav-bar {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 8px;
        left: 12px;
        width: 40px;
        height: 40px;
        font-size: 22px;
        line-height: 1;
        color: var(--ink);
    }
    header.site-header .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        margin: 0;
        padding: 8px;
        flex-direction: column;
        background: #fff;
        box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
    }
    header.site-header .main-nav li { width: 100%; }
    header.site-header .main-nav li a,
    header.site-header .main-nav a.unselected {
        font-size: 16px !important;
        line-height: 48px !important;
        color: var(--ink) !important;
        background: transparent;
        opacity: 1;
    }
    header.site-header .main-nav a.selected,
    header.site-header .main-nav li a.active {
        background: var(--brand) !important;
        color: #fff !important;
    }
    header.site-header .lang select {
        font-size: 14px !important;
        height: 36px !important;
        line-height: 36px !important;
        margin: 0;
    }
    .hero-panel { margin-top: 14px; padding: 22px 16px 18px; }
    .foot-top > .container > div h2,
    .foot-top > .container > div h5,
    .foot-top h2,
    .foot-top h5 {
        font-size: 15px;
        margin-bottom: 6px;
    }
    .foot-top > .container > div p,
    .foot-top p {
        font-size: 14px;
        line-height: 1.5;
    }
    .foot-top .container > div { flex-basis: 100%; }
    .contact-box {
        border: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }
    .foot-bot .container { flex-direction: column; align-items: flex-start; gap: 10px; }
    footer .foot-bot .lang { display: none; }
    footer .foot-bot .lang select {
        font-size: 14px;
        height: 36px;
        line-height: 36px;
        margin: 0;
        padding: 0 8px;
    }
}

@media (max-width: 980px) {
    .preview-words { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .app-choices { grid-template-columns: 1fr; }
    .app-choice-stores img { height: 32px; }
    #features { width: calc(100% - 20px); }
    .feature-grid { grid-template-columns: 1fr; }
    .preview-words { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .hero-stage { width: calc(100% - 20px); }
    .hero-slider { border-radius: 16px; }
    .store-row a img { height: 42px; }
    .band { padding: 48px 0; }
    .hero-panel h1 br,
    .hero-kicker br { display: none; }
    .app-switcher .app-tab { padding: 5px 8px 5px 5px; font-size: 12px; margin: 0; }
}
