/* ========================================
   BEARGE - CU Boulder Engineering Project
   Dark Forest Green Theme
   ======================================== */

/* CSS Variables */
:root {
    --primary-dark: #1a3a2a;
    --primary-medium: #2d5a45;
    --primary-light: #3d7a5f;
    --accent: #4a9d6e;
    --cream: #f5f2eb;
    --cream-dark: #e8e4d9;
    --white: #ffffff;
    --text-light: #f5f2eb;
    --text-dark: #1a3a2a;
    --overlay: rgba(26, 58, 42, 0.85);
    --shadow: rgba(0, 0, 0, 0.15);
    --transition: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--primary-dark);
    color: var(--text-light);
    line-height: 1.7;
    font-size: 16px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
    color: var(--cream-dark);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--cream);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--primary-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition);
}

.nav.scrolled {
    background: rgba(26, 58, 42, 0.98);
    box-shadow: 0 4px 30px var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cream);
    letter-spacing: 0.1em;
}

.nav-logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--cream-dark);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 0;
    position: relative;
    transition: color var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--cream);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Mobile Menu */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--cream);
    transition: all var(--transition);
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--primary-dark);
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding: 2rem 0;
        transform: translateY(-150%);
        opacity: 0;
        transition: all var(--transition);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 1rem;
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 70px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

.hero-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 58, 42, 0.9), rgba(26, 58, 42, 0.7));
}

.hero-content {
    text-align: center;
    max-width: 900px;
    padding: 2rem;
    animation: fadeInUp 1s ease;
}

.hero-badge {
    display: inline-block;
    background: rgba(74, 157, 110, 0.2);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.hero h1 {
    color: var(--white);
    margin-bottom: 1rem;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--cream-dark);
    margin-bottom: 2rem;
    font-weight: 300;
}

/* Page Hero (smaller) */
.page-hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 70px;
}

.page-hero .hero-background::after {
    background: linear-gradient(135deg, rgba(26, 58, 42, 0.95), rgba(26, 58, 42, 0.85));
}

.page-hero h1 {
    color: var(--white);
    text-align: center;
}

/* Placeholder Images */
.placeholder-image {
    background: linear-gradient(135deg, var(--primary-medium), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.placeholder-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 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.05'%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");
    opacity: 0.5;
}

.placeholder-image .placeholder-text {
    position: relative;
    z-index: 1;
    color: var(--cream-dark);
    font-size: 0.9rem;
    max-width: 300px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    padding: 1.5rem;
    border-radius: 8px;
    background: rgba(26, 58, 42, 0.5);
}

.placeholder-image .placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.hero-background.placeholder-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Sections */
section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

.section-header p {
    max-width: 700px;
    margin: 0 auto;
}

.section-divider {
    width: 60px;
    height: 3px;
    background: var(--accent);
    margin: 1.5rem auto 0;
}

/* Philosophy Section */
.philosophy {
    background: linear-gradient(180deg, var(--primary-dark) 0%, rgba(45, 90, 69, 0.3) 100%);
}

.philosophy-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.philosophy-content p {
    font-size: 1.1rem;
    line-height: 1.9;
}

/* Two Column Layout */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.two-col.reverse {
    direction: rtl;
}

.two-col.reverse > * {
    direction: ltr;
}

.two-col-image {
    box-shadow: 0 20px 60px var(--shadow);
}

.two-col-content h3 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
    .two-col,
    .two-col.reverse {
        grid-template-columns: 1fr;
        gap: 2rem;
        direction: ltr;
    }
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.card {
    background: rgba(45, 90, 69, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    transition: all var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    background: rgba(45, 90, 69, 0.5);
    box-shadow: 0 20px 40px var(--shadow);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent), var(--primary-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.card h4 {
    color: var(--white);
    margin-bottom: 1rem;
}

.card p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Challenge Cards */
.challenge-card {
    text-align: center;
}

.challenge-card .card-icon {
    margin: 0 auto 1.5rem;
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, var(--primary-medium), var(--primary-dark));
    text-align: center;
}

.cta h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

.cta p {
    margin-bottom: 2rem;
}

.cta-contact {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.cta-contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--cream-dark);
}

.cta-contact-item svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

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

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

.btn-primary:hover {
    background: var(--primary-light);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(74, 157, 110, 0.3);
}

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

.btn-outline:hover {
    background: var(--cream);
    color: var(--primary-dark);
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.2);
    padding: 3rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--cream-dark);
    font-size: 0.9rem;
}

.footer-item svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
}

.footer-copy {
    color: rgba(245, 242, 235, 0.5);
    font-size: 0.85rem;
}

/* Prototypes Page */
.prototype-section {
    padding: 4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.prototype-section:last-of-type {
    border-bottom: none;
}

.prototype-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.prototype-image {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 40px var(--shadow);
}

.prototype-description {
    background: rgba(45, 90, 69, 0.2);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
}

.prototype-description p {
    font-size: 1.05rem;
    margin-bottom: 0;
}

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

.feedback-card {
    background: rgba(45, 90, 69, 0.3);
    border-radius: 12px;
    padding: 2rem;
    border-left: 4px solid var(--accent);
}

.feedback-card h4 {
    color: var(--white);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feedback-card h4 svg {
    color: var(--accent);
}

.feedback-card p {
    margin-bottom: 0;
}

.next-steps {
    background: linear-gradient(135deg, rgba(74, 157, 110, 0.2), rgba(45, 90, 69, 0.3));
    border-radius: 12px;
    padding: 3rem;
    margin-top: 4rem;
}

.next-steps h3 {
    color: var(--white);
    margin-bottom: 1.5rem;
    text-align: center;
}

.next-steps ol {
    max-width: 800px;
    margin: 0 auto;
    padding-left: 1.5rem;
}

.next-steps li {
    margin-bottom: 2rem;
    color: var(--cream-dark);
    line-height: 1.8;
}

.next-steps li strong {
    color: var(--white);
}

.meeting-note {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-style: italic;
    color: var(--accent);
}

/* Team Page */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.team-card {
    background: rgba(45, 90, 69, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all var(--transition);
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px var(--shadow);
}

.team-card-image {
    aspect-ratio: 1;
    overflow: hidden;
}

.team-card-info {
    padding: 1.5rem;
    text-align: center;
}

.team-card-info h4 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.team-card-info p {
    color: var(--cream-dark);
    font-size: 0.9rem;
    margin-bottom: 0;
}

.client-section {
    padding-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.client-card {
    max-width: 500px;
    margin: 0 auto;
}

/* Scroll Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.6s; }

.stagger-children.visible > * {
    opacity: 1;
    transform: translateY(0);
}

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

/* Image sizing inside containers */
.two-col-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

.prototype-image img {
    width: 100%;
    height: auto;
    display: block;
    background: #f8f8f8;
    border-radius: 12px;
}

/* Name-only team cards */
.team-card-name-only {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.team-card-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--primary-medium));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
}

/* Performance Table */
.performance-table-wrapper {
    background: rgba(45, 90, 69, 0.2);
    border-radius: 12px;
    padding: 2.5rem;
    margin-bottom: 3rem;
    overflow-x: auto;
}

.performance-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.performance-table th,
.performance-table td {
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
}

.performance-table th {
    background: rgba(74, 157, 110, 0.25);
    color: var(--white);
    padding: 0.85rem 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
}

.performance-table td {
    padding: 0.85rem 1.5rem;
    color: var(--cream-dark);
}

.performance-table tr:hover td {
    background: rgba(74, 157, 110, 0.08);
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.validated {
    background: rgba(74, 157, 110, 0.2);
    color: var(--accent);
    border: 1px solid var(--accent);
}

.status-badge.invalidated {
    background: rgba(180, 60, 60, 0.2);
    color: #e07070;
    border: 1px solid #e07070;
}

/* Print Guide Page */
.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.material-card {
    background: rgba(45, 90, 69, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.75rem;
    transition: all var(--transition);
}

.material-card:hover {
    transform: translateY(-4px);
    background: rgba(45, 90, 69, 0.5);
    box-shadow: 0 16px 40px var(--shadow);
}

.material-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--accent), var(--primary-light));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.material-card h4 {
    color: var(--white);
    margin-bottom: 0.75rem;
}

.material-card p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.material-tag {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(74, 157, 110, 0.2);
    color: var(--accent);
    border: 1px solid var(--accent);
}

.material-tag.optional {
    background: rgba(255, 255, 255, 0.08);
    color: var(--cream-dark);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Steps */
.steps-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 860px;
    margin: 0 auto;
}

.step-card {
    display: flex;
    gap: 2rem;
    background: rgba(45, 90, 69, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2rem 2.5rem;
    transition: all var(--transition);
}

.step-card:hover {
    background: rgba(45, 90, 69, 0.35);
    border-color: rgba(74, 157, 110, 0.3);
}

.step-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    opacity: 0.6;
    line-height: 1;
    min-width: 52px;
    padding-top: 0.25rem;
    font-variant-numeric: tabular-nums;
}

.step-content h3 {
    color: var(--white);
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.step-content p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.step-content p:last-child {
    margin-bottom: 0;
}

.step-tip {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    background: rgba(74, 157, 110, 0.12);
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--cream-dark);
    margin-top: 0.5rem;
}

.step-tip.success {
    background: rgba(74, 157, 110, 0.18);
    border-left-color: var(--accent);
    color: var(--cream);
}

.step-tip svg {
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 2px;
}

/* Print Settings Grid */
.print-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.print-setting {
    background: rgba(26, 58, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.setting-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    font-weight: 600;
}

.setting-value {
    font-size: 0.95rem;
    color: var(--white);
    font-weight: 500;
}

/* Print CTA */
.print-cta {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.print-cta h3 {
    color: var(--white);
    margin-bottom: 1rem;
}

.print-cta p {
    margin-bottom: 2rem;
}

@media (max-width: 640px) {
    .step-card {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1.5rem;
    }

    .step-number {
        font-size: 1.75rem;
        min-width: unset;
    }

    .print-settings-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Utility */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-4 { margin-top: 4rem; }
.mb-4 { margin-bottom: 4rem; }

/* Icons (using inline SVGs for simplicity) */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
