/* ================================================================================
   SIGNIT - STYLES
   Based on EasyPanel design system
   ================================================================================ */

/* Variables - Brand Colors (from EasyPanel) */
:root {
    --primary: #0F4C3A;
    --accent: #FF6B35;
    --success: #26D0CE;
    --background: #FAFAF8;
    --surface: #FFFFFF;
    --text-primary: #2C3E50;
    --text-secondary: #64748B;
    --code-bg: #1E293B;
    --border-light: #E5E5E5;
    --error: #DC2626;

    /* Typography */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --section-padding: 100px 0;
    --section-padding-mobile: 60px 0;

    /* Transitions */
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================================================================================
   RESET & BASE
   ================================================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

.inline-link {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: rgba(15, 76, 58, 0.3);
    text-underline-offset: 3px;
}

.inline-link:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

/* ================================================================================
   UTILITIES
   ================================================================================ */

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.fade-in:nth-child(1) {
    animation-delay: 0.1s;
}

.fade-in:nth-child(2) {
    animation-delay: 0.2s;
}

.fade-in:nth-child(3) {
    animation-delay: 0.3s;
}

.fade-in:nth-child(4) {
    animation-delay: 0.4s;
}

.fade-in:nth-child(5) {
    animation-delay: 0.5s;
}

/* ================================================================================
   NAVIGATION
   ================================================================================ */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition-base);
}

.nav.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

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

.nav-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--accent);
}

/* ================================================================================
   HERO SECTION
   ================================================================================ */

.hero {
    padding: 160px 0 100px;
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Animated Wave Background */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    overflow: hidden;
    mask-image: linear-gradient(to bottom, black 0%, black 40%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 40%, transparent 100%);
}

.hero-background::before,
.hero-background::after {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    border-radius: 40%;
}

.hero-background::before {
    top: -50%;
    left: -25%;
    background: radial-gradient(
        ellipse at center,
        rgba(38, 208, 206, 0.05) 0%,
        transparent 70%
    );
    animation: wave1 20s ease-in-out infinite;
}

.hero-background::after {
    bottom: -50%;
    right: -25%;
    background: radial-gradient(
        ellipse at center,
        rgba(15, 76, 58, 0.04) 0%,
        transparent 70%
    );
    animation: wave2 18s ease-in-out infinite reverse;
}

@keyframes wave1 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(20px, -20px) rotate(60deg);
    }
    66% {
        transform: translate(-15px, 15px) rotate(120deg);
    }
}

@keyframes wave2 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    50% {
        transform: translate(-25px, 25px) rotate(90deg) scale(1.05);
    }
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 600px;
}

.hero-eyebrow {
    margin-bottom: 16px;
}

.eyebrow-link {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 16px;
    background: rgba(15, 76, 58, 0.1);
    border-radius: 20px;
    transition: var(--transition-base);
}

.eyebrow-link:hover {
    background: rgba(15, 76, 58, 0.15);
    transform: translateY(-2px);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 52px;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.accent-text {
    color: var(--accent);
    position: relative;
}

.hero-subtitle {
    font-size: 19px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: var(--text-secondary);
    color: white;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 20px;
}

.hero-image {
    position: relative;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* ================================================================================
   BUTTONS
   ================================================================================ */

.btn {
    display: inline-block;
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-base);
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #0d3e2f;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 76, 58, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-light);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-accent {
    background: var(--accent);
    color: white;
}

.btn-accent:hover {
    background: #e55a2a;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.3);
}

.btn-full {
    width: 100%;
}

/* ================================================================================
   SECTIONS
   ================================================================================ */

section {
    padding: var(--section-padding);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 42px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ================================================================================
   PROBLEM SECTION (Before/After Comparison)
   ================================================================================ */

.problem {
    background: var(--surface);
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    max-width: 900px;
    margin: 0 auto;
}

.comparison-card {
    background: var(--background);
    border: 2px solid var(--border-light);
    border-radius: 16px;
    padding: 40px 32px;
    transition: var(--transition-base);
}

.comparison-before {
    border-color: #E5E5E5;
}

.comparison-before .comparison-icon {
    color: var(--text-secondary);
}

.comparison-after {
    border-color: var(--success);
    border-width: 2px;
}

.comparison-after .comparison-icon {
    color: var(--success);
}

.comparison-icon {
    margin-bottom: 24px;
}

.comparison-icon svg {
    width: 48px;
    height: 48px;
}

.comparison-title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.comparison-list {
    list-style: none;
}

.comparison-list li {
    padding: 12px 0;
    padding-left: 28px;
    position: relative;
    font-size: 16px;
    color: var(--text-primary);
    line-height: 1.6;
}

.comparison-before .comparison-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--text-secondary);
    font-size: 20px;
}

.comparison-after .comparison-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}

/* ================================================================================
   HOW IT WORKS SECTION (Zig-zag Steps)
   ================================================================================ */

.how-it-works {
    background: var(--background);
}

.step-item {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 64px;
    align-items: center;
    margin-bottom: 80px;
}

.step-item:last-child {
    margin-bottom: 0;
}

.step-reverse {
    direction: rtl;
}

.step-reverse > * {
    direction: ltr;
}

.step-number {
    display: inline-block;
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: white;
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.step-title {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.step-description {
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.step-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.image-caption {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 12px;
    font-style: italic;
    opacity: 0.8;
}

/* ================================================================================
   FOR WHO SECTION (Fit Check)
   ================================================================================ */

.for-who {
    background: var(--surface);
}

.fit-card {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--background);
    border: 2px solid var(--border-light);
    border-radius: 16px;
    padding: 48px;
}

.fit-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.fit-list {
    list-style: none;
}

.fit-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px 0;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
}

.fit-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.fit-yes .fit-icon {
    color: var(--success);
}

.fit-no .fit-icon {
    color: var(--text-secondary);
}

/* ================================================================================
   WHAT IT'S NOT SECTION (Myth Busting)
   ================================================================================ */

.what-not {
    background: var(--background);
}

.myth-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 1000px;
    margin: 0 auto;
}

.myth-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    transition: var(--transition-base);
}

.myth-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.myth-icon {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.myth-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* ================================================================================
   ECOSYSTEM SECTION (Flow Diagram)
   ================================================================================ */

.ecosystem {
    background: var(--surface);
}

.ecosystem-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.ecosystem-step {
    text-align: center;
}

.ecosystem-dot {
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    margin: 0 auto 8px;
}

.ecosystem-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.ecosystem-product {
    font-size: 12px;
    color: var(--text-secondary);
}

.ecosystem-arrow {
    font-size: 24px;
    color: var(--primary);
    font-weight: 700;
    margin: 0 8px;
}

.ecosystem-cta {
    text-align: center;
}

/* Ecosystem Animation - Infinite Loop with pause */
@keyframes dotPulse {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    10% {
        opacity: 1;
        transform: scale(1.2);
    }
    20% {
        opacity: 1;
        transform: scale(1);
    }
    80% {
        opacity: 1;
        transform: scale(1);
    }
    90% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 0;
        transform: scale(0);
    }
}

@keyframes arrowSlide {
    0% {
        opacity: 0;
        transform: translateX(-10px);
    }
    15% {
        opacity: 1;
        transform: translateX(0);
    }
    75% {
        opacity: 1;
        transform: translateX(0);
    }
    90% {
        opacity: 0;
        transform: translateX(10px);
    }
    100% {
        opacity: 0;
        transform: translateX(-10px);
    }
}

@keyframes textFadeIn {
    0% {
        opacity: 0;
        transform: translateY(5px);
    }
    20% {
        opacity: 1;
        transform: translateY(0);
    }
    70% {
        opacity: 1;
        transform: translateY(0);
    }
    85% {
        opacity: 0;
        transform: translateY(-5px);
    }
    100% {
        opacity: 0;
        transform: translateY(5px);
    }
}

/* Default state - no animation */
.ecosystem-dot {
    opacity: 0;
}

.ecosystem-arrow {
    opacity: 0;
}

.ecosystem-label,
.ecosystem-product {
    opacity: 0;
}

/* Animated state - triggered by .animate-ecosystem on parent section */
/* Now with INFINITE LOOP - 4 steps total, 3.5s duration with pause */
.animate-ecosystem .ecosystem-dot {
    animation: dotPulse 3.5s ease-in-out infinite;
}

.animate-ecosystem .ecosystem-step:nth-child(1) .ecosystem-dot {
    animation-delay: 0s;
}

.animate-ecosystem .ecosystem-step:nth-child(3) .ecosystem-dot {
    animation-delay: 0.4s;
}

.animate-ecosystem .ecosystem-step:nth-child(5) .ecosystem-dot {
    animation-delay: 0.8s;
}

.animate-ecosystem .ecosystem-step:nth-child(7) .ecosystem-dot {
    animation-delay: 1.2s;
}

.animate-ecosystem .ecosystem-arrow {
    animation: arrowSlide 3.5s ease-in-out infinite;
}

.animate-ecosystem .ecosystem-arrow:nth-of-type(1) {
    animation-delay: 0.2s;
}

.animate-ecosystem .ecosystem-arrow:nth-of-type(2) {
    animation-delay: 0.6s;
}

.animate-ecosystem .ecosystem-arrow:nth-of-type(3) {
    animation-delay: 1.0s;
}

.animate-ecosystem .ecosystem-label,
.animate-ecosystem .ecosystem-product {
    animation: textFadeIn 3.5s ease-in-out infinite;
}

.animate-ecosystem .ecosystem-step:nth-child(1) .ecosystem-label,
.animate-ecosystem .ecosystem-step:nth-child(1) .ecosystem-product {
    animation-delay: 0.1s;
}

.animate-ecosystem .ecosystem-step:nth-child(3) .ecosystem-label,
.animate-ecosystem .ecosystem-step:nth-child(3) .ecosystem-product {
    animation-delay: 0.5s;
}

.animate-ecosystem .ecosystem-step:nth-child(5) .ecosystem-label,
.animate-ecosystem .ecosystem-step:nth-child(5) .ecosystem-product {
    animation-delay: 0.9s;
}

.animate-ecosystem .ecosystem-step:nth-child(7) .ecosystem-label,
.animate-ecosystem .ecosystem-step:nth-child(7) .ecosystem-product {
    animation-delay: 1.3s;
}

/* ================================================================================
   EARLY ACCESS / FORM SECTION
   ================================================================================ */

.early-access,
.final-cta {
    background: var(--background);
}

.early-access-form-wrapper {
    max-width: 500px;
    margin: 0 auto;
}

.early-access-form {
    background: var(--surface);
    border: 2px solid var(--border-light);
    border-radius: 16px;
    padding: 40px;
}

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

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 14px 16px;
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--text-primary);
    background: var(--background);
    border: 2px solid var(--border-light);
    border-radius: 8px;
    transition: var(--transition-base);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 76, 58, 0.1);
}

.form-input.error,
.form-select.error {
    border-color: var(--error);
}

.form-success {
    background: var(--surface);
    border: 2px solid var(--success);
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
}

.success-icon {
    color: var(--success);
    margin: 0 auto 20px;
}

.success-title {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.success-text {
    font-size: 16px;
    color: var(--text-secondary);
}

/* ================================================================================
   FAQ SECTION
   ================================================================================ */

.faq {
    background: var(--surface);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border-light);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    background: none;
    border: none;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: var(--transition-base);
}

.faq-question:hover {
    color: var(--accent);
}

.faq-icon {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-answer p {
    padding-bottom: 24px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* ================================================================================
   FOOTER
   ================================================================================ */

.footer {
    background: var(--text-primary);
    color: white;
    padding: 60px 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 64px;
    margin-bottom: 48px;
}

.footer-brand {
    max-width: 400px;
}

.footer-brand .logo-text {
    color: white;
    margin-bottom: 12px;
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.footer-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: white;
}

.footer-list {
    list-style: none;
}

.footer-list li {
    margin-bottom: 12px;
}

.footer-list a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    transition: var(--transition-base);
}

.footer-list a:hover {
    color: var(--accent);
    padding-left: 4px;
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

/* ================================================================================
   RESPONSIVE
   ================================================================================ */

@media (max-width: 968px) {
    :root {
        --section-padding: var(--section-padding-mobile);
    }

    .nav-links {
        display: none;
    }

    .hero {
        padding: 120px 0 60px;
        min-height: auto;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 17px;
    }

    .section-title {
        font-size: 32px;
    }

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

    .step-item,
    .step-reverse {
        grid-template-columns: 1fr;
        direction: ltr;
    }

    .step-title {
        font-size: 24px;
    }

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

    .fit-columns {
        grid-template-columns: 1fr;
        gap: 32px;
    }

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

    .ecosystem-diagram {
        flex-direction: column;
        gap: 12px;
    }

    .ecosystem-arrow {
        transform: rotate(90deg);
    }

    .early-access-form {
        padding: 32px 24px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 28px;
    }

    .hero-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .section-title {
        font-size: 26px;
    }

    .step-title {
        font-size: 22px;
    }
}

/* ================================================================================
   SMOOTH SCROLLING & INTERSECTION ANIMATIONS
   ================================================================================ */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}
