/**
 * TutorCall Landing Page CSS
 * Mobile-first AI English tutor lobby — LIGHT theme, matching the fastmate_tutor_app
 * (light surfaces #F8FAFC/#FFFFFF, ink text #111827) with a warm amber accent
 * (terracotta / sage support). No indigo/violet, no gradient text.
 */

:root {
    --landing-bg: #f6f7f9;
    --landing-bg-soft: #eef1f5;
    --landing-surface: #ffffff;
    --landing-surface-2: #eef2f6;
    --landing-line: rgba(17, 24, 39, 0.1);
    --landing-line-strong: rgba(17, 24, 39, 0.16);
    --landing-text: #131a26;
    --landing-text-secondary: #4b5563;
    --landing-text-muted: #8b93a1;
    --landing-amber: #cf8516;
    --landing-amber-cta: #e6a230;
    --landing-amber-soft: rgba(207, 133, 22, 0.12);
    --landing-amber-tagtext: #93610f;
    --landing-terracotta: #bf5a40;
    --landing-sage: #6f8a4f;
    --landing-ink: #1c2230;
    --landing-onamber: #2a1d05;
    --landing-max-width: 520px;
    --landing-wide-width: 900px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    background: var(--landing-bg);
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    color: var(--landing-text);
    background:
        linear-gradient(180deg, rgba(207, 133, 22, 0.07) 0, rgba(246, 247, 249, 0) 240px),
        var(--landing-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    user-select: none;
    -webkit-user-select: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; -webkit-user-drag: none; }
button { font: inherit; }
img, svg { user-select: none; -webkit-user-select: none; -webkit-user-drag: none; }

/* ===================== Header ===================== */
.landing-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 14px;
    height: 52px;
    width: 100%;
    max-width: var(--landing-wide-width);
    margin: 0 auto;
    padding: env(safe-area-inset-top, 0) 18px 0;
    background: rgba(246, 247, 249, 0.86);
    border-bottom: 1px solid var(--landing-line);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--landing-text);
    text-decoration: none;
}

.header-logo img { width: 28px; height: 28px; border-radius: 8px; }
.header-logo span { font-size: 15px; font-weight: 750; }

.landing-main,
.landing-footer {
    width: 100%;
    max-width: var(--landing-wide-width);
    margin: 0 auto;
}

/* ===================== Hero ===================== */
.landing-hero {
    width: 100%;
    max-width: var(--landing-max-width);
    margin: 0 auto;
    padding: 26px 16px 18px;
}

.landing-kicker,
.section-kicker {
    color: var(--landing-amber);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.landing-kicker { margin-bottom: 10px; text-align: center; }

.landing-hero-heading {
    color: var(--landing-text);
    font-size: 31px;
    font-weight: 850;
    line-height: 1.12;
    text-align: center;
    text-wrap: balance;
}

.landing-hero-heading .accent { color: var(--landing-amber); }

/* Korean wraps per-character by default, which breaks words mid-syllable.
   keep-all forces line breaks only at spaces (eojeol). Scoped to Korean only:
   Japanese/Chinese have no spaces and must keep their default per-character wrapping. */
html[lang="ko"] .landing-main { word-break: keep-all; }

.landing-hero-copy {
    max-width: 430px;
    margin: 12px auto 0;
    color: var(--landing-text-secondary);
    font-size: 14px;
    line-height: 1.55;
    text-align: center;
}

.promise-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    margin: 16px 0 16px;
}

.promise-row span {
    min-height: 30px;
    padding: 7px 11px;
    color: var(--landing-text-secondary);
    background: var(--landing-surface);
    border: 1px solid var(--landing-line);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.1;
}

/* ===================== Hero phone mockup (coded product preview) ===================== */
.hero-stage {
    display: flex;
    justify-content: center;
    padding: 6px 0 2px;
}

.hero-phone {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    padding: 10px;
    background: linear-gradient(160deg, #eceff3, #d9dee6);
    border: 1px solid var(--landing-line-strong);
    border-radius: 34px;
    box-shadow: 0 24px 50px rgba(17, 24, 39, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.hero-phone-screen {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 376px;
    padding: 16px 14px 14px;
    background: #ffffff;
    border-radius: 26px;
}

.hero-chat-top {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--landing-line);
}

.hero-chat-avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    border-radius: 999px;
    border: 1px solid var(--landing-line-strong);
    background-color: var(--landing-amber-cta);
    background-image: linear-gradient(135deg, var(--landing-amber-cta), var(--landing-terracotta));
    background-size: cover;
    background-position: center 16%;
    background-repeat: no-repeat;
}

.hero-chat-id { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hero-chat-name { color: var(--landing-text); font-size: 14px; font-weight: 800; line-height: 1; }
.hero-chat-status { color: #3f9d52; font-size: 11px; font-weight: 600; line-height: 1; }
.hero-chat-time { margin-left: auto; color: var(--landing-text-muted); font-size: 11px; }

.hero-chat-thread { display: flex; flex-direction: column; gap: 8px; padding: 2px 0; }

.hero-bubble {
    max-width: 88%;
    padding: 9px 12px;
    font-size: 12.5px;
    line-height: 1.42;
    border-radius: 14px;
}

.hero-bubble b { font-weight: 800; color: var(--landing-text); }

.hero-bubble-in {
    align-self: flex-start;
    color: #3b4252;
    background: var(--landing-surface-2);
    border: 1px solid var(--landing-line);
    border-bottom-left-radius: 5px;
}

.hero-bubble-out {
    align-self: flex-end;
    color: var(--landing-onamber);
    background: var(--landing-amber-cta);
    border-bottom-right-radius: 5px;
    font-weight: 600;
}

.hero-chat-call {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
    padding: 12px;
    color: var(--landing-onamber);
    background: var(--landing-amber-cta);
    border-radius: 14px;
    font-size: 13px;
    font-weight: 800;
}

.hero-chat-call svg { width: 17px; height: 17px; flex: 0 0 auto; }

/* ===================== Store CTA ===================== */
.store-cta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 18px;
}

.cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 48px;
    gap: 8px;
    padding: 12px 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.1;
    text-decoration: none;
    transition: transform 0.16s ease, opacity 0.16s ease;
}

.cta-btn svg { width: 19px; height: 19px; flex: 0 0 auto; }
.cta-btn:active { transform: translateY(1px) scale(0.99); }
.cta-ios { color: #ffffff; background: var(--landing-ink); }
.cta-android { color: var(--landing-onamber); background: var(--landing-amber-cta); }

/* ===================== Section headings ===================== */
.section-heading { padding: 0 16px; }

.section-heading h2,
.landing-features-title,
.landing-faq-title,
.bottom-cta-title {
    color: var(--landing-text);
    font-size: 21px;
    font-weight: 850;
    line-height: 1.16;
}

.section-sub {
    margin-top: 7px;
    color: var(--landing-text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.tutor-catalog,
.learning-modes,
.landing-features,
.landing-faq {
    padding: 20px 0 8px;
}

/* ===================== Tutor grid ===================== */
.tutor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 14px 16px 18px;
}

.tutor-card {
    position: relative;
    min-width: 0;
    color: inherit;
    overflow: hidden;
    background: var(--landing-surface);
    border: 1px solid var(--landing-line);
    border-radius: 14px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.tutor-card:active { transform: scale(0.98); }

.tutor-card-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: center 12%;
    background: var(--landing-surface-2);
}

.tutor-card-info { padding: 11px 11px 13px; }

.tutor-card-tags { display: flex; flex-wrap: wrap; gap: 5px; min-height: 18px; margin-bottom: 7px; }

.tutor-card-tag {
    padding: 4px 7px;
    color: var(--landing-amber-tagtext);
    background: var(--landing-amber-soft);
    border: 1px solid rgba(207, 133, 22, 0.26);
    border-radius: 6px;
    font-size: 10px;
    font-weight: 750;
    line-height: 1;
}

.tutor-card-name { color: var(--landing-text); font-size: 16px; font-weight: 850; line-height: 1.2; }
.tutor-card-sub { margin-top: 4px; color: var(--landing-text-muted); font-size: 11px; line-height: 1.35; }

.tutor-card-desc {
    display: -webkit-box;
    margin-top: 7px;
    color: var(--landing-text-secondary);
    font-size: 12px;
    line-height: 1.42;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* ===================== Learning modes ===================== */
.mode-list { display: grid; gap: 12px; padding: 14px 16px 8px; }

.mode-card {
    padding: 18px;
    background: var(--landing-surface);
    border: 1px solid var(--landing-line);
    border-radius: 14px;
    border-left: 3px solid var(--landing-amber);
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.mode-challenge { border-left-color: var(--landing-amber); }
.mode-mission { border-left-color: var(--landing-terracotta); }
.mode-practice { border-left-color: var(--landing-sage); }

.mode-top { display: flex; align-items: center; gap: 12px; }

.mode-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    color: var(--landing-amber);
    background: var(--landing-amber-soft);
    border-radius: 10px;
}

.mode-mission .mode-icon { color: var(--landing-terracotta); background: rgba(191, 90, 64, 0.12); }
.mode-practice .mode-icon { color: var(--landing-sage); background: rgba(111, 138, 79, 0.14); }

.mode-icon svg { width: 22px; height: 22px; }

.mode-titles h3 { color: var(--landing-text); font-size: 17px; font-weight: 850; line-height: 1.2; }
.mode-tagline { display: block; margin-top: 3px; color: var(--landing-text-muted); font-size: 12px; font-weight: 650; }

.mode-desc { margin-top: 12px; color: var(--landing-text-secondary); font-size: 13.5px; line-height: 1.6; }

.mode-points { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; }

.mode-points li {
    position: relative;
    padding-left: 20px;
    color: var(--landing-text-secondary);
    font-size: 12.5px;
    line-height: 1.45;
}

.mode-points li::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 7px;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--landing-amber);
}

.mode-mission .mode-points li::before { background: var(--landing-terracotta); }
.mode-practice .mode-points li::before { background: var(--landing-sage); }

/* ===================== Features ===================== */
.feature-grid { display: grid; gap: 10px; padding: 12px 16px 8px; }

.feature-card {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 12px;
    padding: 15px;
    background: var(--landing-surface);
    border: 1px solid var(--landing-line);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: var(--landing-amber);
    background: var(--landing-amber-soft);
    border-radius: 10px;
}

.feature-icon svg { width: 21px; height: 21px; }
.feature-text h3 { color: var(--landing-text); font-size: 15px; font-weight: 800; line-height: 1.25; }
.feature-text p { margin-top: 5px; color: var(--landing-text-secondary); font-size: 13px; line-height: 1.45; }

/* ===================== FAQ ===================== */
.landing-faq { max-width: var(--landing-max-width); margin: 0 auto; padding: 20px 16px 8px; }
.landing-faq-title { margin-bottom: 12px; }
.faq-item { padding: 14px 0; border-top: 1px solid var(--landing-line); }
.faq-question { color: var(--landing-text); font-size: 14px; font-weight: 800; line-height: 1.35; }
.faq-answer { margin-top: 7px; color: var(--landing-text-secondary); font-size: 13px; line-height: 1.5; }

/* ===================== Bottom CTA / Footer ===================== */
.bottom-cta { max-width: var(--landing-max-width); margin: 12px auto 0; padding: 28px 16px; text-align: center; }
.bottom-cta-desc { margin: 8px 0 18px; color: var(--landing-text-secondary); font-size: 14px; line-height: 1.45; }

.landing-footer { padding: 22px 16px max(24px, env(safe-area-inset-bottom, 0)); text-align: center; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-bottom: 12px; }
.footer-links a { color: var(--landing-text-muted); font-size: 13px; text-decoration: none; }
.footer-contact { margin-bottom: 8px; }
.footer-contact a { color: var(--landing-text-muted); font-size: 13px; text-decoration: underline; }
.footer-copy { color: var(--landing-text-muted); font-size: 12px; }
.seo-content { padding: 16px; }

/* ===================== Skeletons ===================== */
.skeleton {
    background: linear-gradient(90deg, #eef1f5 25%, #e2e7ee 50%, #eef1f5 75%);
    background-size: 200% 100%;
    border-radius: 12px;
    animation: skeleton-pulse 1.5s infinite;
}

.skeleton-card { overflow: hidden; border-radius: 12px; }
.skeleton-thumb { width: 100%; aspect-ratio: 3 / 4; }
.skeleton-text { height: 14px; margin: 10px; }
.skeleton-text-short { width: 60%; height: 12px; margin: 8px 10px 12px; }

@keyframes skeleton-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===================== Tutor detail modal ===================== */
.tutor-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    background: rgba(17, 24, 39, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.tutor-modal.open { opacity: 1; visibility: visible; }

.tutor-modal-panel {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: 92vh;
    max-height: 92dvh;
    overflow: hidden;
    background: var(--landing-surface);
    border: 1px solid var(--landing-line);
    border-bottom: 0;
    border-radius: 18px 18px 0 0;
    transform: translateY(24px);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.tutor-modal.open .tutor-modal-panel { transform: translateY(0); }

.tutor-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: #fff;
    background: rgba(0, 0, 0, 0.42);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
}

.tutor-modal-close svg { width: 18px; height: 18px; }

.tutor-modal-body {
    max-height: 92vh;
    max-height: 92dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(17, 24, 39, 0.24) transparent;
}

.tutor-modal-body::-webkit-scrollbar { width: 6px; }
.tutor-modal-body::-webkit-scrollbar-thumb { background: rgba(17, 24, 39, 0.24); border-radius: 3px; }
.tutor-modal-body::-webkit-scrollbar-track { background: transparent; }

/* 3/4 matches the source portrait ratio so the photo shows uncropped, same framing as the grid cards. */
.tutor-modal-hero { position: relative; width: 100%; aspect-ratio: 3 / 4; overflow: hidden; }

.tutor-modal-img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; display: block; }

.tutor-modal-hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 80px 20px 18px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.3) 68%, rgba(0, 0, 0, 0.68) 100%);
}

.tutor-modal-name { color: #ffffff; font-size: 26px; font-weight: 850; line-height: 1.12; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5); }
.tutor-modal-sub { margin-top: 6px; color: rgba(255, 255, 255, 0.9); font-size: 13px; font-weight: 600; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5); }

.tutor-modal-content { padding: 18px 20px 0; }

.tutor-modal-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }

.tutor-chip {
    padding: 6px 10px;
    color: var(--landing-text-secondary);
    background: rgba(17, 24, 39, 0.05);
    border: 1px solid var(--landing-line);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 650;
    line-height: 1;
}

.tutor-chip-strong {
    color: var(--landing-amber-tagtext);
    background: var(--landing-amber-soft);
    border-color: rgba(207, 133, 22, 0.3);
    font-weight: 750;
}

.tutor-modal-lead { color: var(--landing-text); font-size: 16px; font-weight: 800; line-height: 1.4; }
.tutor-modal-bio { margin-top: 10px; color: var(--landing-text-secondary); font-size: 13.5px; line-height: 1.62; }

.tutor-modal-section {
    margin: 22px 0 10px;
    padding-top: 18px;
    color: var(--landing-amber);
    border-top: 1px solid var(--landing-line);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tutor-modal-text { color: var(--landing-text-secondary); font-size: 13.5px; line-height: 1.62; }

.tutor-modal-tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* Signature phrases as chat bubbles — echoes the hero phone mockup thread */
.tutor-modal-quotes { display: flex; flex-direction: column; gap: 8px; }

.tutor-quote {
    align-self: flex-start;
    max-width: 92%;
    padding: 10px 14px;
    color: var(--landing-text);
    background: var(--landing-amber-soft);
    border: 1px solid rgba(207, 133, 22, 0.2);
    border-radius: 16px;
    border-bottom-left-radius: 5px;
    font-size: 13px;
    line-height: 1.45;
}

.tutor-modal-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }

.tutor-modal-list li {
    position: relative;
    padding-left: 20px;
    color: var(--landing-text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.tutor-modal-list li::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 7px;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--landing-amber);
}

.tutor-modal-cta {
    position: sticky;
    bottom: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 22px -20px 0;
    padding: 12px 20px calc(14px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.94);
    border-top: 1px solid var(--landing-line);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

/* ===================== Hover (desktop) ===================== */
@media (hover: hover) and (pointer: fine) {
    .tutor-card:hover {
        transform: translateY(-2px);
        border-color: var(--landing-line-strong);
        box-shadow: 0 10px 24px rgba(17, 24, 39, 0.1);
    }
    .cta-btn:hover { opacity: 0.92; }
}

/* ===================== Wide ===================== */
@media (min-width: 700px) {
    .landing-header { padding-left: 24px; padding-right: 24px; }
    .landing-hero { max-width: 640px; padding-top: 34px; }
    .landing-hero-heading { font-size: 40px; }
    .landing-hero-copy { font-size: 15px; }
    .hero-phone { max-width: 320px; }

    .tutor-catalog,
    .learning-modes,
    .landing-features { max-width: var(--landing-wide-width); margin: 0 auto; }

    .section-heading { padding-left: 24px; padding-right: 24px; }

    .tutor-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 14px;
        padding-left: 24px;
        padding-right: 24px;
    }

    .mode-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        padding-left: 24px;
        padding-right: 24px;
    }

    .feature-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        padding-left: 24px;
        padding-right: 24px;
    }

    .feature-card { grid-template-columns: 1fr; }

    .tutor-modal { align-items: center; padding: 24px; }
    .tutor-modal-panel { border-radius: 18px; border-bottom: 1px solid var(--landing-line); }
}

@media (max-width: 360px) {
    .landing-hero-heading { font-size: 27px; }
    .store-cta,
    .tutor-modal-cta { grid-template-columns: 1fr; }
}
