html {
    scroll-behavior: smooth;
}

:root {

    /* Docly Palette (Extracted from Logo) */
    --primary: #2563EB;
    /* Docly Blue */
    --primary-dark: #1E40AF;
    --secondary: #64748B;
    --bg-main: #FFFFFF;
    --bg-card: #F8FAFC;
    --text-heading: #0F172A;
    --text-body: #334155;
    --text-muted: #64748B;
    --border-subtle: #E2E8F0;

    /* Effects */
    --radius-premium: 24px;
    --shadow-soft: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    --container-width: 1700px;
}

/* Responsive Utilities */
.mobile-only {
    display: none !important;
}

@media (max-width: 768px) {
    .mobile-only {
        display: flex !important;
    }

    .desktop-only {
        display: none !important;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background: var(--bg-page);
    color: var(--text-body);
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.6;
}

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

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.8rem 2rem;
    /* Added horizontal padding to separate from edges */
    border-bottom: 2px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 10px;
    /* Elevated slightly */
    z-index: 1000;
    border-radius: 20px;
    /* Added border radius as requested */
    margin: 0 1rem;
    /* Space from page edges */
}

.header-actions {
    display: flex;
    align-items: center;
    margin-left: auto;
    /* Push buttons to the left of the auth circle */
    margin-right: 2rem;
}

/* Hamburger Menu Icon */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1100;
}

.menu-toggle span {
    width: 30px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
    transition: 0.3s;
}

@media (max-width: 968px) {
    .menu-toggle {
        display: flex;
    }

    .navbar nav {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        background: white;
        padding: 6rem 2rem 2rem;
        gap: 2rem;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        text-align: center;
    }

    .navbar nav.active {
        display: flex;
    }

    .header-actions {
        display: none !important;
    }

    .navbar {
        padding: 1rem 0;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img {
    height: 52px;
    width: auto;
}

nav {
    display: flex;
    gap: 2.5rem;
    margin-left: 5rem;
    flex: 1;
}

nav a {
    text-decoration: none;
    color: var(--text-body);
    font-weight: 500;
    font-size: 0.95rem;
    transition: 0.3s;
}

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

/* Auth Dropdown & Circle */
.auth-wrapper {
    position: relative;
    margin-left: 2rem;
}

.auth-trigger {
    width: 48px;
    height: 48px;
    background: #F1F5F9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    border: 2px solid transparent;
    color: var(--primary);
    overflow: hidden;
    /* Ensure initials stay inside */
    position: relative;
}

.avatar-circle {
    width: 100%;
    height: 100%;
    background: white;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: none;
    /* Shadow removed as requested */
    border: 1px solid var(--border-subtle);
}

.auth-trigger:hover {
    background: #E2E8F0;
    border-color: var(--primary);
    transform: scale(1.05);
}

.dropdown-menu {
    position: absolute;
    top: 110%;
    right: 0;
    width: 240px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.15);
    border: 1px solid var(--border-subtle);
    padding: 0.8rem;
    display: none;
    z-index: 2000;
    transition: 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.dropdown-menu.active {
    display: block;
    animation: dropdownPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes dropdownPop {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.95);
    }

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

.dropdown-item {
    padding: 0.85rem 1.25rem;
    color: var(--text-body);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: 0.2s;
    cursor: pointer;
    /* Pointer for all items */
}

.dropdown-item:hover {
    background: var(--bg-card);
    color: var(--primary);
}

.settings-submenu {
    padding: 0.5rem;
    background: white;
    /* Match dropdown background */
    border-radius: 12px;
    margin: 0.2rem 0.5rem 0.5rem 0.5rem;
    display: none;
    border: 1px solid var(--border-subtle);
}

.settings-submenu.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.settings-option {
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
    color: var(--text-body);
    cursor: pointer;
    border-radius: 8px;
    transition: 0.2s;
    font-weight: 500;
}

.settings-option:hover {
    background: white;
    color: var(--primary);
    transform: translateX(5px);
}

/* Login Button Highlight Effect */
@keyframes loginPing {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    }

    100% {
        box-shadow: 0 0 15px 20px rgba(37, 99, 235, 0);
    }
}

.highlight-active {
    animation: loginPing 1.5s ease-out infinite;
}

/* Hero */
.hero {
    padding: 6rem 0;
    text-align: left;
    /* Changed to left */
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 968px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero {
        padding: 4rem 0;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .hero-content {
        margin: 0 auto;
    }

    .hero-image {
        transform: rotate(0deg);
        max-width: 90%;
        margin: 0 auto;
    }
}

.hero-image {
    width: 100%;
    border-radius: var(--radius-premium);
    box-shadow: var(--shadow-hover);
    transform: rotate(2deg);
    transition: 0.5s;
}

/* Password Toggle */
.password-wrapper {
    position: relative;
    width: 100%;
}

.toggle-password {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: 0.3s;
}

.toggle-password:hover {
    color: var(--primary);
}

.password-wrapper input {
    padding-right: 3.5rem !important;
    width: 100% !important;
}

/* Mobile Input Field Fixes */
@media (max-width: 600px) {

    input,
    select,
    textarea,
    button {
        font-size: 16px !important;
        /* Prevent iOS auto-zoom */
    }
}

.hero-image:hover {
    transform: rotate(0deg) scale(1.02);
}

.badge {
    background: var(--accent-light);
    color: var(--primary);
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-block;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    color: var(--text-heading);
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 2rem;
}

.hero h1 span {
    display: block;
    color: var(--primary);
}

.hero p {
    font-size: 1.25rem;
    max-width: 650px;
    margin-bottom: 3rem;
    color: var(--text-body);
}

.bento-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 16px;
    margin-top: 2rem;
    border: 1px solid var(--border-subtle);
}

.btn {
    padding: 1rem 2rem;
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    text-decoration: none;
    display: inline-block;
}

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

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.4);
}

/* Modern Scroll Animations (Inspired by treeangle.io - Clean reveal) */
.reveal {
    opacity: 0;
    transform: translateY(50px) scale(0.97);
    transition: all 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
    will-change: transform, opacity;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Specific Child Delays for Bento Cards */
.reveal.active .bento-card:nth-child(1) {
    transition-delay: 0.1s;
}

.reveal.active .bento-card:nth-child(2) {
    transition-delay: 0.2s;
}

.reveal.active .bento-card:nth-child(3) {
    transition-delay: 0.3s;
}

.reveal.active .bento-card:nth-child(4) {
    transition-delay: 0.4s;
}

.btn-outline {
    border: 2px solid var(--border-subtle);
    color: var(--text-heading);
}

.btn-outline:hover {
    background: var(--bg-card);
    border-color: var(--primary);
}

/* The "Bento" Cards Reimagined */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
    padding: 4rem 0;
}

.bento-card {
    background: var(--bg-card);
    border-radius: var(--radius-premium);
    padding: 2.5rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-subtle);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bento-card:hover {
    background: linear-gradient(145deg, #ffffff 0%, #eef6ff 100%);
    border-color: #3b82f6;
    transform: translateY(-15px) scale(1.01);
    box-shadow: 0 40px 80px -15px rgba(37, 99, 235, 0.2);
}

.bento-card:hover .icon {
    color: var(--primary);
    transform: scale(1.1) rotate(5deg);
}

.bento-card .icon {
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.span-8 {
    grid-column: span 8;
}

.span-4 {
    grid-column: span 4;
}

.span-6 {
    grid-column: span 6;
}

.bento-card .icon {
    width: 64px;
    height: 64px;
    background: var(--accent-light);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--primary);
    transition: 0.3s;
}

.bento-card .icon svg {
    width: 28px;
    height: 28px;
}

.bento-card h3 {
    font-size: 1.75rem;
    color: var(--text-heading);
    margin-bottom: 1rem;
}

.bento-card p {
    color: var(--text-body);
    font-size: 1rem;
}

/* Bento Section */
.bento-section {
    padding: 10rem 0;
    background: radial-gradient(circle at 0% 0%, rgba(37, 99, 235, 0.03) 0%, transparent 50%);
    margin-top: 2rem;
}

/* Ecosystem Section */
.ecosystem-section {
    padding: 8rem 0;
    margin-top: 2rem;
}

.ecosystem-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 5rem;
    align-items: center;
}

.ecosystem-visual {
    position: relative;
    background: radial-gradient(circle at center, #f8fafc 0%, #dbeafe 100%);
    border-radius: 40px;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #bfdbfe;
    box-shadow: inset 0 0 50px rgba(37, 99, 235, 0.05);
}

.visual-card {
    background: rgba(255, 255, 255, 0.85);
    padding: 2.5rem;
    border-radius: 32px;
    box-shadow: 0 40px 100px -20px rgba(15, 23, 42, 0.2);
    width: 380px;
    transform: rotate(-3deg);
    animation: floatingModern 5s ease-in-out infinite;
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px);
    z-index: 10;
}

@keyframes floatingModern {

    0%,
    100% {
        transform: rotate(-3deg) translateY(0);
    }

    50% {
        transform: rotate(-1.5deg) translateY(-30px);
    }
}

.status-pulse {
    width: 14px;
    height: 14px;
    background: #10B981;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 10px #10B981;
}

.status-pulse::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(3);
        opacity: 0;
    }
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.data-bar {
    height: 10px;
    background: #F1F5F9;
    border-radius: 5px;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}

.data-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--primary);
    width: inherit;
    animation: loadingBar 2s ease-out forwards;
}

@keyframes loadingBar {
    from {
        width: 0;
    }
}

.badge-mini {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: #DBEAFE;
    color: var(--primary);
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.feature-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .ecosystem-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .ecosystem-section {
        padding: 4rem 1rem;
    }
}

/* Pricing Light */
.pricing-section {
    padding: 6rem 0;
    background: white;
    border-top: 1px solid var(--border-subtle);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.price-card {
    padding: 3rem 2rem;
    border-radius: var(--radius-premium);
    background: var(--bg-page);
    text-align: center;
    border: 2px solid transparent;
}

.price-card.featured {
    border-color: var(--primary);
    background: white;
    transform: scale(1.05);
}

.hero-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 2rem;
    font-weight: 900;
    letter-spacing: -2px;
}

.hero-content h1 span {
    color: var(--primary);
    display: block;
}

.hero-content p {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--text-body);
    margin-bottom: 3rem;
    max-width: 580px;
}

.price-card .amount {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 2rem;
}

.price-card .amount span {
    font-size: 1rem;
    color: var(--text-muted);
}

.features-list {
    list-style: none;
    text-align: left;
    margin-bottom: 3rem;
}

.features-list li {
    margin-bottom: 1rem;
    display: flex;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.features-list li::before {
    color: var(--secondary);
    font-weight: 900;
}

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade {
    animation: fadeIn 1s ease forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

/* Refined Shadows */
:root {
    --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

.bento-card,
.price-card {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-card:hover,
.price-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-premium);
}

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

    .span-8,
    .span-4,
    .span-6 {
        grid-column: span 1;
    }

    .pricing-grid {
        grid-template-columns: 1r;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
}

/* ============================================================
   SPLASH SCREEN
   ============================================================ */

#splash-screen {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Exit animation triggered by JS adding .splash-exit class */
    transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.76, 0, 0.24, 1);
}

#splash-screen.splash-exit {
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
}

.splash-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* --- Logo circle + cross --- */
.splash-logo-wrap {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.splash-circle {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #10B981, #059669);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    animation: splashCirclePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both,
        splashPulse 2.5s ease-in-out 0.8s infinite;
}

.splash-cross {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: splashCrossIn 0.4s ease 0.55s both;
}

.splash-cross span {
    position: absolute;
    background: white;
    border-radius: 3px;
}

/* vertical bar */
.splash-cross span:nth-child(1) {
    width: 5px;
    height: 38px;
}

/* horizontal bar */
.splash-cross span:nth-child(2) {
    width: 38px;
    height: 5px;
}

/* --- Pulsing rings --- */
.splash-rings {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(16, 185, 129, 0.35);
    animation: splashRingExpand 2.5s ease-out 0.6s infinite;
}

.ring-1 {
    width: 110px;
    height: 110px;
    animation-delay: 0.6s;
}

.ring-2 {
    width: 110px;
    height: 110px;
    animation-delay: 1.1s;
}

.ring-3 {
    width: 110px;
    height: 110px;
    animation-delay: 1.6s;
}

/* --- Wordmark letters --- */
.splash-wordmark {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    font-family: 'Inter', sans-serif;
    font-size: 3.8rem;
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1;
}

.word-docly,
.word-up {
    display: flex;
    gap: 0;
}

.word-up {
    margin-left: 0.4rem;
    font-style: italic;
}

.splash-wordmark span {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: splashLetterIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* DOC = blue, LY = dark */
/* Logo Colors matching the image */
.sw-d,
.sw-c,
.sw-l,
.sw-y {
    color: #2563EB;
    /* Docly Blue */
}

.sw-o {
    color: #10B981;
    /* Docly Green */
}

.sw-u,
.sw-p {
    color: #0F172A;
    /* Docly Dark Slate */
}

/* Staggered delays for each letter */
.sw-d {
    animation-delay: 0.75s;
}

.sw-o {
    animation-delay: 0.88s;
}

.sw-c {
    animation-delay: 1.01s;
}

.sw-l {
    animation-delay: 1.14s;
}

.sw-y {
    animation-delay: 1.27s;
}

.sw-u {
    animation-delay: 1.40s;
}

.sw-p {
    animation-delay: 1.53s;
}

/* --- Tagline --- */
.splash-tagline {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #64748B;
    opacity: 0;
    animation: splashFadeIn 0.6s ease 1.6s both;
}

/* ============================================================
   SPLASH KEYFRAMES
   ============================================================ */

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

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

@keyframes splashPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    50% {
        box-shadow: 0 0 0 18px rgba(16, 185, 129, 0);
    }
}

@keyframes splashCrossIn {
    from {
        opacity: 0;
        transform: scale(0.5) rotate(45deg);
    }

    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes splashRingExpand {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

@keyframes splashLetterIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.8);
    }

    60% {
        opacity: 1;
        transform: translateY(-8px) scale(1.15);
    }

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

@keyframes splashFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}