/* NECTAR Band Website - Styles */
/* Dark & Edgy Rock Aesthetic */

/* ===== CSS Variables ===== */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #252525;
    --accent: #ff6600;
    --accent-hover: #ff8533;
    --text-primary: #f5f5f5;
    --text-muted: #888888;
    --border-color: #333333;
    --shadow: rgba(0, 0, 0, 0.5);
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%; /* Prevent font scaling in landscape on iOS */
}

body {
    font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased; /* Smoother fonts on iOS/macOS */
    -moz-osx-font-smoothing: grayscale;
}

/* iOS/Android touch optimizations */
a, button, .btn, .menu-toggle {
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on iOS */
    touch-action: manipulation; /* Disable double-tap zoom */
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Oswald', 'Impact', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, var(--bg-primary) 0%, rgba(10,10,10,0.95) 100%);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.navbar .logo img {
    height: 50px;
    width: auto;
}

.navbar .logo {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 3px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-primary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: 0.3s;
}

/* ===== Hero Section ===== */
.hero {
    min-height: calc(100vh - 120px); /* Adjusted for ticker above */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--bg-primary) 0%, #1a0a00 50%, var(--bg-primary) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-primary) 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 30px rgba(255, 102, 0, 0.5);
}

.hero .tagline {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 600px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 102, 0, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: var(--bg-primary);
}

/* ===== Sections ===== */
.section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent);
    margin: 1rem auto 0;
}

/* ===== Cards ===== */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow);
    border-color: var(--accent);
}

/* ===== Grid Layouts ===== */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

/* ===== Member Cards ===== */
.member-card {
    text-align: center;
    background: var(--bg-secondary);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.member-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.member-card img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--border-color);
    margin-bottom: 1rem;
    transition: border-color 0.3s ease;
}

.member-card:hover img {
    border-color: var(--accent);
}

.member-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.member-card .role {
    color: var(--accent);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== Video Grid ===== */
.video-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
}

.video-card:hover {
    border-color: var(--accent);
    transform: scale(1.02);
}

.video-card video {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #000;
}

/* Featured video - no cropping */
.video-card.featured video {
    height: auto;
    object-fit: contain;
}

.video-card .video-info {
    padding: 1rem;
}

.video-card h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.video-card .venue {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== Events ===== */
.event-card {
    display: flex;
    gap: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 2rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.event-date {
    text-align: center;
    min-width: 80px;
}

.event-date .day {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.event-date .month {
    font-size: 1rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

.event-details h3 {
    margin-bottom: 0.5rem;
}

.event-details .location {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* ===== Song List ===== */
.song-list {
    list-style: none;
}

.song-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s ease;
}

.song-item:hover {
    background: var(--bg-secondary);
}

.song-item .artist {
    color: var(--accent);
    font-weight: 500;
}

.song-item .title {
    color: var(--text-muted);
}

/* ===== Contact Form ===== */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.footer-section h4 {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.footer-section p,
.footer-section a {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 2;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-primary);
}

/* Newsletter signup */
.newsletter-form {
    display: flex;
    gap: 0.5rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.newsletter-form button {
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    border: none;
    color: var(--bg-primary);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.newsletter-form button:hover {
    background: var(--accent-hover);
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== Page Header (for inner pages) ===== */
.page-header {
    padding: 150px 2rem 4rem;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.page-header h1 {
    margin-bottom: 1rem;
}

.page-header .breadcrumb {
    color: var(--text-muted);
}

.page-header .breadcrumb a {
    color: var(--accent);
}

/* ===== Member Profile Page ===== */
.member-profile {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    align-items: start;
}

.member-profile .photo {
    width: 100%;
    border: 3px solid var(--border-color);
}

.member-profile .bio {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* ===== Karaoke Mode (Easter Egg) ===== */
.karaoke-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: linear-gradient(180deg, #000 0%, #0a0a1a 100%);
}

.karaoke-lyrics {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.5;
    max-width: 900px;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 102, 0, 0.5);
    white-space: pre-line;
}

.karaoke-controls {
    margin-bottom: 2rem;
}

.karaoke-controls select {
    padding: 1rem 2rem;
    font-size: 1.25rem;
    background: var(--bg-secondary);
    border: 2px solid var(--accent);
    color: var(--text-primary);
    cursor: pointer;
}

/* ===== Responsive Design ===== */

/* Large tablets and small laptops (1024px - 1366px) - iPad Pro landscape */
@media (max-width: 1366px) {
    .section {
        padding: 4rem 3rem;
    }
}

/* Tablets (768px - 1024px) - iPad portrait/landscape */
@media (min-width: 768px) and (max-width: 1024px) {
    /* Increase base font size for tablets */
    html {
        font-size: 18px;
    }

    h1 { font-size: 2.75rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.35rem; }

    .hero h1 {
        font-size: 3.25rem;
    }

    .hero .tagline {
        font-size: 1.35rem;
    }

    .section {
        padding: 4rem 3rem;
    }

    .grid-5 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }

    .member-card img {
        width: 180px;
        height: 180px;
    }

    .member-profile {
        grid-template-columns: 280px 1fr;
        gap: 2.5rem;
    }

    .nav-links {
        gap: 1.25rem;
    }

    .nav-links a {
        font-size: 0.85rem;
    }

    .btn {
        padding: 1.1rem 2.25rem;
        font-size: 1.05rem;
    }

    .footer-content {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .video-card video {
        height: 220px;
    }

    .karaoke-lyrics {
        font-size: 2.5rem;
    }
}

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-5 { grid-template-columns: repeat(3, 1fr); }
    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .social-links { justify-content: center; }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        display: none;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .grid-5 {
        grid-template-columns: 1fr;
    }

    .member-profile {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .member-profile .photo {
        max-width: 300px;
        margin: 0 auto;
    }

    .event-card {
        flex-direction: column;
        text-align: center;
    }

    .karaoke-lyrics {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .section {
        padding: 3rem 1rem;
    }

    .newsletter-form {
        flex-direction: column;
    }
}

/* ===== Orientation-based Adjustments ===== */

/* Portrait orientation - taller than wide (phones held upright, tablets in portrait) */
@media (orientation: portrait) {
    .hero {
        min-height: calc(100vh - 150px);
        padding: 3rem 1.5rem;
    }

    .hero-content img {
        max-width: 85vw;
    }
}

/* Landscape orientation - wider than tall */
@media (orientation: landscape) {
    .hero {
        min-height: calc(100vh - 100px);
        padding: 2rem 3rem;
    }

    .hero-content img {
        max-width: 350px;
    }

    /* Optimize for landscape tablets (iPad) */
    @media (min-width: 768px) and (max-width: 1366px) {
        .hero {
            flex-direction: row;
            gap: 3rem;
        }

        .hero-content {
            text-align: left;
        }

        .hero-content > div {
            justify-content: flex-start;
        }

        .grid-5 { grid-template-columns: repeat(5, 1fr); }
        .grid-4 { grid-template-columns: repeat(4, 1fr); }
        .grid-3 { grid-template-columns: repeat(3, 1fr); }
    }
}

/* Tablet portrait mode (768px-1024px in portrait) */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    .hero h1 {
        font-size: 3rem;
    }

    .grid-5 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }

    .member-profile {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .member-profile .photo {
        max-width: 350px;
        margin: 0 auto;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

/* Tablet landscape mode (768px-1366px in landscape) */
@media (min-width: 768px) and (max-width: 1366px) and (orientation: landscape) {
    html {
        font-size: 17px;
    }

    .hero {
        min-height: calc(100vh - 80px);
    }

    .hero h1 {
        font-size: 3.5rem;
    }

    .member-card img {
        width: 140px;
        height: 140px;
    }

    .video-card video {
        height: 180px;
    }
}

/* Handle orientation change smoothly */
@media screen {
    html {
        transition: font-size 0.3s ease;
    }

    .hero, .section, .grid, .member-profile, .footer-content {
        transition: all 0.3s ease;
    }
}

/* During orientation change - prevent flickering on iOS */
body.orientation-changing {
    opacity: 0.99; /* Triggers GPU layer without visible change */
}

body.orientation-changing * {
    transition-duration: 0.1s !important;
}

/* ===== iOS/Android Specific ===== */

/* Prevent zoom on input focus (iOS) - inputs must be 16px+ */
@media (max-width: 768px) {
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* Safe area support for notched phones (iPhone X+, Android) */
@supports (padding: env(safe-area-inset-bottom)) {
    .footer-bottom {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }

    .navbar {
        padding-left: calc(1rem + env(safe-area-inset-left));
        padding-right: calc(1rem + env(safe-area-inset-right));
    }
}

/* Minimum touch target sizes (44x44px recommended) */
@media (max-width: 768px) {
    .btn, button {
        min-height: 44px;
        min-width: 44px;
    }

    .nav-links a {
        padding: 0.75rem 0;
        display: block;
    }

    .social-links a {
        min-width: 44px;
        min-height: 44px;
    }

    .menu-toggle {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Smooth scrolling for iOS */
.nav-links {
    -webkit-overflow-scrolling: touch;
}

/* Fix for iOS video controls */
video::-webkit-media-controls-panel {
    background: rgba(0, 0, 0, 0.5);
}
