/* ============================================
   ONE PIECE - The Grand Adventure
   Theme Stylesheet
   ============================================ */

/* --- CSS Variables / Color Palette --- */
:root {
    --op-red: #e63946;
    --op-dark-red: #c1121f;
    --op-gold: #f4a261;
    --op-yellow: #e9c46a;
    --op-blue: #3a86ff;
    --op-dark-blue: #1d3557;
    --op-teal: #2a9d8f;
    --op-dark: #0d1b2a;
    --op-darker: #070f1a;
    --op-brown: #6b3a2a;
    --op-white: #f8f9fa;
    --op-cream: #fff8e7;
    --op-gray: #6c757d;
    --op-light: #e0e1dd;

    --font-display: 'Pirata One', cursive;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --transition: all 0.3s ease;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.15);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.2);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.3);

    --radius: 12px;
    --radius-lg: 24px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--op-dark);
    color: var(--op-white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 14px 36px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--op-red), var(--op-dark-red));
    color: var(--op-white);
    box-shadow: 0 4px 20px rgba(230, 57, 70, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(230, 57, 70, 0.6);
}

.btn-full {
    width: 100%;
}

/* --- Section Shared Styles --- */
.section {
    padding: 100px 0;
    position: relative;
}

.section:nth-child(even) {
    background: var(--op-darker);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    color: var(--op-gold);
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.3);
}

.section-desc {
    max-width: 600px;
    margin: 0 auto;
    color: var(--op-gray);
    font-size: 1.1rem;
}

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 16px 0 24px;
}

.divider::before,
.divider::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--op-gold), transparent);
}

.divider-icon {
    font-size: 1.8rem;
    animation: float 3s ease-in-out infinite;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 12px 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(13, 27, 42, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
    padding: 8px 0;
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--op-white);
}

.logo-icon {
    font-size: 2rem;
    animation: sway 2s ease-in-out infinite;
}

.logo-text {
    background: linear-gradient(135deg, var(--op-gold), var(--op-yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 8px 18px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--op-light);
    border-radius: 50px;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--op-gold);
    background: rgba(244, 162, 97, 0.1);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 28px;
    height: 2px;
    background: var(--op-white);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: linear-gradient(135deg, var(--op-darker) 0%, var(--op-dark-blue) 50%, var(--op-darker) 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(230, 57, 70, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(58, 134, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 0%, rgba(244, 162, 97, 0.08) 0%, transparent 50%);
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(4rem, 12vw, 10rem);
    color: var(--op-white);
    text-transform: uppercase;
    letter-spacing: 8px;
    text-shadow:
        3px 3px 0 var(--op-red),
        6px 6px 0 rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease-out;
    line-height: 1.1;
}

.hero-subtitle {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 3vw, 2rem);
    color: var(--op-gold);
    margin: 16px 0 12px;
    letter-spacing: 6px;
    text-transform: uppercase;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-desc {
    max-width: 600px;
    margin: 0 auto 32px;
    font-size: 1.1rem;
    color: var(--op-light);
    opacity: 0.8;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero .btn {
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-badge {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 40px;
    animation: fadeInUp 1s ease-out 0.8s both;
}

.badge-item {
    font-size: 2rem;
    opacity: 0.5;
    animation: float 4s ease-in-out infinite;
}

.badge-item:nth-child(2) { animation-delay: 0.5s; }
.badge-item:nth-child(3) { animation-delay: 1s; }

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--op-gray);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: fadeInUp 1s ease-out 1s both;
}

.scroll-arrow {
    font-size: 1.5rem;
    animation: bounce 2s ease-in-out infinite;
}

/* ============================================
   ABOUT
   ============================================ */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    margin-bottom: 16px;
    font-size: 1.05rem;
    color: var(--op-light);
    line-height: 1.8;
}

.about-text strong {
    color: var(--op-gold);
}

.stats {
    display: flex;
    gap: 30px;
    margin-top: 32px;
    padding: 24px;
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.05);
}

.stat {
    text-align: center;
    flex: 1;
}

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--op-gold);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--op-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.about-image .image-frame {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-image .image-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid rgba(244, 162, 97, 0.3);
    border-radius: var(--radius-lg);
    z-index: 1;
    transition: var(--transition);
}

.about-image .image-frame:hover::before {
    border-color: var(--op-gold);
}

.about-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.about-image .image-frame:hover img {
    transform: scale(1.05);
}

/* ============================================
   CREW CARDS
   ============================================ */
.crew-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.crew-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.crew-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--op-red), var(--op-gold), var(--op-blue));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.crew-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: rgba(244, 162, 97, 0.3);
}

.crew-card:hover::before {
    transform: scaleX(1);
}

.card-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--op-red);
    color: var(--op-white);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-img {
    margin-bottom: 16px;
}

.char-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--char-color, var(--op-teal));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 0 30px rgba(255,255,255,0.05);
    transition: var(--transition);
}

.crew-card:hover .char-avatar {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 40px rgba(255,255,255,0.1);
}

.avatar-emoji {
    font-size: 2.8rem;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

.card-name {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--op-white);
    margin-bottom: 4px;
}

.card-bounty {
    font-size: 0.8rem;
    color: var(--op-gray);
    margin-bottom: 12px;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--op-light);
    opacity: 0.7;
    margin-bottom: 16px;
    line-height: 1.5;
}

.card-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.card-skills span {
    background: rgba(255,255,255,0.06);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--op-gold);
    border: 1px solid rgba(244, 162, 97, 0.2);
}

/* ============================================
   TIMELINE (ARCS)
   ============================================ */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--op-red), var(--op-gold), var(--op-blue));
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 40px;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 40px;
    text-align: left;
}

.timeline-dot {
    position: absolute;
    top: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--op-gold);
    border: 3px solid var(--op-dark);
    box-shadow: 0 0 0 3px var(--op-gold);
    z-index: 2;
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -8px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -8px;
}

.timeline-saga {
    display: inline-block;
    background: var(--op-red);
    color: var(--op-white);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.timeline-content h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--op-white);
    margin-bottom: 8px;
}

.timeline-content p {
    font-size: 0.9rem;
    color: var(--op-light);
    opacity: 0.7;
    line-height: 1.6;
}

.timeline-content {
    background: rgba(255,255,255,0.03);
    padding: 20px 24px;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition);
}

.timeline-content:hover {
    border-color: rgba(244, 162, 97, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* ============================================
   GALLERY
   ============================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.8));
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay span {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--op-white);
    letter-spacing: 1px;
}

/* ============================================
   JOIN / FORM
   ============================================ */
.join-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.join-text p {
    font-size: 1.05rem;
    color: var(--op-light);
    opacity: 0.8;
    margin-bottom: 24px;
    line-height: 1.8;
}

.join-benefits {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.join-benefits li {
    font-size: 1rem;
    color: var(--op-light);
    padding: 10px 16px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    transition: var(--transition);
    border-left: 3px solid var(--op-gold);
}

.join-benefits li:hover {
    background: rgba(255,255,255,0.06);
    transform: translateX(4px);
}

.join-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    width: 100%;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: var(--op-white);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--op-gold);
    background: rgba(255,255,255,0.08);
    box-shadow: 0 0 0 3px rgba(244, 162, 97, 0.15);
}

.form-input::placeholder {
    color: var(--op-gray);
}

.form-input option {
    background: var(--op-dark);
    color: var(--op-white);
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--op-darker);
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--op-gold);
    letter-spacing: 2px;
}

.footer-desc {
    color: var(--op-gray);
    font-size: 0.9rem;
    margin-top: 8px;
    line-height: 1.6;
}

.footer-links h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--op-white);
    margin-bottom: 16px;
}

.footer-links ul li {
    margin-bottom: 8px;
}

.footer-links ul li a {
    color: var(--op-gray);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--op-gold);
}

.footer-quote blockquote {
    font-style: italic;
    color: var(--op-light);
    opacity: 0.7;
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-quote cite {
    display: block;
    margin-top: 8px;
    color: var(--op-gold);
    font-style: normal;
    font-weight: 500;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--op-gray);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes sway {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    75% { transform: rotate(-5deg); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* ============================================
   SCROLL ANIMATIONS (on reveal)
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .about-grid,
    .join-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .hero-title {
        font-size: clamp(3rem, 10vw, 6rem);
    }
}

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }

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

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(13, 27, 42, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 16px;
        transition: right 0.4s ease;
        box-shadow: -10px 0 30px rgba(0,0,0,0.3);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-link {
        font-size: 1.1rem;
        padding: 12px 24px;
    }

    .hamburger {
        display: flex;
    }

    /* Timeline mobile */
    .timeline::before {
        left: 20px;
    }

    .timeline-item,
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0;
        width: 100%;
        padding-left: 50px;
        padding-right: 0;
        text-align: left;
    }

    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        left: 12px;
        right: auto;
    }

    .timeline-item:nth-child(odd) .timeline-content {
        text-align: left;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats {
        flex-direction: column;
        gap: 16px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-quote {
        grid-column: 1;
    }

    .hero-subtitle {
        letter-spacing: 3px;
    }
}

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

    .section-title {
        font-size: 2rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .crew-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        letter-spacing: 4px;
    }
}
