/* ethica.dev - Corporate Gradient SaaS */
/* Palette: #ffffff, #f9fafb, #e5e7eb, #111827, #3b82f6, #10b981, #2563eb, #1e1e1e, #d4d4d4 */
/* Fonts: Inter (400, 700), Fira Code (400) */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #ffffff;
    color: #111827;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
}

/* ================================
   GRADIENT BAR - Signature Element
   ================================ */
.gradient-bar {
    height: 4px;
    background: linear-gradient(to right, #3b82f6, #10b981);
    border-radius: 2px;
}

.gradient-bar--hero {
    width: 0;
    max-width: 160px;
    margin: 0 auto;
    transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.gradient-bar--hero.drawn {
    width: 160px;
}

.gradient-bar--closing {
    width: 120px;
    margin: 0 auto;
}

/* ================================
   HERO SECTION (0-100vh)
   ================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    padding: 2rem;
    position: relative;
}

.hero-inner {
    text-align: center;
    max-width: 680px;
}

.brand-row {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 0.25rem;
}

.shield-icon {
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.shield-icon.visible {
    opacity: 1;
    transform: scale(1);
}

.brand {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: clamp(2.8rem, 7vw, 4.5rem);
    color: #111827;
    letter-spacing: -0.02em;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.brand.visible {
    opacity: 1;
    transform: translateY(0);
}

.tagline {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 400;
    color: #6b7280;
    margin-top: 0.5rem;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.8s ease 0.3s, transform 0.8s ease 0.3s;
}

.tagline.visible {
    opacity: 1;
    transform: translateY(0);
}

.badge-row {
    margin-top: 1.5rem;
    opacity: 0;
    transition: opacity 0.6s ease 1.4s;
}

.badge-row.visible {
    opacity: 1;
}

.badge-pill {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 0.3rem 1rem;
}

/* ================================
   SECTION HEADINGS
   ================================ */
.section-heading {
    text-align: center;
    margin-bottom: 3rem;
}

.section-heading-text {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    color: #111827;
    display: block;
    margin-bottom: 0.6rem;
}

.section-heading--light .section-heading-text {
    color: #f9fafb;
}

.heading-underline {
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, #3b82f6, #10b981);
    border-radius: 2px;
    margin: 0 auto;
}

/* ================================
   FEATURES SECTION
   ================================ */
.features {
    padding: 6rem 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

@media (max-width: 640px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

.feature-card {
    padding: 1.5rem;
}

.feature-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #10b981);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.feature-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #111827;
    margin-bottom: 0.4rem;
}

.feature-desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.7;
}

/* ================================
   PRINCIPLES SECTION (100-260vh)
   ================================ */
.principles {
    background: #f9fafb;
    padding: 6rem 1.5rem;
}

.principles-list {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.principle {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.principle-num {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 3rem;
    line-height: 1;
    background: linear-gradient(135deg, #3b82f6, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex-shrink: 0;
    min-width: 64px;
}

.principle-content {
    padding-top: 0.3rem;
}

.principle-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: #111827;
    margin-bottom: 0.35rem;
}

.principle-desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.7;
}

/* ================================
   CODE SECTION (260-360vh)
   ================================ */
.code-section {
    background: #1e1e1e;
    padding: 6rem 1.5rem;
}

.code-block {
    max-width: 680px;
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #333333;
    background: #1a1a1a;
}

.code-header {
    background: #2a2a2a;
    padding: 0.65rem 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.code-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.code-dot--red { background: #ff5f57; }
.code-dot--yellow { background: #febc2e; }
.code-dot--green { background: #28c840; }

.code-filename {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    color: #d4d4d4;
    margin-left: 8px;
}

.code-content {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    line-height: 1.8;
    padding: 1.5rem;
    color: #e5e7eb;
    overflow-x: auto;
    margin: 0;
}

.code-comment { color: #10b981; }
.code-keyword { color: #3b82f6; }
.code-func { color: #e5e7eb; }
.code-string { color: #10b981; }

.code-caption {
    max-width: 680px;
    margin: 2rem auto 0;
    text-align: center;
}

.code-caption p {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: #a1a1aa;
    line-height: 1.7;
}

/* ================================
   CLOSING SECTION (360vh+)
   ================================ */
.closing {
    padding: 6rem 1.5rem 4rem;
    text-align: center;
    background: #ffffff;
}

.closing-inner {
    max-width: 540px;
    margin: 0 auto;
}

.closing-cta {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    color: #111827;
    margin-bottom: 1.5rem;
}

.closing-sub {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: #6b7280;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.closing-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.closing-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s ease;
}

.closing-link:hover {
    color: #3b82f6;
}

.closing-divider {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #e5e7eb;
}

.closing-brand {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    color: #d4d4d4;
    letter-spacing: 0.02em;
}

/* ================================
   FADE-IN ANIMATIONS
   ================================ */
.fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger fade-in children */
.principles-list .principle.fade-in:nth-child(1) { transition-delay: 0s; }
.principles-list .principle.fade-in:nth-child(2) { transition-delay: 0.08s; }
.principles-list .principle.fade-in:nth-child(3) { transition-delay: 0.16s; }
.principles-list .principle.fade-in:nth-child(4) { transition-delay: 0.24s; }
.principles-list .principle.fade-in:nth-child(5) { transition-delay: 0.32s; }

.features-grid .feature-card.fade-in:nth-child(1) { transition-delay: 0s; }
.features-grid .feature-card.fade-in:nth-child(2) { transition-delay: 0.08s; }
.features-grid .feature-card.fade-in:nth-child(3) { transition-delay: 0.16s; }
.features-grid .feature-card.fade-in:nth-child(4) { transition-delay: 0.24s; }

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 480px) {
    .principle {
        flex-direction: column;
        gap: 0.5rem;
    }

    .principle-num {
        font-size: 2.2rem;
        min-width: auto;
    }

    .brand-row {
        flex-direction: column;
        gap: 8px;
    }

    .closing-cta {
        font-size: 1.6rem;
    }

    .closing-links {
        flex-direction: column;
        gap: 0.75rem;
    }

    .closing-divider {
        display: none;
    }
}
