/* CodeSync public pages — purple, black, white, gray */

:root {
    --cs-purple: #7c3aed;
    --cs-purple-dark: #5b21b6;
    --cs-purple-darker: #4c1d95;
    --cs-purple-light: #ede9fe;
    --cs-purple-muted: #a78bfa;
    --cs-white: #ffffff;
    --cs-black: #0a0a0a;
    --cs-gray-50: #fafafa;
    --cs-gray-100: #f4f4f5;
    --cs-gray-200: #e4e4e7;
    --cs-gray-300: #d4d4d8;
    --cs-gray-400: #a1a1aa;
    --cs-gray-500: #71717a;
    --cs-gray-600: #52525b;
    --cs-gray-700: #3f3f46;
    --cs-gray-800: #27272a;
    --cs-gray-900: #18181b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.public-landing {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    color: var(--cs-gray-900);
}

body.public-auth {
    background: linear-gradient(135deg, var(--cs-purple-darker) 0%, var(--cs-purple) 50%, var(--cs-gray-800) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
    overflow: hidden;
}

body.public-auth::before,
body.public-auth::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: cs-float 20s infinite ease-in-out;
}

body.public-auth::before {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
}

body.public-auth::after {
    width: 200px;
    height: 200px;
    bottom: -50px;
    right: -50px;
    animation-delay: 10s;
}

@keyframes cs-float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(50px, 50px) rotate(180deg); }
}

.hero-section {
    background: linear-gradient(135deg, var(--cs-purple-darker) 0%, var(--cs-purple) 45%, var(--cs-purple-muted) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before,
.hero-section::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: cs-float 20s infinite ease-in-out;
}

.hero-section::before {
    width: 400px;
    height: 400px;
    top: -150px;
    left: -150px;
}

.hero-section::after {
    width: 300px;
    height: 300px;
    bottom: -100px;
    right: -100px;
    animation-delay: 10s;
}

.hero-content {
    position: relative;
    z-index: 1;
    color: var(--cs-white);
    text-align: center;
    padding: 60px 20px;
}

.hero-logo-container {
    position: relative;
    display: inline-block;
    margin-bottom: 40px;
}

.hero-logo-shell {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    background: var(--cs-white);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    line-height: 0;
    overflow: hidden;
}

.hero-brand-banner,
.login-logo {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    filter: none;
    vertical-align: middle;
}

.login-logo {
    max-width: 300px;
}

.hero-subtitle {
    font-size: 1.1rem;
    margin-top: 20px;
    margin-bottom: 40px;
    opacity: 0.95;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
}

.btn-hero,
.btn-cta {
    background: var(--cs-white);
    color: var(--cs-purple-dark);
    padding: 15px 50px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    border: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-cta {
    padding: 18px 60px;
    font-size: 1.3rem;
}

.btn-hero:hover,
.btn-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(91, 33, 182, 0.35);
    color: var(--cs-purple-darker);
}

.btn-hero-outline {
    background: transparent;
    color: var(--cs-white);
    border: 2px solid var(--cs-white);
    margin-left: 0.75rem;
}

.btn-hero-outline:hover {
    background: var(--cs-white);
    color: var(--cs-purple-darker);
}

.features-section {
    padding: 100px 0;
    background: var(--cs-gray-50);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--cs-gray-900);
    margin-bottom: 20px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--cs-gray-600);
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.feature-card {
    background: var(--cs-white);
    border-radius: 15px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid var(--cs-gray-200);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(124, 58, 237, 0.12);
}

.feature-card .feature-icon {
    font-size: 3.5rem;
    color: var(--cs-purple);
    margin-bottom: 25px;
    display: block;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--cs-gray-900);
    margin-bottom: 15px;
}

.feature-description {
    color: var(--cs-gray-600);
    line-height: 1.6;
    font-size: 1rem;
    margin-bottom: 0;
}

.cta-section {
    background: linear-gradient(135deg, var(--cs-purple-dark), var(--cs-purple));
    padding: 80px 0;
    text-align: center;
    color: var(--cs-white);
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.cta-text {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.95;
}

.public-footer {
    background: var(--cs-black);
    color: var(--cs-gray-400);
    padding: 40px 0;
    text-align: center;
    border-top: 3px solid var(--cs-purple);
}

.public-footer-text {
    margin: 0;
    opacity: 0.9;
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
    z-index: 1;
}

.login-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    padding: 40px;
    animation: cs-slide-up 0.6s ease-out;
    border: 1px solid var(--cs-gray-200);
}

@keyframes cs-slide-up {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.logo-container {
    text-align: center;
    margin-bottom: 24px;
    line-height: 0;
}

.login-card .form-control {
    border: 2px solid var(--cs-gray-200);
    border-radius: 10px;
    padding: 12px 16px;
    transition: all 0.3s ease;
}

.login-card .form-control:focus {
    border-color: var(--cs-purple);
    box-shadow: 0 0 0 0.25rem rgba(124, 58, 237, 0.2);
}

.login-card .input-group-text {
    background: var(--cs-purple-light);
    border: 2px solid var(--cs-gray-200);
    border-right: none;
    border-radius: 10px 0 0 10px;
    color: var(--cs-purple-dark);
}

.login-card .input-group .form-control {
    border-left: none;
    border-radius: 0 10px 10px 0;
}

.login-card .input-group:focus-within .input-group-text {
    border-color: var(--cs-purple);
    background: rgba(124, 58, 237, 0.1);
}

.btn-login {
    background: linear-gradient(135deg, var(--cs-purple-dark), var(--cs-purple));
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--cs-white);
    width: 100%;
    margin-top: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(124, 58, 237, 0.35);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.45);
    background: linear-gradient(135deg, var(--cs-purple-darker), var(--cs-purple-dark));
    color: var(--cs-white);
}

.login-info {
    margin-top: 25px;
    padding: 15px;
    background: var(--cs-purple-light);
    border-radius: 10px;
    border-left: 4px solid var(--cs-purple);
}

.login-info p {
    margin: 0;
    color: var(--cs-purple-darker);
    font-size: 0.9rem;
}

.login-info-note {
    margin-top: 0.5rem !important;
    font-size: 0.85rem !important;
}

.login-card .alert {
    border-radius: 10px;
    border: none;
    padding: 12px 16px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .hero-logo-shell {
        max-width: 400px;
        padding: 25px;
    }

    .section-title { font-size: 2rem; }
    .cta-title { font-size: 2rem; }
    .btn-hero-outline { margin-left: 0; margin-top: 0.75rem; }
}

@media (max-width: 576px) {
    .login-card { padding: 30px 20px; }
    .login-logo { max-width: 220px; }
}

/* Public certificate verification */
.cert-verify-page {
    min-height: 100vh;
    background:
        radial-gradient(ellipse 70% 45% at 50% 0%, rgba(237, 233, 254, 0.65), transparent 60%),
        linear-gradient(180deg, #f8fafc 0%, #f5f3ff 100%);
}

.text-purple {
    color: var(--cs-purple-darker, #4c1d95);
}

.cert-verify-result--valid {
    border-top: 4px solid #22c55e;
}

.cert-verify-result-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #15803d;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.cert-verify-result-eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #15803d;
}

.cert-verify-details dt {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.cert-verify-details dd {
    margin-bottom: 0.85rem;
}

.cert-verify-code-pill {
    display: inline-block;
    padding: 0.25rem 0.55rem;
    border-radius: 0.45rem;
    background: #ede9fe;
    color: #4c1d95;
    font-weight: 700;
    letter-spacing: 0.06em;
}

