/* Base Styles - Typography, Layout, Responsive */

/* Reset and Box Sizing */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Root Variables */
:root {
    --header-font: 'Amatic SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --body-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    --content-max-width: 1200px;
    --section-padding: clamp(2rem, 6vw, 4rem);
    --container-padding: clamp(1rem, 5vw, 2rem);
}

/* Body */
body {
    font-family: var(--body-font);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

html {
    overflow-x: hidden;
    width: 100%;
}

/* Typography */
h1, h2, h3 {
    font-family: var(--header-font);
    font-weight: 700;
    line-height: 1.1;
}

h1 {
    font-size: clamp(4rem, 12vw, 7rem);
    margin-bottom: 1rem;
}

h2 {
    font-size: clamp(3rem, 8vw, 5rem);
    margin-bottom: 0.75rem;
}

h3 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin-bottom: 0.5rem;
}

p {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Links */
a {
    color: inherit;
    text-decoration: underline;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.8;
}

/* Sections */
section {
    padding: var(--section-padding) var(--container-padding);
    position: relative;
    overflow-x: hidden;
    width: 100%;
}

/* Container */
.container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    width: 100%;
    box-sizing: border-box;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-family: var(--header-font);
    font-size: clamp(1.5rem, 4vw, 2rem);
    text-decoration: none;
    border-radius: 8px;
    transition: transform 0.3s ease, background 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn:hover {
    opacity: 1;
}

/* Video Container */
.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    box-sizing: content-box;
    background: black;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Polaroid Frame */
.polaroid {
    background: white;
    padding: 1rem 1rem 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: inline-block;
}

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

/* Responsive Grid */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Text Alignment */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
    :root {
        --section-padding: clamp(1.5rem, 4vw, 2.5rem);
    }

    h1 {
        font-size: clamp(3.5rem, 10vw, 5rem);
    }

    h2 {
        font-size: clamp(2.75rem, 8vw, 4rem);
    }

    p {
        font-size: clamp(1.125rem, 4vw, 1.375rem);
    }

    .btn {
        font-size: clamp(1.375rem, 4vw, 1.75rem);
        padding: 1rem 1.75rem;
    }

    /* Stack grid layouts on mobile */
    .vibe-section .container {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .vibe-section h2,
    .vibe-section p {
        text-align: center !important;
    }

    .grid,
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr !important;
    }

    /* Ensure no elements cause overflow */
    * {
        max-width: 100%;
    }

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

@media (max-width: 480px) {
    :root {
        --container-padding: 1rem;
    }

    h1 {
        font-size: clamp(2rem, 7vw, 3rem);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Focus States */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
