/* ===========================================================
   Forem Suite — Shared App Landing Page Styles
   Used by /news/, /meet/, /tasks/, /notes/, /weather/, etc.
   Design tokens mirror index.html.
   =========================================================== */

:root {
    color-scheme: light;
    --primary: #6366f1;
    --accent-2: #a855f7;
    --accent-pink: #ec4899;

    --gray-400: #71717a;
    --gray-500: #52525b;

    --bg: #ffffff;
    --bg-2: #f6f7fb;
    --surface: #f4f5f9;
    --surface-card: #ffffff;
    --surface-strong: #eceef4;
    --border: rgba(0, 0, 0, 0.09);
    --border-hover: rgba(0, 0, 0, 0.18);

    --text: #16161f;
    --text-muted: #55556a;
    --text-dim: #8a8a9c;

    --nav-scrolled-bg: rgba(255, 255, 255, 0.78);
    --nav-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);

    --shadow: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.10);
    --shadow-lg: 0 18px 45px rgba(0,0,0,0.12);

    --gradient-primary: linear-gradient(135deg, #6366f1, #a855f7 55%, #ec4899);

    --radius: 18px;
    --radius-lg: 26px;

    /* Per-page accent — overridden inline on each app page */
    --app-accent: #6366f1;
    --app-accent-soft: color-mix(in srgb, var(--app-accent) 10%, transparent);
    --app-accent-border: color-mix(in srgb, var(--app-accent) 30%, transparent);
}

html[data-theme="dark"] {
    color-scheme: dark;
    --primary: #818cf8;

    --gray-400: #a0a0b2;
    --gray-500: #8a8a9c;

    --bg: #07070b;
    --bg-2: #0a0a12;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-card: rgba(255, 255, 255, 0.04);
    --surface-strong: rgba(255, 255, 255, 0.07);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);

    --text: #ECECF3;
    --text-muted: #A0A0B2;
    --text-dim: #6E6E80;

    --nav-scrolled-bg: rgba(8, 8, 14, 0.72);
    --nav-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Navbar ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--nav-scrolled-bg);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text);
    text-decoration: none;
    margin-right: auto;
}

.logo img { width: 30px; height: 30px; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }

.nav-cta {
    background: var(--app-accent);
    color: #fff !important;
    padding: 8px 18px;
    border-radius: 999px;
    font-weight: 600;
}

.nav-cta:hover { opacity: 0.9; }

.theme-toggle {
    background: var(--surface-strong);
    border: 1px solid var(--border);
    border-radius: 999px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    flex-shrink: 0;
}

.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ===== Explore Apps dropdown ===== */
.explore-menu { position: relative; }

.explore-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--surface-strong);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 16px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.2s;
}

.explore-btn:hover { border-color: var(--border-hover); }
.explore-btn .chevron { transition: transform 0.2s; }
.explore-menu.open .explore-btn .chevron { transform: rotate(180deg); }

.explore-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    width: 340px;
    max-width: calc(100vw - 32px);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--nav-shadow);
    padding: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
}

.explore-menu.open .explore-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.explore-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 600;
    transition: background 0.15s;
}

.explore-item:hover { background: var(--surface-strong); }
.explore-item img { width: 30px; height: 30px; border-radius: 8px; }
.explore-item span small {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-dim);
}

@media (max-width: 420px) {
    .explore-dropdown { grid-template-columns: 1fr; left: auto; right: -60px; transform: translateY(-6px); }
    .explore-menu.open .explore-dropdown { transform: translateY(0); }
}

/* ===== Hero ===== */
.app-hero {
    padding: 72px 0 56px;
    text-align: center;
    background:
        radial-gradient(700px 340px at 50% -80px, var(--app-accent-soft), transparent 70%),
        var(--bg);
    border-bottom: 1px solid var(--border);
}

.app-hero-icon {
    width: 112px;
    height: 112px;
    border-radius: 26px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    background: var(--surface-card);
}

.app-hero h1 {
    font-size: clamp(2rem, 5vw, 2.9rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-top: 22px;
}

.app-hero .tagline {
    font-size: clamp(1.05rem, 2.5vw, 1.3rem);
    color: var(--app-accent);
    font-weight: 600;
    margin-top: 6px;
}

.app-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
}

.badge {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-strong);
    color: var(--text-muted);
}

.badge-rating { color: var(--app-accent); border-color: var(--app-accent-border); background: var(--app-accent-soft); }
.badge-new { color: #059669; border-color: rgba(16,185,129,0.35); background: rgba(16,185,129,0.1); }
html[data-theme="dark"] .badge-new { color: #34d399; }
.badge-coming { color: #d97706; border-color: rgba(217,119,6,0.35); background: rgba(217,119,6,0.1); }
html[data-theme="dark"] .badge-coming { color: #fbbf24; }
.badge-india { color: #ea580c; border-color: rgba(255,153,51,0.4); background: rgba(255,153,51,0.12); }
html[data-theme="dark"] .badge-india { color: #fb923c; }

.app-hero .description {
    max-width: 720px;
    margin: 26px auto 0;
    color: var(--text-muted);
    font-size: 1.02rem;
}

.store-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-top: 30px;
}

.store-btn img { height: 52px; display: block; }
.store-btn { display: inline-block; transition: transform 0.2s; }
.store-btn:hover { transform: translateY(-2px); }
.store-btn.disabled { cursor: default; }
.store-btn.disabled img { opacity: 0.45; }

.store-btn-custom {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--app-accent);
    color: #fff;
    text-decoration: none;
    padding: 10px 22px;
    border-radius: 12px;
    font-weight: 600;
}

.store-btn-custom svg { width: 24px; height: 24px; }
.store-btn-custom small { display: block; font-size: 0.65rem; opacity: 0.85; text-align: left; letter-spacing: 0.06em; }
.store-btn-custom .store-btn-text span { font-size: 1rem; }

.app-usp {
    max-width: 720px;
    margin: 34px auto 0;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    text-align: left;
    background: var(--app-accent-soft);
    border: 1px solid var(--app-accent-border);
    border-left: 4px solid var(--app-accent);
    border-radius: 12px;
    padding: 14px 18px;
    font-weight: 500;
    font-size: 0.95rem;
}

.app-usp .usp-icon { font-size: 1.2rem; line-height: 1.4; }

.highlight-note {
    max-width: 720px;
    margin: 20px auto 0;
    text-align: left;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-left: 4px solid #10b981;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ===== Sections ===== */
.page-section { padding: 64px 0; }
.page-section + .page-section { border-top: 1px solid var(--border); }

.section-title {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    text-align: center;
    margin-bottom: 36px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 14px;
}

.feature-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    transition: border-color 0.2s, transform 0.2s;
}

.feature-item:hover { border-color: var(--app-accent-border); transform: translateY(-2px); }

.feature-icon { font-size: 1.25rem; line-height: 1.5; }
.feature-item p { font-size: 0.92rem; color: var(--text-muted); }

/* ===== Chips / info groups ===== */
.chip-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    margin-top: 28px;
}

.chip-group {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
}

.chip-group h4 {
    font-size: 0.98rem;
    font-weight: 700;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
    font-size: 0.82rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--surface-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
}

/* ===== Other apps ===== */
.other-apps { background: var(--bg-2); }

.other-apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 14px;
    max-width: 760px;
    margin: 0 auto;
}

.other-app-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 8px;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    text-align: center;
}

.other-app-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow);
    color: var(--text);
}

.other-app-card img { width: 48px; height: 48px; border-radius: 12px; }

.suite-cta {
    text-align: center;
    margin-top: 30px;
}

.suite-cta a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--app-accent);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
}

.suite-cta a:hover { text-decoration: underline; }

/* ===== Footer ===== */
.footer {
    border-top: 1px solid var(--border);
    padding: 34px 0;
    background: var(--bg);
}

.footer .container {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-links a:hover { color: var(--text); }

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .nav-links { display: none; }
    .app-hero { padding: 52px 0 44px; }
    .features-grid { grid-template-columns: 1fr; }
    .footer .container { flex-direction: column; text-align: center; }
}
