/* ============================================
   RIPOSTE VISUAL — Cinematic Dark Theme
   Color: Dark Single Accent (Red #C70000)
   Fonts: DM Sans + Fraunces + Space Mono
   ============================================ */

:root {
    --bg: #0a0a0a;
    --bg-elevated: #141414;
    --text: #e8e8e8;
    --text-muted: #999999;
    --accent: #C70000;
    --accent-light: #EB0202;
    --accent-dim: rgba(199, 0, 0, 0.15);
    --border: rgba(255, 255, 255, 0.08);
    --font-display: 'Fraunces', serif;
    --font-body: 'DM Sans', sans-serif;
    --font-mono: 'Space Mono', monospace;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

@media (min-width: 768px) {
    .container { padding: 0 48px; }
}

/* Grain Overlay */
.grain-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
    mix-blend-mode: overlay;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: background 0.4s ease, padding 0.4s ease;
}

.nav.scrolled {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

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

@media (min-width: 768px) {
    .nav-inner { padding: 0 48px; }
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1001;
}

.nav-logo-mark {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--accent);
    color: var(--accent);
    transition: all 0.3s ease;
}

.nav-logo:hover .nav-logo-mark {
    background: var(--accent);
    color: var(--bg);
}

.nav-logo-text {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.2em;
    color: var(--text);
}

.nav-links {
    display: none;
    gap: 32px;
    align-items: center;
}

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

.nav-link {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--text);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link--cta {
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 8px 20px;
    transition: all 0.3s ease;
}

.nav-link--cta::after {
    display: none;
}

.nav-link--cta:hover {
    background: var(--accent);
    color: var(--bg);
}

.nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 8px;
}

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

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s ease;
}

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

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

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

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 999;
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: clip-path 0.8s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-overlay.active {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.menu-inner {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 24px;
}

.menu-link {
    font-family: var(--font-mono);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    letter-spacing: 0.1em;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-link:hover {
    -webkit-text-stroke: 1px var(--text);
    color: var(--text);
}

.menu-link-num {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent);
    letter-spacing: 0.1em;
    -webkit-text-stroke: 0;
}

/* ============================================
   HERO
   ============================================ */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-images {
    position: absolute;
    inset: 0;
}

.hero-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 1.2s ease, transform 8s ease;
}

.hero-img--1 {
    opacity: 1;
    transform: scale(1);
}

.hero-img.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(10, 10, 10, 0.78) 0%,
        rgba(10, 10, 10, 0.75) 40%,
        rgba(10, 10, 10, 0.92) 100%
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 0 24px;
}

.hero-text-phase {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    max-width: 900px;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-text-phase.active {
    opacity: 1;
}

.hero-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 6px 16px;
    margin-bottom: 24px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    color: #FFFFFF;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.4);
}

.hero-cta {
    display: inline-block;
    margin-top: 32px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text);
    border: 1px solid var(--text);
    padding: 14px 40px;
    transition: all 0.3s ease;
}

.hero-cta:hover {
    background: var(--text);
    color: var(--bg);
}

.hero-scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.hero-scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--text-muted));
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
    100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

/* ============================================
   SECTION COMMON
   ============================================ */
.section {
    padding: 100px 0;
    position: relative;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--text);
}

/* ============================================
   SERVICES
   ============================================ */
.section--services {
    background: var(--bg);
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 60px;
}

@media (min-width: 768px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}

.service-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    padding: 40px 32px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

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

.service-card:hover {
    border-color: rgba(199, 0, 0, 0.3);
    transform: translateY(-4px);
}

.service-card-icon {
    color: var(--accent);
    margin-bottom: 24px;
}

.service-card-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--text);
}

.service-card-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ============================================
   WORK
   ============================================ */
.section--work {
    background: var(--bg-elevated);
}

.work-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 60px;
}

@media (min-width: 768px) {
    .work-grid { grid-template-columns: repeat(3, 1fr); }
}

.work-card {
    position: relative;
    overflow: hidden;
}

.work-card-img {
    height: 400px;
    background-size: cover;
    background-position: center;
    filter: grayscale(50%) brightness(0.7);
    transition: filter 0.6s ease, transform 0.6s ease;
}

.work-card:hover .work-card-img {
    filter: grayscale(0%) brightness(1);
    transform: scale(1.05);
}

.work-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 32px;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.9) 0%, transparent 60%);
    transition: background 0.4s ease;
}

.work-card-tag {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
}

.work-card-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 8px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.work-card-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* ============================================
   ABOUT
   ============================================ */
.section--about {
    background: var(--bg);
}

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

@media (min-width: 768px) {
    .about-grid { grid-template-columns: 1.2fr 1fr; }
}

.about-text {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-top: 20px;
}

.about-stats {
    display: flex;
    gap: 48px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.stat-num {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 8px;
    display: block;
}

.about-visual {
    position: relative;
}

.about-img {
    height: 500px;
    background-size: cover;
    background-position: center;
    filter: grayscale(40%) brightness(0.8);
    transition: filter 0.6s ease;
}

.about-img:hover {
    filter: grayscale(0%) brightness(1);
}

/* ============================================
   CTA SECTION
   ============================================ */
.section--cta {
    background: var(--accent);
    text-align: center;
    padding: 80px 0;
}

.cta-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    color: #FFFFFF;
    line-height: 1.15;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.cta-text {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 20px auto 32px;
    line-height: 1.7;
}

.cta-btn {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    background: #FFFFFF;
    padding: 16px 48px;
    transition: all 0.3s ease;
    border: 2px solid #FFFFFF;
}

.cta-btn:hover {
    background: transparent;
    color: #FFFFFF;
}

/* ============================================
   CONTACT
   ============================================ */
.section--contact {
    background: var(--bg-elevated);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
}

@media (min-width: 768px) {
    .contact-grid { grid-template-columns: 1.5fr 1fr; }
}

.contact-form {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.form-input {
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--border);
    padding: 12px 0;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease;
    outline: none;
    width: 100%;
}

.form-input::placeholder {
    font-family: var(--font-mono);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.05em;
}

.form-input:focus {
    border-color: var(--accent);
}

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

.form-btn {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text);
    background: transparent;
    border: 2px solid var(--text);
    padding: 16px 48px;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.form-btn:hover {
    background: var(--text);
    color: var(--bg);
}

.contact-info-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 16px;
}

.contact-info-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.contact-info-link {
    display: block;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--accent);
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.contact-info-link:hover {
    color: var(--accent-light);
}

.contact-social {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

.social-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.social-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 32px 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-logo {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.2em;
    color: var(--text-muted);
}

.footer-copy {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Stagger children */
.services-grid .reveal:nth-child(1) { transition-delay: 0.1s; }
.services-grid .reveal:nth-child(2) { transition-delay: 0.2s; }
.services-grid .reveal:nth-child(3) { transition-delay: 0.3s; }
.services-grid .reveal:nth-child(4) { transition-delay: 0.4s; }

.work-grid .reveal:nth-child(1) { transition-delay: 0.1s; }
.work-grid .reveal:nth-child(2) { transition-delay: 0.2s; }
.work-grid .reveal:nth-child(3) { transition-delay: 0.3s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 767px) {
    .hero-title {
        font-size: clamp(1.8rem, 8vw, 3rem);
    }

    .section { padding: 60px 0; }

    .about-stats {
        gap: 32px;
    }

    .stat-num { font-size: 2rem; }

    .work-card-img { height: 280px; }

    .about-img { height: 300px; }

    .form-btn {
        width: 100%;
        text-align: center;
    }
}

/* ============================================
   CURSOR (desktop only)
   ============================================ */
.cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
}

.cursor-bubble {
    width: 60px;
    height: 60px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cursor-bubble-label {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cursor-bubble.active {
    width: 100px;
    height: 100px;
}

.cursor-bubble.active .cursor-bubble-label {
    opacity: 1;
}

@media (hover: none) {
    .cursor-dot,
    .cursor-bubble { display: none !important; }
}