/* ============================================================
   EIP Partner Portal – Stylesheet
   Matches main site design system
   ============================================================ */

:root {
    --primary: #4a8e8f;
    --primary-dark: #3a7172;
    --primary-light: #6aa4a6;
    --accent: #c9a96e;
    --dark: #1a1f2e;
    --dark-soft: #2a2f3e;
    --light: #f8f9fa;
    --light-warm: #faf9f7;
    --text: #2d3436;
    --text-muted: #636e72;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 32px rgba(0,0,0,0.1);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.12);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--light-warm);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    margin: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    color: var(--dark);
}

p { font-size: 1.05rem; color: var(--text); margin-bottom: 1.2rem; }

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

::selection { background: var(--primary-light); color: white; }

/* ---------- Login Overlay ---------- */
.login-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-soft) 100%);
    padding: 1.5rem;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.login-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.login-box {
    background: white;
    border-radius: var(--radius);
    padding: 3rem 2.5rem;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.login-box .login-logo {
    width: 120px;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.login-box h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.login-box .login-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.login-input-group {
    position: relative;
    margin-bottom: 1rem;
}

.login-input-group input {
    width: 100%;
    padding: 0.85rem 1.2rem;
    border: 1.5px solid #e0e0e0;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.login-input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 142, 143, 0.15);
}

.login-input-group input.is-error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.login-btn {
    width: 100%;
    padding: 0.85rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}

.login-btn:hover { background: var(--primary-dark); }
.login-btn:active { transform: scale(0.98); }

.login-error {
    color: #e74c3c;
    font-size: 0.88rem;
    margin-top: 0.75rem;
    min-height: 1.3em;
}

.login-back {
    display: inline-block;
    margin-top: 1.5rem;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.login-back:hover { color: var(--primary); }

/* ---------- Navbar ---------- */
.portal-nav {
    background: white;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.portal-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.portal-nav img {
    height: 32px;
}

.portal-nav .nav-back {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.portal-nav .nav-back:hover { color: var(--primary); }

/* ---------- Content Sections ---------- */
.portal-hero {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 3rem 0;
}

.portal-hero h1 {
    color: white;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin-bottom: 0.5rem;
}

.portal-hero p {
    color: rgba(255,255,255,0.85);
    font-size: 1.05rem;
    max-width: 680px;
    margin-bottom: 0;
}

.portal-section {
    padding: 2rem 0;
}

.section-title {
    font-size: 1.4rem;
    margin-bottom: 0.4rem;
    color: var(--dark);
}

.title-accent {
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
    margin-bottom: 1.5rem;
}

/* ---------- Cards ---------- */
.portal-card {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

.portfolio-highlight {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(74,142,143,0.08), rgba(201,169,110,0.06));
    border: 1px solid rgba(74,142,143,0.15);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    transition: all var(--transition);
}

.portfolio-highlight:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--text);
}

.portfolio-highlight .ph-icon {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.portfolio-highlight .ph-text h5 {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
    color: var(--dark);
}

.portfolio-highlight .ph-text span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ---------- Airtable link ---------- */
.airtable-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    background: var(--light);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    transition: all var(--transition);
    margin-bottom: 1.5rem;
}

.airtable-link:hover { background: var(--primary); color: white; }

/* ---------- Document List ---------- */
.doc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.doc-list li {
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.doc-list li:last-child { border-bottom: none; }

.doc-list a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.75rem 0.5rem;
    color: var(--text);
    border-radius: 6px;
    transition: all var(--transition);
    text-decoration: none;
}

.doc-list a:hover {
    background: rgba(74, 142, 143, 0.06);
    color: var(--primary);
    padding-left: 0.8rem;
}

.doc-list .doc-icon {
    color: var(--primary);
    font-size: 0.9rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.doc-list .doc-label { flex: 1; font-size: 0.95rem; }

.doc-list .doc-arrow {
    color: var(--primary-light);
    opacity: 0;
    transform: translateX(-6px);
    transition: all var(--transition);
    font-size: 0.8rem;
}

.doc-list a:hover .doc-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ---------- Accordion ---------- */
.accordion-button {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--dark);
    background: transparent;
    border: none;
    padding: 1rem 0.5rem;
}

.accordion-button:not(.collapsed) {
    color: var(--primary);
    background: transparent;
    box-shadow: none;
}

.accordion-button:focus { box-shadow: none; }

.accordion-item {
    border: none;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    background: transparent;
}

.accordion-item:last-child { border-bottom: none; }

.accordion-body { padding: 0 0.5rem 1rem; }

/* ---------- Footer ---------- */
.portal-footer {
    background: var(--dark);
    color: rgba(255,255,255,0.5);
    padding: 2rem 0;
    text-align: center;
    font-size: 0.82rem;
    margin-top: 2rem;
}

.portal-footer p { color: rgba(255,255,255,0.4); margin-bottom: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .portal-card { padding: 1.5rem; }
    .portal-hero { padding: 2rem 0; }
    .login-box { padding: 2rem 1.5rem; }
    .portfolio-highlight { flex-direction: column; text-align: center; }
}
