/* The Dragon Fruit Directory — shared design system */
:root {
    --ink: #1b1024;
    --ink-2: #4a3a56;
    --muted: #7c6d87;
    --line: #ece2e8;
    --line-strong: #dccbd6;
    --bg: #faf6f8;
    --card: #ffffff;
    --pink: #e5286f;
    --pink-deep: #bd1a5a;
    --pink-soft: #fdeef4;
    --plum: #8b5cf6;
    --dark: #14101c;
    --dark-2: #241534;
    --on-dark: #f6eef3;
    --on-dark-muted: rgba(246, 238, 243, 0.68);
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 1px 2px rgba(27, 16, 36, 0.04), 0 10px 30px -12px rgba(27, 16, 36, 0.18);
    --shadow-hover: 0 2px 4px rgba(27, 16, 36, 0.05), 0 22px 44px -16px rgba(229, 40, 111, 0.35);
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.icon {
    width: 1em; height: 1em;
    stroke: currentColor; fill: none;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
    flex-shrink: 0;
    vertical-align: -0.15em;
}

.container { width: min(1240px, 100% - 2rem); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
    position: relative;
    color: var(--on-dark);
    background:
        radial-gradient(60% 90% at 8% 0%, rgba(229, 40, 111, 0.42), transparent 60%),
        radial-gradient(45% 80% at 100% 10%, rgba(139, 92, 246, 0.35), transparent 60%),
        linear-gradient(180deg, var(--dark-2) 0%, var(--dark) 100%);
    overflow: hidden;
}
.site-header::after {
    content: '';
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,0.5), transparent 80%);
    -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.5), transparent 80%);
    pointer-events: none;
}
.site-header > .container { position: relative; z-index: 1; }

.topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.09);
}
.brand {
    display: inline-flex; align-items: center; gap: 0.6rem;
    text-decoration: none; color: var(--on-dark);
    font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em;
    white-space: nowrap;
}
.brand-mark {
    width: 34px; height: 34px; border-radius: 10px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--pink), var(--plum));
    box-shadow: 0 6px 18px -6px rgba(229, 40, 111, 0.7);
}
.brand-mark .icon { width: 19px; height: 19px; stroke-width: 2.2; }

.site-nav { display: flex; align-items: center; gap: 0.35rem; }
.nav-link {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.5rem 0.85rem; border-radius: 999px;
    text-decoration: none; font-weight: 500; font-size: 0.9rem;
    color: var(--on-dark-muted);
    transition: background 0.2s, color 0.2s;
}
.nav-link .icon { width: 16px; height: 16px; }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--on-dark); background: rgba(255,255,255,0.08); }
.nav-cta {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.55rem 1rem; border-radius: 999px;
    text-decoration: none; font-weight: 600; font-size: 0.9rem;
    color: #fff; background: var(--pink);
    box-shadow: 0 8px 20px -8px rgba(229, 40, 111, 0.9);
    transition: transform 0.2s, background 0.2s;
    white-space: nowrap;
}
.nav-cta .icon { width: 16px; height: 16px; }
.nav-cta:hover { background: #ff3d81; transform: translateY(-1px); }

.hero { padding: 2.75rem 0 2.25rem; text-align: center; }
.hero h1 {
    font-family: var(--font-display); font-weight: 600;
    font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.05; letter-spacing: -0.02em;
    margin: 0 0 0.75rem;
}
.hero h1 em { font-style: italic; color: #ff7fae; }
.hero p { max-width: 42rem; margin: 0 auto; color: var(--on-dark-muted); font-size: clamp(0.98rem, 1.4vw, 1.12rem); }
.hero-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 1.4rem; }
.hero .chip {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.4rem 0.8rem; border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.06);
    color: var(--on-dark); font-size: 0.82rem; font-weight: 500;
}
.hero .chip .icon { width: 14px; height: 14px; color: #ff9cc0; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.7rem 1.15rem; border-radius: 999px; border: 1px solid transparent;
    font-weight: 600; font-size: 0.92rem; text-decoration: none; cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--pink); color: #fff; box-shadow: 0 10px 24px -10px rgba(229, 40, 111, 0.8); }
.btn-primary:hover { background: var(--pink-deep); transform: translateY(-1px); }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--pink); color: var(--pink); }

/* ---------- Footer ---------- */
.site-footer {
    margin-top: 4rem; color: var(--on-dark);
    background: linear-gradient(180deg, var(--dark) 0%, #0f0b16 100%);
}
.footer-grid {
    display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem;
    padding: 3rem 0 2rem;
}
.footer-brand p { color: var(--on-dark-muted); margin: 0.75rem 0 0; max-width: 32ch; font-size: 0.92rem; }
.footer-col h4 { margin: 0 0 0.85rem; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-dark-muted); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.footer-col a { color: var(--on-dark); text-decoration: none; font-size: 0.93rem; opacity: 0.9; display: inline-flex; align-items: center; gap: 0.45rem; }
.footer-col a:hover { opacity: 1; color: #ff9cc0; }
.footer-col a .icon { width: 15px; height: 15px; opacity: 0.7; }
.footer-bottom {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem;
    padding: 1.1rem 0 1.5rem; border-top: 1px solid rgba(255,255,255,0.08);
    color: var(--on-dark-muted); font-size: 0.8rem;
}
.footer-bottom a { color: inherit; }

/* ---------- Mobile install bar (homepage) ---------- */
.mobile-install-bar { display: none; }
@media (max-width: 767px) {
    .mobile-install-bar {
        display: flex; position: fixed; top: 0; left: 0; right: 0; z-index: 2000;
        align-items: center; gap: 0.6rem;
        padding: 0.5rem 0.75rem; padding-top: calc(0.5rem + env(safe-area-inset-top));
        background: rgba(20, 16, 28, 0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    body.has-install-bar { padding-top: calc(56px + env(safe-area-inset-top)); }
    .mobile-install-icon { width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0; background: #fff; }
    .mobile-install-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; flex: 1; }
    .mobile-install-text strong { color: #fff; font-size: 0.9rem; }
    .mobile-install-text span { color: rgba(255,255,255,0.7); font-size: 0.72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .mobile-install-cta {
        flex-shrink: 0; background: var(--pink); color: #fff; font-weight: 700; font-size: 0.85rem;
        text-decoration: none; padding: 0.45rem 1.1rem; border-radius: 999px; white-space: nowrap;
    }
    .mobile-install-cta:active { transform: scale(0.96); }
    .nav-cta.hide-mobile { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .topbar { flex-wrap: wrap; justify-content: center; }
    .site-nav { width: 100%; justify-content: center; flex-wrap: wrap; }
    .nav-link { padding: 0.45rem 0.7rem; font-size: 0.85rem; }
    .hero { padding: 2rem 0 1.75rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 2.25rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
    html { scroll-behavior: auto; }
}
