/* ============================================================
   Purple Penguin Properties LLC — styles.css
   Built on Bootstrap 5 + Vue 3
   WCAG 2.2 / ADA / Section 508 compliant
   ============================================================ */

/* ---- Custom Properties ------------------------------------ */
:root {
    --ppp-purple:       #671B8D;
    --ppp-purple-dark:  #4e1469;
    --ppp-purple-light: #9b4ec7;
    --ppp-secondary:    #7464a1;
    --ppp-white:        #ffffff;
    --ppp-off-white:    rgba(255, 255, 255, 0.75); /* was 0.5 — contrast fix */
    --ppp-black:        #000000;
    --ppp-bg-dark:      #111111;
    --ppp-border:       rgba(103, 27, 141, 0.35);

    --font-display:     'Varela Round', -apple-system, sans-serif;
    --font-body:        'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI',
                        Roboto, 'Helvetica Neue', Arial, sans-serif;

    scroll-behavior: smooth;
    scroll-padding-top: 4rem;
}

/* ---- Base ------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--ppp-black);
    background-color: var(--ppp-white);
    letter-spacing: 0.04em;
    overflow-x: hidden;
}

/* ---- Accessibility: skip link ----------------------------- */
.skip-link {
    position: absolute;
    top: -44px;
    left: 0;
    background: var(--ppp-purple);
    color: var(--ppp-white);
    padding: 8px 16px;
    text-decoration: none;
    font-weight: 700;
    z-index: 9999;
    border-bottom-right-radius: 4px;
    transition: top 0.2s ease;
}
.skip-link:focus { top: 0; }

/* ---- Contrast utility classes (WCAG AA replacements) ------ */
/* Bootstrap's text-white-50 (0.5 opacity) fails AA on dark bg.
   text-white-75 achieves ~5.9:1 on pure black — passes AA.    */
.text-white-75 {
    color: rgba(255, 255, 255, 0.75) !important;
}

/* Bootstrap's text-black-50 (~3.5:1 on #f5f5f5) fails AA.
   text-black-70 achieves ~6.2:1 on #f5f5f5 — passes AA.       */
.text-black-70 {
    color: rgba(0, 0, 0, 0.70) !important;
}

/* Required field asterisk */
.req-mark {
    color: #c0392b;
    margin-left: 2px;
}

/* ---- Navbar ----------------------------------------------- */
#mainNav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    background-color: transparent;
    transition: background-color 0.3s ease, padding 0.3s ease,
                box-shadow 0.3s ease;
}

#mainNav.scrolled {
    background-color: var(--ppp-white);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
    padding: 0.5rem 0;
}

/* Brand */
#mainNav .navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--ppp-white);
    text-decoration: none;
    transition: color 0.3s ease;
}
#mainNav.scrolled .navbar-brand { color: var(--ppp-purple); }

/* ---- Logo: invert to white on dark navbar (no extra asset) - */
#mainNav:not(.scrolled) .nav-logo {
    filter: brightness(0) invert(1) drop-shadow(0 0 3px rgba(255,255,255,0.25));
    transition: filter 0.3s ease;
}
#mainNav.scrolled .nav-logo {
    filter: none;
    transition: filter 0.3s ease;
}

/* Nav links */
#mainNav .nav-link {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85); /* was 0.5 — contrast fix */
    padding: 0.5rem 1rem;
    position: relative;
    transition: color 0.3s ease;
}
#mainNav.scrolled .nav-link { color: var(--ppp-black); }

/* Hover */
#mainNav .nav-link:hover,
#mainNav .nav-link:focus {
    color: var(--ppp-white);
    outline: 2px solid rgba(255, 255, 255, 0.4);
    outline-offset: 3px;
    border-radius: 3px;
}
#mainNav.scrolled .nav-link:hover,
#mainNav.scrolled .nav-link:focus {
    color: var(--ppp-purple);
    outline-color: var(--ppp-border);
}

/* Active underline */
#mainNav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 1rem;
    right: 1rem;
    height: 3px;
    background: var(--ppp-purple-light);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.25s ease;
}
#mainNav .nav-link.active::after,
#mainNav .nav-link:hover::after  { transform: scaleX(1); }
#mainNav .nav-link.active {
    color: var(--ppp-white);
    font-weight: 900;
}
#mainNav.scrolled .nav-link.active { color: var(--ppp-purple); }

/* Toggler */
#mainNav .navbar-toggler {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    color: var(--ppp-white);
    border: 2px solid rgba(255, 255, 255, 0.5);
    padding: 0.4rem 0.8rem;
    transition: all 0.3s ease;
}
#mainNav.scrolled .navbar-toggler {
    color: var(--ppp-purple);
    border-color: var(--ppp-border);
}
#mainNav .navbar-toggler:focus { outline: none; box-shadow: none; }

/* ---- Buttons ---------------------------------------------- */
.btn {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15rem;
    padding: 1rem 2rem;
    border: 0;
    border-radius: 50px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.2s ease,
                box-shadow 0.2s ease;
}

.btn-primary {
    background-color: var(--ppp-purple);
    color: var(--ppp-white);
}
.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--ppp-purple-dark);
    color: var(--ppp-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(103, 27, 141, 0.45);
    outline: none;
}
.btn-primary:disabled {
    background-color: var(--ppp-secondary);
    cursor: not-allowed;
    transform: none;
}

/* ---- Back-to-top button ----------------------------------- */
.home-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    width: 52px;
    height: 52px;
    background: var(--ppp-purple);
    color: var(--ppp-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.home-button.visible {
    opacity: 1;
    pointer-events: auto;
}
.home-button:hover,
.home-button:focus {
    background: var(--ppp-purple-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(103, 27, 141, 0.5);
    outline: 3px solid rgba(103, 27, 141, 0.4);
    outline-offset: 2px;
}

/* ---- Scroll-reveal animations ----------------------------- */
.fade-in,
.team-item {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-in.visible,
.team-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Section shared --------------------------------------- */
section { position: relative; }

.section-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    color: var(--ppp-purple);
    margin-bottom: 1.5rem;
}

/* ---- Hero / Masthead -------------------------------------- */
.masthead {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 10rem 0 6rem;
    display: flex;
    align-items: center;
    background:
        linear-gradient(to bottom,
            rgba(0, 0, 0, 0.35) 0%,
            rgba(0, 0, 0, 0.65) 70%,
            var(--ppp-black) 100%),
        url('https://images.unsplash.com/photo-1448375240586-882707db888b?w=1920&q=80')
        center center / cover no-repeat;
}

.masthead h1 {
    font-family: var(--font-display);
    letter-spacing: 0.5rem;
    background: linear-gradient(
        rgba(255, 255, 255, 0.95),
        rgba(255, 255, 255, 0.3)
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.masthead h2 {
    max-width: 30rem;
    margin-left: auto;
    margin-right: auto;
    font-size: 1rem;
    font-weight: 300;
}

@media (min-width: 768px) {
    .masthead h1 { line-height: 4rem; }
}
@media (min-width: 992px) {
    .masthead h2 { font-size: 1.2rem; }
}

/* ---- Mission section -------------------------------------- */
.mission-section {
    padding: 8rem 0 5rem;
    background: linear-gradient(
        to bottom,
        var(--ppp-black) 0%,
        rgba(0, 0, 0, 0.88) 75%,
        rgba(0, 0, 0, 0.78) 100%
    );
}

.mission-section .section-title { color: var(--ppp-purple-light); }

.mission-section img {
    max-height: 480px;
    width: 100%;
    object-fit: cover;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

/* ---- About / Team section --------------------------------- */
.about-section {
    padding: 8rem 0;
    background-color: #f5f5f5;
}

.about-section .section-title { color: var(--ppp-purple); }

.featured-text { padding: 2rem; }

@media (min-width: 992px) {
    .featured-left {
        padding: 0 0 0 2.5rem;
        border-left: 5px solid var(--ppp-purple);
    }
    .featured-right {
        padding: 0 2.5rem 0 0;
        border-right: 5px solid var(--ppp-purple);
    }
}

.featured-text h4 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    color: var(--ppp-purple);
    margin-bottom: 0.75rem;
}

/* ---- Contact section -------------------------------------- */
.contact-section {
    padding: 8rem 0 5rem;
    background-color: var(--ppp-black);
}

.contact-section .section-title { color: var(--ppp-purple-light); }

/* Info cards */
.contact-section .card {
    border: 0;
    border-bottom: 4px solid var(--ppp-purple);
    border-radius: 4px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.contact-section .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(103, 27, 141, 0.25);
}

.contact-section .card .card-icon {
    display: block;
    font-size: 2rem;
    color: var(--ppp-purple) !important;
    margin-bottom: 0.5rem;
}

.contact-section .card h4 {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15rem;
    color: var(--ppp-purple);
}

.contact-section .card hr {
    opacity: 1;
    border-color: var(--ppp-purple);
    border-width: 3px;
    width: 3rem;
}

.contact-section .card a {
    color: var(--ppp-purple);
    text-decoration: none;
}
.contact-section .card a:hover { text-decoration: underline; }

/* Contact form */
.contact-form {
    margin-top: 3rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(103, 27, 141, 0.3);
    border-radius: 8px;
    padding: 2.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08rem;
    color: rgba(255, 255, 255, 0.85); /* was 0.7 — contrast fix */
}

.contact-form .form-control {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(103, 27, 141, 0.5);
    border-radius: 4px;
    color: var(--ppp-white);
    font-family: var(--font-body);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.contact-form .form-control::placeholder { color: rgba(255, 255, 255, 0.4); }
.contact-form .form-control:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--ppp-purple-light);
    box-shadow: 0 0 0 3px rgba(103, 27, 141, 0.25);
    color: var(--ppp-white);
    outline: none;
}
.contact-form .form-control.is-invalid {
    border-color: #dc3545;
}
.contact-form .invalid-feedback {
    color: #ff8080; /* brighter red for dark bg contrast */
}

/* ---- Footer ----------------------------------------------- */
.footer {
    background-color: var(--ppp-black);
    padding: 2.5rem 0;
    font-family: var(--font-body);
    font-size: 0.8rem;
}

.footer a {
    color: var(--ppp-purple-light);
    text-decoration: none;
}
.footer a:hover {
    color: var(--ppp-white);
    text-decoration: underline;
}

/* ---- Responsive adjustments ------------------------------ */
@media (max-width: 991px) {
    #mainNav .navbar-collapse {
        background-color: rgba(10, 0, 15, 0.97);
        padding: 1rem 1.5rem;
        border-top: 2px solid var(--ppp-border);
        margin-top: 0.5rem;
        border-radius: 0 0 8px 8px;
    }
    #mainNav.scrolled .navbar-collapse {
        background-color: var(--ppp-white);
        border-top-color: #e0e0e0;
    }
    #mainNav .nav-link { padding: 0.6rem 0; }
    #mainNav .nav-link::after { left: 0; right: 0; }

    .masthead h1 { letter-spacing: 0.2rem; }
    .contact-form { padding: 1.5rem; }
}

@media (max-width: 767px) {
    .section-title { font-size: 1.5rem; }
    .mission-section,
    .about-section,
    .contact-section { padding: 5rem 0 3rem; }
    .home-button { bottom: 18px; right: 18px; width: 44px; height: 44px; }
}