/* ================================================
   CadaEuro — Minimalist Landing Page Styles
   ================================================ */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

html {
    height: 100%;
    /* Prevent white overscroll background */
    background: #0B1C1F;
}

body {
    height: 100%;
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background: linear-gradient(160deg, #12494C 0%, #0B1C1F 100%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding-bottom: 80px;
    /* Space for the fixed footer */
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Fallback for mobile browsers with issues on fixed backgrounds */
@supports (-webkit-touch-callout: none) {
    body {
        background-attachment: scroll;
    }
}

/* ================================================
   Hero Section — Full Viewport
   ================================================ */
.hero-minimal {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    position: relative;
    min-height: calc(100vh - 60px);
}

/* Subtle grain texture */
.hero-minimal::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
}

.hero-minimal-container {
    max-width: 1200px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    padding: 0 60px;
    position: relative;
    z-index: 1;
}

/* Hero Visual (Right side - App Screenshot) */
.hero-visual {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Glow Effect behind the phone */
.hero-visual::before {
    content: '';
    position: absolute;
    width: 140%;
    height: 120%;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.15) 0%, rgba(20, 184, 166, 0) 70%);
    z-index: -1;
    filter: blur(40px);
}

.hero-screenshot {
    max-height: 560px;
    /* Increased from 500px as recommended */
    width: auto;
    border-radius: 40px;
    /* More natural for modern iPhones */
    filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.6));
    animation: fadeInSlideRight 1s ease-out 0.2s both;
}

/* Logo - Positioned at top of hero */
.hero-logo {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 2;
}

.hero-logo .logo-image {
    height: 24px;
    width: auto;
}

.hero-logo .logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: -0.01em;
}

/* Main Content */
.hero-minimal-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
    /* Increased from 24px for more air */
    animation: fadeInSlideLeft 1s ease-out 0.2s both;
}

/* Title */
/* Title */
.hero-minimal-title {
    font-size: clamp(3rem, 7vw, 4.5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
    color: #ffffff;
    margin-bottom: 0;
    text-align: left;
}

/* Highlighted words base style */
.hero-minimal-title .highlight {
    display: inline-block;
    position: relative;
    color: rgba(255, 255, 255, 0.4);
    /* Default dimmed state */
    transition: color 0.3s ease;
}

/* Underline base style */
.hero-minimal-title .highlight::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #D4AF37 0%, #F4D03F 50%, #D4AF37 100%);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
}

/* Word 1: Pass through (Enter -> Stay -> Exit) */
.hero-minimal-title .highlight:nth-child(1) {
    animation: textColorPass 2s ease-in-out 0.5s forwards;
}

.hero-minimal-title .highlight:nth-child(1)::after {
    animation: underlinePass 2s ease-in-out 0.5s forwards;
}

/* Word 2: Pass through (Enter -> Stay -> Exit) */
.hero-minimal-title .highlight:nth-child(2) {
    animation: textColorPass 2s ease-in-out 2.7s forwards;
}

.hero-minimal-title .highlight:nth-child(2)::after {
    animation: underlinePass 2s ease-in-out 2.7s forwards;
}

/* Word 3: Arrive (Enter -> Stay) */
.hero-minimal-title .highlight:nth-child(3) {
    animation: textColorArrive 0.8s ease-out 4.9s forwards;
}

.hero-minimal-title .highlight:nth-child(3)::after {
    animation: underlineArrive 0.8s ease-out 4.9s forwards;
}

@keyframes underlinePass {
    0% {
        transform: scaleX(0);
        transform-origin: left;
    }

    30% {
        transform: scaleX(1);
        transform-origin: left;
    }

    70% {
        transform: scaleX(1);
        transform-origin: right;
    }

    100% {
        transform: scaleX(0);
        transform-origin: right;
    }
}

@keyframes textColorPass {
    0% {
        color: rgba(255, 255, 255, 0.4);
    }

    30% {
        color: #ffffff;
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    }

    70% {
        color: #ffffff;
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    }

    100% {
        color: rgba(255, 255, 255, 0.4);
    }
}

@keyframes underlineArrive {
    0% {
        transform: scaleX(0);
        transform-origin: left;
    }

    100% {
        transform: scaleX(1);
        transform-origin: left;
    }
}

@keyframes textColorArrive {
    0% {
        color: rgba(255, 255, 255, 0.4);
    }

    100% {
        color: #ffffff;
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    }
}

/* Entrance Animations */
@keyframes fadeInSlideLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

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

@keyframes fadeInSlideRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

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

/* Subtitle */
.hero-minimal-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    /* Increased opacity from 0.5 */
    max-width: 600px;
    margin-top: 0;
    line-height: 1.5;
    /* Increased from 1.4 for readability */
    letter-spacing: -0.01em;
    text-align: left;
}

/* CTA Button (App Store Badge) */
/* CTA Button (App Store Badge) */
.hero-minimal-cta {
    display: inline-flex;
    margin-top: 0;
    /* Removing manual margin, using gap */
    text-decoration: none;
    transition: transform 0.25s ease;
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.hero-minimal-cta img {
    height: 56px;
    width: auto;
    display: block;
}

.hero-minimal-cta:hover {
    transform: translateY(-2px);
    background: transparent;
    box-shadow: none;
}

.hero-minimal-cta:active {
    transform: translateY(0);
}

/* Tagline */
/* Tagline */
.hero-minimal-tagline {
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    /* Spaced out caps */
    color: rgba(255, 255, 255, 0.4);
    margin-top: 24px;
}

/* ================================================
   Footer — Minimal (Fixed at bottom)
   ================================================ */
.footer-minimal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 24px;
    background: rgba(11, 28, 31, 1);
    /* Dark base to match app theme */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
}

/* Add backdrop filter for supported browsers */
@supports (backdrop-filter: blur(10px)) {
    .footer-minimal {
        background: rgba(11, 28, 31, 0.85);
        backdrop-filter: blur(12px);
    }
}

.footer-minimal-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-logo {
    height: 10px;
    width: auto;
    opacity: 0.6;
}

.footer-links-minimal {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links-minimal a {
    font-size: 0.85rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links-minimal a:hover {
    color: rgba(255, 255, 255, 0.9);
}

.footer-divider {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.85rem;
}

.footer-copyright {
    font-size: 0.8rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.4);
}

/* ================================================
   Responsive
   ================================================ */
@media (max-width: 768px) {

    .hero-logo {
        top: 32px;
        /* Increased from 16px to avoid system notch/clock */
    }

    .hero-minimal-container {
        flex-direction: column;
        padding: 90px 24px 80px;
        /* Increased bottom padding to clear footer */
        gap: 28px;
        /* Tighter gap */
        text-align: center;
        min-height: auto;
    }

    .hero-minimal-content {
        align-items: center;
    }

    .hero-minimal-title {
        text-align: center;
    }

    .hero-minimal-subtitle {
        text-align: center;
    }

    .hero-screenshot {
        max-height: 280px;
        /* Reduced to fit in the safe area */
        border-radius: 20px;
    }

    /* Refine Glow for mobile - even softer */
    .hero-visual::before {
        width: 110%;
        height: 90%;
        opacity: 0.4;
        /* Much more subtle */
        filter: blur(35px);
    }

    .footer-minimal-container {
        flex-direction: column;
        text-align: center;
        align-items: center;
        /* Ensure items are centered */
        gap: 24px;
        padding-bottom: 20px;
        /* Add padding to prevent cut-off */
    }

    .footer-links-minimal {
        justify-content: center;
        /* Center links in flex container */
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {

    .hero-minimal-content {
        gap: 24px;
        /* Better spacing for small vertical screens */
        width: 100%; /* Prevent content overflow */
    }

    .hero-logo .logo-image {
        height: 24px;
        width: auto;
        /* Restored size for better branding visibility */
    }

    .hero-minimal-title {
        font-size: 2.4rem;
        /* Slightly reduced for better fit */
        margin-bottom: 8px;
        line-height: 1.1;
        /* Tighter line spacing */
        word-wrap: break-word; /* Ensure long words break if necessary */
    }

    .hero-minimal-subtitle {
        font-size: 1.05rem;
        /* Balanced size */
        line-height: 1.6;
        /* More relaxed */
        margin-top: 0;
        padding: 0 10px; /* Reduced padding to give more text space */
        color: rgba(255, 255, 255, 0.75);
        /* Good visibility */
    }

    .hero-minimal-cta {
        margin-top: 16px;
        /* Tighter gap for CTA */
        width: 100%;
        max-width: 260px;
        justify-content: center;
    }

    .hero-minimal-cta img {
        margin: 0 auto;
        /* Force image centering if display block */
    }

    .hero-minimal-tagline {
        margin-top: 24px;
        font-size: 0.7rem;
    }

    /* Mobile Footer Tweaks */
    .footer-logo {
        display: none;
    }

    .footer-divider {
        display: none;
        /* Hide pipes on mobile for cleaner look */
    }

    .footer-links-minimal {
        gap: 32px;
        /* Larger gap for tap targets */
        width: 100%;
        justify-content: center;
    }
}

/* ================================================
   Special Fix for Small Screens (iPhone SE / Short Screens)
   ================================================ */
@media (max-height: 700px) and (max-width: 480px) {
    body {
        padding-bottom: 60px;
        /* Tighter footer space */
    }

    .hero-logo {
        top: 20px;
        /* Pull logo up */
    }

    .hero-minimal-container {
        padding-top: 65px;
        padding-bottom: 10px;
        gap: 16px;
        /* Tighten all gaps */
    }

    .hero-minimal-title {
        font-size: 1.8rem;
        /* Smaller title */
    }

    .hero-minimal-subtitle {
        font-size: 0.9rem;
        padding: 0 30px;
    }

    .hero-minimal-cta {
        margin-top: 10px;
        max-width: 200px;
        /* Smaller button */
    }

    .hero-screenshot {
        max-height: 200px;
        /* Small phone for small screen */
    }

    .hero-visual::before {
        filter: blur(20px);
        opacity: 0.2;
    }
}