/* ================================================================
   Configura Public Nav — pub-nav.css
   Floating glass pill · Mobile-first
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@700;800&family=Cormorant+Garamond:ital,wght@1,700&display=swap');

body { padding-top: 98px; }
html, body { overflow-x: hidden; max-width: 100vw; }

/* ── Nav bar — floating pill ─────────────────────────────── */
#pub-nav-mount nav {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    height: 66px;
    width: min(1100px, calc(100% - 32px));
    padding: 0 14px 0 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: clamp(12px, 2vw, 24px);
    background: rgba(255,255,255,0.40);
    backdrop-filter: blur(24px) saturate(1.8);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    border: 1px solid rgba(255,255,255,0.55);
    border-radius: 100px;
    box-shadow:
        0 8px 32px rgba(15, 23, 42, 0.08),
        0 2px 8px rgba(15, 23, 42, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: background 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1;
    margin: 0;
}
#pub-nav-mount nav.scrolled {
    background: rgba(255,255,255,0.55);
    box-shadow:
        0 12px 40px rgba(15, 23, 42, 0.10),
        0 4px 12px rgba(15, 23, 42, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* ── Logo ────────────────────────────────────────────────── */
#pub-nav-mount .logo {
    display: flex;
    align-items: center;
    gap: clamp(6px, 1.5vw, 10px);
    text-decoration: none;
    flex-shrink: 0;
    line-height: 1;
}
#pub-nav-mount .logo-text {
    color: #0f172a;
    font-weight: 700;
    font-size: clamp(1.05rem, 3vw, 1.25rem);
    letter-spacing: -0.03em;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    white-space: nowrap;
}
#pub-nav-mount .logo-studio {
    font-weight: 400;
    color: rgba(15, 23, 42, 0.55);
}
#pub-nav-mount .logo-icon,
#pub-nav-mount .logo img,
#pub-nav-mount .logo svg {
    height: clamp(22px, 4vw, 28px);
    width: auto;
    display: block;
    flex-shrink: 0;
}

/* ── Center nav links ────────────────────────────────────── */
#pub-nav-mount .nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    margin: 0; padding: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    line-height: 1;
}
#pub-nav-mount .nav-links li { list-style: none; margin: 0; padding: 0; line-height: 1; }
#pub-nav-mount .nav-links a {
    color: #475569;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
    line-height: 1;
    display: block;
    padding: 6px 2px;
}
#pub-nav-mount .nav-links a:hover { color: #0f172a; }
#pub-nav-mount .nav-links a.nav-active { color: #0f172a; font-weight: 600; }

/* ── Nav actions ─────────────────────────────────────────── */
#pub-nav-mount .nav-actions {
    display: flex; gap: 8px; align-items: center; margin: 0; padding: 0;
}

/* ── Buttons ─────────────────────────────────────────────── */
#pub-nav-mount .btn {
    padding: 10px 20px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    white-space: nowrap;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1;
    box-sizing: border-box;
}
#pub-nav-mount .btn-ghost {
    background: transparent;
    color: #475569;
}
#pub-nav-mount .btn-ghost:hover {
    color: #0f172a;
    background: rgba(0, 0, 0, 0.05);
}
#pub-nav-mount .btn-primary {
    background: #0f172a;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}
#pub-nav-mount .btn-primary:hover {
    background: #1e293b;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.25);
}
#pub-nav-mount .mobile-only-btn { display: none; }

/* ── Hamburger ───────────────────────────────────────────── */
#pub-nav-mount .hamburger-btn {
    display: none; flex-direction: column; justify-content: center; align-items: center;
    gap: 5px; width: 40px; height: 40px; padding: 8px; background: transparent;
    border: none; cursor: pointer; border-radius: 50%; transition: background 0.2s;
}
#pub-nav-mount .hamburger-btn:hover { background: rgba(0,0,0,0.05); }
#pub-nav-mount .hamburger-line {
    display: block; width: 20px; height: 2px; background: #334155;
    border-radius: 2px; transition: all 0.3s ease;
}

/* ── Mobile overlay ──────────────────────────────────────── */
#pub-nav-mount .mobile-nav-overlay {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.25); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    z-index: 998; opacity: 0; transition: opacity 0.3s ease;
}
#pub-nav-mount .mobile-nav-overlay.open { display: block; opacity: 1; }

/* ── Mobile panel ────────────────────────────────────────── */
#pub-nav-mount .mobile-nav-panel {
    display: none; position: fixed; top: 0; right: -300px; width: 300px; height: 100%;
    background: #ffffff; z-index: 999; flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -8px 0 32px rgba(0,0,0,0.08);
}
#pub-nav-mount .mobile-nav-panel.open { right: 0; }
#pub-nav-mount .mobile-nav-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid #f1f5f9;
}
#pub-nav-mount .mobile-nav-close {
    background: transparent; border: none; color: #94a3b8; cursor: pointer;
    padding: 8px; border-radius: 8px; transition: all 0.2s;
}
#pub-nav-mount .mobile-nav-close:hover { color: #0f172a; background: #f1f5f9; }
#pub-nav-mount .mobile-nav-links { display: flex; flex-direction: column; padding: 12px 0; flex: 1; }
#pub-nav-mount .mobile-nav-link {
    display: flex; align-items: center; padding: 16px 24px; color: #64748b;
    text-decoration: none; font-size: 16px; font-weight: 500; transition: all 0.15s; min-height: 48px;
}
#pub-nav-mount .mobile-nav-link:hover,
#pub-nav-mount .mobile-nav-link.active { color: #0f172a; background: #f8fafc; }
#pub-nav-mount .mobile-nav-link.active { font-weight: 600; }
#pub-nav-mount .mobile-nav-actions {
    padding: 20px; display: flex; flex-direction: column; gap: 12px; border-top: 1px solid #f1f5f9;
}
#pub-nav-mount .btn-block { width: 100%; justify-content: center; padding: 14px 20px; }

/* ── Mobile breakpoint ───────────────────────────────────── */
@media (max-width: 768px) {
    body { padding-top: 80px; }
    #pub-nav-mount nav {
        top: 10px;
        height: 60px;
        width: calc(100% - 20px);
        padding: 0 8px 0 16px;
    }
    #pub-nav-mount .nav-links { display: none; }
    #pub-nav-mount .desktop-only-btn { display: none !important; }
    #pub-nav-mount .mobile-only-btn { display: inline-flex; }
    #pub-nav-mount .hamburger-btn { display: flex; }
    #pub-nav-mount .mobile-nav-panel { display: flex; }
    #pub-nav-mount .nav-actions { margin-left: auto; gap: 6px; flex-shrink: 0; }
    #pub-nav-mount .nav-actions .btn { padding: 8px 14px; font-size: 13px; }
}

/* ── Auth modal — V2 split layout (visual left, form right) ──── */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.55); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    display: flex; align-items: center; justify-content: center;
    z-index: 2000; opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
    padding: 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.modal-overlay.active { opacity: 1; visibility: visible; }

/* Base modal (single-column fallback / signup form) */
.modal {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 24px;
    width: 100%;
    max-width: 420px;
    margin: auto;
    transform: scale(0.92) translateY(20px);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-sizing: border-box;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22), 0 8px 24px rgba(15, 23, 42, 0.1);
    position: relative;
    overflow: hidden;
}
.modal-overlay.active .modal { transform: scale(1) translateY(0); }

/* ── Split modal: visual left, form right ──────────────────── */
.modal.modal-split {
    max-width: 760px;
    display: grid;
    grid-template-columns: 300px 1fr;
}

/* Visual side (purple gradient) */
.modal-visual {
    background: linear-gradient(135deg, #fde68a 0%, #fef3c7 18%, #bae6fd 50%, #7dd3fc 75%, #38bdf8 100%);
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    color: #0a1a2e;
    min-height: 480px;
}
.modal-visual::before {
    content: '';
    position: absolute;
    top: -50px; right: -50px;
    width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(255,255,255,0.45), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.modal-visual::after {
    content: '';
    position: absolute;
    bottom: -80px; left: -40px;
    width: 240px; height: 240px;
    background: radial-gradient(circle, rgba(253, 224, 71, 0.35), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.modal-visual-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 100px;
    color: #1a1a1a;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    align-self: flex-start;
    position: relative;
    z-index: 1;
}
.modal-visual-content { position: relative; z-index: 1; }
.modal-visual-title {
    font-family: 'Manrope', 'DM Sans', sans-serif;
    color: #0a1a2e;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-top: 18px;
}
.modal-visual-title em {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-weight: 700;
    font-size: 1.2em;
}
.modal-visual-sub {
    color: rgba(10, 26, 46, 0.72);
    font-size: 13px;
    margin-top: 12px;
    line-height: 1.5;
}
.modal-visual-quote {
    position: relative;
    z-index: 1;
    padding: 14px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    color: #1a1a1a;
    font-size: 12px;
    line-height: 1.5;
    font-style: italic;
}
.modal-visual-quote-author {
    display: block;
    font-style: normal;
    font-weight: 700;
    margin-top: 8px;
    font-size: 11px;
    opacity: 0.85;
}

/* Form side */
.modal-form-side { padding: 40px 36px 32px; }

/* Single-column / signup-tall fallback: padding for non-split content */
.modal:not(.modal-split) > div:not(.modal-visual):not(.modal-form-side) { padding: 44px 36px 36px; }

.modal-header { text-align: left; margin-bottom: 24px; }
.modal-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
}
.modal-subtitle { color: #64748b !important; -webkit-text-fill-color: #64748b !important; font-size: 0.9rem; }
.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: #334155 !important;
    -webkit-text-fill-color: #334155 !important;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}
.form-input {
    width: 100%;
    padding: 13px 16px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 12px;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.15s;
    box-sizing: border-box;
}
.form-input:focus {
    outline: none;
    border-color: #4f46e5;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}
.form-input::placeholder { color: #94a3b8; }
.form-input:focus::placeholder,
.form-input:focus::-webkit-input-placeholder,
.form-input:focus::-moz-placeholder,
.form-input:focus:-ms-input-placeholder { color: transparent !important; opacity: 0 !important; }

.forgot-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}
.forgot-password-link {
    display: inline-block;
    font-size: 12px;
    color: #4f46e5;
    text-decoration: none;
    transition: color 0.15s;
    font-weight: 600;
}
.forgot-password-link:hover { color: #7c3aed; text-decoration: underline; }

.form-error { color: #ef4444; font-size: 0.85rem; margin-top: 8px; display: none; }
.form-error.visible { display: block; }
.form-submit { width: 100%; margin-top: 8px; }

.modal-toggle { text-align: center; margin-top: 20px; color: #64748b !important; -webkit-text-fill-color: #64748b !important; font-size: 13px; }
.modal-toggle a { color: #4f46e5; text-decoration: none; font-weight: 700; }
.modal-toggle a:hover { text-decoration: underline; }

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    background: #f1f5f9;
    border: none;
    border-radius: 50%;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    z-index: 10;
}
.modal-close:hover { background: #e2e8f0; color: #0f172a; }

#pnAuthModal .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: inherit;
    white-space: nowrap;
    width: 100%;
    box-sizing: border-box;
    line-height: 1;
}
#pnAuthModal .btn-primary {
    background: #1a1a1a;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
#pnAuthModal .btn-primary:hover {
    background: #000000;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

/* ── MOBILE: collapse split into single column ────────────── */
@media (max-width: 720px) {
    .modal-overlay { padding: 0; align-items: flex-start; }
    .modal.modal-split {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin: 12px auto;
        max-height: calc(100vh - 24px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .modal-visual {
        padding: 28px 26px 24px;
        min-height: 0;
    }
    .modal-visual::before { width: 160px; height: 160px; top: -40px; right: -40px; }
    .modal-visual::after { display: none; }
    .modal-visual-badge { font-size: 10px; padding: 4px 10px; }
    .modal-visual-title { font-size: 22px; margin-top: 14px; }
    .modal-visual-sub { font-size: 12px; margin-top: 10px; }
    .modal-visual-quote { display: none; }
    .modal-form-side { padding: 28px 26px 24px; }
    .modal-header { margin-bottom: 20px; }
    .modal-title { font-size: 1.35rem; }
    .form-group { margin-bottom: 14px; }
    .form-input { padding: 12px 14px; font-size: 14.5px; }
}

@media (max-width: 380px) {
    .modal.modal-split { margin: 8px auto; max-height: calc(100vh - 16px); }
    .modal-visual { padding: 22px 20px 20px; }
    .modal-visual-title { font-size: 20px; }
    .modal-form-side { padding: 22px 20px 20px; }
}
