/* GroAsk — Apple Minimal
   Pure white canvas, bold typography, restrained palette.
   Let the product breathe. */

html {
    scroll-behavior: smooth;
}

:root {
    --bg: #fff;
    --bg-secondary: #f5f5f7;
    --bg-card: #fff;
    --border: #d2d2d7;
    --border-light: #e8e8ed;
    --text: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-dim: #86868b;
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    --radius: 12px;
    --radius-sm: 8px;
    --max-w: 980px;
}

* { box-sizing: border-box; }

::selection {
    background: var(--accent);
    color: #fff;
}

body {
    font-family: var(--sans);
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px 60px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover { color: var(--accent-hover); text-decoration: none; }

h1 {
    font-weight: 700;
    font-size: 3em;
    margin-bottom: 8px;
    letter-spacing: -0.04em;
    line-height: 1.1;
    color: var(--text);
}
h2 {
    font-weight: 700;
    font-size: 2.2em;
    margin-top: 0;
    margin-bottom: 16px;
    color: var(--text);
    letter-spacing: -0.03em;
    line-height: 1.15;
}
h3 {
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 10px;
    font-size: 1.1em;
    letter-spacing: -0.02em;
    color: var(--text);
}
h4 {
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
}

p { color: var(--text-secondary); }
strong { color: var(--text); font-weight: 600; }
em { color: var(--text-secondary); }
code {
    font-family: 'SF Mono', 'Fira Code', Menlo, monospace;
    background: var(--bg-secondary);
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 0.88em;
    color: var(--text);
}

.tagline {
    font-size: 1.4em;
    font-weight: 300;
    color: var(--text-secondary);
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}
.highlight { color: var(--accent); }

/* ─── Sticky Navbar ─── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    margin: 0 -24px;
    padding-left: 24px;
    padding-right: 24px;
}
.navbar .nav-brand {
    font-weight: 700;
    font-size: 1.1em;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.03em;
}
.navbar .nav-brand:hover { text-decoration: none; opacity: 0.7; }
.navbar .nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 0.85em;
}
.navbar .nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 400;
}
.navbar .nav-links a:hover { color: var(--text); text-decoration: none; }
.navbar .lang-switch a {
    color: var(--text-dim);
    text-decoration: none;
    padding: 2px 6px;
    font-size: 0.85em;
    transition: color 0.2s;
}
.navbar .lang-switch a:hover { color: var(--text); }
.navbar .lang-switch a.active {
    color: var(--text);
    font-weight: 600;
}

/* ─── Section rhythm ─── */
section {
    margin: 100px 0;
    scroll-margin-top: 80px;
}

/* Centered section headings */
section > h2 {
    text-align: center;
}
section > p {
    text-align: center;
}
#about > h2,
#about > p {
    text-align: left;
}

/* ─── Hero Section ─── */
.hero {
    text-align: center;
    padding: 80px 0 60px;
}
.hero h1 {
    font-size: 4.2em;
    margin-bottom: 12px;
    letter-spacing: -0.045em;
}
.hero .subtitle {
    font-size: 1.2em;
    color: var(--text-dim);
    margin-bottom: 20px;
    font-weight: 400;
}
.hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 20px 0 32px;
}
.hero-badges .badge {
    background: var(--bg-secondary);
    border: none;
    border-radius: 100px;
    padding: 8px 18px;
    font-size: 0.85em;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ─── Buttons ─── */
.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 14px 32px;
    text-decoration: none;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.95em;
    margin: 10px 5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn:hover {
    background: var(--accent-hover);
    text-decoration: none;
    color: #fff;
    transform: scale(1.02);
}

/* ─── Feature Grid ─── */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin: 40px 0;
}
.feature {
    background: var(--bg-secondary);
    padding: 28px;
    border-radius: var(--radius);
    border: none;
    transition: transform 0.3s ease;
}
.feature:hover {
    transform: translateY(-2px);
}
.feature h3 {
    margin-top: 0;
    font-size: 1.05em;
}
.feature p {
    margin-bottom: 0;
    color: var(--text-secondary);
    font-size: 0.92em;
    line-height: 1.65;
}
.feature-icon {
    font-size: 1.5em;
    margin-bottom: 12px;
}

/* ─── How it Works ─── */
.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 40px 0;
}
.step {
    text-align: center;
    padding: 28px 16px;
}
.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--text);
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.95em;
    margin-bottom: 16px;
}
.step h4 {
    margin: 8px 0;
    font-size: 1em;
}
.step p {
    color: var(--text-secondary);
    font-size: 0.88em;
    line-height: 1.6;
}

/* ─── Channel List ─── */
.channels {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 24px 0;
}
.channel {
    background: var(--bg-secondary);
    padding: 8px 20px;
    border-radius: 100px;
    border: none;
    font-size: 0.88em;
    color: var(--text-secondary);
    font-weight: 500;
}
.channel.pro {
    background: var(--text);
    color: #fff;
}

/* ─── Pricing ─── */
.pricing {
    background: var(--bg-secondary);
    padding: 48px 40px;
    border-radius: 20px;
    border: none;
    text-align: center;
    margin: 40px 0;
}
.pricing h3 {
    margin-top: 0;
    font-size: 1.3em;
    letter-spacing: -0.02em;
}
.price {
    font-size: 3.5em;
    font-weight: 700;
    margin: 16px 0 8px;
    color: var(--text);
    letter-spacing: -0.04em;
}
.price-note {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* ─── Comparison Table ─── */
.comparison { margin: 40px 0; }
.comparison table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg);
}
.comparison th, .comparison td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.92em;
}
.comparison th {
    font-weight: 600;
    font-size: 0.82em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-dim);
}
.comparison td { color: var(--text-secondary); }
.comparison tr:last-child td { border-bottom: none; }

/* ─── Why GroAsk ─── */
.why-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 40px 0;
}
.why-card {
    background: var(--bg-secondary);
    padding: 28px;
    border-radius: var(--radius);
    border: none;
    transition: transform 0.3s ease;
}
.why-card:hover {
    transform: translateY(-2px);
}
.why-card .why-icon {
    font-size: 1.5em;
    margin-bottom: 12px;
}
.why-card h3 {
    margin-top: 0;
    font-size: 1.05em;
    text-align: left;
}
.why-card p {
    margin-bottom: 0;
    color: var(--text-secondary);
    font-size: 0.92em;
    line-height: 1.65;
    text-align: left;
}
@media (max-width: 640px) {
    .why-grid { grid-template-columns: 1fr; }
}

/* ─── Before/After Demo ─── */
.before-after {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 40px 0;
}
.before-after .panel {
    background: var(--bg-secondary);
    padding: 28px;
    border-radius: var(--radius);
    border: none;
    text-align: center;
}
.before-after .panel h3 {
    margin-top: 0;
    font-size: 1.15em;
}
.before-after .panel video {
    width: 100%;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}
@media (max-width: 640px) {
    .before-after { grid-template-columns: 1fr; }
}

/* ─── Privacy & Permissions ─── */
.permissions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 40px 0;
}
.permission-card {
    background: var(--bg-secondary);
    padding: 28px;
    border-radius: var(--radius);
    border: none;
}
.permission-card h3 {
    margin-top: 0;
    font-size: 1.05em;
}
.permission-card p {
    margin-bottom: 0;
    color: var(--text-secondary);
    font-size: 0.92em;
}
.permission-card .perm-icon {
    font-size: 1.5em;
    margin-bottom: 12px;
}
.browser-note {
    margin-top: 20px;
    padding: 18px 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.88em;
    line-height: 1.7;
}

/* ─── FAQ ─── */
.faq details {
    background: var(--bg);
    border: none;
    border-bottom: 1px solid var(--border-light);
    border-radius: 0;
    margin-bottom: 0;
    overflow: hidden;
}
.faq details:first-of-type {
    border-top: 1px solid var(--border-light);
}
.faq summary {
    padding: 20px 4px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text);
    font-size: 1em;
    transition: color 0.2s;
}
.faq summary:hover { color: var(--accent); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+";
    font-size: 1.3em;
    font-weight: 300;
    color: var(--text-dim);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 16px;
}
.faq details[open] summary::after {
    content: "\2212";
    color: var(--accent);
}
.faq details .faq-body {
    padding: 0 4px 20px;
    color: var(--text-secondary);
    line-height: 1.75;
    font-size: 0.95em;
}
.faq details .faq-body ul {
    margin: 10px 0 10px 20px;
    color: var(--text-secondary);
}
.faq details .faq-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 0.9em;
}
.faq details .faq-body th,
.faq details .faq-body td {
    padding: 8px 12px;
    border: 1px solid var(--border-light);
    text-align: left;
}
.faq details .faq-body th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text);
}

/* ─── Footer ─── */
.divider {
    border: 0;
    border-top: 1px solid var(--border-light);
    margin: 60px 0 32px;
}
.footer {
    padding-top: 20px;
    font-size: 0.85em;
    color: var(--text-dim);
    text-align: center;
}
.footer a {
    color: var(--text-dim);
    margin: 0 14px;
    text-decoration: none;
    transition: color 0.2s;
}
.footer a:hover { color: var(--text-secondary); }
.footer-links { margin-bottom: 16px; }
.footer .version {
    color: var(--text-dim);
    font-size: 0.85em;
}

/* ─── Keyboard ─── */
kbd {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 5px;
    padding: 2px 7px;
    font-family: 'SF Mono', 'Fira Code', Menlo, monospace;
    font-size: 0.85em;
    color: var(--text);
    box-shadow: 0 1px 0 var(--border);
}

/* ─── Hero Mockup (replaces screenshot) ─── */
.hero-mockup {
    margin: 48px auto 0;
    max-width: 640px;
    perspective: 800px;
}
.mockup-bar {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 6px 6px 6px 4px;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04),
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 24px 60px rgba(0, 0, 0, 0.06);
}

/* Channel selector */
.mockup-channel {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 10px 12px;
    flex-shrink: 0;
    min-width: 110px;
}
.mockup-channel-name {
    font-size: 0.88em;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}
.mockup-channel-arrow {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    margin-left: 4px;
    flex-shrink: 0;
}

/* Input area */
.mockup-input {
    flex: 1;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    min-height: 44px;
    overflow: hidden;
}
.mockup-text {
    font-size: 1.05em;
    color: var(--text-secondary);
    white-space: nowrap;
}
.mockup-text::after {
    content: '\200b'; /* zero-width space — keeps line-height when text is empty */
}
.mockup-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: var(--accent);
    margin-left: 1px;
    animation: cursorBlink 1s step-end infinite;
    vertical-align: middle;
    flex-shrink: 0;
}
@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Send button */
.mockup-send {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 10px;
    flex-shrink: 0;
    transition: transform 0.2s, background 0.2s;
}
.mockup-send:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

/* ─── Demo ─── */
.demos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin: 40px 0;
}
.demo {
    background: var(--bg-secondary);
    padding: 28px;
    border-radius: var(--radius);
    border: none;
    transition: transform 0.3s ease;
}
.demo:hover { transform: translateY(-2px); }
.demo h3 {
    margin-top: 0;
    margin-bottom: 8px;
}
.demo p {
    color: var(--text-secondary);
    font-size: 0.88em;
    margin-bottom: 18px;
    min-height: 3.2em;
}
.demo img, .demo video {
    width: 100%;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* ─── Video lightbox ─── */
video { cursor: pointer; }
.video-lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.video-lightbox.show { display: flex; }
.video-lightbox video {
    max-width: 92vw;
    max-height: 88vh;
    border-radius: var(--radius);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

/* ─── Policy pages ─── */
.policy-page {
    max-width: 720px;
    padding-top: 48px;
}
.policy-page h1 {
    font-size: 2.4em;
    letter-spacing: -0.03em;
}
.policy-page h2 {
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-dim);
    margin-top: 40px;
    text-align: left;
}
.policy-page p { color: var(--text-secondary); }
.policy-page ul { color: var(--text-secondary); }
.policy-page .back { margin-bottom: 32px; }
.policy-page .back a {
    color: var(--text-dim);
    font-size: 0.9em;
}
.policy-page .back a:hover { color: var(--accent); }
.policy-page .footer {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}
.policy-page .highlight-box {
    background: var(--bg-secondary);
    padding: 22px 24px;
    border-radius: var(--radius-sm);
    margin: 24px 0;
}

/* ─── Utility classes ─── */
.text-dim { color: var(--text-dim); }
.text-sm { font-size: 0.9em; }
.text-xs { font-size: 0.8em; }
.text-italic { font-style: italic; }
.mt-sm { margin-top: 12px; }
.mt-md { margin-top: 15px; }
.mb-sm { margin-bottom: 15px; }

/* ─── Responsive ─── */
@media (max-width: 640px) {
    body { padding: 0 20px 40px; }

    .navbar {
        margin: 0 -20px;
        padding-left: 20px;
        padding-right: 20px;
    }
    .navbar .nav-links { gap: 16px; font-size: 0.8em; }

    .hero { padding: 48px 0 36px; }
    .hero h1 { font-size: 2.8em; }

    section { margin: 64px 0; }
    h2 { font-size: 1.7em; }

    .features { grid-template-columns: 1fr; }
    .steps { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .demos { grid-template-columns: 1fr; }
    .permissions { grid-template-columns: 1fr; }

    .pricing { padding: 32px 24px; }
    .price { font-size: 2.6em; }

    .comparison th, .comparison td { padding: 10px 12px; font-size: 0.85em; }
}

/* ─── Smooth reveals (scroll-triggered) ─── */
@media (prefers-reduced-motion: no-preference) {
    section {
        opacity: 0;
        transform: translateY(12px);
        transition: opacity 0.5s ease, transform 0.5s ease;
    }
    section.visible {
        opacity: 1;
        transform: translateY(0);
    }
}
@media (prefers-reduced-motion: reduce) {
    section { opacity: 1; transform: none; }
}
