@keyframes float {
    0% { translate: 0 0; }
    50% { translate: 0 -12px; }
    100% { translate: 0 0; }
}

.book-float {
    animation: float 7s ease-in-out infinite;
    position: absolute;
    width: 100px;
    height: auto;
    cursor: pointer;
    transform: rotate(var(--rotation));
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                filter 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.background-books {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    pointer-events: none;
}

.background-books img {
    position: absolute;
    filter: blur(8px);
    opacity: 0.6;
    transform: rotate(var(--rotation));
    pointer-events: auto;
    border-radius: 5px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                filter 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: #121212;
    will-change: transform, filter, opacity;
}

.background-books img:hover {
    filter: blur(0);
    transform: scale(1.5) rotate(0deg);
    z-index: 10000;
    opacity: 1;
}

/* Container styles */
.container {
    position: relative;
    z-index: 3;
    pointer-events: none;
}

.container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle at center,
        transparent 60%,
        rgba(18, 18, 18, 0.6) 100%
    );
    pointer-events: none;
    z-index: 2;
}

.container > * {
    pointer-events: auto;
}

/* Phone Mockup styles */
.container img[src*="SerifMockup"] {
    width: 120%;
    max-width: none;
    height: auto;
    position: absolute;
    left: 50%;
    bottom: -183%;
    transform: translateX(-50%);
}

/* Email Input styles */
.flex input[type="email"] {
    background-color: #FFFFFF;
    height: 40px;
    border-radius: 30px;
    line-height: 40px;
    padding-top: 0;
    padding-bottom: 0;
}

.flex input[type="email"]::placeholder {
    color: #A3A3A3;
}

.flex button {
    height: 32px;
    width: 32px;
    margin-right: 8px;
}

.flex button[disabled] {
    background-color: #E5E5E5;
    cursor: not-allowed;
}

.flex button:not([disabled]) {
    background-color: #121212;
    cursor: pointer;
}

/* Update container padding */
.flex.items-center {
    background-color: #FFFFFF;
    padding: 4px;
    border-radius: 30px;
    position: relative;
    z-index: 100;
}

@font-face {
    font-family: 'Freight';
    src: url('freight_font/FreightDispProBook-Regular.ttf') format('truetype');
}

body {
    font-family: 'Fustat', sans-serif;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    position: relative;
    width: 100%;
}

html {
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

.font-freight {
    font-family: 'Freight', serif;
}

.font-fustat {
    font-family: 'Fustat', sans-serif;
}

/* Notch styles */
.bg-\[#1E1E1E\] {
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[x-cloak] {
    display: none !important;
}

/* Responsive Design */
/* Extra large screens (1201px and above) */
@media screen and (min-width: 1201px) {
    .container img[src*="SerifMockup"] {
        width: 120%;
        max-width: none;
        height: auto;
        position: absolute;
        left: 50%;
        bottom: -190%;
        transform: translateX(-50%);
    }
}

/* Large laptops and smaller (1366px and below) */
@media screen and (max-width: 1366px) {
    .container img[src*="SerifMockup"] {
        transform: translate(-50%, 50%) scale(0.9);
    }

    h1 {
        font-size: 40px;
    }
    
    [class~="text-[22px]"] {
        font-size: 20px;
    }
}

/* MacBook Pro 14-inch and similar (1512px and below) */
@media screen and (max-width: 1512px) {
    .container img[src*="SerifMockup"] {
        width: 110% !important;
        bottom: -142% !important    ;
        transform: translateX(-50%) !important;
    }

    .book-float {
        width: 90px;
    }

    /* Logo size */
    .container img[src*="serif_logo"] {
        width: 28px;
        height: 36px;
    }

    /* Main heading */
    h1 {
        font-size: 40px !important;
    }

    /* Subheading */
    [class~="text-[22px]"] {
        font-size: 18px !important;
    }

    /* Email input placeholder */
    .flex input[type="email"] {
        font-size: 14px !important
    }

    [class~="max-w-sm"] {
        max-width: 22rem !important;
    }
}

/* Tablets and small laptops (1024px and below) */
@media screen and (max-width: 1024px) {
    .container img[src*="SerifMockup"] {
        width: 300% !important;
        bottom: -264% !important;
        transform: translateX(-50%) !important;
    }

    .book-float,
    .background-books {
        display: none;
    }

    h1 {
        font-size: 36px !important;
    }

    [class~="text-[22px]"] {
        font-size: 22px !important;
    }

    [class~="max-w-sm"] {
        max-width: 28rem !important;
    }

    .container {
        padding-top: 2rem;
    }
}

/* Tablets (768px and below) */
@media screen and (max-width: 768px) {
    .container img[src*="SerifMockup"] {
        width: 250% !important;
        bottom: -208% !important;
        transform: translateX(-50%) !important;
    }

    .book-float {
        width: 60px;
    }

    h1 {
        font-size: 32px;
    }

    [class~="text-[22px]"] {
        font-size: 16px;
    }

    [class~="max-w-sm"] {
        max-width: 280px;
    }
}

/* Mobile phones (480px and below) */
@media screen and (max-width: 480px) {
    .container img[src*="SerifMockup"] {
        width: 300% !important;
        bottom: -130% !important;
        transform: translateX(-50%) !important;
    }

    .book-float,
    .background-books {
        display: none;
    }

    h1 {
        font-size: 30px !important;
        padding: 0 1rem;
    }

    [class~="text-[22px]"] {
        font-size: 16px !important;
        padding: 0 1rem;
    }

    [class~="max-w-sm"] {
        max-width: 20rem !important;
    }

    .container::before {
        background: radial-gradient(
            circle at center,
            transparent 80%,
            rgba(18, 18, 18, 0.3) 100%
        );
    }
}

/* Handle very small screens */
@media screen and (max-width: 375px) {
    .container img[src*="SerifMockup"] {
        width: 300% !important;
        bottom: -152% !important;
        transform: translateX(-50%) !important;
    }

    .book-float,
    .background-books {
        display: none;
    }

    h1 {
        font-size: 28px !important;
        padding: 0 1rem;
    }

    [class~="text-[22px]"] {
        font-size: 14px !important;
        padding: 0 1rem;
    }

    [class~="max-w-sm"] {
        max-width: 18rem !important;
    }

    .container::before {
        background: radial-gradient(
            circle at center,
            transparent 80%,
            rgba(18, 18, 18, 0.3) 100%
        );
    }
}

/* Handle shorter heights */
@media screen and (max-height: 700px) {
    .container {
        padding-top: 1rem;
    }

    [class~="mb-12"] {
        margin-bottom: 2rem;
    }

    [class~="mb-16"] {
        margin-bottom: 2rem;
    }
}

/* Add noise texture to body */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.shake {
    animation: shake 0.8s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* iPhone-specific adjustments */
/* iPhone 12, 12 Pro */
@media screen and (device-width: 390px) and (device-height: 844px) {
    .container img[src*="SerifMockup"] {
        width: 350% !important;
        bottom: -152% !important;
        transform: translateX(-50%) !important;
    }
}

/* iPhone XR, 11 */
@media screen and (device-width: 414px) and (device-height: 896px) {
    .container img[src*="SerifMockup"] {
        width: 350% !important;
        bottom: -168% !important;
        transform: translateX(-50%) !important;
    }
}

/* iPhone 13 Pro Max, 12 Pro Max */
@media screen and (device-width: 428px) and (device-height: 926px) {
    .container img[src*="SerifMockup"] {
        width: 350% !important;
        bottom: -172% !important;
        transform: translateX(-50%) !important;
    }
}

/* iPhone SE (2nd gen) */
@media screen and (device-width: 375px) and (device-height: 667px) {
    .container img[src*="SerifMockup"] {
        width: 300% !important;
        bottom: -147% !important;
        transform: translateX(-50%) !important;
    }
}

/* Android Device Adjustments */
/* Samsung Galaxy S20, S21 (and similar 20:9 ratio phones) */
@media screen and (device-width: 360px) and (device-height: 800px) {
    .container img[src*="SerifMockup"] {
        width: 320% !important;
        bottom: -158% !important;
        transform: translateX(-50%) !important;
    }
}

/* Samsung Galaxy S8, S9, S10 (and similar 18.5:9 ratio phones) */
@media screen and (device-width: 360px) and (device-height: 740px) {
    .container img[src*="SerifMockup"] {
        width: 320% !important;
        bottom: -122% !important;
        transform: translateX(-50%) !important;
    }
}

/* Google Pixel 4, 5 */
@media screen and (device-width: 393px) and (device-height: 851px) {
    .container img[src*="SerifMockup"] {
        width: 340% !important;
        bottom: -162% !important;
        transform: translateX(-50%) !important;
    }
}

/* OnePlus 8, 9 */
@media screen and (device-width: 412px) and (device-height: 915px) {
    .container img[src*="SerifMockup"] {
        width: 350% !important;
        bottom: -170% !important;
        transform: translateX(-50%) !important;
    }
}

/* Generic Android Fallback (for devices not covered above) */
/* @media screen and (min-width: 360px) and (max-width: 420px) and (min-height: 640px) {
    .container img[src*="SerifMockup"] {
        width: 330% !important;
        bottom: -167% !important;
        transform: translateX(-50%) !important;
    }
} */

/* iPad Pro Adjustments */
/* iPad Pro 12.9" */
@media screen and (device-width: 1024px) and (device-height: 1366px) {
    .container img[src*="SerifMockup"] {
        width: 280% !important;
        bottom: -310% !important;
        transform: translateX(-50%) !important;
    }
    
    h1 {
        font-size: 48px !important;
    }
    
    [class~="text-[22px]"] {
        font-size: 24px !important;
    }
    
    [class~="max-w-sm"] {
        max-width: 28rem !important;
    }
}

/* iPad Pro 11" */
@media screen and (device-width: 834px) and (device-height: 1194px) {
    .container img[src*="SerifMockup"] {
        width: 260% !important;
        bottom: -220% !important;
        transform: translateX(-50%) !important;
    }
    
    h1 {
        font-size: 42px !important;
    }
    
    [class~="text-[22px]"] {
        font-size: 20px !important;
    }
    
    [class~="max-w-sm"] {
        max-width: 26rem !important;
    }
}

/* iPad Pro 10.5" */
@media screen and (device-width: 834px) and (device-height: 1112px) {
    .container img[src*="SerifMockup"] {
        width: 250% !important;
        bottom: -210% !important;
        transform: translateX(-50%) !important;
    }
    
    h1 {
        font-size: 40px !important;
    }
    
    [class~="text-[22px]"] {
        font-size: 20px !important;
    }
    
    [class~="max-w-sm"] {
        max-width: 24rem !important;
    }
}


