:root {
    --bg-color: #0d1117;
    --surface-color: #161b22;
    --surface-hover: #21262d;
    --surface-border: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #8e8e93;
    --accent-color: #00E676;
    /* Vibrant Shade Tree Green */
    --accent-glow: rgba(0, 230, 118, 0.3);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

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

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
}

.accent {
    color: var(--accent-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1000;
    border-bottom: 1px solid var(--surface-border);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

/* Buttons */
.btn-primary {
    background-color: var(--text-primary);
    color: var(--bg-color);
    padding: 0.75rem 1.75rem;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: var(--font-body);
    display: inline-block;
}

.btn-primary:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

/* Hero Section */
.hero {
    padding: 110px 0 30px;
    min-height: 85vh;
    display: flex;
    align-items: center;
}

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

.hero-title {
    font-size: 5.5rem;
    line-height: 1.05;
    margin-bottom: 1.5rem;
    letter-spacing: -2.5px;
}

.hero-subtitle {
    font-size: 1.35rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 500px;
    font-weight: 400;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.platform-support {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-left: 0.5rem;
}

.hero-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
}

/* Word Rotator */
.word-rotator {
    display: inline-block;
    position: relative;
    /* We set a fixed height and minimum width so the layout doesn't jump */
    height: 1.1em;
    min-width: 7em;
    /* generous enough for 'maintained.' */
    vertical-align: bottom;
}

.word-rotator .word {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    text-align: center;
    /* Smoother, gentler transition */
    animation: rotateWordFade 12s ease-in-out infinite;
}

/* Stagger the 4 words */
.word-rotator .word:nth-child(1) {
    animation-delay: 0s;
}

.word-rotator .word:nth-child(2) {
    animation-delay: 3s;
}

.word-rotator .word:nth-child(3) {
    animation-delay: 6s;
}

.word-rotator .word:nth-child(4) {
    animation-delay: 9s;
}

@keyframes rotateWordFade {
    0% {
        opacity: 0;
        transform: translateY(40%);
        filter: blur(4px);
    }

    5% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }

    20% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }

    25% {
        opacity: 0;
        transform: translateY(-40%);
        filter: blur(4px);
    }

    100% {
        opacity: 0;
        transform: translateY(-40%);
        filter: blur(4px);
    }
}

.floating-phone {
    width: 450px;
    border-radius: 40px;
    z-index: 2;
}

.glow-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    height: 600px;
    background: var(--accent-color);
    filter: blur(140px);
    opacity: 0.2;
    z-index: 1;
    border-radius: 50%;
    animation: pulse 8s alternate infinite ease-in-out;
}

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

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

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

@keyframes pulse {
    0% {
        opacity: 0.15;
        transform: translate(-50%, -50%) scale(0.9);
    }

    100% {
        opacity: 0.25;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Legal Pages (Privacy Policy etc) */
.legal-page {
    padding: 140px 0 80px;
    min-height: 70vh;
}

.legal-content {
    max-width: 800px;
    /* narrower readable column */
}

.legal-content .hero-title {
    font-size: 3.5rem;
    margin-bottom: 2.5rem;
    text-align: left;
}

.legal-body h2 {
    font-size: 1.5rem;
    margin: 2.5rem 0 1rem;
    color: var(--text-primary);
}

.legal-body p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* Features - Bento Grid */
.features {
    padding: 40px 0;
    background-color: var(--bg-color);
}

.section-title {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 3.5rem;
    line-height: 1.1;
    letter-spacing: -1.5px;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 1.5rem;
    grid-auto-rows: 420px;
}

.bento-item {
    background-color: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: 32px;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.3s ease;
}

.bento-item:hover {
    transform: translateY(-8px);
    background-color: var(--surface-hover);
    border-color: rgba(255, 255, 255, 0.15);
}

.bento-content {
    z-index: 2;
}

.bento-item h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.bento-item p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
}

.bento-image {
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 65%;
    z-index: 1;
    transform: rotate(5deg) scale(1.05);
    /* slightly angled for dynamic look */
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bento-item:hover .bento-image {
    transform: rotate(0deg) scale(1.1);
}

.bento-image img {
    width: 100%;
    border-radius: 20px;

}

.bento-image-top {
    position: absolute;
    top: 2rem;
    left: 2rem;
    right: 2rem;
    height: 480px;
    overflow: hidden;
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.bento-image-top img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.6s ease;
}

.bento-item:hover .bento-image-top img {
    transform: scale(1.05);
}

.tall {
    grid-row: span 2;
    padding-top: 520px;
    /* Make room for the expanded top image */
}

.wide {
    grid-column: span 2;
    flex-direction: row;
    align-items: center;
}

.wide .bento-content {
    width: 45%;
    padding-right: 2rem;
}

.wide .bento-image {
    position: absolute;
    bottom: -150px;
    right: 0;
    width: 60%;
    transform: rotate(-6deg);
}

.wide.reverse .bento-content {
    margin-left: auto;
    padding-left: 2rem;
    padding-right: 0;
}

.wide.reverse .bento-image {
    left: -40px;
    right: auto;
    bottom: -80px;
    transform: rotate(6deg);
}

/* Privacy Section */
.privacy {
    padding: 50px 0;
    background: linear-gradient(180deg, var(--bg-color) 0%, rgba(0, 230, 118, 0.03) 50%, var(--bg-color) 100%);
    text-align: center;
}

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

.privacy-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(0, 230, 118, 0.1);
    color: var(--accent-color);
    margin-bottom: 2.5rem;
    box-shadow: 0 0 30px rgba(0, 230, 118, 0.15);
}

.privacy h2 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.privacy p {
    font-size: 1.35rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto;
}

/* Bottom CTA */
.bottom-cta {
    padding: 50px 0 60px;
    text-align: center;
    background-color: var(--surface-color);
    border-top: 1px solid var(--surface-border);
    position: relative;
    overflow: hidden;
}

.bottom-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    opacity: 0.3;
    pointer-events: none;
}

.bottom-cta h2 {
    font-size: 3.5rem;
    margin-bottom: 3rem;
    letter-spacing: -1.5px;
}

.glow-btn {
    font-size: 1.25rem;
    padding: 1.25rem 3rem;
    background-color: var(--accent-color);
    color: #000;
}

.glow-btn:hover {
    background-color: #00c868;
    color: #000;
}

/* Footer */
footer {
    padding: 4rem 0 3rem;
    border-top: 1px solid var(--surface-border);
    background-color: var(--bg-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 1rem;
}

.footer-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.2rem;
    text-transform: uppercase;
    color: var(--text-primary);
    line-height: 1.1;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 2.5rem;
    transition: color 0.3s;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.copyright {
    display: flex;
    align-items: center;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Animations without JS fallback */
@media (prefers-reduced-motion: reduce) {
    .fade-in-up {
        opacity: 1;
        transform: translateY(0);
        transition: none;
    }

    .glow-bg {
        animation: none;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-title {
        font-size: 4.5rem;
    }

    .hero-grid {
        gap: 2rem;
    }

    .floating-phone {
        width: 300px;
    }

    .section-title,
    .bottom-cta h2,
    .privacy h2 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 140px 0 80px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-subtitle {
        margin: 0 auto 2.5rem;
    }

    .hero-cta {
        align-items: center;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: minmax(320px, auto);
    }

    .wide,
    .tall {
        grid-column: span 1;
        grid-row: span 1;
    }

    .wide {
        flex-direction: column;
        padding: 2.5rem;
    }

    .wide .bento-content,
    .wide.reverse .bento-content {
        width: 100%;
        padding: 0;
        margin-bottom: 2.5rem;
        /* create some bottom padding on mobile so content doesn't hit the absolute image */
        padding-bottom: 150px;
    }

    .wide .bento-image,
    .wide.reverse .bento-image {
        position: absolute;
        bottom: -20px;
        right: -20px;
        width: 65%;
        left: unset;
        align-self: unset;
        transform: rotate(5deg) scale(1.05);
    }

    .tall {
        padding-top: 240px;
    }

    .bento-image-top {
        position: absolute;
        top: 2rem;
        left: 2rem;
        right: 2rem;
        height: 200px;
        margin-bottom: 2rem;
        border-radius: 32px;
    }

    .bento-item h3 {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 2.5rem;
        margin-bottom: 3rem;
    }

    .privacy {
        padding: 80px 0;
    }

    .privacy h2 {
        font-size: 2.5rem;
    }

    .bottom-cta {
        padding: 80px 0;
    }

    .bottom-cta h2 {
        font-size: 2.5rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .footer-links a {
        margin: 0 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .logo-text {
        font-size: 1.25rem;
    }

    .navbar .btn-primary {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .floating-phone {
        width: 260px;
    }

    .bento-item {
        padding: 2rem;
    }
    
    .wide .bento-content,
    .wide.reverse .bento-content {
        padding-bottom: 120px;
    }
}