@import 'navbar.css';

@font-face {
    font-family: 'Mayonice';
    src: url('../assets/fonts/mayonice/Mayonice.ttf') format('truetype'),
        url('../assets/fonts/mayonice/Mayonice.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'ZT Nature';
    src: url('../assets/fonts/zt-nature/ZTNature-Thin.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
}

@font-face {
    font-family: 'ZT Nature';
    src: url('../assets/fonts/zt-nature/ZTNature-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'ZT Nature';
    src: url('../assets/fonts/zt-nature/ZTNature-Black.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
}

:root {
    --primary: #0EA5E9;
    /* Sky 500 */
    --primary-hover: #0284C7;
    /* Sky 600 */
    --text-dark: #0F172A;
    /* Slate 900 */
    --text-muted: #475569;
    /* Slate 600 */
    --bg-color: #FFFFFF;
    --bg-dots: #E2E8F0;
    /* Slate 200 */

    --font-main: 'Inter', system-ui, -apple-system, sans-serif;

    --radius-lg: 48px;
    --transition: all 0.3s ease;

    /* Configurable glass blur */
    --glass-blur: 1px;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.5;
    overflow-x: hidden;
}

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

img {
    max-width: 100%;
    display: block;
}

/* 2. Layout & Header */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.75rem;
    font-weight: 500;
    font-size: 1rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-lg {
    padding: 0.875rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 600;
}

/* 3. Hero Section */
.main-content {
    flex: 1;
    padding: 0 1.5rem 1.5rem 1.5rem;
    /* Space around the hero box */
    display: flex;
    justify-content: center;
}

.hero {
    position: relative;
    width: 100%;
    max-width: 1800px;
    background-color: #fff;
    background-image: radial-gradient(var(--bg-dots) 2px, transparent 2px);
    background-size: 28px 28px;
    background-position: center center;
    border-radius: var(--radius-lg);
    border: 1px solid #F1F5F9;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    /* Clips the floating elements neatly to corners */
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Home Page Entry Animations */
.hero-title,
.hero-subtitle,
.hero .btn-primary,
.float-el {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-title,
.hero-subtitle,
.hero .btn-primary {
    transform: translateY(30px);
}

.float-el {
    transform: scale(0.8) translateY(20px);
}

.animate-active {
    opacity: 1 !important;
    transform: translate(0, 0) scale(1) !important;
}



/* Rectangle-shaped Top Glass Frame */
.top-glass-frame {
    position: absolute;
    top: 800px;
    left: 10%;
    transform: translateX(-50%);
    width: clamp(300px, 50%, 500px);
    height: 200px;
    border-radius: 24px;
    transform: translate(-50%, -50%) rotate(-10deg);
    /* Glass properties */
    background: rgba(255, 255, 255, 0.2);
    /* The blur is driven by the CSS variable defined in :root */
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    z-index: 3;
    overflow: hidden;
}

/* Floating Elements Container */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    /* Let clicks pass through to content */
}

/* Position Floating Images based on the visual design */
.float-el {
    position: absolute;
}

.note {
    top: 0px;
    left: 0px;
    width: clamp(170px, 20vw, 270px);
    /* Responsive sizing */
    display: flex;
    align-items: center;
    justify-content: center;
}

.note img {
    width: 100%;
    height: auto;
}

.note-text {
    position: absolute;
    /* Adjust these based on the actual SVG's visual center and tilt */
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-35deg);
    width: 75%;
    font-family: 'Mayonice', cursive, sans-serif;
    font-weight: 400;
    font-size: clamp(12px, 1.8vw, 22.53px);
    line-height: 1.4;
    letter-spacing: -0.05em;
    text-align: center;
    color: #1A202C;
    /* Dark color for handwriting */
}

.logs-wrapper {
    top: 20px;
    right: -20px;
    width: clamp(280px, 28vw, 360px);
    transform: rotate(-6deg);
}

.logs-img {
    width: 80%;
    left: 30%;
    height: auto;
    display: block;
    position: relative;
    z-index: 1;
    border-radius: 32px;
    /* Just in case */
    /* box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); */
}

.glass-frame {
    position: absolute;
    top: 30%;
    /* Starts around the middle of the card */
    left: 50%;
    width: 110%;
    height: 75%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.1) 100%);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    border-radius: 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
    z-index: 2;
    transform: rotate(18deg);
    transform-origin: center;
}

.emp {
    bottom: 0px;
    left: 0px;
    width: clamp(250px, 25vw, 400px);
}

.pen {
    bottom: 0px;
    right: 0px;
    width: clamp(150px, 15vw, 240px);
}

/* Add subtle floating animation for liveliness */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-12px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes float-delayed {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }

    100% {
        transform: translateY(0px);
    }
}

.note,
.emp {
    animation: float 6s ease-in-out infinite;
}

.logs-wrapper,
.pen {
    animation: float-delayed 8s ease-in-out infinite;
}

/* Hero Text Content */
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 100%;
    padding: 2rem;
}

.hero-title {
    font-family: 'ZT Nature', sans-serif;
    font-size: 66.72px;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: 0;
    text-align: center;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.text-blue {
    color: var(--primary);
}

.hero-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 27px;
    font-weight: 400;
    line-height: 1.59;
    letter-spacing: -0.05em;
    text-align: center;
    color: var(--text-muted);
    max-width: 100%;
    white-space: nowrap;
    margin: 0 auto 2.5rem auto;
}

/* Responsive adjustments */
@media (max-width: 1200px) {

    /* Scale down large floating elements on medium screens */
    .note {
        width: clamp(120px, 15vw, 160px);
    }

    .logs-wrapper {
        width: clamp(180px, 20vw, 240px);
    }

    .emp {
        width: clamp(180px, 20vw, 240px);
    }

    .pen {
        width: clamp(80px, 10vw, 120px);
    }
}

@media (max-width: 1024px) {

    .hero-content {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }

    /* Adjust typography for tablet constraints */
    .hero-title {
        font-size: 48px;
        line-height: 1.25;
    }

    .hero-subtitle {
        font-size: 20px;
        white-space: normal;
        /* critical fix to allow wrapping */
        max-width: 90%;
    }

    .top-glass-frame {
        width: 80%;
        height: 120px;
        top: 80%;
        /* responsive positioning instead of 800px absolute */
    }
}

@media (max-width: 768px) {
    .hero {
        border-radius: 24px;
        min-height: 80vh;
    }

    /* Adjust typography for mobile smartphones */
    .hero-title {
        font-size: 34px;
        line-height: 1.3;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 16px;
        line-height: 1.5;
        margin-bottom: 2rem;
    }

    /* Wash out floating background elements to preserve mobile legibility */
    .floating-elements {
        opacity: 0.15;
        pointer-events: none;
    }

    .top-glass-frame {
        display: none;
        /* Hide decorative floating frame on small mobile screens */
    }

    .btn-lg {
        padding: 0.75rem 2rem;
        font-size: 1rem;
    }
}

.mobile-scroll-indicator {
    position: fixed;
    left: 80%;
    bottom: 18px;
    transform: translateX(-50%) translateY(10px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    opacity: 0;
    pointer-events: none;
    z-index: 220;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.mobile-scroll-indicator.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.scroll-indicator-chevron {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    animation: scroll-indicator-bounce 1s ease-in-out infinite;
}

@keyframes scroll-indicator-bounce {

    0%,
    100% {
        transform: rotate(45deg) translate(0, 0);
    }

    50% {
        transform: rotate(45deg) translate(3px, 3px);
    }
}

@media (min-width: 1024px) {
    .mobile-scroll-indicator {
        display: none;
    }
}