/* ==========================================================================
   HERO SECTION — Premium 2-Column Layout
   Left: content hierarchy, Right: mini diagram + typing terminal
   Staggered reveals, parallax, gradient buttons
   ========================================================================== */

/* ---- Hero Section ---- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 100vh;
    padding-top: 68px;
}

/* ---- Left Column: Content ---- */
.hero-content {
    position: relative;
    z-index: 2;
}

/* Greeting */
.hero-greeting {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--olive-muted, #7A8450);
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(16px);
}

/* Name */
.hero-name {
    font-family: var(--font-heading);
    font-size: clamp(2.8rem, 5.2vw, 3.8rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
}

.hero-name .hero-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
}

.hero-name.animate-active .hero-word {
    animation: heroWordPop 550ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes heroWordPop {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Role / Subtitle */
.hero-role {
    font-family: var(--font-body);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(16px);
}

/* Description */
.hero-desc {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text-muted);
    max-width: 500px;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(16px);
}

/* ---- Hero CTAs ---- */
.hero-cta-group {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(16px);
}

/* Primary: Wheat Gradient */
.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 1.8rem;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-body);
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, var(--wheat), var(--amber));
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 14px rgba(228, 179, 99, 0.3);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(228, 179, 99, 0.45);
}

.btn-hero-primary:active {
    transform: scale(0.97);
}

/* Ripple container */
.btn-hero-primary .ripple,
.btn-hero-outline .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    transform: scale(0);
    animation: btnRipple 0.6s ease-out forwards;
    pointer-events: none;
}

@keyframes btnRipple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Secondary: Outlined Amber */
.btn-hero-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.72rem 1.8rem;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-body);
    text-decoration: none;
    color: var(--amber);
    background: transparent;
    border: 1.5px solid var(--amber);
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.btn-hero-outline:hover {
    background: rgba(217, 142, 4, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(217, 142, 4, 0.15);
}

.btn-hero-outline:active {
    transform: scale(0.97);
}

.btn-hero-outline .ripple {
    background: rgba(217, 142, 4, 0.2);
}

/* ---- Right Column: Visual ---- */
.hero-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* Mini Architecture Diagram */
.hero-diagram {
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    position: relative;
}

.diagram-node {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1.2rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    z-index: 2;
}

.diagram-node:hover {
    border-color: var(--wheat);
    box-shadow: 0 4px 16px rgba(228, 179, 99, 0.12);
}

.diagram-node-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(228, 179, 99, 0.1);
    border-radius: 8px;
    color: var(--wheat);
}

.diagram-node-icon svg {
    width: 18px;
    height: 18px;
}

.diagram-node-info {
    display: flex;
    flex-direction: column;
}

.diagram-node-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
}

.diagram-node-tech {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Connector between nodes */
.diagram-connector {
    width: 2px;
    height: 28px;
    background: var(--border);
    position: relative;
    z-index: 1;
}

/* Animated pulse dot traveling along connector */
.diagram-connector .pulse-dot {
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--wheat);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(228, 179, 99, 0.6);
    animation: pulseTravel 2s ease-in-out infinite;
}

.diagram-connector:nth-of-type(2) .pulse-dot {
    animation-delay: 0.4s;
}

@keyframes pulseTravel {
    0% {
        top: -3px;
        opacity: 0;
    }
    15% {
        opacity: 1;
    }
    85% {
        opacity: 1;
    }
    100% {
        top: calc(100% - 3px);
        opacity: 0;
    }
}

/* ---- Typing Terminal ---- */
.hero-terminal {
    width: 100%;
    max-width: 320px;
    background: var(--text-primary);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(62, 44, 35, 0.15);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.6rem 0.9rem;
    background: rgba(255, 255, 255, 0.06);
}

.terminal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.terminal-dot.red { background: #C75B5B; }
.terminal-dot.yellow { background: #D4A843; }
.terminal-dot.green { background: #6B8F5E; }

.terminal-title {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
    margin-left: auto;
    font-family: var(--font-body);
}

.terminal-body {
    padding: 1rem 1.2rem;
    font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
    font-size: 0.78rem;
    line-height: 1.7;
    min-height: 80px;
}

.terminal-prompt {
    color: var(--wheat);
}

.terminal-text {
    color: rgba(255, 255, 255, 0.85);
}

.terminal-cursor {
    display: inline-block;
    width: 7px;
    height: 14px;
    background: var(--wheat);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: cursorBlink 1s step-end infinite;
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ---- Stagger Animation Classes ---- */
.hero-reveal {
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-revealed {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* ---- Responsive ---- */
@media (max-width: 968px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
        padding-top: 100px;
        min-height: auto;
        padding-bottom: 4rem;
    }

    .hero-section {
        min-height: auto;
    }

    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta-group {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
    }

    .hero-diagram {
        max-width: 280px;
    }

    .hero-terminal {
        max-width: 280px;
    }
}

@media (max-width: 768px) {
    .hero-name {
        font-size: clamp(2.2rem, 8vw, 2.8rem);
    }

    .hero-role {
        font-size: 1.1rem;
    }

    .hero-visual {
        display: none;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        padding-top: 90px;
        padding-bottom: 3rem;
    }
}

@media (max-width: 480px) {
    .hero-grid {
        padding: 80px 16px 3rem;
    }

    .hero-name {
        font-size: 2.2rem;
    }

    .hero-cta-group {
        flex-direction: column;
        width: 100%;
    }

    .btn-hero-primary,
    .btn-hero-outline {
        width: 100%;
        justify-content: center;
    }
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
    .hero-greeting,
    .hero-role,
    .hero-desc,
    .hero-cta-group {
        opacity: 1;
        transform: none;
    }

    .hero-name .hero-word {
        opacity: 1;
        transform: none;
    }

    .diagram-connector .pulse-dot {
        animation: none;
        opacity: 1;
        top: 50%;
    }

    .terminal-cursor {
        animation: none;
        opacity: 1;
    }
}
