/* ─── PRODUCTIFY – SHARED DESIGN SYSTEM ─────────────────────────────────── */

/* ─── TOKENS ──────────────────────────────────────────────────────────────── */
:root {
    --blue:          #2563EB;
    --blue-dark:     #1D4ED8;
    --blue-light:    #3B82F6;
    --blue-dim:      rgba(37,99,235,0.08);
    --blue-mid:      rgba(37,99,235,0.14);
    --blue-glow:     rgba(37,99,235,0.22);

    --bg:            #ffffff;
    --bg-alt:        #F7F8FA;
    --bg-alt-2:      #F0F2F5;
    --surface:       #ffffff;
    --border:        #E5E7EB;
    --border-hover:  #C7CBD4;

    --ink:           #111827;
    --ink-2:         #374151;
    --ink-muted:     #6B7280;
    --ink-faint:     #9CA3AF;

    --dark-bg:       #0F172A;
    --dark-surface:  #1E293B;
    --dark-border:   rgba(255,255,255,0.08);

    --shadow-xs:     0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm:     0 4px 12px rgba(0,0,0,0.07);
    --shadow-md:     0 8px 28px rgba(0,0,0,0.09);
    --shadow-lg:     0 16px 48px rgba(0,0,0,0.12);

    --radius-card:   16px;
    --radius-pill:   50px;

    /* legacy aliases */
    --purple:        #2563EB;
    --purple-light:  #3B82F6;
}

/* ─── RESET ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: 'Inter', sans-serif;
    color: var(--ink-2);
    background: var(--bg);
    line-height: 1.7;
    overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; transition: color .2s; }
ul, ol { list-style: none; }

/* ─── LAYOUT ──────────────────────────────────────────────────────────────── */
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; background: var(--bg); }
.section--alt  { background: var(--bg-alt); }
.section--dark { background: var(--dark-bg); }

/* ─── TYPOGRAPHY ──────────────────────────────────────────────────────────── */
.eyebrow {
    display: inline-block;
    font-size: .71rem; font-weight: 600;
    letter-spacing: .13em; text-transform: uppercase;
    color: var(--blue); background: var(--blue-dim);
    border: 1px solid rgba(37,99,235,.15);
    padding: 4px 14px; border-radius: var(--radius-pill);
    margin-bottom: 16px;
}
h1 {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 800; color: var(--ink);
    letter-spacing: -1.2px; line-height: 1.14;
}
h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700; color: var(--ink);
    letter-spacing: -.6px; line-height: 1.24;
}
h3 {
    font-size: 1.05rem; font-weight: 600;
    color: var(--ink); line-height: 1.4; margin-bottom: 8px;
}
.lead {
    font-size: clamp(.97rem, 2vw, 1.1rem);
    color: var(--ink-muted); line-height: 1.84; max-width: 640px;
}
.text-center { text-align: center; }
.text-muted   { color: var(--ink-muted); }

/* dark section overrides */
.section--dark h2,
.section--dark h3 { color: #F8FAFC; }
.section--dark p,
.section--dark .lead { color: rgba(248,250,252,.65); }
.section--dark .eyebrow { background: rgba(255,255,255,.08); color: #93C5FD; border-color: rgba(255,255,255,.1); }

/* ─── BUTTONS ─────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 30px; border-radius: var(--radius-pill);
    font-weight: 600; font-size: .97rem;
    transition: all .2s cubic-bezier(.4,0,.2,1);
    cursor: pointer; border: none; white-space: nowrap;
    font-family: 'Inter', sans-serif;
}
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 2px 8px var(--blue-glow); }
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); box-shadow: 0 6px 20px var(--blue-glow); }
.btn-secondary { background: var(--bg); color: var(--ink); border: 1.5px solid var(--border); }
.btn-secondary:hover { border-color: var(--border-hover); background: var(--bg-alt); }
.btn-ghost { background: rgba(255,255,255,.1); color: #F8FAFC; border: 1.5px solid rgba(255,255,255,.18); }
.btn-ghost:hover { background: rgba(255,255,255,.18); }
.btn-lg { padding: 16px 38px; font-size: 1.02rem; }

/* ─── APP STORE BADGE ─────────────────────────────────────────────────────── */
.appstore-badge-link { display: inline-block; line-height: 0; }
.appstore-badge { display: block; height: auto; border-radius: 10px; transition: opacity .2s, transform .2s; }
.appstore-badge:hover { opacity: .85; transform: translateY(-2px); }

/* ─── NAVBAR ──────────────────────────────────────────────────────────────── */
.navbar {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}
.navbar__inner {
    display: flex; align-items: center;
    justify-content: space-between; padding: 16px 0;
}
.logo { font-size: 1.4rem; font-weight: 800; color: var(--ink); letter-spacing: -.5px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links > a {
    font-size: .88rem; font-weight: 500; color: var(--ink-muted);
    padding: 6px 10px; border-radius: 8px;
    transition: color .2s, background .2s;
}
.nav-links > a:hover { color: var(--ink); background: var(--bg-alt); }

/* dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown__toggle {
    font-size: .88rem; font-weight: 500; color: var(--ink-muted);
    padding: 6px 10px; border-radius: 8px;
    background: none; border: none; cursor: pointer;
    display: flex; align-items: center; gap: 4px;
    font-family: 'Inter', sans-serif;
    transition: color .2s, background .2s;
    user-select: none;
}
.nav-dropdown__toggle:hover,
.nav-dropdown.open .nav-dropdown__toggle { color: var(--ink); background: var(--bg-alt); }
.nav-dropdown__toggle svg { width: 12px; height: 12px; transition: transform .25s; }
.nav-dropdown.open .nav-dropdown__toggle svg { transform: rotate(180deg); }
/* hover-to-open: hidden via opacity/visibility so the invisible bridge works */
.nav-dropdown__menu {
    position: absolute; top: 100%; left: 0;
    padding-top: 8px;   /* invisible bridge — cursor stays inside the element */
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .2s ease-in-out, transform .2s ease-in-out, visibility .2s;
    pointer-events: none;
}
.nav-dropdown__menu-inner {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; padding: 8px; min-width: 230px;
    box-shadow: var(--shadow-md);
}
.nav-dropdown.open .nav-dropdown__menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}
.nav-dropdown__item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 12px; border-radius: 8px;
    transition: background .15s; color: inherit;
}
.nav-dropdown__item:hover { background: var(--bg-alt); }
.nav-dropdown__item-icon {
    width: 32px; height: 32px; border-radius: 8px;
    background: var(--blue-dim);
    display: flex; align-items: center; justify-content: center;
    font-size: .95rem; flex-shrink: 0;
}
.nav-dropdown__item-text strong {
    display: block; font-size: .86rem; font-weight: 600; color: var(--ink);
}
.nav-dropdown__item-text span { font-size: .78rem; color: var(--ink-muted); }

.nav-cta { display: flex; align-items: center; gap: 12px; }
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 1.5px; background: var(--ink-muted); border-radius: 2px; margin: 5px 0; transition: all .3s; }

/* ─── MOBILE NAV ──────────────────────────────────────────────────────────── */
.mobile-nav {
    display: none; position: fixed; inset: 0; z-index: 200;
    background: rgba(255,255,255,.97); backdrop-filter: blur(16px);
    flex-direction: column; align-items: center; justify-content: center; gap: 24px;
    overflow-y: auto;
}
.mobile-nav a, .mobile-nav .mobile-nav__group-label {
    font-size: 1.2rem; font-weight: 600; color: var(--ink-muted);
}
.mobile-nav a:hover { color: var(--ink); }
.mobile-nav__group { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.mobile-nav__group-label { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }
.mobile-nav__sub { font-size: 1rem !important; }
.mobile-nav__close {
    position: absolute; top: 24px; right: 24px; font-size: 1.5rem;
    background: none; border: none; cursor: pointer; color: var(--ink-muted);
}

/* ─── BREADCRUMB ──────────────────────────────────────────────────────────── */
.breadcrumb {
    padding: 12px 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    font-size: .82rem; color: var(--ink-muted);
}
.breadcrumb__list { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.breadcrumb__list a { color: var(--ink-muted); transition: color .2s; }
.breadcrumb__list a:hover { color: var(--blue); }
.breadcrumb__sep { color: var(--ink-faint); }
.breadcrumb__current { color: var(--ink); font-weight: 500; }

/* ─── SUB-PAGE HERO ───────────────────────────────────────────────────────── */
.page-hero {
    padding: 72px 0 64px;
    background: var(--bg);
    position: relative; overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse 900px 400px at 50% 0%, rgba(37,99,235,.05) 0%, transparent 70%);
    pointer-events: none;
}
.page-hero__inner { position: relative; z-index: 1; max-width: 720px; }
.page-hero h1 { margin-bottom: 18px; }
.page-hero h1 span { color: var(--blue); }
.page-hero .lead { margin-bottom: 32px; }

/* ─── ARTICLE BODY ────────────────────────────────────────────────────────── */
.article { max-width: 760px; }
.article h2 { margin: 48px 0 16px; }
.article h3 { margin: 32px 0 10px; font-size: 1.05rem; }
.article p { font-size: .97rem; color: var(--ink-2); line-height: 1.9; margin-bottom: 16px; }
.article p:last-child { margin-bottom: 0; }

/* ─── CHECK LIST ──────────────────────────────────────────────────────────── */
.check-list { display: flex; flex-direction: column; gap: 11px; margin: 20px 0; }
.check-list li {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: .95rem; color: var(--ink-2);
}
.check-list li::before {
    content: '✓'; flex-shrink: 0;
    width: 20px; height: 20px;
    background: var(--blue-dim); color: var(--blue);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .65rem; font-weight: 700; margin-top: 3px;
}

/* ─── USE CASE CARDS ──────────────────────────────────────────────────────── */
.use-case-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px;
    margin-top: 32px;
}
.use-case-card {
    background: var(--surface); border-radius: var(--radius-card);
    padding: 28px 22px; border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}
.use-case-card__icon { font-size: 1.6rem; margin-bottom: 12px; }
.use-case-card h3 { font-size: .97rem; margin-bottom: 6px; }
.use-case-card p { font-size: .88rem; color: var(--ink-muted); line-height: 1.7; }

/* ─── HIGHLIGHT BOX ───────────────────────────────────────────────────────── */
.highlight-box {
    background: var(--blue-dim);
    border: 1px solid rgba(37,99,235,.15);
    border-radius: var(--radius-card);
    padding: 28px 32px; margin: 32px 0;
}
.highlight-box p { font-size: .97rem; color: var(--ink-2); line-height: 1.84; margin: 0; }
.highlight-box strong { color: var(--blue); }

/* ─── CTA BANNER ──────────────────────────────────────────────────────────── */
.cta-banner {
    text-align: center; padding: 80px 0;
    background: var(--dark-bg); position: relative; overflow: hidden;
}
.cta-banner::before {
    content: ''; position: absolute;
    top: 50%; left: 50%; transform: translate(-50%,-50%);
    width: 700px; height: 380px;
    background: radial-gradient(ellipse, rgba(37,99,235,.18) 0%, transparent 70%);
    pointer-events: none;
}
.cta-banner h2 { color: #F8FAFC; }
.cta-banner .lead { color: rgba(248,250,252,.65); margin: 0 auto 32px; }
.cta-banner__btns { position: relative; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ─── FOOTER ──────────────────────────────────────────────────────────────── */
.footer {
    background: var(--dark-bg);
    border-top: 1px solid var(--dark-border);
    color: rgba(248,250,252,.55);
    padding: 64px 0 32px;
}
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer__brand .logo { color: #F8FAFC; font-size: 1.35rem; }
.footer__brand p { margin-top: 14px; font-size: .87rem; line-height: 1.8; color: rgba(248,250,252,.45); }
.footer__col h4 {
    font-size: .73rem; font-weight: 700; color: rgba(248,250,252,.3);
    letter-spacing: .1em; text-transform: uppercase; margin-bottom: 16px;
}
.footer__col ul { display: flex; flex-direction: column; gap: 10px; }
.footer__col ul a { font-size: .87rem; color: rgba(248,250,252,.5); }
.footer__col ul a:hover { color: #F8FAFC; }
.footer__bottom {
    padding-top: 24px; border-top: 1px solid var(--dark-border);
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 16px; font-size: .79rem; color: rgba(248,250,252,.35);
}
.footer__social { display: flex; gap: 10px; }
.footer__social a {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--dark-surface); border: 1px solid var(--dark-border);
    display: flex; align-items: center; justify-content: center;
    font-size: .9rem; color: rgba(248,250,252,.5);
    transition: background .2s, color .2s;
}
.footer__social a:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ─── RESPONSIVE ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .nav-links { display: none; }
    .hamburger { display: block; }
    /* dropdowns hidden with mobile nav open — transition still works when nav-links is shown */
    .nav-dropdown__menu { pointer-events: none !important; opacity: 0 !important; visibility: hidden !important; }
}
@media (max-width: 600px) {
    .section { padding: 60px 0; }
    .page-hero { padding: 52px 0 48px; }
    .footer__grid { grid-template-columns: 1fr; }
    .footer__bottom { flex-direction: column; align-items: flex-start; }
    .use-case-grid { grid-template-columns: 1fr; }
}
