/* =================================================================
   AOEC MEET — Landing v2
   Font: Be Vietnam Pro (VN) + Noto Sans SC (中文)
   Palette: #f7838d primary, #c84a55 accessible text, #fff5f6 bg-soft
   ================================================================= */

:root {
    --c-primary: #f7838d;
    --c-primary-hover: #e8707a;
    --c-primary-active: #d95e68;
    --c-text-accent: #c84a55;        /* WCAG AA on white: 4.6:1 */
    --c-bg: #ffffff;
    --c-bg-soft: #fff5f6;
    --c-bg-softer: #fff0f1;
    --c-border: #ffd7da;
    --c-text: #2b1a1c;
    --c-text-muted: #6b5256;
    --c-ink: #1a1012;

    --shadow-sm: 0 2px 8px rgba(247, 131, 141, 0.08);
    --shadow-md: 0 8px 24px rgba(247, 131, 141, 0.15);
    --shadow-lg: 0 20px 48px rgba(247, 131, 141, 0.20);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;

    --font-sans: 'Be Vietnam Pro', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-cn: 'Noto Sans SC', 'Be Vietnam Pro', sans-serif;

    --container: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--c-text);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--c-text-accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--c-primary-active); }

h1, h2, h3, h4 { color: var(--c-ink); letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 700; margin-bottom: 12px; }
h3 { font-size: 1.2rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; margin-bottom: 12px; }
p  { color: var(--c-text-muted); }

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

/* ===== Buttons ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 28px;
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    font: inherit; font-weight: 600; font-size: 1rem;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, background .15s, color .15s;
    white-space: nowrap;
}
.btn-sm { padding: 9px 18px; font-size: 0.9rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--c-primary); color: #fff; border-color: var(--c-primary); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--c-primary-hover); border-color: var(--c-primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); color: #fff; }
.btn-primary:active { background: var(--c-primary-active); transform: translateY(0); }

.btn-ghost { background: transparent; color: var(--c-text-accent); border-color: var(--c-border); }
.btn-ghost:hover { background: var(--c-bg-soft); border-color: var(--c-primary); color: var(--c-text-accent); }

.btn-white { background: #fff; color: var(--c-text-accent); border-color: #fff; padding: 16px 36px; font-size: 1.05rem; }
.btn-white:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: var(--c-primary-active); }

.btn:focus-visible { outline: 3px solid rgba(247, 131, 141, 0.5); outline-offset: 2px; }

/* ===== Header ===== */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--c-border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; color: var(--c-ink); }
.brand strong { color: var(--c-text-accent); }
.brand img { border-radius: 8px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--c-text); font-weight: 500; }
.nav-links a:hover { color: var(--c-text-accent); }

@media (max-width: 768px) {
    .nav-links { display: none; }
}

/* ===== Hero ===== */
.hero {
    padding: 72px 0 96px;
    background:
        radial-gradient(1200px 600px at 90% -10%, rgba(247, 131, 141, 0.18), transparent 60%),
        radial-gradient(800px 400px at -10% 110%, rgba(247, 131, 141, 0.12), transparent 60%),
        #fff;
    overflow: hidden;
}
.hero-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.hero-copy { max-width: 560px; }
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 999px;
    background: var(--c-bg-soft); border: 1px solid var(--c-border);
    font-size: 0.85rem; font-weight: 500; color: var(--c-text-accent);
    margin-bottom: 20px;
}
h1 .grad {
    background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-active) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { font-size: 1.15rem; margin: 20px 0 32px; color: var(--c-text-muted); }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 32px; }
.hero-bullets { list-style: none; display: grid; gap: 8px; color: var(--c-text); font-size: 0.95rem; }

/* Hero visual: layered cards */
.hero-visual {
    position: relative; aspect-ratio: 1; max-width: 440px; justify-self: end;
}
.hero-card {
    position: absolute; background: #fff; border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); padding: 20px;
}
.card-1 {
    inset: 10% 10% 20% 0; padding: 40px 24px 24px;
    display: flex; flex-direction: column; gap: 12px;
    background: linear-gradient(180deg, #fff 0%, var(--c-bg-soft) 100%);
}
.card-1::before { /* traffic lights */ }
.dot { position: absolute; top: 14px; width: 10px; height: 10px; border-radius: 50%; }
.dot-red { left: 16px; background: #ff5f57; }
.dot-yellow { left: 32px; background: #febc2e; }
.dot-green { left: 48px; background: #28c840; }
.hero-avatar {
    width: 72px; height: 72px; border-radius: 50%;
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-active));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-family: var(--font-cn); font-size: 1.6rem; font-weight: 700;
    box-shadow: var(--shadow-md);
}
.hero-line { height: 10px; background: var(--c-border); border-radius: 6px; width: 85%; }
.hero-line.short { width: 55%; }
.card-2 {
    top: 5%; right: 0; width: 90px; height: 90px;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
    animation: floatY 3s ease-in-out infinite;
}
.card-3 {
    bottom: 8%; right: 8%; padding: 14px 20px;
    font-weight: 700; color: var(--c-text-accent);
    animation: floatY 4s ease-in-out infinite reverse;
}
@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-visual { display: none; }
}

/* ===== Sections ===== */
.section { padding: 80px 0; }
.section h2 { text-align: center; }
.section-sub { text-align: center; max-width: 640px; margin: 0 auto 48px; font-size: 1.05rem; }

/* ===== Device test ===== */
.device-test { background: var(--c-bg-soft); }
.device-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 32px; }
.device-card {
    background: #fff; border-radius: var(--radius-md); padding: 28px;
    text-align: center; border: 1px solid var(--c-border);
    display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.device-icon { font-size: 2.5rem; }
.device-status { font-size: 0.9rem; min-height: 1.4em; }
.device-status.ok { color: #2e8540; font-weight: 600; }
.device-status.error { color: #c92a2a; font-weight: 600; }

.mic-meter {
    width: 100%; height: 10px; background: var(--c-bg-softer); border-radius: 5px; overflow: hidden;
}
#mic-bar {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, var(--c-primary), var(--c-primary-active));
    transition: width .08s linear;
}

#cam-preview {
    width: 100%; aspect-ratio: 16 / 9; background: #1a1012; border-radius: var(--radius-sm);
    object-fit: cover;
}

.net-info {
    display: flex; gap: 16px; font-size: 0.85rem; color: var(--c-text-muted);
}
.net-info span { font-weight: 500; }

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

/* ===== Features ===== */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 32px; }
.feature-card {
    padding: 32px 24px; background: #fff;
    border: 1px solid var(--c-border); border-radius: var(--radius-md);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.feature-card:hover {
    transform: translateY(-4px); box-shadow: var(--shadow-md);
    border-color: var(--c-primary);
}
.feature-icon { font-size: 2.2rem; margin-bottom: 14px; }
.feature-card h3 { margin-bottom: 8px; }

@media (max-width: 900px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } }

/* ===== How-to ===== */
.howto { background: var(--c-bg-soft); }
.step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 32px; }
.step-card {
    background: #fff; padding: 32px; border-radius: var(--radius-md);
    position: relative; border: 1px solid var(--c-border);
}
.step-num {
    position: absolute; top: -20px; left: 24px;
    width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-active));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.4rem;
    box-shadow: var(--shadow-md);
}
.step-card h3 { margin: 16px 0 8px; }

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

/* ===== FAQ ===== */
.faq details {
    max-width: 800px; margin: 0 auto 12px;
    background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-sm);
    padding: 0; overflow: hidden;
}
.faq summary {
    padding: 18px 24px; cursor: pointer; font-weight: 500; color: var(--c-ink);
    list-style: none; position: relative; padding-right: 48px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+"; position: absolute; right: 24px; top: 50%; transform: translateY(-50%);
    font-size: 1.4rem; color: var(--c-text-accent); transition: transform .2s;
}
.faq details[open] summary::after { content: "−"; }
.faq details[open] summary { border-bottom: 1px solid var(--c-border); }
.faq details p { padding: 18px 24px; color: var(--c-text-muted); }

/* ===== CTA band ===== */
.cta-band {
    background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-active) 100%);
    color: #fff; text-align: center; padding: 64px 0;
}
.cta-band h2 { color: #fff; margin-bottom: 28px; }

/* ===== Footer ===== */
.site-footer {
    background: var(--c-ink); color: #e8d9db; padding: 56px 0 24px;
}
.site-footer h4 { color: #fff; }
.site-footer a { color: #ffbcc2; }
.site-footer a:hover { color: #fff; }
.footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; margin-bottom: 32px;
}
.site-footer ul { list-style: none; display: grid; gap: 8px; font-size: 0.9rem; }
.site-footer p { color: #bba0a4; font-size: 0.9rem; margin-top: 12px; line-height: 1.7; }
.footer-bottom {
    border-top: 1px solid #2d1d1f; padding-top: 24px;
    text-align: center; font-size: 0.85rem; color: #8a7478;
}

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

/* ===== Motion preference ===== */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    html { scroll-behavior: auto; }
}
