:root {
    --bg-primary: #09090B;
    --bg-secondary: #121217;
    --text-heading: #FFFFFF;
    --text-body: rgba(255, 255, 255, 0.70);
    --accent-primary: #00E5FF;
    --accent-secondary: #FFB800;
    --accent-tertiary: #FF007F;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-heading);
    overflow-x: hidden;
}

h1, h2, h3, h4, .section-title, .brand-logo, .cta-button, .nav-links a {
    font-family: var(--font-heading);
}

/* Navbar */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(9, 9, 11, 0.0);
    backdrop-filter: blur(0px);
    transition: all 0.5s ease;
    border-bottom: 1px solid rgba(255,255,255,0);
}

.glass-nav.scrolled {
    background: rgba(18, 18, 23, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

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

.brand-logo {
    display: inline-block;
    width: 200px;
    height: 40px;
    background-image: url('portfolio.jpg');
    /* Scaled up roughly to extract just the top-left logo */
    background-size: 600px auto;
    background-position: -20px -20px;
    background-repeat: no-repeat;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.brand-logo:hover {
    opacity: 0.8;
}

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

.nav-links a {
    color: var(--text-body);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-heading);
}

.cta-button {
    display: inline-block;
    background: transparent;
    color: var(--accent-primary);
    text-decoration: none;
    padding: 0.75rem 1.75rem;
    border-radius: 99px;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid var(--accent-primary);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.15), inset 0 0 10px rgba(0, 229, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.cta-button:hover {
    background: var(--accent-primary);
    color: #000;
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.5);
    transform: translateY(-2px);
}

/* Scroll Container */
.scroll-container {
    height: 600vh;
}

/* Sticky View Fullscreen */
.sticky-view {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    background-color: var(--bg-primary);
}

#sequence-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.bottom-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to top, rgba(9,9,11,1) 0%, rgba(9,9,11,0.8) 40%, rgba(9,9,11,0) 100%);
    z-index: 2;
    pointer-events: none;
}

/* Text Sections Grounded at Bottom */
.text-section {
    position: absolute;
    bottom: 8%;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 5%;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.text-section.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

h1 {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    color: #FFF;
    text-shadow: none; 
}

h2 {
    font-size: 1.25rem;
    font-weight: 400;
    color: rgba(255,255,255,0.9);
    margin-bottom: 1rem;
    text-shadow: none;
}

p {
    font-size: 1.125rem;
    color: var(--text-body);
    line-height: 1.5;
    max-width: 600px;
    text-shadow: none;
}

.actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    h1 { font-size: 2.25rem; }
    .bottom-gradient { height: 60%; }
    .text-section { bottom: 12%; }
}

/* Main Content (Below Scroll Video) */
.main-content {
    position: relative;
    z-index: 20;
    background: var(--bg-primary);
}

.premium-section {
    padding: 8rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.premium-section.alt-bg {
    background: var(--bg-secondary);
    max-width: 100%;
}

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

.section-title {
    font-size: 3rem;
    font-weight: 700;
    color: #FFF;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    text-shadow: none;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-body);
    margin: 0 auto;
    text-align: center;
    text-shadow: none;
}

/* Service Cards */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.service-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 3rem;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s, border-color 0.4s;
}

.service-card:hover {
    transform: translateY(-8px);
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.15);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 1rem;
}

.service-card p {
    text-shadow: none;
    max-width: 100%;
    font-size: 1.1rem;
}

/* Types Grid */
.types-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.type-item h3 {
    color: var(--accent-primary);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}
.type-item p {
    text-shadow: none;
    font-size: 1rem;
}

/* Image Comparison Slider */
.mt-large { margin-top: 4rem; }
.mb-1 { margin-bottom: 1.5rem; }
.text-center { text-align: center; }

.comparison-container {
    max-width: 900px;
    margin: 0 auto;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.comparison-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    background: #000;
    cursor: ew-resize;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    /* Clip to border radius */
    overflow: hidden;
}

.img-after, .img-before {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}

.img-after {
    z-index: 1;
}

.img-before {
    z-index: 2;
    /* initial state 50% */
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}

.comparison-slider img, .placeholder-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    user-drag: none;
    -webkit-user-drag: none;
}

.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 40px;
    height: 100%;
    transform: translateX(-50%);
    z-index: 3;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.handle-line {
    position: absolute;
    width: 2px; height: 100%; background: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.8);
}

.handle-btn {
    width: 40px; height: 40px;
    background: #fff;
    border-radius: 50%;
    color: #000;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    z-index: 2;
}

.label {
    position: absolute;
    bottom: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(0,0,0,0.7);
    color: #fff;
    border-radius: 8px;
    font-size: 0.875rem;
    backdrop-filter: blur(4px);
    z-index: 4;
    border: 1px solid rgba(255,255,255,0.1);
}

.before-label { left: 1rem; }
.after-label { right: 1rem; }

/* Footer */
.footer {
    background: var(--bg-primary);
    padding: 6rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.footer h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-shadow: none;
}
.copyright {
    margin-top: 4rem;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.3);
    text-shadow: none;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-secondary);
    padding: 3rem;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    position: relative;
    border: 1px solid rgba(255,255,255,0.1);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

.modal-overlay.open .modal-content {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-body);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: white;
}

.modal-content h2 {
    margin-bottom: 0.5rem;
    text-shadow: none;
    color: #fff;
}

.modal-p {
    text-shadow: none;
    color: var(--text-body);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

label {
    display: block;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: #fff;
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 0.875rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    font-family: inherit;
    transition: border-color 0.2s, background 0.2s;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255,255,255,0.06);
}

.file-input {
    width: 100%;
    color: var(--text-body);
    font-size: 0.875rem;
}

.file-input::file-selector-button {
    background: rgba(255,255,255,0.1);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    margin-right: 1rem;
    transition: background 0.2s;
}

.file-input::file-selector-button:hover {
    background: rgba(255,255,255,0.2);
}

.submit-btn {
    width: 100%;
    margin-top: 1rem;
    text-align: center;
}
