/* ==========================================================================
   Lets family design system (LetsMeet, LetsParty, LetsPoll), by dabidao

   This file is IDENTICAL in all three repositories. Edit it in all three.
   It loads after each app's own style.css and:
     1. defines the dabidao brand tokens and self-hosted fonts,
     2. sets the per-app accent from <body data-app="meet|party|poll">,
     3. styles the shared family components (lf-*),
     4. restyles the legacy classes the three apps have in common.
   Brand reference: dabidao.com/css/style.css
   ========================================================================== */

@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/outfit-latin.woff2') format('woff2');
}

@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/dmsans-latin.woff2') format('woff2');
}

:root {
    /* dabidao brand */
    --lf-navy: #061127;
    --lf-navy-2: #0b1733;
    --lf-slate: #1b2831;
    --lf-violet: #8840fb;
    --lf-blue: #1f64ff;
    --lf-cyan: #17dbf3;
    --lf-mint: #20efc5;
    --lf-gradient: linear-gradient(100deg, #8840fb 0%, #1f64ff 35%, #17dbf3 72%, #20efc5 100%);

    /* Neutrals (text pairs meet WCAG AA) */
    --lf-bg: #f5f7fb;
    --lf-surface: #ffffff;
    --lf-subtle: #eceff6;
    --lf-border: #dde3ee;
    --lf-text: #0b1733;
    --lf-text-muted: #52607a;
    --lf-on-dark: rgba(255, 255, 255, 0.82);
    --lf-on-dark-muted: rgba(255, 255, 255, 0.62);

    /* Status */
    --lf-success: #0f7a4a;
    --lf-success-bg: #e6f6ee;
    --lf-danger: #c62828;
    --lf-danger-bg: #fdecec;
    --lf-warning: #8a5a00;
    --lf-warning-bg: #fff6e0;
    --lf-info-bg: #eaf1ff;

    /* Per-app accent: LetsMeet is the default */
    --app-accent: #1a56e0;
    --app-accent-strong: #1446c0;
    --app-tint: #e9f0ff;
    --app-glow: #1f64ff;

    /* Shape and type */
    --lf-radius: 12px;
    --lf-radius-sm: 8px;
    --lf-radius-pill: 999px;
    --lf-shadow: 0 1px 3px rgba(6, 17, 39, 0.06), 0 4px 14px rgba(6, 17, 39, 0.06);
    --lf-shadow-lg: 0 2px 6px rgba(6, 17, 39, 0.08), 0 12px 32px rgba(6, 17, 39, 0.12);
    --lf-font-display: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --lf-font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --lf-max: 1040px;
}

/* Legacy variables used by the apps' own style.css. Set on body, where the
   per-app accent is defined, so they resolve to that app's colour. */
body {
    --primary-color: var(--app-accent);
    --primary-hover: var(--app-accent-strong);
    --success-color: var(--lf-success);
    --danger-color: var(--lf-danger);
    --header-bg: var(--lf-navy);
    --background: var(--lf-bg);
    --surface: var(--lf-surface);
    --surface-light: var(--lf-subtle);
    --border: var(--lf-border);
    --text-primary: var(--lf-text);
    --text-secondary: var(--lf-text-muted);
    --shadow-lg: var(--lf-shadow-lg);
}

body[data-app="party"] {
    --app-accent: #7c3aed;
    --app-accent-strong: #6d28d9;
    --app-tint: #f3ecff;
    --app-glow: #8840fb;
}

body[data-app="poll"] {
    --app-accent: #0f766e;
    --app-accent-strong: #115e59;
    --app-tint: #e3f6f3;
    --app-glow: #20efc5;
}

/* ---------- Base ---------- */

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--lf-font-body);
    background: var(--lf-bg);
    color: var(--lf-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5 {
    font-family: var(--lf-font-display);
    color: var(--lf-text);
    letter-spacing: -0.01em;
    line-height: 1.2;
    font-weight: 600;
}

a { color: var(--app-accent); }
a:hover { color: var(--app-accent-strong); }

:focus-visible {
    outline: 3px solid var(--app-accent);
    outline-offset: 2px;
}

.lf-main {
    flex: 1 0 auto;
    width: 100%;
}

.container {
    max-width: var(--lf-max);
}

.lf-skip {
    position: absolute;
    left: -9999px;
    top: 0;
}
.lf-skip:focus {
    left: 1rem;
    top: 1rem;
    z-index: 100;
    background: #fff;
    color: var(--lf-text);
    padding: 0.5rem 1rem;
    border-radius: var(--lf-radius-sm);
}

/* ---------- Header ---------- */

.lf-header {
    display: block;
    background: var(--lf-navy);
    color: #fff;
    position: relative;
    padding: 0;
    margin: 0;
    box-shadow: none;
    text-align: left;
    border: 0;
    border-radius: 0;
}

.lf-header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--lf-gradient);
}

.lf-header-inner {
    width: 100%;
    box-sizing: border-box;
    max-width: calc(var(--lf-max) + 2.5rem);
    margin: 0 auto;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.lf-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: #fff;
    text-decoration: none;
}
.lf-brand:hover { color: #fff; }

.lf-brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: var(--app-accent);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset, 0 6px 18px -6px var(--app-glow);
    flex-shrink: 0;
}
.lf-brand-mark svg { width: 22px; height: 22px; }

.lf-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.lf-brand-name {
    font-family: var(--lf-font-display);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.02em;
    color: #fff;
}
.lf-brand-by {
    font-size: 0.75rem;
    color: var(--lf-on-dark-muted);
    letter-spacing: 0.01em;
}

.lf-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.lf-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--lf-on-dark);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: var(--lf-radius-pill);
    transition: background 0.15s, color 0.15s;
}
.lf-nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}
.lf-nav-link svg { width: 16px; height: 16px; opacity: 0.85; }

.lf-nav-cta {
    background: #fff;
    color: var(--lf-navy);
    font-weight: 600;
}
.lf-nav-cta:hover { background: #fff; color: var(--app-accent-strong); }

@media (max-width: 640px) {
    .lf-nav .lf-nav-sibling span { display: none; }
    .lf-nav-sibling { padding: 0.45rem; }
    .lf-brand-name { font-size: 1.15rem; }
}

/* ---------- Footer ---------- */

.lf-footer {
    background: var(--lf-navy);
    color: var(--lf-on-dark);
    margin-top: 3rem;
    padding: 2.5rem 1.25rem 2rem;
    text-align: left;
    font-size: 0.92rem;
    border: 0;
}

.lf-footer-inner {
    max-width: var(--lf-max);
    box-sizing: content-box;
    margin: 0 auto;
}

.lf-footer h2 {
    color: #fff;
    font-size: 1rem;
    margin: 0 0 1rem;
}

.lf-footer a { color: var(--lf-cyan); }
.lf-footer a:hover { color: #fff; }
.lf-footer a.lf-footer-app,
.lf-footer a.lf-footer-app:hover { color: #fff; }

.lf-footer-apps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

.lf-footer-app {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 0.9rem;
    border-radius: var(--lf-radius);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}
.lf-footer-app:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
}
.lf-footer-app[aria-current="page"] {
    border-color: rgba(255, 255, 255, 0.25);
}
.lf-footer-app strong {
    display: block;
    font-family: var(--lf-font-display);
    font-weight: 600;
}
.lf-footer-app small { color: var(--lf-on-dark-muted); }

.lf-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--lf-on-dark-muted);
}
.lf-footer-bottom nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; }

/* App glyph tiles (used in footer and promos) */
.lf-glyph {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: #fff;
}
.lf-glyph svg { width: 20px; height: 20px; }
.lf-glyph-meet { background: #1a56e0; }
.lf-glyph-party { background: #7c3aed; }
.lf-glyph-poll { background: #0f766e; }
.lf-glyph-dabidao { background: var(--lf-navy); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); }

/* ---------- Landing page ---------- */

.lf-hero {
    background: var(--lf-navy);
    color: #fff;
    padding: 3.5rem 1.25rem 4rem;
    position: relative;
    overflow: hidden;
}
.lf-hero::before {
    content: '';
    position: absolute;
    width: 620px;
    height: 620px;
    right: -180px;
    top: -260px;
    background: radial-gradient(circle, var(--app-glow) 0%, transparent 62%);
    opacity: 0.35;
    pointer-events: none;
}
.lf-hero-inner {
    max-width: var(--lf-max);
    box-sizing: content-box;
    margin: 0 auto;
    position: relative;
}
.lf-eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--lf-cyan);
    margin-bottom: 0.9rem;
}
.lf-hero h1 {
    color: #fff;
    font-size: clamp(2rem, 5vw, 3.3rem);
    line-height: 1.08;
    margin: 0 0 1rem;
    max-width: 18ch;
    font-weight: 700;
}
.lf-hero p {
    color: var(--lf-on-dark);
    font-size: 1.12rem;
    max-width: 56ch;
    margin: 0 0 1.75rem;
}
.lf-hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.lf-hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin: 1.75rem 0 0;
    padding: 0;
    list-style: none;
    color: var(--lf-on-dark-muted);
    font-size: 0.92rem;
}
.lf-hero-points li::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--lf-mint);
    margin-right: 0.5rem;
    vertical-align: middle;
}

.lf-section {
    box-sizing: content-box;
    max-width: var(--lf-max);
    margin: 0 auto;
    padding: 3rem 1.25rem 0;
}
.lf-section > h2 {
    font-size: clamp(1.45rem, 3vw, 1.9rem);
    margin: 0 0 0.4rem;
}
.lf-section-lead {
    color: var(--lf-text-muted);
    margin: 0 0 1.5rem;
    max-width: 60ch;
}

.lf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.lf-tile {
    background: var(--lf-surface);
    border: 1px solid var(--lf-border);
    border-radius: var(--lf-radius);
    padding: 1.35rem;
    box-shadow: var(--lf-shadow);
}
.lf-tile h3 { font-size: 1.1rem; margin: 0 0 0.35rem; }
.lf-tile p { color: var(--lf-text-muted); margin: 0; font-size: 0.97rem; }

.lf-step-num {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--app-tint);
    color: var(--app-accent-strong);
    font-family: var(--lf-font-display);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

/* ---------- Cross-promotion ---------- */

.lf-promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.lf-promo {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    background: var(--lf-surface);
    border: 1px solid var(--lf-border);
    border-radius: var(--lf-radius);
    padding: 1.35rem;
    color: var(--lf-text);
    text-decoration: none;
    box-shadow: var(--lf-shadow);
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.lf-promo:hover {
    transform: translateY(-2px);
    box-shadow: var(--lf-shadow-lg);
    border-color: #c9d2e3;
    color: var(--lf-text);
}
.lf-promo-head { display: flex; align-items: center; gap: 0.7rem; }
.lf-promo-head strong { font-family: var(--lf-font-display); font-size: 1.12rem; }
.lf-promo p { margin: 0; color: var(--lf-text-muted); font-size: 0.96rem; }
.lf-promo-cta { margin-top: auto; font-weight: 600; font-size: 0.93rem; }
.lf-promo-meet .lf-promo-cta { color: #1a56e0; }
.lf-promo-party .lf-promo-cta { color: #7c3aed; }
.lf-promo-poll .lf-promo-cta { color: #0f766e; }
.lf-promo-dabidao .lf-promo-cta { color: var(--lf-text); }

/* Slim contextual promo after an action */
.lf-nudge {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin: 1.5rem 0;
    padding: 1rem 1.1rem;
    border-radius: var(--lf-radius);
    background: var(--lf-surface);
    border: 1px dashed #c9d2e3;
    color: var(--lf-text);
    text-decoration: none;
    text-align: left;
}
.lf-nudge:hover { border-style: solid; color: var(--lf-text); }
.lf-nudge p { margin: 0; font-size: 0.95rem; color: var(--lf-text-muted); }
.lf-nudge strong { color: var(--lf-text); }
.lf-nudge-arrow { margin-left: auto; font-weight: 700; color: var(--lf-text-muted); }

/* ---------- Buttons (family) ---------- */

.lf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.4rem;
    border-radius: var(--lf-radius-pill);
    font-family: var(--lf-font-body);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    text-decoration: none;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
    width: auto;
    margin: 0;
}
.lf-btn:active { transform: translateY(1px); }
.lf-btn-primary { background: var(--app-accent); color: #fff; }
.lf-btn-primary:hover { background: var(--app-accent-strong); color: #fff; }
.lf-btn-light { background: #fff; color: var(--lf-navy); }
.lf-btn-light:hover { background: var(--lf-subtle); color: var(--lf-navy); }
.lf-btn-ghost-dark { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.lf-btn-ghost-dark:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, 0.06); }
.lf-btn-ghost { background: transparent; color: var(--lf-text); border-color: var(--lf-border); }
.lf-btn-ghost:hover { border-color: var(--app-accent); color: var(--app-accent-strong); background: transparent; }

/* Copy feedback (family.js) */
.lf-copied {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    transform: translateX(-50%);
    background: var(--lf-navy);
    color: #fff;
    padding: 0.6rem 1.1rem;
    border-radius: var(--lf-radius-pill);
    font-size: 0.92rem;
    box-shadow: var(--lf-shadow-lg);
    z-index: 1000;
    pointer-events: none;
}

/* Link boxes for share/manage links */
.lf-linkbox {
    background: var(--lf-subtle);
    border: 1px solid var(--lf-border);
    border-radius: var(--lf-radius);
    padding: 1rem;
    margin: 1rem 0;
}
.lf-linkbox-label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.lf-linkbox-hint { display: block; color: var(--lf-text-muted); font-size: 0.9rem; margin-bottom: 0.6rem; }
.lf-linkbox code {
    display: block;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.85rem;
    background: #fff;
    border: 1px solid var(--lf-border);
    border-radius: var(--lf-radius-sm);
    padding: 0.6rem 0.75rem;
    word-break: break-all;
    margin-bottom: 0.75rem;
    color: var(--lf-text);
}
.lf-linkbox-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.lf-linkbox-actions .lf-btn { padding: 0.55rem 1rem; font-size: 0.92rem; }

/* ==========================================================================
   Legacy class restyle (classes the three apps share)
   ========================================================================== */

.card,
.manage-container {
    border-radius: var(--lf-radius);
    border: 1px solid var(--lf-border);
    box-shadow: var(--lf-shadow);
}

.lf-main > .container { padding-top: 2rem; padding-bottom: 1rem; box-sizing: border-box; }

.card { background: var(--lf-surface); }

/* Buttons: plain <button>, .btn (LetsParty), .button-* (LetsPoll) */
button:not([class]),
button[type="submit"]:not([class*="icon"]):not([class*="lf-"]),
.btn,
.btn-primary,
.button-success,
a.btn {
    font-family: var(--lf-font-body);
    font-weight: 600;
    border-radius: var(--lf-radius-pill);
    letter-spacing: 0;
}

button:not([class]),
button[type="submit"]:not([class]),
.btn-primary,
.button-success {
    background: var(--app-accent);
    color: #fff;
    border: 1.5px solid var(--app-accent);
}
button:not([class]):hover,
button[type="submit"]:not([class]):hover,
.btn-primary:hover,
.button-success:hover {
    background: var(--app-accent-strong);
    border-color: var(--app-accent-strong);
    color: #fff;
}

.btn-secondary,
.button-secondary,
button.btn-secondary {
    background: #fff;
    color: var(--lf-text);
    border: 1.5px solid var(--lf-border);
    border-radius: var(--lf-radius-pill);
    font-weight: 600;
}
.btn-secondary:hover,
.button-secondary:hover,
button.btn-secondary:hover {
    background: #fff;
    color: var(--app-accent-strong);
    border-color: var(--app-accent);
}

.btn-danger,
.button-danger {
    background: var(--lf-danger);
    border-color: var(--lf-danger);
    color: #fff;
    border-radius: var(--lf-radius-pill);
}
.btn-danger:hover,
.button-danger:hover { background: #a32020; border-color: #a32020; color: #fff; }

/* Form controls */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="datetime-local"],
input[type="date"],
input[type="time"],
select,
textarea {
    font-family: var(--lf-font-body);
    font-size: 16px; /* prevents iOS zoom */
    color: var(--lf-text);
    background: #fff;
    border: 1.5px solid var(--lf-border);
    border-radius: var(--lf-radius-sm);
    transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--app-accent);
    box-shadow: 0 0 0 3px var(--app-tint);
}

label { color: var(--lf-text); }

input[type="checkbox"],
input[type="radio"] { accent-color: var(--app-accent); }

/* Alerts */
.alert {
    border-radius: var(--lf-radius);
    border: 1px solid transparent;
}
.alert-success { background: var(--lf-success-bg); color: #0b5a37; border-color: #bfe6d1; }
.alert-error,
.alert-danger { background: var(--lf-danger-bg); color: #8e1c1c; border-color: #f4c7c7; }
.alert-warning { background: var(--lf-warning-bg); color: var(--lf-warning); border-color: #f3dfa6; }
.alert-info { background: var(--lf-info-bg); color: #1d3a7a; border-color: #cddbfb; }

/* Hide the old app headers and footers if a template still renders one */
body > header:not(.lf-header),
body > footer:not(.lf-footer) { display: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
