/* ==========================================================================
   Infosys X Cohesity Partner Enablement Workshop
   Hero Layout Stylesheet: Mobile-First, Robust & Fully Responsive
   ========================================================================== */

:root {
    --primary: #007cc3;           /* Infosys Blue */
    --primary-dark: #005a92;
    --primary-light: #e0f2fe;
    --accent: #00c389;            /* Cohesity Green */
    --accent-dark: #009968;
    --accent-light: #d1fae5;
    
    --dark-900: #06111d;
    --dark-800: #0a1b2d;
    --dark-700: #102a45;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-light: #cbd5e1;
    --text-white: #ffffff;
    
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --border-focus: #007cc3;
    --required: #e11d48;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    
    --shadow-card: 0 20px 45px -10px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.08);
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

html, body {
    min-height: 100%;
    background-color: var(--dark-900);
}

body {
    font-family: var(--font-sans);
    color: var(--text-white);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   Hero Wrapper & Background
   -------------------------------------------------------------------------- */
.hero-page-wrapper {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    padding-top: max(32px, env(safe-area-inset-top));
    padding-bottom: max(36px, env(safe-area-inset-bottom));
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    background: radial-gradient(circle at 80% 20%, #102e48 0%, var(--dark-900) 75%);
}

.hero-glow-1 {
    position: absolute;
    top: -80px;
    left: 8%;
    width: clamp(280px, 40vw, 450px);
    height: clamp(280px, 40vw, 450px);
    background: radial-gradient(circle, rgba(0, 124, 195, 0.16) 0%, transparent 70%);
    filter: blur(50px);
    pointer-events: none;
}

.hero-glow-2 {
    position: absolute;
    bottom: -60px;
    right: 10%;
    width: clamp(260px, 35vw, 420px);
    height: clamp(260px, 35vw, 420px);
    background: radial-gradient(circle, rgba(0, 195, 137, 0.14) 0%, transparent 70%);
    filter: blur(50px);
    pointer-events: none;
}

.hero-main-container {
    max-width: 1140px;
    width: 100%;
    margin: auto 0;
    position: relative;
    z-index: 2;
}

.hero-layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
    gap: clamp(32px, 5vw, 60px);
    align-items: center;
}

/* --------------------------------------------------------------------------
   Left Column: Registration Card
   -------------------------------------------------------------------------- */
.hero-form-col {
    width: 100%;
    min-width: 0;
}

.registration-card {
    background: var(--bg-card);
    color: var(--text-primary);
    border-radius: var(--radius-xl);
    padding: clamp(22px, 3.5vw, 34px) clamp(16px, 3vw, 30px);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.card-accent-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
}

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

.form-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    background: var(--primary-light);
    padding: 3px 10px;
    border-radius: 9999px;
    margin-bottom: 8px;
}

.form-header h2 {
    font-size: clamp(1.25rem, 3vw, 1.45rem);
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.req-indicator {
    font-size: 0.8rem;
    color: var(--required);
    margin-top: 4px;
    font-weight: 500;
}

/* Form Groups */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.req-star {
    color: var(--required);
    font-weight: 700;
}

/* 
 * CRITICAL FOR MOBILE: font-size 16px prevents iOS Safari auto-zoom
 */
.form-control {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 16px !important;
    font-family: inherit;
    color: #0f172a;
    background: #ffffff;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-control:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(0, 124, 195, 0.16);
}

.error-text {
    display: none;
    font-size: 0.78rem;
    color: var(--required);
    margin-top: 5px;
    font-weight: 500;
}

.form-group.has-error .form-control {
    border-color: var(--required);
    background: #fffafa;
}

.form-group.has-error .error-text {
    display: block;
}

/* Alert Box */
.form-alert-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    margin-bottom: 16px;
    line-height: 1.4;
}

/* Form Buttons */
.form-btn-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 22px;
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    min-height: 48px;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 3px 12px rgba(0, 124, 195, 0.3);
}

.btn-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #0089dd 0%, #0066a3 100%);
    box-shadow: 0 5px 18px rgba(0, 124, 195, 0.4);
    transform: translateY(-1px);
}

.btn-submit:active:not(:disabled) {
    transform: translateY(1px);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-submit.loading .btn-spinner {
    display: inline-block;
}

.btn-submit.loading .btn-text {
    display: none;
}

.btn-clear {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    min-height: 48px;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-clear:hover,
.btn-clear:active {
    color: #334155;
    background: #f1f5f9;
}

/* --------------------------------------------------------------------------
   Success View
   -------------------------------------------------------------------------- */
.success-view {
    text-align: center;
    padding: 8px 0;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

.success-icon-wrap {
    width: 58px;
    height: 58px;
    background: var(--accent-light);
    color: var(--accent-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}

.success-view h3 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #065f46;
    margin-bottom: 4px;
}

.success-msg {
    font-size: 0.92rem;
    color: var(--text-secondary);
    margin-bottom: 18px;
}

.response-summary-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    text-align: left;
    margin-bottom: 20px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.86rem;
    gap: 12px;
}

.summary-line:last-child {
    margin-bottom: 0;
}

.summary-line .s-label {
    color: var(--text-secondary);
    font-weight: 500;
    flex-shrink: 0;
}

.summary-line .s-val {
    color: #0f172a;
    font-weight: 700;
    text-align: right;
    word-break: break-word;
}

.font-mono {
    font-family: var(--font-mono);
}

.btn-another {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    font-family: inherit;
    padding: 10px;
    min-height: 44px;
}

.btn-another:hover {
    color: var(--primary-dark);
}

/* --------------------------------------------------------------------------
   Right Column: Event Name & Details
   -------------------------------------------------------------------------- */
.hero-details-col {
    padding-left: 10px;
    min-width: 0;
}

.brand-badge-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 6px 14px;
    border-radius: 9999px;
    margin-bottom: 20px;
}

.brand-badge {
    font-weight: 800;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
}

.brand-badge.infosys { color: #38bdf8; }
.brand-sep { color: #64748b; font-size: 0.72rem; }
.brand-badge.cohesity { color: var(--accent); }

.hero-event-title {
    font-size: clamp(1.75rem, 4.2vw, 2.85rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: #ffffff;
    margin-bottom: clamp(20px, 3.5vw, 32px);
}

.title-highlight {
    display: block;
    background: linear-gradient(135deg, #ffffff 20%, #38bdf8 65%, #00c389 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Event Details Stack */
.event-details-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 480px;
}

.detail-card {
    background: rgba(16, 42, 69, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    backdrop-filter: blur(8px);
    transition: transform 0.2s, border-color 0.2s;
}

.detail-card:hover {
    transform: translateX(4px);
    border-color: rgba(255, 255, 255, 0.22);
}

.detail-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.detail-icon.blue {
    background: rgba(0, 124, 195, 0.25);
    color: #38bdf8;
}

.detail-icon.green {
    background: rgba(0, 195, 137, 0.22);
    color: #34d399;
}

.detail-icon.amber {
    background: rgba(245, 158, 11, 0.22);
    color: #fbbf24;
}

.detail-content {
    min-width: 0;
    flex: 1;
}

.detail-content .detail-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.detail-content .detail-value {
    font-size: clamp(0.95rem, 2.2vw, 1.08rem);
    font-weight: 700;
    color: #ffffff;
    margin-top: 2px;
    word-break: break-word;
}

/* --------------------------------------------------------------------------
   Mobile-Friendly Media Queries
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    /* 
     * Switch to clean block flow on mobile:
     * This completely prevents the top of the page from being cut off 
     * by flex vertical centering, and prevents keyboard jumping!
     */
    .hero-page-wrapper {
        display: block;
        min-height: auto;
        padding: 20px 14px 40px;
        padding-top: max(20px, env(safe-area-inset-top));
        padding-bottom: max(32px, env(safe-area-inset-bottom));
        padding-left: max(14px, env(safe-area-inset-left));
        padding-right: max(14px, env(safe-area-inset-right));
    }

    .hero-main-container {
        margin: 0 auto;
    }

    .hero-layout-grid {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    /* On mobile, show event details first, followed directly by form */
    .hero-details-col {
        order: 1;
        padding-left: 0;
        text-align: center;
        width: 100%;
    }

    .hero-form-col {
        order: 2;
        width: 100%;
    }

    .brand-badge-group {
        margin-bottom: 12px;
    }

    .hero-event-title {
        font-size: clamp(1.45rem, 5.5vw, 1.95rem);
        margin-bottom: 16px;
    }

    .title-highlight {
        display: inline;
    }

    .event-details-stack {
        max-width: 100%;
        margin: 0 auto;
        gap: 10px;
    }

    .detail-card {
        padding: 12px 14px;
        gap: 12px;
        background: rgba(16, 42, 69, 0.75);
    }

    .detail-card:hover {
        transform: none; /* Disable transform on mobile touch */
    }

    .detail-icon {
        width: 38px;
        height: 38px;
    }

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

    .detail-content {
        text-align: left;
    }

    .detail-content .detail-label {
        font-size: 0.68rem;
    }

    .detail-content .detail-value {
        font-size: 0.95rem;
    }
}

@media (max-width: 520px) {
    .registration-card {
        padding: 20px 16px;
        border-radius: var(--radius-lg);
    }

    .form-header h2 {
        font-size: 1.25rem;
    }

    .form-btn-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .btn-submit {
        width: 100%;
        order: 1;
        min-height: 48px;
        font-size: 1rem;
    }

    .btn-clear {
        width: 100%;
        order: 2;
        min-height: 42px;
        padding: 8px 14px;
        font-size: 0.88rem;
    }
}
