/* ============================================
   ALMESTAR — Premium Proposal Site
   Rebuilt by Pixel Pete, Chief Web Officer
   ============================================ */

/* --- Variables --- */
:root {
    --bg-dark: #0b0f19;
    --bg-section: #111827;
    --bg-light: #f8fafc;
    --primary: #0dc9a0;
    --primary-dark: #088873;
    --gradient: linear-gradient(135deg, #088873, #0dc9a0);
    --text-white: #ffffff;
    --text-light: #e2e8f0;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --card-bg: rgba(255,255,255,0.03);
    --card-border: rgba(255,255,255,0.08);
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-dark);
    color: var(--text-muted);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 16px;
}

a { color: var(--primary); text-decoration: none; transition: color 0.3s var(--ease); }
a:hover { color: var(--text-white); }
img { max-width: 100%; height: auto; display: block; }

::selection { background: rgba(13,201,160,0.3); color: var(--text-white); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--primary-dark); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(32px, 4.5vw, 56px);
    font-weight: 800;
    color: var(--text-white);
    line-height: 1.15;
    margin-bottom: 24px;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 80px;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 24px 0;
    transition: all 0.5s var(--ease);
    background: transparent;
}

.navbar.scrolled {
    padding: 14px 0;
    background: rgba(11,15,25,0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--card-border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.nav-logo-img {
    height: 36px;
    width: auto;
    filter: brightness(1.2);
    transition: filter 0.3s var(--ease);
}
.nav-logo:hover .nav-logo-img { filter: brightness(1.5); }

.footer-logo-img {
    height: 32px;
    width: auto;
    filter: brightness(0.9);
    opacity: 0.7;
    transition: opacity 0.3s var(--ease);
}
.footer-logo-img:hover { opacity: 1; }

.nav-menu {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
}

.nav-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s var(--ease);
    text-decoration: none;
    letter-spacing: 0.3px;
}

.nav-link:hover,
.nav-link.active { color: var(--text-white); }

.nav-link.nav-cta {
    background: var(--gradient);
    color: var(--bg-dark);
    font-weight: 600;
    padding: 8px 22px;
    margin-left: 8px;
}

.nav-link.nav-cta:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    color: var(--bg-dark);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 22px; height: 2px;
    background: var(--text-white);
    transition: all 0.3s var(--ease);
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============================================
   HERO
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: var(--bg-dark);
    /* Johannesburg image kept as fallback if Vanta fails to load */
    background-image: url('https://images.unsplash.com/photo-1577948000111-9c970dfe3743?w=1920&q=80');
    background-size: cover;
    background-position: center 40%;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(11,15,25,0.55) 0%,
        rgba(11,15,25,0.70) 40%,
        rgba(11,15,25,0.92) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 24px;
}

.hero-logo { margin-bottom: 28px; }
.hero-logo-img {
    height: clamp(60px, 10vw, 120px);
    width: auto;
    filter: brightness(1.3) drop-shadow(0 4px 30px rgba(13,201,160,0.3));
    animation: heroLogoFade 1.5s var(--ease) forwards;
}
@keyframes heroLogoFade {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.hero-headline {
    font-family: var(--font-body);
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 300;
    color: var(--text-light);
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.hero-meta {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 48px;
}

/* Button */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 40px;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.35s var(--ease);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient);
    color: var(--bg-dark);
    box-shadow: 0 4px 24px rgba(13,201,160,0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(13,201,160,0.35);
    color: var(--bg-dark);
}

.btn-full { width: 100%; justify-content: center; }

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(180deg, var(--primary), transparent);
    animation: scrollPulse 2.5s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
}

/* ============================================
   SECTIONS — Shared
   ============================================ */
.section {
    padding: clamp(80px, 10vw, 140px) 0;
    position: relative;
}

.about { background: var(--bg-dark); }

/* --- Clients / Trusted By --- */
.clients {
    background: var(--bg-dark);
    padding: 60px 0;
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
}
.clients-label {
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 36px;
}
.clients-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}
.client-logo img {
    height: 36px;
    width: auto;
    filter: grayscale(100%) brightness(1.8);
    opacity: 0.4;
    transition: all 0.4s var(--ease);
}
.client-logo:hover img {
    filter: grayscale(0%) brightness(1.2);
    opacity: 0.9;
}
@media (max-width: 768px) {
    .clients-row { gap: 32px; }
    .client-logo img { height: 28px; }
}

.solutions { background: var(--bg-section); }
.team { background: var(--bg-section); }
.contact { background: var(--bg-dark); }

/* ============================================
   ABOUT — Split layout
   ============================================ */
.about-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-image {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.about-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    will-change: transform;
}

.about-content .section-tag { text-align: left; }
.about-content .section-title { text-align: left; }

.about-text {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 48px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.stat {
    padding: 24px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    text-align: center;
    transition: all 0.4s var(--ease);
}

.stat:hover {
    border-color: rgba(13,201,160,0.25);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: clamp(32px, 3vw, 42px);
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-dim);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   SOLUTIONS — Frosted cards
   ============================================ */
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.solution-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 40px 32px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s var(--ease);
    backdrop-filter: blur(8px);
}

.solution-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s var(--ease);
}

.solution-card:hover {
    transform: translateY(-4px);
    border-color: rgba(13,201,160,0.2);
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.solution-card:hover::before { transform: scaleX(1); }

.solution-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px; height: 56px;
    border-radius: 10px;
    background: rgba(13,201,160,0.07);
    border: 1px solid rgba(13,201,160,0.12);
    margin-bottom: 24px;
    color: var(--primary);
    transition: all 0.3s var(--ease);
}

.solution-card:hover .solution-icon {
    background: rgba(13,201,160,0.14);
    transform: scale(1.05);
}

.solution-card h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 10px;
}

.solution-card p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.65;
}

/* ============================================
   CULTURE — Full-width visual
   ============================================ */
.culture {
    position: relative;
    background: none;
    padding: clamp(100px, 12vw, 160px) 0;
    overflow: hidden;
}

.culture-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.culture-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(11,15,25,0.88) 0%,
        rgba(11,15,25,0.92) 50%,
        rgba(11,15,25,0.88) 100%
    );
}

.culture-inner {
    position: relative;
    z-index: 2;
    text-align: center;
}

.traid-row {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
    margin: 64px 0;
}

.traid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 140px;
}

.traid-letter {
    font-family: var(--font-heading);
    font-size: clamp(48px, 5vw, 72px);
    font-weight: 900;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.traid-word {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.traid-desc {
    font-size: 13px;
    color: var(--text-muted);
    max-width: 180px;
    line-height: 1.5;
}

.culture-quote {
    font-size: clamp(16px, 2vw, 20px);
    font-style: italic;
    color: var(--text-dim);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.7;
}

.culture-quote cite {
    display: block;
    margin-top: 16px;
    font-size: 14px;
    font-style: normal;
    color: var(--primary);
    letter-spacing: 0.5px;
}

/* ============================================
   TEAM — Minimal elegance
   ============================================ */
.team-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.team-member {
    text-align: center;
    min-width: 160px;
    flex: 0 1 180px;
}

.team-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 88px; height: 88px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--gradient);
    position: relative;
    transition: all 0.4s var(--ease);
}

.team-avatar::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid rgba(13,201,160,0.15);
    transition: all 0.4s var(--ease);
}

.team-member:hover .team-avatar {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(13,201,160,0.25);
}

.team-member:hover .team-avatar::before {
    inset: -10px;
    border-color: rgba(13,201,160,0.35);
}

.team-avatar span {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    color: var(--bg-dark);
}

.team-member h3 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 4px;
}

.team-role {
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
    opacity: 0;
    transform: translateY(4px);
    transition: all 0.3s var(--ease);
}

.team-member:hover .team-role {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   CONTACT — Clean split
   ============================================ */
.contact-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.contact-form-wrap {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 48px;
}

.form-group { margin-bottom: 20px; }

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: var(--text-white);
    font-family: var(--font-body);
    font-size: 15px;
    transition: all 0.3s var(--ease);
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-dim);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    background: rgba(13,201,160,0.03);
    box-shadow: 0 0 0 3px rgba(13,201,160,0.08);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-status {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
}

.form-status.success {
    display: block;
    background: rgba(13,201,160,0.08);
    border: 1px solid rgba(13,201,160,0.25);
    color: var(--primary);
}

.form-status.error {
    display: block;
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.25);
    color: #ef4444;
}

/* Contact details */
.contact-details {
    padding-top: 16px;
}

.detail-block {
    margin-bottom: 36px;
}

.detail-block h4 {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 8px;
}

.detail-block p {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.7;
}

.detail-block a {
    color: var(--text-light);
}

.detail-block a:hover {
    color: var(--primary);
}

/* ============================================
   FOOTER — Minimal
   ============================================ */
.footer {
    background: var(--bg-section);
    border-top: 1px solid var(--card-border);
    padding: 48px 0 0;
}

.footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    padding-bottom: 32px;
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: color 0.3s var(--ease);
}

.footer-links a:hover { color: var(--primary); }

.footer-contact {
    display: flex;
    gap: 24px;
}

.footer-contact a {
    font-size: 13px;
    color: var(--text-dim);
}

.footer-contact a:hover { color: var(--primary); }

.footer-bottom {
    padding: 20px 0;
    border-top: 1px solid var(--card-border);
    text-align: center;
}

.footer-bottom p {
    font-size: 12px;
    color: var(--text-dim);
    letter-spacing: 0.3px;
}

/* ============================================
   REVEAL — GSAP handles all animations now.
   .reveal class kept in HTML as GSAP targets it.
   ============================================ */

/* ============================================
   RESPONSIVE — Tablet (1024px)
   ============================================ */
@media (max-width: 1024px) {
    .about-split {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .about-image img { height: 360px; }

    .about-content .section-tag,
    .about-content .section-title { text-align: center; }
    .about-text { text-align: center; }

    .solutions-grid { grid-template-columns: repeat(2, 1fr); }

    .traid-row { gap: 32px; }

    .contact-split {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .footer-row {
        flex-direction: column;
        text-align: center;
    }

    .footer-links { justify-content: center; }
    .footer-contact { justify-content: center; }
}

/* ============================================
   RESPONSIVE — Mobile (768px)
   ============================================ */
@media (max-width: 768px) {
    .container { padding: 0 20px; }

    .nav-toggle { display: flex; }

    .nav-menu {
        position: fixed;
        top: 0; right: -100%;
        width: 280px; height: 100vh;
        background: rgba(11,15,25,0.98);
        backdrop-filter: blur(24px);
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        padding: 40px;
        gap: 4px;
        transition: right 0.4s var(--ease);
        border-left: 1px solid var(--card-border);
    }

    .nav-menu.active { right: 0; }

    .nav-link {
        font-size: 16px;
        padding: 12px 20px;
        width: 100%;
    }

    .nav-link.nav-cta { margin-left: 0; margin-top: 8px; }

    .section { padding: clamp(64px, 8vw, 100px) 0; }

    .section-header { margin-bottom: 48px; }

    .solutions-grid { grid-template-columns: 1fr; }

    .traid-row {
        flex-direction: column;
        align-items: center;
        gap: 32px;
    }

    .traid-item { min-width: auto; }

    .team-row {
        flex-direction: column;
        align-items: center;
        gap: 32px;
    }

    .team-role {
        opacity: 1;
        transform: translateY(0);
    }

    .footer-links { flex-wrap: wrap; gap: 16px; justify-content: center; }
    .footer-contact { flex-direction: column; align-items: center; gap: 8px; }
}

/* ============================================
   RESPONSIVE — Small (480px)
   ============================================ */
@media (max-width: 480px) {
    .container { padding: 0 16px; }

    .hero-logo-img { height: 50px; }

    .stats-grid { gap: 12px; }
    .stat { padding: 20px 16px; }

    .solution-card { padding: 32px 24px; }

    .contact-form-wrap { padding: 28px; }

    .scroll-indicator { display: none; }
}
