/* ========================================
   Salvador the Brown - Portfolio Site
   Editorial Modern Design System
   ======================================== */

:root {
    --bg-primary: #0c0c0c;
    --bg-surface: #161616;
    --bg-elevated: #1e1e1e;
    --text-primary: #f0ebe3;
    --text-secondary: #8a8580;
    --text-muted: #5a5754;
    --accent: #e85d3a;
    --accent-gold: #c9a962;
    --accent-gold-dim: rgba(201, 169, 98, 0.15);
    --border: rgba(240, 235, 227, 0.08);
    --border-accent: rgba(232, 93, 58, 0.3);

    --font-display: 'Outfit', sans-serif;
    --font-body: 'DM Sans', sans-serif;

    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 3rem);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s var(--ease-out);
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 8vw, 5rem); }
h2 { font-size: clamp(2rem, 5vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

/* ========================================
   Header / Navigation
   ======================================== */

#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(12, 12, 12, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem clamp(1.5rem, 5vw, 3rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s var(--ease-out);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-cta {
    background: var(--accent);
    color: var(--bg-primary) !important;
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    font-weight: 600 !important;
}

.nav-cta:hover {
    background: #d14f2e;
    color: var(--bg-primary) !important;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s var(--ease-out);
    transform-origin: center;
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8rem 2rem 4rem;
    position: relative;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(232, 93, 58, 0.08) 0%, transparent 50%),
        var(--bg-primary);
}

.hero-content {
    text-align: center;
    max-width: 800px;
}

.hero h1 {
    margin-bottom: 1.5rem;
    animation: fadeUp 0.8s var(--ease-out) both;
}

.hero-sub {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    animation: fadeUp 0.8s var(--ease-out) 0.1s both;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeUp 0.8s var(--ease-out) 0.2s both;
}

.hero-scroll-hint {
    position: absolute;
    bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    animation: fadeUp 0.8s var(--ease-out) 0.4s both;
}

.hero-scroll-hint svg {
    animation: bounce 2s infinite;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s var(--ease-out);
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: #d14f2e;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(232, 93, 58, 0.25);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-surface);
    border-color: var(--text-muted);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ========================================
   Section Headers
   ======================================== */

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 1rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   Work / Portfolio Section
   ======================================== */

.work-section {
    padding: 8rem 0;
    background: var(--bg-primary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.project-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.35s var(--ease-out);
}

.project-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.project-card-wide {
    grid-column: span 2;
}

.project-preview {
    aspect-ratio: 16 / 9;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border);
}

.project-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-surface) 100%);
}

.project-icon {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
    opacity: 0.6;
}

.project-info {
    padding: 1.75rem;
}

.project-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    background: rgba(232, 93, 58, 0.1);
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.project-info h3 {
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.project-info p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
}

.project-link:hover {
    color: var(--accent-gold);
}

.project-link svg {
    transition: transform 0.2s var(--ease-out);
}

.project-link:hover svg {
    transform: translate(2px, -2px);
}

/* ========================================
   Services Section
   ======================================== */

.services-section {
    padding: 8rem 0;
    background: var(--bg-surface);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 5rem;
}

.service-card {
    padding: 2.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s var(--ease-out);
}

.service-card:hover {
    border-color: var(--accent-gold);
    transform: translateY(-4px);
}

.service-number {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-gold);
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.service-card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Services Compare */
.services-compare {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.compare-column {
    padding: 2.5rem;
    border-radius: 12px;
}

.compare-them {
    background: var(--bg-primary);
    border: 1px solid var(--border);
}

.compare-me {
    background: var(--accent-gold-dim);
    border: 1px solid rgba(201, 169, 98, 0.3);
}

.compare-column h4 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.compare-column ul {
    list-style: none;
}

.compare-column li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.compare-them li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

.compare-me li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-gold);
    font-weight: 600;
}

.compare-me li {
    color: var(--text-primary);
}

/* ========================================
   About Section
   ======================================== */

.about-section {
    padding: 8rem 0;
    background: var(--bg-primary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    margin-bottom: 1.5rem;
}

.about-text p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stat {
    padding: 2rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-align: center;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

/* ========================================
   Contact Section
   ======================================== */

.contact-section {
    padding: 8rem 0;
    background: var(--bg-surface);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h2 {
    margin-bottom: 1rem;
}

.contact-info > p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-method {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: color 0.2s var(--ease-out);
}

.contact-method:hover {
    color: var(--accent);
}

.contact-method svg {
    flex-shrink: 0;
}

/* Contact Form */
.contact-form {
    background: var(--bg-primary);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color 0.2s var(--ease-out);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238a8580' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-note {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

/* ========================================
   Footer
   ======================================== */

.footer {
    padding: 4rem 0 2rem;
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.footer-brand p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.footer-bottom p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card-wide {
        grid-column: span 1;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-stats {
        flex-direction: row;
    }

    .stat {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        z-index: 999;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    .nav-cta {
        margin-top: 1rem;
        font-size: 1rem !important;
    }

    .mobile-menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero {
        padding: 7rem 1.5rem 3rem;
    }

    .services-compare {
        grid-template-columns: 1fr;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .about-stats {
        flex-direction: column;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .service-card,
    .contact-form {
        padding: 1.75rem;
    }

    .stat {
        padding: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }
}

/* ========================================
   Form States & Animations
   ======================================== */

.btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.form-success {
    text-align: center;
    padding: 3rem;
}

.form-success h3 {
    color: var(--accent-gold);
    margin-bottom: 1rem;
}

.form-success p {
    color: var(--text-secondary);
}

/* ========================================
   Scroll Reveal Animations
   ======================================== */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--ease-out);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animations for grids */
.project-card,
.service-card,
.stat {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s var(--ease-out);
}

.project-card.visible,
.service-card.visible,
.stat.visible {
    opacity: 1;
    transform: translateY(0);
}
