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

:root {
    --background: #09090b;
    --foreground: #fafafa;
    --card: #18181b;
    --card-foreground: #fafafa;
    --popover: #18181b;
    --popover-foreground: #fafafa;
    --primary: #8b5cf6;
    --primary-foreground: #fafafa;
    --secondary: #27272a;
    --secondary-foreground: #fafafa;
    --muted: #27272a;
    --muted-foreground: #a1a1aa;
    --accent: #27272a;
    --accent-foreground: #fafafa;
    --destructive: #7f1d1d;
    --destructive-foreground: #fafafa;
    --border: #27272a;
    --input: #27272a;
    --ring: #8b5cf6;
}

body {
    background-color: var(--background);
    font-family: "Space Mono", monospace;
    font-style: normal;
    line-height: 1.6;
    color: var(--foreground);
}

.top-nav {
    margin: 1rem;
    border: 1px solid var(--border);
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: var(--card);
    position: relative;
}

.logo h2 {
    font-size: 1.5rem;
    color: var(--foreground);
}

.nav-links a {
    font-weight: bold;
    color: var(--primary);
    padding: 5px 10px;
    margin-left: 1rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-foreground);
}

.header {
    color: var(--foreground);
    background-color: var(--card);
    border-radius: 5px;
    text-align: center;
    margin: 1rem;
    padding: 4rem 2rem;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
}

.main-title {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    text-transform: lowercase;
}

.subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    font-weight: normal;
    /* color: var(--muted-foreground); */
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn {
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: bold;
    font-family: "Space Mono", monospace;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background-color: var(--primary);
    color: var(--primary-foreground);
    animation: pulse 2s infinite;
}

.btn-primary:hover {
    background-color: var(--ring);
    animation: none;
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--secondary-foreground);
}

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

.header-badge {
    font-size: 0.9rem;
    opacity: 0.8;
    color: var(--muted-foreground);
}

.y-combinator {
    color: #fc651e;
}

.section-title {
    text-align: center;
    font-size: 25px;
    margin-bottom: 2rem;
    color: var(--foreground);
}

.features {
    padding: 4rem 2rem;
    background-color: var(--background);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-item {
    text-align: center;
    padding: 2rem;
    background-color: var(--card);
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, rgba(139, 92, 246, 0) 70%);
    transform: scale(0);
    transition: transform 0.6s ease-out;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.feature-item:hover::before {
    transform: scale(1);
}

.feature-item i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.feature-item:hover i {
    transform: scale(1.1);
}

.feature-item h3 {
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    color: var(--foreground);
}

.trusted-by {
    padding: 4rem 2rem;
    background-color: var(--card);
}

.logo-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.company-logo {
    max-width: 80px;
    height: auto;
    filter: grayscale(100%) brightness(0.8) invert(1);
    opacity: 0.7;
    transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.company-logo:hover {
    filter: grayscale(0%) brightness(1) invert(0);
    opacity: 1;
    transform: scale(1.1);
}

.onboarding {
    padding: 4rem 2rem;
    background-color: var(--background);
}

.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background-color: var(--primary);
    transform: translateX(-50%);
}

.timeline-item {
    margin-bottom: 3rem;
    position: relative;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.timeline-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-content {
    background-color: var(--card);
    border-radius: 10px;
    padding: 1.5rem;
    position: relative;
    width: calc(50% - 30px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: auto;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 20px;
    width: 20px;
    height: 20px;
    background-color: var(--primary);
    border-radius: 50%;
}

.timeline-item:nth-child(odd) .timeline-content::before {
    left: -40px;
}

.timeline-item:nth-child(even) .timeline-content::before {
    right: -40px;
}

@media (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }

    .timeline-content {
        width: calc(100% - 60px);
        margin-left: 60px !important;
    }

    .timeline-content::before {
        left: -50px !important;
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(139, 92, 246, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0);
    }
}

.footer {
    background-color: var(--background);
    color: var(--foreground);
    padding: 4rem 2rem 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section {
    flex: 1;
    margin-bottom: 2rem;
    min-width: 200px;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--foreground);
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--muted-foreground);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--muted-foreground);
}

@media (max-width: 768px) {
    .top-nav {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-links {
        margin-top: 1rem;
    }

    .nav-links a {
        margin-left: 0;
        margin-right: 1rem;
    }

    .main-title {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

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

    .btn {
        width: 100%;
    }

    .timeline::before {
        left: 0;
    }

    .timeline-content {
        margin-left: 2rem;
        margin-right: 0;
    }

    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 2rem;
        margin-right: 0;
    }

    .timeline-content::before {
        left: -30px;
    }

    .timeline-item:nth-child(even) .timeline-content::before {
        left: -30px;
        right: auto;
    }

    .footer-content {
        flex-direction: column;
    }

    .footer-section {
        margin-bottom: 2rem;
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.header-content>* {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.header-content>*:nth-child(1) { animation-delay: 0.2s; }
.header-content > *:nth-child(2) { animation-delay: 0.4s; }
.header-content > *:nth-child(3) { animation-delay: 0.6s; }
.header-content > *:nth-child(4) { animation-delay: 0.8s; }

.feature-item {
    animation: scaleIn 0.5s ease-out forwards;
    opacity: 0;
}

.timeline-item {
    animation: slideInLeft 0.5s ease-out forwards;
    opacity: 0;
}

/* Scroll-triggered animations */
.fade-in-section {
    opacity: 0;
    transform: translateY(20vh);
    visibility: hidden;
    transition: opacity 0.6s ease-out, transform 1.2s ease-out;
    will-change: opacity, visibility;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
    visibility: visible;
}

/* Additional styles for better visual hierarchy and readability */
.space-mono-regular {
    font-weight: 400;
}

.space-mono-bold {
    font-weight: 700;
}

@font-face {
    font-family: TiemposHeadline-Regular;
    src: url("assets/fonts/TiemposHeadline-Regular.otf") format("opentype");
}

@font-face {
    font-family: TiemposText-Regular;
    src: url("assets/fonts/TiemposText-Regular.otf") format("opentype");
}

.tiempos {
    font-family: TiemposHeadline-Regular, serif;
}

/* Enhance readability */
p {
    max-width: 65ch;
    margin-left: auto;
    margin-right: auto;
    color: var(--muted-foreground);
}

/* Improve button accessibility */
.btn:focus {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

/* Add a subtle hover effect to feature items */
.feature-item {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.feature-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
}

/* Style the timeline for better visual appeal */
.timeline-content {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease;
}

.timeline-content:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.header {
    background: 
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.6) 0%,
            rgba(0, 0, 0, 1) 80%,
            rgba(0, 0, 0, 1) 100%
        ),
        repeating-linear-gradient(
            45deg,
            #000000,
            #000000 5px,
            var(--primary) 20px,
            var(--primary) 30px
        );
}

.petti {
    color: white;
    padding-left: 3px;
    padding-right: 3px;
    margin-right: 3px;
    background-color: #8a2be2;
    border-style: solid;
    border-width: 0px;
    border-radius: 5px;
}

/* Improve footer link interactions */
.footer-section a {
    position: relative;
    transition: color 0.3s ease;
}

.footer-section a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--primary);
    visibility: hidden;
    transform: scaleX(0);
    transition: all 0.3s ease-in-out;
}

.footer-section a:hover::after {
    visibility: visible;
    transform: scaleX(1);
}

.hamburger {
    display: none;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    z-index: 1000;
}

.hamburger span {
    display: block;
    position: absolute;
    width: 25px;
    height: 3px;
    background-color: var(--foreground);
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger span:nth-child(1) {
    transform: translateY(-8px);
}

.hamburger span:nth-child(3) {
    transform: translateY(8px);
}

@media screen and (max-width: 768px) {
    .top-nav {
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
    }

    .nav-links {
        display: none;
        width: 100%;
        text-align: center;
        padding-top: 1rem;
        margin-top: 1rem;
        order: 3;
        background-color: var(--card);
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
    }

    .nav-links a {
        display: block;
        margin: 0.5rem 0;
    }

    .hamburger {
        display: flex;
    }

    /* Hamburger to X animation */
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg);
    }

    /* Ensure the logo stays on the left */
    .logo {
        margin-right: auto;
    }
}

/* Modern Functionality Showcase Styles */
.functionality-showcase {
    background-color: var(--background);
    padding: 6rem 2rem;
    overflow: hidden;
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.showcase-item {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: var(--card);
}

.showcase-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.showcase-item:hover::before {
    opacity: 1;
}

.showcase-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.showcase-content {
    padding: 2rem;
    color: var(--foreground);
    transition: color 0.3s ease;
}

.showcase-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.showcase-item:hover .showcase-image img {
    transform: scale(1.1);
}

.showcase-item h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
    color: var(--foreground);
}

.showcase-item p {
    font-size: 1rem;
    margin-bottom: 0;
    color: var(--muted-foreground);
}

/* Vertical layout */
.showcase-item-vertical {
    display: flex;
    flex-direction: column;
    height: 600px;
}

.showcase-item-vertical .showcase-content,
.showcase-item-vertical .showcase-image {
    flex: 1;
}

/* Horizontal layout */
.showcase-item-horizontal {
    grid-column: span 2;
    display: flex;
    height: 400px;
}

.showcase-item-horizontal .showcase-content,
.showcase-item-horizontal .showcase-image {
    flex: 1;
}

.showcase-item-reverse {
    flex-direction: row-reverse;
}

/* Abstract shapes */
.showcase-item::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    opacity: 0.1;
    transition: transform 0.3s ease;
}

.showcase-item-vertical::after {
    bottom: -100px;
    right: -100px;
}

.showcase-item-horizontal::after {
    top: -100px;
    left: -100px;
}

.showcase-item:hover::after {
    transform: scale(1.5);
}

.image-container {
    width: 85%;
    height: auto;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    margin: 3rem auto;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    filter: drop-shadow(0 30px 20px rgba(0, 0, 0, 0.3));
    transform: perspective(1000px) rotateX(5deg);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, filter 0.3s ease-in-out;
}

.image-container:hover {
    transform: perspective(1000px) rotateX(0deg) translateY(-10px);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.6),
        0 0 0 2px rgba(255, 255, 255, 0.2);
    filter: drop-shadow(0 40px 30px rgba(0, 0, 0, 0.4));
}

.image-container img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 20px;
}

.features {
    background-color: var(--background);
    position: relative;
    margin-top: -30vh;
    border-radius: 20px 20px 0 0;
}

.image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, var(--background) 80%);
    pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .showcase-grid {
        grid-template-columns: 1fr;
    }

    .showcase-item-horizontal {
        grid-column: span 1;
        height: auto;
        flex-direction: column;
    }

    .showcase-item-vertical,
    .showcase-item-horizontal {
        height: auto;
    }

    .showcase-item-vertical .showcase-content,
    .showcase-item-vertical .showcase-image,
    .showcase-item-horizontal .showcase-content,
    .showcase-item-horizontal .showcase-image {
        flex: none;
    }

    .showcase-image img {
        max-height: 300px;
    }
}

/* Animation */
.showcase-item {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.showcase-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Glowing effect for primary elements */
.btn-primary, .feature-item i, .timeline-content::before {
    position: relative;
}

.btn-primary::after, .feature-item i::after, .timeline-content::before::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: var(--primary);
    z-index: -1;
    filter: blur(15px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover::after, .feature-item:hover i::after, .timeline-content:hover::before::after {
    opacity: 0.5;
}

/* Subtle background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25px 25px, var(--card) 2%, transparent 0%),
        radial-gradient(circle at 75px 75px, var(--card) 2%, transparent 0%);
    background-size: 100px 100px;
    opacity: 0.03;
    z-index: -1;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.2); /* Use rgba to make it semi-transparent */
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.8); /* More opaque on hover */
}

/* Focus styles for accessibility */
a:focus, button:focus, input:focus, textarea:focus {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

/* Custom selection color */
::selection {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

/* Smooth scrolling for the whole page */
html {
    scroll-behavior: smooth;
}

@media (prefers-color-scheme: light) {
    :root {
        --background: #ffffff;
        --foreground: #09090b;
        --card: #f4f4f5;
        --card-foreground: #09090b;
        --popover: #ffffff;
        --popover-foreground: #09090b;
        --primary: #8b5cf6;
        --primary-foreground: #ffffff;
        --secondary: #f4f4f5;
        --secondary-foreground: #09090b;
        --muted: #f4f4f5;
        --muted-foreground: #71717a;
        --accent: #f4f4f5;
        --accent-foreground: #09090b;
        --destructive: #ff4136;
        --destructive-foreground: #ffffff;
        --border: #e4e4e7;
        --input: #e4e4e7;
        --ring: #8b5cf6;
    }
    
    .company-logo {
        filter: grayscale(100%) brightness(0.8);
    }
    
    .company-logo:hover {
        filter: grayscale(0%) brightness(1);
    }
    
    body::before {
        opacity: 0.05;
    }
}
