/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    font-family: Arial, sans-serif;
    color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Wrapper for Sticky Footer Layout */
.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
header {
    background-color: #222;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

/* Make the site title fluid */
header h1 {
    font-size: clamp(1.1rem, 2.2vw + 0.5rem, 1.8rem);
    margin-left: 0.5rem;
    line-height: 1;
}

/* Nav layout - uses flexible wrapping */
nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* link appearance */
nav a {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    transition: color 0.25s ease, transform 0.15s ease;
    display: inline-block;
    font-size: 0.95rem;
}

nav a:hover {
    color: #1abc9c;
    transform: translateY(-2px);
}

/* Navbar Button Style */
.navbar-button {
    background: transparent;
    border: 2px solid #1abc9c;
    color: #1abc9c;
    padding: 6px 14px;
    border-radius: 20px;
    transition: all 0.25s ease;
    margin-left: 12px;
    font-size: 0.95rem;
}

/* Make the hover state accessible */
.navbar-button:hover {
    background-color: #1abc9c;
    color: #fff;
}

/* Main Section with Background Image */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
    background: url('https://pikwizard.com/pw/medium/84b3c53afa2eb573eda03dcb100c0b57.jpg') no-repeat center center;
    background-size: cover;
    /* background-attachment: fixed;  -- disabled on small screens via media queries below */
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
    min-height: 60vh;
}

main h2 {
    font-size: clamp(1.3rem, 3vw + 0.4rem, 2rem);
    margin-bottom: 0.75rem;
}

main p {
    font-size: clamp(1rem, 1.2vw + 0.6rem, 1.2rem);
    max-width: 720px;
    margin: 0.5rem auto 1rem;
}

/* Hero paragraph */
.hero {
    font-size: clamp(0.95rem, 1.1vw + 0.5rem, 1.125rem);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto 20px auto;
}

/* Call to Action Button */
.cta-button {
    display: inline-block;
    background-color: #4caf50;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 8px;
    margin-top: 20px;
    transition: background-color 0.25s ease, transform 0.12s ease;
    font-size: 1rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.cta-button:hover {
    background-color: #45a049;
    transform: translateY(-3px);
}

/* Footer */
footer {
    background-color: #eee;
    color: #333;
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
}

/* Small utility spacing on nav items for touch targets */
nav a,
.navbar-button {
    border-radius: 8px;
}

/* Responsive rules */
@media (max-width: 1024px) {
    header {
        padding: 0.9rem 1rem;
    }

    nav a,
    .navbar-button {
        font-size: 0.95rem;
        padding: 9px 10px;
    }
}

/* Tablet & mobile: stack nav into a column and center buttons */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
        padding: 0.75rem;
    }

    /* site title centered on smaller screens */
    header h1 {
        margin-left: 0;
        text-align: center;
    }

    nav {
        justify-content: center;
        gap: 8px;
        padding-bottom: 6px;
    }

    /* Make nav links and buttons more touch-friendly */
    nav a {
        padding: 10px 14px;
        font-size: 1rem;
    }

    .navbar-button {
        margin-left: 0;
        border-radius: 12px;
        padding: 10px 14px;
    }

    /* CTA becomes more prominent and wider on tablets */
    .cta-button {
        padding: 14px 26px;
        font-size: 1.05rem;
    }
}

/* Mobile: center everything and make CTAs full width */
@media (max-width: 480px) {
    header {
        padding: 0.6rem 0.75rem;
    }

    /* Center and enlarge title for readability */
    header h1 {
        font-size: clamp(1rem, 4.5vw, 1.25rem);
    }

    /* stack nav vertically */
    nav {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    nav a {
        width: 100%;
        max-width: 340px;
        text-align: center;
        padding: 12px 14px;
        font-size: 1rem;
    }

    /* Make the navbar button span the width, remove left margin */
    .navbar-button {
        display: block;
        width: 100%;
        max-width: 340px;
        margin-left: 0;
        padding: 12px 16px;
        border-radius: 12px;
    }

    /* CTA button full width and easier to tap */
    .cta-button {
        display: block;
        width: 100%;
        max-width: 360px;
        margin-left: auto;
        margin-right: auto;
        padding: 14px 18px;
        border-radius: 10px;
        font-size: 1.05rem;
    }

    /* Turn off background-attachment fixed on mobile (improves performance & avoids bugs) */
    main {
        background-attachment: scroll;
        padding: 1.25rem;
    }

    main p,
    .hero {
        padding: 0 0.5rem;
    }
}

/* Accessibility: focus states */
a:focus,
button:focus {
    outline: 3px solid rgba(26, 188, 156, 0.25);
    outline-offset: 2px;
}