/* CSS Variables - Based on your existing color scheme */
:root {
    --primary-blue: #1A73E8;
    --primary-green: #34A853;
    --dark-gray: #333333;
    --light-gray: #F4F4F4;
    --white: #ffffff;
    --purple: #8b5cf6;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.2);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--dark-gray);
    background-color: var(--light-gray);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

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

/* Header */
header {
    background-color: var(--primary-blue);
    padding: 20px 0;
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px var(--shadow);
}

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

header .logo {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

header nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

header nav a {
    font-weight: 500;
    font-size: 16px;
    transition: opacity 0.3s ease;
}

header nav a:hover {
    opacity: 0.8;
}

header nav .btn-join {
    background-color: var(--primary-green);
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
}

header nav .btn-join:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 168, 83, 0.3);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #1557b0 100%);
    color: var(--white);
    padding: 100px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect fill="rgba(255,255,255,0.05)" x="0" y="0" width="50" height="50"/><rect fill="rgba(255,255,255,0.05)" x="50" y="50" width="50" height="50"/></svg>');
    opacity: 0.3;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 56px;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 22px;
    margin-bottom: 10px;
    font-weight: 500;
    opacity: 0.95;
}

.hero-description {
    font-size: 18px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
}

.btn-primary, .btn-secondary {
    padding: 16px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-green);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(52, 168, 83, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary-blue);
}

.hero-badges {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.badge {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

/* Portfolio Section */
.portfolio {
    padding: 80px 0;
    background-color: var(--white);
}

.portfolio h2 {
    font-size: 42px;
    margin-bottom: 10px;
    color: var(--primary-blue);
    font-weight: 700;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    font-size: 18px;
    color: #666;
    margin-bottom: 50px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    perspective: 1000px;
}

/* Portfolio Card - Original flip design with overflow fix */
.portfolio-card {
    width: 100%;
    height: 300px;
    position: relative;
    perspective: 1000px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.portfolio-card-inner {
    position: absolute;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    border-radius: 10px;
}

.portfolio-card:hover .portfolio-card-inner {
    transform: rotateY(180deg);
}

.portfolio-card-front,
.portfolio-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
}

.portfolio-card-front {
    background-size: cover;
    background-position: center;
    background-blend-mode: darken;
    background-color: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    flex-direction: column;
}

/* Status pill on front of card */
.status-pill {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
    background-color: var(--primary-green);
    color: var(--white);
}

.status-pill.live {
    background-color: var(--primary-green);
}

.status-pill.active {
    background-color: var(--primary-blue);
}

.status-pill.paused {
    background-color: #9e9e9e;
}

.status-pill.coming-soon {
    background-color: #ff9800;
}

.portfolio-card-front h3 {
    font-size: 22px;
    margin-bottom: 12px;
    margin-top: 20px;
}

.portfolio-card-front p {
    font-size: 16px;
    line-height: 1.5;
    opacity: 0.95;
}

.portfolio-card-front .pulse-dot {
    z-index: 5;
}

/* Coming Soon state - grey out */
.portfolio-card.coming-soon {
    opacity: 0.6;
}

.portfolio-card.coming-soon .portfolio-card-front {
    filter: grayscale(50%);
}

.portfolio-card-back {
    background-color: #1A73E8;
    color: white;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    overflow: hidden;
}

/* Fix for text overflow - constrain the content */
.portfolio-card-back h3 {
    margin-bottom: 15px;
    font-size: 18px;
    flex-shrink: 0;
}

.portfolio-card-back ul {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
    width: 100%;
    max-height: calc(100% - 100px); /* Leave room for title and button */
}

.portfolio-card-back li {
    margin: 8px 0;
    font-size: 14px;
    color: #ffffff;
    display: flex;
    align-items: center;
    text-align: left;
}

.portfolio-card-back input[type="checkbox"] {
    margin-right: 10px;
    flex-shrink: 0;
}

.portfolio-card-back a {
    margin-top: 10px;
    background-color: #34A853;
    padding: 10px 20px;
    color: white;
    border-radius: 5px;
    display: inline-block;
    flex-shrink: 0;
}

.pulse-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    background-color: rgba(52, 168, 83, 0.6);
    border-radius: 50%;
    pointer-events: none;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Ethos Section */
.ethos {
    padding: 80px 0;
    background-color: var(--white);
}

.ethos h2 {
    font-size: 42px;
    margin-bottom: 50px;
    color: var(--primary-blue);
    font-weight: 700;
    text-align: center;
}

.ethos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.ethos-card {
    text-align: center;
    padding: 30px;
    transition: transform 0.3s ease;
}

.ethos-card:hover {
    transform: translateY(-5px);
}

.ethos-icon {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.ethos-card h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--dark-gray);
}

.ethos-card p {
    font-size: 17px;
    line-height: 1.6;
    color: #666;
}

/* About Section */
.about {
    padding: 80px 0;
    background-color: var(--light-gray);
}

.about h2 {
    font-size: 42px;
    margin-bottom: 30px;
    color: var(--primary-blue);
    font-weight: 700;
    text-align: center;
}

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

.about-text p {
    font-size: 18px;
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-text ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.about-text li {
    font-size: 17px;
    margin: 15px 0;
    padding-left: 30px;
    position: relative;
}

.about-text li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-green);
    font-weight: bold;
    font-size: 20px;
}

/* Footer */
footer {
    background-color: var(--dark-gray);
    color: var(--light-gray);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--white);
}

.footer-section h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--white);
    font-weight: 600;
}

.footer-section p {
    margin-bottom: 10px;
    opacity: 0.8;
}

.footer-section a {
    display: block;
    margin-bottom: 10px;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.footer-section a:hover {
    opacity: 1;
    color: var(--primary-green);
    padding-left: 5px;
}

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

.footer-bottom p {
    margin: 10px 0;
    font-size: 14px;
    opacity: 0.7;
}

.footer-bottom a {
    color: var(--primary-green);
    margin: 0 5px;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    header nav {
        gap: 10px;
    }

    header nav a {
        font-size: 13px;
    }

    header .btn-join {
        padding: 8px 16px;
    }

    .hero {
        padding: 60px 0 50px;
    }

    .hero h1 {
        font-size: 36px;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .hero-description {
        font-size: 16px;
    }

    .hero-cta {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .hero-cta .btn-primary,
    .hero-cta .btn-secondary {
        width: 100%;
        text-align: center;
    }

    .badge {
        font-size: 13px;
        padding: 6px 12px;
    }

    .portfolio {
        padding: 60px 0;
    }

    .portfolio h2,
    .about h2,
    .ethos h2 {
        font-size: 32px;
    }

    .section-subtitle {
        font-size: 16px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    /* Show back of card by default on mobile */
    .portfolio-card-inner {
        transform: rotateY(180deg);
    }

    .portfolio-card:hover .portfolio-card-inner {
        transform: rotateY(180deg);
    }

    /* Enable tap to flip on mobile */
    .portfolio-card {
        cursor: pointer;
    }

    /* Larger touch targets for status pills */
    .status-pill {
        padding: 8px 16px;
        font-size: 13px;
    }

    /* Better card button on mobile */
    .portfolio-card-back a {
        padding: 12px 24px;
        font-size: 15px;
        margin-top: 15px;
    }

    .ethos {
        padding: 60px 0;
    }

    .ethos-grid {
        gap: 30px;
    }

    .ethos-card {
        padding: 20px;
    }

    .ethos-card h3 {
        font-size: 22px;
    }

    .ethos-card p {
        font-size: 16px;
    }

    .about {
        padding: 60px 0;
    }

    .about-text p {
        font-size: 16px;
    }

    .about-text li {
        font-size: 16px;
    }

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

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

    header {
        padding: 15px 0;
    }

    header .logo {
        font-size: 20px;
    }

    header nav {
        gap: 8px;
    }

    header nav a {
        font-size: 12px;
    }

    header .btn-join {
        padding: 6px 12px;
        font-size: 12px;
    }

    .hero {
        padding: 50px 0 40px;
    }

    .hero h1 {
        font-size: 28px;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-description {
        font-size: 15px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 14px 28px;
        font-size: 15px;
    }

    .badge {
        font-size: 12px;
        padding: 5px 10px;
    }

    .portfolio,
    .about,
    .ethos {
        padding: 50px 0;
    }

    .portfolio h2,
    .about h2,
    .ethos h2 {
        font-size: 28px;
    }

    .section-subtitle {
        font-size: 15px;
        padding: 0 10px;
    }

    .portfolio-grid {
        gap: 20px;
    }

    .portfolio-card {
        height: 320px; /* Slightly taller for better mobile readability */
    }

    .portfolio-card-back h3 {
        font-size: 17px;
    }

    .portfolio-card-back li {
        font-size: 13px;
    }

    .ethos-card h3 {
        font-size: 20px;
    }

    .ethos-card p {
        font-size: 15px;
    }

    .about-text p {
        font-size: 15px;
    }

    .about-text li {
        font-size: 15px;
    }

    footer {
        padding: 40px 0 20px;
    }

    .footer-section h3 {
        font-size: 20px;
    }

    .footer-section h4 {
        font-size: 16px;
    }
}
