/* 
   Version: 4.0 - EXACT FIGMA MATCH
   Importing Figma tokens and properties.
*/

:root {
    /* Colors from Figma */
    --bg-main: #f6f6f6;
    --bg-hero: #f9f9f9;
    --bg-dark: #272727;
    /* Experiencia bg */
    --bg-cta: #ececec;
    /* Contacto bg */
    --bg-footer: #0d0d0d;
    /* Footer bg */

    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --text-light: #ffffff;

    --brand-dark: #000000;
    --white: #ffffff;
    --border-gray: #f3f4f6;
    --border-card: #e5e5e5;

    /* Typography */
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Shadows */
    --shadow-btn: 0px 4px 10px 0px rgba(0, 0, 0, 0.25);
    --shadow-pill: 0px 1px 2px 0px rgba(0, 0, 0, 0.05);
    --shadow-card: 0px 10px 25px 0px rgba(0, 0, 0, 0.05);

    --container-max: 1400px;
    /* Ensanchado para aprovechar más espacio de los monitores de escritorio */

    /* Hero dynamics */
}

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

/* Skip to content — accessibility */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 10000;
    padding: 12px 24px;
    background: var(--text-primary);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
}

html,
body {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    /* Hard stop para el horizontal scroll fantasma en iOS/Safari */
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 400;
    /* Regular */
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 40px;
    margin: 0 auto;
    /* Reducido para acortar el margen vacío a los costados */
    position: relative;
    width: 100%;
}

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s;
}

.header.header-hidden {
    transform: none;
    /* Efecto desactivado por defecto para Desktop: Header fijo perenne */
}

/* Hamburguesa (Oculta por defecto) */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    position: relative;
    z-index: 1100;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: #000;
    transition: 0.3s ease-in-out;
    left: 4px;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    top: 8px;
}

body.menu-open .hamburger {
    background: transparent;
}

body.menu-open .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

body.menu-open .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

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

.logo img {
    height: 54px;
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    position: relative;
    transition: color 0.2s;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text-primary);
    transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.btn-header {
    background: var(--brand-dark);
    color: var(--white);
    padding: 8px 22px;
    border-radius: 9999px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-header:hover {
    transform: scale(1.04);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.btn-header-mobile {
    display: none;
    /* Oculto en pantallas grandes */
}

/* --- Hero Section --- */
.hero {
    background-color: #e5e5e5;
    min-height: 100vh;
    padding-top: 240px;
    padding-bottom: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    align-items: center;
}

/* Figma dot grid */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(0, 0, 0, 0.28) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.45;
}

/* Canvas particles */
#hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Gradient orbs */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(72px);
}

.hero-orb-1,
.hero-orb-2 {
    display: none;
}

@keyframes orb-drift-1 {

    0%,
    100% {
        transform: translate(0px, 0px);
    }

    40% {
        transform: translate(-50px, 40px);
    }

    70% {
        transform: translate(30px, -30px);
    }
}

@keyframes orb-drift-2 {

    0%,
    100% {
        transform: translate(0px, 0px);
    }

    35% {
        transform: translate(60px, -50px);
    }

    65% {
        transform: translate(-30px, 35px);
    }
}

/* Mouse spotlight */
.hero-spotlight {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(420px circle at var(--sx, 50%) var(--sy, 50%),
            rgba(255, 255, 255, 0.55) 0%,
            transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

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


.hero-bg-text-wrapper {
    position: absolute;
    top: 240px;
    left: 50%;
    --hero-bg-translateY: 0px;
    --hero-bg-scale: 1;
    --hero-bg-horizontal-shift: 0px;
    transform: translateX(calc(-50% + var(--hero-bg-horizontal-shift))) translateY(var(--hero-bg-translateY)) scale(var(--hero-bg-scale));
    transform-origin: center top;
    width: 100%;
    max-width: var(--container-max);
    /* Extremos idénticos al contenedor principal */
    padding: 0 40px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: clamp(12px, 1.6vw, 28px);
    /* Palabras centradas en conjunto, separadas solo por el gap */
    align-items: center;
    z-index: 1;
    /* Atrás de todo para el efecto 3D */
    pointer-events: none;
    will-change: transform;
}

/* Letras gigantes JULIÁN POBLETE */
.hero-bg-text-left,
.hero-bg-text-right {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: var(--hero-word-font-size, clamp(60px, 11vw, 220px));
    letter-spacing: var(--hero-word-letter-spacing, 0px);
    line-height: 1;
    color: #111;
    text-transform: uppercase;
    flex: 0 0 auto;
    width: auto;
    display: inline-block;
    white-space: nowrap;
    position: relative;
    z-index: 1;
}

.hero-bg-text-left {
    text-align: right;
}

.hero-bg-text-right {
    text-align: left;
}

/* Grid container for content */
.hero-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 40px !important;
    padding-bottom: 0 !important;
    z-index: 5;
}

/* Columna Izquierda: UI/UX Designer */
.hero-col-left {
    justify-self: start;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: clamp(260px, 25vw, 360px);
    position: relative;
    z-index: 10;
    margin-bottom: 0;
    --hero-col-left-shift: -40px;
    --hero-col-left-x: 0px;
    --hero-col-left-scale: 1;
    transform-origin: center top;
    transform: translateX(var(--hero-col-left-x)) translateY(var(--hero-col-left-shift)) scale(var(--hero-col-left-scale));
    transition: none;
    will-change: transform, opacity;
    align-items: flex-start;
    text-align: left;
}

.hero-subtitle {
    font-size: clamp(24px, 2.5vw, 36px);
    /* Achicado de 44px */
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-primary);
    white-space: normal;
}

.hero-description {
    font-size: clamp(14px, 1.2vw, 18px);
    /* Achicado de 22px */
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-secondary);
}

.btn-primary-hero {
    background: var(--brand-dark);
    color: var(--white);
    padding: 16px 36px;
    /* Simplificado */
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    /* Achicado */
    line-height: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-btn);
    transition: transform 0.2s;
    width: max-content;
    margin-top: 16px;
}

.btn-primary-hero:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
}

.arrow-btn-icon {
    width: 20px;
    height: 20px;
    display: block;
}

/* Imagen Central: FLUJO NORMAL ACTIVO */
.hero-col-center {
    justify-self: center;
    position: relative;
    bottom: auto;
    left: auto;
    --hero-col-center-shift: -10px;
    --hero-col-center-scale: 1;
    transform-origin: center bottom;
    transform: translateY(var(--hero-col-center-shift)) scale(var(--hero-col-center-scale));
    transition: none;
    will-change: transform, opacity;
    width: 100%;
    max-width: 860px;
    height: auto;
    z-index: 4;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.hero-image-frame {
    width: 100%;
    min-height: 700px;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    transform: translateY(0);
}

.hero-img-main {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    object-position: bottom center;
    pointer-events: none;
    --hero-img-translate: 0px;
    --hero-img-scale: 1.32;
    transform-origin: center bottom;
    transform: translateY(var(--hero-img-translate)) scale(var(--hero-img-scale));
    will-change: transform;
}

/* Columna Derecha: Redes - Verticales */
.hero-col-right {
    justify-self: end;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
    position: relative;
    z-index: 10;
    margin-bottom: 0;
    --hero-col-right-shift: -40px;
    --hero-col-right-x: 0px;
    --hero-col-right-scale: 1;
    transform-origin: center top;
    transform: translateX(var(--hero-col-right-x)) translateY(var(--hero-col-right-shift)) scale(var(--hero-col-right-scale));
    transition: none;
    will-change: transform, opacity;
    text-align: right;
}


.side-socials {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.social-side-pill {
    background: var(--white);
    border: 1px solid var(--border-gray);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-radius: 9999px;
    padding: 10px 20px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
    line-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.social-side-pill img {
    width: 16px;
    height: 16px;
}

.social-side-pill:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}


/* --- Works Section --- */
.works {
    padding: 140px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-bg-title {
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 128px;
    letter-spacing: -6.4px;
    line-height: 128px;
    color: #e6e6e6;
    opacity: 0.5;
    text-transform: uppercase;
    white-space: nowrap;
    z-index: -1;
    pointer-events: none;
}

.works .section-bg-title {
    left: 0;
    right: 0;
    width: 100%;
    transform: none;
    text-align: center;
    margin: 0 auto;
}

.section-heading {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 600;
    letter-spacing: -1.5px;
    line-height: 48px;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 88px;
}

.works-header {
    display: none;
}

.filter-group {
    display: flex;
    gap: 32px;
    align-items: center;
}

.filter-btn {
    background: none;
    border: none;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    color: var(--text-tertiary);
    /* #9ca3af */
    cursor: pointer;
    padding-bottom: 6px;
    position: relative;
    border-bottom: 2px solid transparent;
}

.filter-btn.active {
    color: var(--text-primary);
    font-weight: 700;
    /* Bold */
    border-bottom-color: #000;
}


.works-grid-wrap {
    position: relative;
    width: 100%;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}


/* Peek row: same grid layout, height-clipped to show only card tops */
.works-peek-row {
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    height: 100px;
    overflow: hidden;
    margin-top: 20px;
    position: relative;
    pointer-events: none;
}

.works-peek-row::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(246, 246, 246, 0) 10%, var(--bg-main) 85%);
    pointer-events: none;
    z-index: 1;
}

.works-grid-wrap.has-peek .works-peek-row {
    display: grid;
}

/* Peek cards: image area with a placeholder color instead of real image */
.works-peek-row .work-card {
    border-radius: 20px 20px 0 0;
}

.works-peek-row .work-img-box {
    background: #dddee0;
    border-radius: 14px 14px 0 0;
}

/* Load-more button: pulled up to float over the gradient when peek is active */
.works-grid-wrap.has-peek .load-more-container {
    margin-top: -8px;
    position: relative;
    z-index: 3;
}

.work-card {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 8px;
    overflow: hidden;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    opacity: 1;
}

.work-card.filtering-out {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
}

.work-card.hidden {
    display: none !important;
}

.work-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 28px 72px rgba(0, 0, 0, 0.13);
}

.work-card-link {
    display: contents;
    text-decoration: none;
    color: inherit;
}

/* --- Load More & View All --- */
.load-more-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 0;
    width: 100%;
}

/* Ghost secondary — loads next batch */
.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1.5px solid rgba(0, 0, 0, 0.15);
    border-radius: 9999px;
    padding: 13px 28px;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: border-color 0.22s, color 0.22s, transform 0.22s;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.load-more-btn svg {
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    flex-shrink: 0;
}

.load-more-btn:hover {
    border-color: rgba(0, 0, 0, 0.35);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.load-more-btn:hover svg {
    transform: translateY(2px);
}

/* Primary CTA — goes to full works page */
.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--text-primary);
    border: 1.5px solid var(--text-primary);
    border-radius: 9999px;
    padding: 13px 28px;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.22s, border-color 0.22s, transform 0.22s, box-shadow 0.22s;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.view-all-link svg {
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    flex-shrink: 0;
}

.view-all-link:hover {
    background: #222;
    border-color: #222;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

.view-all-link:hover svg {
    transform: translate(2px, -2px);
}

@media (max-width: 768px) {
    .load-more-container {
        flex-direction: column;
        gap: 8px;
    }

    .load-more-btn,
    .view-all-link {
        width: 100%;
        justify-content: center;
    }
}

.work-img-box {
    width: 100%;
    height: 264px;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    background: #f3f4f6;
}

.work-img-box img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.work-card:hover .work-img-box img {
    transform: scale(1.04);
}

.work-meta {
    padding: 16px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.work-title {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.2px;
    color: var(--text-primary);
    margin: 0;
}

.work-tags {
    display: flex;
    gap: 8px;
    height: 28px;
}

.work-tag {
    background: #f9fafb;
    border: 1px solid #e5e5e5;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}


/* --- Services --- */
.services {
    background-color: var(--bg-hero);
    padding-bottom: 50px;
    padding-top: 80px;
    /* offset top space */
}

/* Local section title para servicios */
.services .section-bg-title {
    top: 64px;
    left: 0;
    opacity: 0.3;
    transform: translateY(-50%);
}

.services .section-heading {
    text-align: left;
    margin-bottom: 0px;
}

.services-group {
    list-style: none;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 56px;
    border-top: 1px solid #e5e7eb;
    /* gap from title */
}

.service-item {
    border-bottom: 1px solid #e5e7eb;
}

/* Accordion button — replaces the old <a> */
.service-accordion-btn {
    display: flex;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    padding: 40px 0;
    cursor: pointer;
    text-align: left;
    gap: 24px;
    color: var(--text-primary);
    font-size: clamp(24px, 4vw, 48px);
    font-weight: 400;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    transition: opacity 0.3s;
}

.service-accordion-btn:hover {
    opacity: 0.65;
}

.service-num {
    font-size: clamp(11px, 1vw, 13px);
    font-weight: 500;
    color: #999;
    letter-spacing: 0.5px;
    margin-top: 4px;
    flex-shrink: 0;
    align-self: flex-start;
}

.service-name {
    flex: 1;
}

.service-accordion-chevron {
    flex-shrink: 0;
    color: #aaa;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), color 0.3s;
}

.service-item.open .service-accordion-chevron {
    transform: rotate(180deg);
    color: var(--text-primary);
}

/* Collapsible content */
.service-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.22, 1, 0.36, 1), padding 0.4s ease;
    padding-bottom: 0;
}

.service-item.open .service-accordion-content {
    max-height: 200px;
    padding-bottom: 40px;
}

.service-desc {
    font-size: clamp(14px, 1.1vw, 17px);
    line-height: 1.75;
    color: #555;
    max-width: 680px;
    padding-left: calc(clamp(11px, 1vw, 13px) + 24px);
    /* align with service-name */
}

/* --- Experience --- */
.experience {
    background-color: var(--bg-dark);
    /* #272727 */
    padding: 96px 0;
}

.exp-card-container {
    padding: 0;
    background: transparent;
    position: relative;
    border-radius: 0;
}

.experience .section-bg-title.light {
    top: 64px;
    left: 0;
    color: rgba(255, 255, 255, 0.05);
    opacity: 1;
    transform: translateY(-50%);
}

.experience .section-heading {
    color: var(--white);
    text-align: left;
    margin-bottom: 0;
    padding-top: 80px;
}

/* Timeline */
.exp-timeline {
    margin-top: 56px;
    position: relative;
    padding-left: 40px;
    max-width: 800px;
}

.exp-timeline-line {
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.05));
}

.exp-timeline-item {
    position: relative;
    padding-bottom: 48px;
}

.exp-timeline-item:last-child {
    padding-bottom: 0;
}

.exp-timeline-dot {
    position: absolute;
    left: -40px;
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.25);
    background: var(--bg-dark);
    z-index: 2;
}

.exp-timeline-dot.active {
    border-color: #fff;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.15);
}

.exp-timeline-date {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    font-family: var(--font-body);
}

.exp-timeline-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 28px 32px;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.exp-timeline-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
}

.exp-timeline-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #111;
    background: #fff;
    padding: 3px 10px;
    border-radius: 9999px;
    margin-bottom: 12px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.exp-timeline-duration {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 3px 10px;
    border-radius: 9999px;
    margin-bottom: 12px;
    letter-spacing: 0.3px;
}

.exp-company {
    color: var(--white);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
}

.exp-role {
    color: rgba(255, 255, 255, 0.5);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: 14px;
}

.exp-desc {
    color: rgba(255, 255, 255, 0.35);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 16px;
}

.exp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.exp-tag {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 9999px;
    font-family: var(--font-body);
}

/* Timeline ghost card (faded hint of more history) */
.exp-timeline-ghost {
    max-height: 70px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.45) 0%, transparent 100%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.45) 0%, transparent 100%);
    pointer-events: none;
}

.exp-timeline-ghost .exp-timeline-dot {
    border-color: rgba(255, 255, 255, 0.12);
}

.exp-timeline-ghost .exp-timeline-card {
    padding: 18px 24px;
}

.exp-ghost-line {
    height: 10px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.08);
    margin-bottom: 10px;
}

.exp-ghost-line.short {
    width: 40%;
}

.exp-ghost-line.long {
    width: 70%;
}


/* --- CTA Section --- */
.cta-section {
    background-color: #0a0a0a;
    padding: 112px 0;
    overflow: hidden;
}

.cta-section .container {
    display: block;
}

.badge-status {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: none;
    padding: 9px 17px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
    color: rgba(255, 255, 255, 0.65);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
}

.cta-title {
    font-size: clamp(32px, 6vw, 76px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -2.5px;
    text-transform: uppercase;
    color: #ffffff;
    max-width: 960px;
    text-align: center;
    margin-bottom: 0;
}

.cta-text {
    font-size: 17px;
    font-weight: 400;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.5);
    max-width: 960px;
    text-align: center;
    margin-bottom: 0;
}

.cta-section .btn-primary-hero.dark-btn {
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 600;
    line-height: 28px;
    margin-top: 0;
    background: #ffffff;
    color: #0a0a0a;
    border: 2px solid #ffffff;
    box-shadow: 0 8px 40px rgba(255, 255, 255, 0.1);
}

.cta-section .btn-primary-hero.dark-btn .arrow-btn-icon {
    filter: invert(1);
}

.cta-section .btn-primary-hero.dark-btn:hover {
    background: transparent;
    color: #ffffff;
    box-shadow: 0 20px 56px rgba(0, 0, 0, 0.6);
}

.cta-section .btn-primary-hero.dark-btn:hover .arrow-btn-icon {
    filter: none;
}

.tag-cloud {
    margin-top: auto;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 48px;
    display: flex;
    justify-content: center;
    gap: 16px;
}

.cta-section .social-side-pill {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.8);
    box-shadow: none;
}

.cta-section .social-side-pill img {
    filter: invert(1) opacity(0.7);
}

.cta-section .social-side-pill:hover {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: none;
    transform: scale(1.04);
}

.cta-section .social-side-pill:hover img {
    filter: invert(1);
}

/* ── Contact Layout ──────────────────────────────────────────────────── */

.contact-layout {
    display: flex;
    align-items: flex-start;
    gap: 72px;
    width: 100%;
}

.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
    padding-top: 6px;
}

.contact-info .cta-title {
    text-align: left;
}

.contact-info .cta-text {
    text-align: left;
}

.contact-info .tag-cloud {
    border-top: none;
    padding-top: 0;
    width: auto;
    justify-content: flex-start;
    margin-top: 0;
}

/* ── Contact Form Card ───────────────────────────────────────────────── */

.contact-form-wrap {
    flex: 0 0 460px;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    padding: 36px 40px 44px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.45);
}

.form-card-header {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.form-card-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 6px;
}

.form-card-title {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.4px;
    line-height: 1.2;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-field {
    position: relative;
}

.form-label {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.28);
    pointer-events: none;
    transition: top 0.2s ease, transform 0.2s ease, font-size 0.2s ease,
        font-weight 0.2s ease, letter-spacing 0.2s ease, color 0.2s ease;
    transform-origin: left center;
    white-space: nowrap;
}

.form-field--textarea .form-label {
    top: 18px;
    transform: none;
}

/* Label flota cuando el input tiene foco o valor */
.form-input:focus~.form-label,
.form-input:not(:placeholder-shown)~.form-label {
    top: 9px;
    transform: none;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.38);
}

.form-field--textarea .form-input:focus~.form-label,
.form-field--textarea .form-input:not(:placeholder-shown)~.form-label {
    top: 9px;
}

/* Estado inválido */
.form-input.is-invalid~.form-label {
    color: rgba(248, 113, 113, 0.6);
}

.form-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 22px 18px 8px;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    width: 100%;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.form-input::placeholder {
    color: transparent;
}

.form-input:focus {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.form-input.is-invalid {
    border-color: rgba(239, 68, 68, 0.55);
    background: rgba(239, 68, 68, 0.04);
}

.form-input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.field-error {
    display: none;
    font-size: 12px;
    color: rgba(248, 113, 113, 0.85);
    line-height: 1.4;
    padding-left: 2px;
}

.form-group.has-error .field-error {
    display: block;
}

.form-textarea {
    resize: vertical;
    min-height: 128px;
    max-height: 320px;
    font-family: var(--font-body);
    padding-top: 26px;
}

.contact-submit {
    width: 100%;
    justify-content: center;
    margin-top: 10px;
}

.contact-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.form-feedback {
    display: none;
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.55;
    text-align: center;
}

.form-feedback.visible {
    display: block;
}

.form-feedback.is-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.22);
    color: #4ade80;
}

.form-feedback.is-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.form-feedback.is-error a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cloud-pill {
    background: var(--white);
    border: 1px solid var(--border-gray);
    box-shadow: var(--shadow-pill);
    padding: 9px 17px;
    border-radius: 9999px;
    height: 40px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    /* SemiBold */
    font-size: 14px;
    line-height: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: 0.2s;
}

.cloud-pill img {
    width: 16px;
    height: 16px;
}

/* --- Footer --- */
.footer {
    background: var(--bg-footer);
    /* #0d0d0d */
    padding: 64px 0;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.footer-layout {
    display: flex;
    justify-content: space-between;
    padding-bottom: 0;
    border-bottom: none;
    width: 100%;
    gap: 0;
}

.footer-brand {
    width: 156px;
}

.footer-brand img {
    width: 100%;
    height: auto;
    filter: brightness(0) invert(1);
    opacity: 0.85;
}

.footer-menus {
    display: flex;
    width: 719px;
    gap: 32px;
}

.footer-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-label {
    color: #666;
    font-size: 14px;
    font-weight: 600;
    /* SemiBold */
    margin-bottom: 0px;
    letter-spacing: normal;
}

/* Botón acordeón del footer — solo visible en mobile */
.footer-accordion-btn {
    display: none;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links li {
    margin-bottom: 0;
}

.footer-links a {
    color: #949494;
    font-size: 14px;
    font-weight: 400;
    opacity: 1;
    text-decoration: none;
}

.footer-links a:hover {
    color: #fff;
}

.footer-col.contact-col {
    justify-content: flex-start;
}

.footer-col.contact-col .footer-links {
    gap: 10px;
}

.social-icons-footer {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.social-icons-footer a {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, background 0.2s;
}

.social-icons-footer a:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

.social-icons-footer img {
    width: 15px;
    height: 15px;
    display: block;
    filter: brightness(0) invert(0.5);
}

.social-icons-footer a:hover img {
    filter: brightness(0) invert(1);
}

.footer-credits {
    color: #b8b8b8;
    font-size: 14px;
    font-weight: 400;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 48px;
    margin-top: 48px;
    text-align: center;
}

/* --- Entrance Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ── Figma-style hero entrance animations ──────────────────────────────── */

/* Background text: snap onto canvas like placing a text layer */
@keyframes figmaLetterIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Center photo: placed from above, slight spring */
@keyframes figmaPlaceDown {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(0.97);
    }

    65% {
        opacity: 1;
        transform: translateY(-14px) scale(1.005);
    }

    100% {
        opacity: 1;
        transform: translateY(-10px) scale(1);
    }
}

/* Left column: slides in from left like a panel opening */
@keyframes figmaSlideLeft {
    0% {
        opacity: 0;
        transform: translateX(-28px) translateY(-40px) scale(1);
    }

    100% {
        opacity: 1;
        transform: translateX(0px) translateY(-40px) scale(1);
    }
}

/* Right column: slides in from right */
@keyframes figmaSlideRight {
    0% {
        opacity: 0;
        transform: translateX(28px) translateY(-40px) scale(1);
    }

    100% {
        opacity: 1;
        transform: translateX(0px) translateY(-40px) scale(1);
    }
}

/* Figma UI chrome: pure fade, appears last */
@keyframes figmaChrome {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.fade-in {
    opacity: 0;
}

.scale-in {
    opacity: 0;
}

.fade-in.visible {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.scale-in.visible {
    animation: scaleIn 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.hero-bg-letter {
    display: inline-block;
    opacity: 0;
    animation: figmaLetterIn 0.001s steps(1, end) forwards;
    animation-delay: var(--letter-delay, 0s);
    animation-play-state: paused;
}

/* Typewriter cursor — fixed so overflow:hidden on hero doesn't clip it */
.hero-type-cursor {
    position: fixed;
    width: 4px;
    background: #111111;
    border-radius: 2px;
    pointer-events: none;
    z-index: 9999;
    opacity: 1;
}

body.menu-open .hero-type-cursor {
    opacity: 0 !important;
}

body.hero-letters-ready .hero-bg-letter {
    animation-play-state: running;
}

.hero-bg-letter-space {
    animation: none;
    opacity: 1;
    transform: none;
}

/* Content columns — each gets its own directional animation */
.hero-content-animate {
    opacity: 0;
    animation-play-state: paused;
    will-change: transform, opacity;
}

body.hero-letters-ready .hero-content-animate {
    animation-play-state: running;
}

/* Left col (copy/CTA) — slides from left, fill-mode:none so JS can control after */
.hero-content-animate.delay-1 {
    animation: figmaSlideLeft 0.55s cubic-bezier(0.16, 1, 0.3, 1) none;
    animation-delay: 0.25s;
    animation-play-state: paused;
}

/* Center col (photo) — drops in with spring */
.hero-content-animate.delay-2 {
    animation: figmaPlaceDown 0.6s cubic-bezier(0.34, 1.2, 0.64, 1) none;
    animation-delay: 0.4s;
    animation-play-state: paused;
}

/* Right col (pills) — slides from right */
.hero-content-animate.delay-3 {
    animation: figmaSlideRight 0.55s cubic-bezier(0.16, 1, 0.3, 1) none;
    animation-delay: 0.55s;
    animation-play-state: paused;
}

/* Figma UI chrome: appears after content, pure fade */
.figma-artboard,
.figma-zoom,
.figma-label {
    opacity: 0;
    animation: figmaChrome 0.4s ease forwards;
    animation-delay: 0.85s;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

.delay-5 {
    animation-delay: 0.5s;
}

.delay-6 {
    animation-delay: 0.6s;
}


/* --- Responsive (General Fixes) --- */
@media (max-width: 1100px) {
    .container {
        padding: 0 40px;
    }

    /* Hero Re-flow para Tablets (Portrait/Vertical) */
    .hero {
        min-height: 100vh;
        padding-top: 120px;
        justify-content: flex-start;
    }

    .hero-bg-text-wrapper {
        position: static;
        padding: 0 40px;
        gap: 2px;
        flex-direction: column;
        text-align: center;
        transform: none;
        margin-bottom: 72px;
        width: 100%;
        margin: 0 auto;
        order: 0;
    }

    .hero-bg-text-left,
    .hero-bg-text-right {
        width: 100%;
        flex: 1 1 100%;
        text-align: center;
        line-height: 0.9;
        flex: auto;
        white-space: nowrap;
        position: static;
        z-index: auto;
        letter-spacing: var(--hero-word-letter-spacing, -3px);
    }

    /* Cap each word so it never overflows on stacked layout */
    .hero-bg-text-left {
        font-size: min(var(--hero-word-font-size, clamp(48px, 22vw, 120px)), 22vw);
        order: 0;
    }

    .hero-bg-text-right {
        font-size: min(var(--hero-word-font-size, clamp(48px, 18vw, 120px)), 18vw);
        order: 1;
    }

    .hero-inner {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 40px;
        padding: 40px 20px !important;
        width: 100%;
    }

    .hero-inner>* {
        width: 100%;
    }

    .hero-col-left {
        text-align: center;
        align-items: center;
        order: 2;
        z-index: 5;
        max-width: 600px;
        transform: none;
        position: relative;
        padding: 0 10px;
    }

    .hero-col-center {
        position: relative;
        order: 1;
        top: 0;
        bottom: auto;
        left: 0;
        transform: none;
        width: 100%;
        max-width: 600px;
        height: auto;
        min-height: 400px;
        max-height: 60vh;
        z-index: 4;
    }

    .hero-image-frame {
        min-height: auto;
    }

    .hero-img-main {
        object-fit: contain;
        transform: none;
    }

    .hero-col-right {
        order: 3;
        align-items: center;
        width: 100%;
        z-index: 5;
        margin-top: 32px;
        position: relative;
        padding: 0 10px;
    }

    .side-socials {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
        width: 100%;
        margin-bottom: 12px;
    }

    /* Other modules */
    .works-grid,
    .works-peek-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .services .section-bg-title {
        font-size: 8vw;
        letter-spacing: normal;
    }

    .service-accordion-btn {
        font-size: 32px;
    }

    .cta-title {
        font-size: 48px;
        letter-spacing: -2px;
    }

    .footer-layout {
        flex-direction: column;
        gap: 40px;
    }

    .footer-menus {
        flex-wrap: wrap;
        width: 100%;
    }
}

@media (max-width: 768px) {

    /* Header Mobile y Menú */
    .menu-toggle {
        display: block;
    }

    .btn-header-desktop {
        display: none;
    }

    /* Ocultamos el Call To Action de arriba para limpiar, y lo mostramos dentro del menu abierto */
    .btn-header-mobile {
        display: inline-flex;
        margin-top: 24px;
        font-size: 22px;
        padding: 20px 48px;
        justify-content: center;
    }

    .nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 32px;
        transform: translateY(-100%);
        transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.35s ease;
        z-index: 1050;
        opacity: 0;
        pointer-events: none;
    }

    body.menu-open .nav {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-link {
        font-size: 36px;
        font-weight: 600;
    }

    .header-flex {
        height: 60px;
        padding: 0 10px;
    }

    .header {
        padding: 10px 0;
    }

    .header.header-hidden {
        transform: translateY(-100%);
    }

    /* Activamos el auto-hide exclusivamente en móvil para no saturar pantalla */

    /* Correcciones Globales para Scroll Horizontal */
    .container {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        padding: 0 20px;
    }

    .hero-subtitle {
        white-space: normal;
        font-size: 32px;
        line-height: 40px;
    }

    /* Rompía scroll por nowrap! */
    .hero-description {
        font-size: 18px;
    }

    .hero {
        height: auto;
        min-height: 100vh;
        padding-top: 100px;
        padding-bottom: 60px;
        justify-content: flex-start;
    }

    .hero-bg-text-wrapper {
        position: static;
        padding: 10px 0 0;
        gap: 2px;
        flex-direction: column;
        text-align: center;
        transform: none;
        width: 100%;
        overflow-x: clip;
        overflow-y: visible;
        margin: 0 auto;
        order: 0;
    }

    .hero-bg-text-left,
    .hero-bg-text-right {
        text-align: center;
        line-height: 0.9;
        width: 100%;
        white-space: nowrap;
        order: initial;
        letter-spacing: var(--hero-word-letter-spacing, -2px);
    }

    .hero-bg-text-left {
        font-size: min(var(--hero-word-font-size, clamp(42px, 22vw, 90px)), 22vw);
        order: 0;
    }

    .hero-bg-text-right {
        font-size: min(var(--hero-word-font-size, clamp(42px, 18vw, 75px)), 18vw);
        order: 1;
    }

    /* canvas y orbs habilitados en mobile para mantener efectos del hero */

    /* Achicado para celular */
    .hero-inner {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 40px;
        padding-bottom: 40px !important;
        padding: 0 20px !important;
        width: 100%;
    }

    .hero-col-left {
        text-align: center;
        align-items: center;
        order: 2;
        padding-top: 0px;
        z-index: 6;
        width: 100%;
        will-change: opacity;
    }

    .hero-col-center {
        position: relative;
        order: 1;
        bottom: auto;
        width: 100%;
        max-width: 100vw;
        height: auto;
        max-height: 60vh;
        left: 0;
        transform: scale(var(--hero-col-center-scale, 1));
        transform-origin: center center;
        will-change: transform, opacity;
    }

    .hero-col-right {
        order: 3;
        align-items: center;
        width: 100%;
        z-index: 6;
        transform: none;
        text-align: center;
        margin-top: 16px;
        will-change: opacity;
    }

    .side-socials {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    /* Social pills: icon-only round buttons on mobile */
    .social-side-pill {
        width: 44px;
        height: 44px;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
        font-size: 0;
        gap: 0;
    }

    .social-side-pill img {
        width: 20px;
        height: 20px;
    }

    /* ── Mobile Hero Figma Personality ─────────────────────────── */

    /* Background text: stays above photo, parallax on scroll */
    .hero-bg-text-wrapper {
        margin-bottom: 0 !important;
        position: relative;
        top: 0;
        left: 0;
        transform: translateY(var(--hero-bg-translateY, 0px)) scale(var(--hero-bg-scale, 1));
        transform-origin: center top;
        will-change: transform;
        z-index: 6;
    }

    /* Figma-style frame around photo */
    .hero-image-frame {
        border: 1.5px solid rgba(26, 188, 254, 0.25);
        border-radius: 2px;
        position: relative;
        padding: 6px;
    }

    /* Photo frame label */
    .hero-image-frame::before {
        content: 'profile-photo';
        position: absolute;
        top: -18px;
        left: 0;
        font-size: 9.5px;
        font-weight: 500;
        color: rgba(26, 188, 254, 0.55);
        font-family: var(--font-body);
        white-space: nowrap;
        letter-spacing: 0.1px;
        z-index: 10;
    }

    /* Dimensions badge on photo */
    .hero-image-frame::after {
        content: '320 × 480';
        position: absolute;
        top: -18px;
        right: 0;
        font-size: 9px;
        font-weight: 500;
        color: rgba(26, 188, 254, 0.45);
        font-family: var(--font-body);
        z-index: 10;
    }

    /* Constraint line: photo → copy section */
    .hero-col-left {
        position: relative;
    }

    .hero-col-left::before {
        content: '';
        position: absolute;
        top: -28px;
        left: 50%;
        transform: translateX(-50%);
        width: 1px;
        height: 20px;
        background: linear-gradient(to bottom, rgba(232, 93, 117, 0.5), rgba(232, 93, 117, 0.1));
    }

    /* Auto Layout label */
    .hero-col-left::after {
        content: 'Auto layout';
        position: absolute;
        top: -40px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 8px;
        font-weight: 600;
        color: rgba(232, 93, 117, 0.45);
        font-family: var(--font-body);
        white-space: nowrap;
        letter-spacing: 0.3px;
        text-transform: uppercase;
    }

    /* Constraint line above socials */
    .hero-col-right::before {
        content: '';
        position: absolute;
        top: -12px;
        left: 50%;
        transform: translateX(-50%);
        width: 1px;
        height: 12px;
        background: rgba(232, 93, 117, 0.3);
    }

    /* Social pills: Figma component badge */
    .side-socials::before {
        content: '⬦ Component';
        display: none;
    }

    .works {
        padding: 90px 0;
        width: 100%;
    }

    .works .container {
        overflow-x: visible;
    }

    .section-bg-title {
        font-size: clamp(80px, 22vw, 128px);
        letter-spacing: -4px;
        line-height: 1;
        top: 0px;
    }

    /* Anula el override de desktop: hace que PORTFOLIO llene el viewport en mobile */
    .works .section-bg-title {
        width: 100vw;
        left: 50%;
        transform: translateX(-50%);
    }

    .section-heading {
        font-size: 32px;
        line-height: 1.2;
        word-wrap: break-word;
    }


    .works-grid,
    .works-peek-row {
        grid-template-columns: 1fr;
        width: 100%;
        padding: 4px 6px 0;
        /* padding lateral para que las sombras de las cards no se corten */
    }

    .filter-group {
        overflow-x: visible;
        flex-wrap: wrap;
        /* Permitimos baje de linea si es muy angosto */
        width: 100%;
        justify-content: center;
        /* Centramos los botones en mobile */
        padding-bottom: 10px;
    }

    .services,
    .experience,
    .cta-section {
        padding: 60px 0;
        overflow: hidden;
        width: 100%;
    }

    .service-accordion-btn {
        padding: 28px 0;
        gap: 16px;
    }

    .service-desc {
        font-size: 14px;
        padding-left: 0;
    }

    .service-item.open .service-accordion-content {
        max-height: 260px;
        padding-bottom: 28px;
    }

    .experience .section-heading {
        padding-top: 40px;
    }

    .exp-timeline {
        padding-left: 28px;
    }

    .exp-timeline-line {
        left: 5px;
    }

    .exp-timeline-dot {
        left: -28px;
        width: 12px;
        height: 12px;
    }

    .exp-timeline-dot.active {
        box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
    }

    .exp-timeline-ghost {
        max-height: 60px;
    }

    .exp-timeline-ghost .exp-timeline-card {
        padding: 16px 20px;
    }

    .exp-timeline-card {
        padding: 20px 20px;
    }

    .exp-company {
        font-size: 20px;
    }

    .exp-timeline-item {
        padding-bottom: 36px;
    }

    .cta-title {
        font-size: 36px;
        word-wrap: break-word;
    }

    .btn-primary-hero.dark-btn {
        width: 100%;
        justify-content: center;
    }

    .tag-cloud {
        justify-content: center;
        flex-wrap: wrap;
    }

    .contact-layout {
        flex-direction: column;
        gap: 44px;
    }

    .contact-info {
        align-items: center;
        width: 100%;
    }

    .contact-info .cta-title {
        text-align: center;
    }

    .contact-info .cta-text {
        text-align: center;
    }

    .contact-info .tag-cloud {
        justify-content: center;
    }

    .contact-form-wrap {
        flex: none;
        width: 100%;
        padding: 28px 24px 36px;
    }

    .footer-menus {
        flex-direction: column;
        gap: 0;
    }

    .footer {
        padding: 32px 0 16px 0;
    }

    .footer-layout {
        flex-direction: row;
        align-items: flex-start;
        gap: 20px;
    }

    .footer-brand {
        width: 64px;
        flex-shrink: 0;
        padding-top: 14px;
    }

    .footer-menus {
        flex: 1;
        min-width: 0;
    }

    .footer-col {
        gap: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    }

    /* Botón acordeón */
    .footer-accordion-btn {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        background: none;
        border: none;
        cursor: pointer;
        padding: 14px 0;
        color: #666;
        font-family: var(--font-body);
        font-size: 13px;
        font-weight: 600;
        letter-spacing: 0.5px;
        text-align: left;
    }

    .footer-accordion-icon {
        flex-shrink: 0;
        color: #555;
        transition: transform 0.3s ease;
        display: block;
    }

    .footer-col.open .footer-accordion-icon {
        transform: rotate(180deg);
    }

    /* Contenido desplegable */
    .footer-accordion-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, padding 0.3s ease;
        padding-bottom: 0;
    }

    .footer-col.open .footer-accordion-content {
        max-height: 300px;
        padding-bottom: 14px;
    }

    /* Ocultar label original en mobile (lo reemplaza el botón) */
    .footer-label {
        display: none;
    }

    .footer-links a {
        font-size: 14px;
        display: block;
        padding: 5px 0;
    }

    .social-icons-footer a {
        display: flex;
        padding: 0;
    }

    .footer-credits {
        padding-top: 20px;
        font-size: 12px;
        margin-top: 8px;
        text-align: center;
    }
}

/* --- Project Detail Modal --- */
.proj-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.proj-modal-card {
    position: fixed;
    inset: 28px;
    background: var(--white);
    border-radius: 20px;
    overflow-y: auto;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    scrollbar-width: thin;
    overscroll-behavior: contain;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.35);
}

.proj-modal-overlay.open .proj-modal-card {
    transform: translateY(0) scale(1);
}

.proj-modal-close {
    position: sticky;
    top: 16px;
    float: right;
    margin: 16px 16px 0 0;
    background: #f3f4f6;
    border: 1px solid #e5e5e5;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: background 0.2s, transform 0.2s;
    z-index: 10;
    flex-shrink: 0;
}

.proj-modal-close:hover {
    background: #e5e7eb;
    transform: scale(1.08);
}

.proj-modal-cover {
    display: none;
}

.proj-modal-body {
    --modal-h-pad: 40px;
    max-width: 720px;
    margin: 0 auto;
    padding: 20px var(--modal-h-pad) 56px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    clear: both;
}

.proj-modal-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.4px;
    color: var(--text-primary);
}

.proj-modal-content {
    font-size: 15px;
    line-height: 1.78;
    color: var(--text-secondary);
}

.proj-modal-content img {
    display: block;
    width: calc(100% + var(--modal-h-pad) * 2);
    max-width: none;
    margin-left: calc(-1 * var(--modal-h-pad));
    margin-right: calc(-1 * var(--modal-h-pad));
    border-radius: 0;
}

.proj-modal-content h1,
.proj-modal-content h2,
.proj-modal-content h3 {
    color: var(--text-primary);
    margin: 20px 0 8px;
}

.proj-modal-content p {
    margin-bottom: 12px;
}

.proj-modal-content ul,
.proj-modal-content ol {
    padding-left: 20px;
    margin-bottom: 12px;
}

.proj-modal-cta {
    align-self: flex-start;
    margin-top: 4px;
}

/* scroll lock handled via JS (position:fixed) for cross-browser + iOS support */
@media (max-width: 600px) {
    .proj-modal-card {
        inset: 12px;
        border-radius: 16px;
    }

    .proj-modal-body {
        --modal-h-pad: 20px;
        padding: 12px var(--modal-h-pad) 40px;
    }

    .proj-modal-title {
        font-size: 22px;
    }

    .proj-modal-cta {
        width: 100%;
        justify-content: center;
    }
}


/* ── HERO: FIGMA CANVAS OVERRIDES ─────────────────────────────────────── */

/* JULIÁN — contorno exterior limpio */
.hero .hero-bg-text-left {
    color: #e5e5e5;
    -webkit-text-fill-color: #e5e5e5;
    -webkit-text-stroke: 4.5px rgba(0, 0, 0, 0.82);
    paint-order: stroke fill;
}

/* POBLETE — relleno negro sólido */
.hero .hero-bg-text-right {
    color: #111;
    -webkit-text-fill-color: #111;
    -webkit-text-stroke: 0;
}

/* Textos del hero */
.hero .hero-subtitle {
    color: var(--text-primary);
}

.hero .hero-description {
    color: var(--text-secondary);
}

/* Botón Hablemos */
.hero .btn-primary-hero {
    background: var(--brand-dark);
    color: #fff;
    box-shadow: var(--shadow-btn);
}

.hero .btn-primary-hero .arrow-btn-icon {
    filter: none;
}

.hero .btn-primary-hero:hover {
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
}

/* Social pills: blancas sobre canvas */
.hero .social-side-pill {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hero .social-side-pill img {
    filter: none;
}

.hero .social-side-pill:hover {
    background: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
}

/* ── Figma UI decorations ─────────────────────────────────────────────── */
.figma-label {
    position: absolute;
    font-size: 10.5px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.35);
    letter-spacing: 0.15px;
    pointer-events: none;
    z-index: 3;
    user-select: none;
    white-space: nowrap;
    font-family: var(--font-body);
    line-height: 1;
}

/* Figma rulers (Shift+R) */
.figma-ruler-corner,
.figma-ruler-h,
.figma-ruler-v {
    position: absolute;
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    animation: figmaChrome 0.4s ease forwards;
    animation-delay: 0.85s;
}

.figma-ruler-corner {
    top: 80px;
    left: 0;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.94);
    border-right: 1px solid rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: inset -1px -1px 0 rgba(0, 0, 0, 0.05);
}

.figma-ruler-h {
    top: 80px;
    left: 20px;
    height: 20px;
    width: calc(100% - 20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

.figma-ruler-v {
    top: 100px;
    left: 0;
    width: 20px;
    height: calc(100% - 100px);
    border-right: 1px solid rgba(0, 0, 0, 0.15);
}

/* ── Figma Interactive Toolbar ─────────────────────────────── */
.figma-toolbar {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    background: #2c2c2c;
    border-radius: 8px;
    padding: 5px 7px;
    display: flex;
    align-items: center;
    gap: 1px;
    z-index: 120;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.06);
    user-select: none;
    opacity: 0;
    animation: figmaChrome 0.4s ease forwards;
    animation-delay: 0.9s;
}

.figma-tool-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b0b0b0;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
    flex-shrink: 0;
}

.figma-tool-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.figma-tool-btn.is-active {
    background: #1a73e8;
    color: #fff;
}

.figma-toolbar-sep {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.14);
    margin: 0 5px;
    flex-shrink: 0;
}

/* ── Draw preview (while dragging) ── */
/* Prevent native image drag while using draw tools */
.hero img {
    -webkit-user-drag: none;
}

.figma-draw-preview {
    position: absolute;
    border: 1.5px dashed #18a0fb;
    background: rgba(24, 160, 251, 0.07);
    border-radius: 3px;
    pointer-events: none;
    z-index: 110;
}

.figma-draw-preview--ellipse {
    border-radius: 50%;
}

.figma-draw-preview--line {
    border: none;
    border-top: 1.5px dashed #18a0fb;
    background: transparent;
    height: 0;
}

/* ── Drawn shapes ── */
.figma-drawn-shape {
    position: absolute;
    pointer-events: none;
    z-index: 55;
    transform-origin: center center;
    animation: figmaShapeIn 0.45s cubic-bezier(0.22, 1.5, 0.36, 1) forwards;
}

@keyframes figmaShapeIn {
    from {
        opacity: 0;
        scale: 0.78;
    }

    to {
        opacity: 1;
        scale: 1;
    }
}

.figma-drawn-shape.is-exiting {
    animation: figmaShapeOut 0.7s ease-in forwards;
}

@keyframes figmaShapeOut {
    0% {
        opacity: 1;
        translate: 0 0;
        scale: 1;
    }

    100% {
        opacity: 0;
        translate: 0 -28px;
        scale: 0.82;
    }
}

/* Shape fill area */
.figma-shape-fill {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(3px);
    border: 1.5px solid #18a0fb;
    border-radius: inherit;
}

.figma-drawn-shape--rect {
    border-radius: 5px;
}

.figma-drawn-shape--ellipse {
    border-radius: 50%;
}

.figma-drawn-shape--ellipse .figma-shape-fill {
    border-radius: 50%;
}

.figma-drawn-shape--line {
    border-radius: 0;
}

.figma-drawn-shape--line .figma-shape-fill {
    inset: auto;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: none;
    backdrop-filter: none;
    border: none;
    border-top: 2px solid #18a0fb;
    border-radius: 0;
}

/* Selection handles */
.figma-draw-handle {
    position: absolute;
    width: 7px;
    height: 7px;
    background: #fff;
    border: 1.5px solid #18a0fb;
    border-radius: 1.5px;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
}

.figma-draw-handle--line {
    border-radius: 50%;
}

/* Deselected state: fade handles */
.figma-drawn-shape.is-deselected .figma-draw-handle {
    opacity: 0;
}

.figma-drawn-shape.is-deselected .figma-shape-fill {
    border-color: rgba(0, 0, 0, 0.18);
}

/* Shape name label */
.figma-shape-label {
    bottom: calc(100% + 4px);
    top: auto;
    left: 0;
}

/* Compact toolbar on mobile */
@media (max-width: 768px) {
    .figma-toolbar {
        top: auto;
        bottom: 16px;
        padding: 4px 6px;
        gap: 1px;
        border-radius: 6px;
        transform: translateX(-50%) scale(0.88);
        opacity: 0.55;
        animation-delay: 1.2s;
    }

    .figma-tool-btn {
        width: 26px;
        height: 26px;
    }

    .figma-tool-btn svg {
        width: 13px;
        height: 13px;
    }

    .figma-toolbar-sep {
        height: 14px;
        margin: 0 3px;
    }
}

/* Selection frames (all hero components) — own continuous cycle */
.figma-sel-frame {
    position: absolute;
    border: 1.5px solid #1abcfe;
    pointer-events: none;
    z-index: 3;
    opacity: 0;
    transform-origin: center center;
    animation: figma-sel-frame-enter 10s linear infinite;
    will-change: transform, opacity;
}

/* Scale desde el centro + fade — entrada con spring, salida suave */
@keyframes figma-sel-frame-enter {
    0% {
        opacity: 0;
        transform: scale(0.62);
        animation-timing-function: cubic-bezier(0.22, 1.9, 0.36, 1);
    }

    12% {
        opacity: 1;
        transform: scale(1);
    }

    20% {
        opacity: 1;
        transform: scale(1);
        animation-timing-function: ease-in;
    }

    26% {
        opacity: 0;
        transform: scale(0.94);
    }

    100% {
        opacity: 0;
        transform: scale(0.62);
    }
}

/* Main artboard frame border + handles */
.figma-artboard {
    position: absolute;
    border: 1.5px solid rgba(26, 188, 254, 0.55);
    pointer-events: none;
    z-index: 3;
}

.figma-artboard-label {
    position: absolute;
    top: -22px;
    left: 0;
    font-size: 10.5px;
    font-weight: 500;
    color: rgba(26, 188, 254, 0.8);
    white-space: nowrap;
    letter-spacing: 0.1px;
    font-family: var(--font-body);
}

/* Figma selection handle (small square) */
.figma-handle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #1abcfe;
    border: 1.5px solid #fff;
    border-radius: 1px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 4;
}

/* Figma measurement annotation lines */
.figma-measure {
    position: absolute;
    pointer-events: none;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    /* animación específica en .figma-measure-h / .figma-measure-v */
}

/* delays + label delays set via JS */

/* Horizontal measure line — trazado desde el centro hacia ambos lados */
.figma-measure-h {
    height: 0;
    flex-direction: row;
    border-top: 1px solid #e85d75;
    clip-path: inset(-26px 50% -8px 50%);
    animation: figma-measure-h-draw 10s linear infinite;
    will-change: clip-path, opacity;
}

.figma-measure-h::before,
.figma-measure-h::after {
    content: '';
    position: absolute;
    top: -4px;
    width: 1px;
    height: 9px;
    background: #e85d75;
}

.figma-measure-h::before {
    left: 0;
}

.figma-measure-h::after {
    right: 0;
}

@keyframes figma-measure-h-draw {
    0% {
        opacity: 0;
        clip-path: inset(-26px 50% -8px 50%);
    }

    4% {
        opacity: 1;
        clip-path: inset(-26px 50% -8px 50%);
        animation-timing-function: cubic-bezier(0.22, 1.45, 0.36, 1);
    }

    13% {
        opacity: 1;
        clip-path: inset(-26px 0% -8px 0%);
    }

    20% {
        opacity: 1;
        clip-path: inset(-26px 0% -8px 0%);
        animation-timing-function: ease-in;
    }

    26% {
        opacity: 0;
        clip-path: inset(-26px 0% -8px 0%);
    }

    100% {
        opacity: 0;
        clip-path: inset(-26px 50% -8px 50%);
    }
}

/* Vertical measure line — trazado desde el centro hacia arriba y abajo */
.figma-measure-v {
    width: 0;
    flex-direction: column;
    border-left: 1px solid #e85d75;
    clip-path: inset(50% -55px 50% -8px);
    animation: figma-measure-v-draw 10s linear infinite;
    will-change: clip-path, opacity;
}

.figma-measure-v::before,
.figma-measure-v::after {
    content: '';
    position: absolute;
    left: -4px;
    width: 9px;
    height: 1px;
    background: #e85d75;
}

.figma-measure-v::before {
    top: 0;
}

.figma-measure-v::after {
    bottom: 0;
}

@keyframes figma-measure-v-draw {
    0% {
        opacity: 0;
        clip-path: inset(50% -55px 50% -8px);
    }

    4% {
        opacity: 1;
        clip-path: inset(50% -55px 50% -8px);
        animation-timing-function: cubic-bezier(0.22, 1.45, 0.36, 1);
    }

    13% {
        opacity: 1;
        clip-path: inset(0% -55px 0% -8px);
    }

    20% {
        opacity: 1;
        clip-path: inset(0% -55px 0% -8px);
        animation-timing-function: ease-in;
    }

    26% {
        opacity: 0;
        clip-path: inset(0% -55px 0% -8px);
    }

    100% {
        opacity: 0;
        clip-path: inset(50% -55px 50% -8px);
    }
}

/* Pixel label — emerge con spring después de que la línea se traza */
.figma-measure-label {
    position: absolute;
    background: #e85d75;
    color: #fff;
    font-size: 9px;
    font-weight: 600;
    font-family: var(--font-body);
    padding: 2px 5px;
    border-radius: 3px;
    white-space: nowrap;
    letter-spacing: 0.2px;
    line-height: 1;
    opacity: 0;
    animation: figma-label-pop 10s linear infinite;
    /* animation-delay se setea via JS: mismo delay de la línea + 0.4s */
}

@keyframes figma-label-pop {
    0% {
        opacity: 0;
        scale: 0.3;
        animation-timing-function: cubic-bezier(0.22, 1.9, 0.36, 1);
    }

    10% {
        opacity: 1;
        scale: 1;
    }

    80% {
        opacity: 1;
        scale: 1;
        animation-timing-function: ease-in;
    }

    90% {
        opacity: 0;
        scale: 0.75;
    }

    100% {
        opacity: 0;
        scale: 0.45;
    }
}

.figma-measure-h .figma-measure-label {
    top: -18px;
    left: 50%;
    translate: -50% 0;
}

.figma-measure-v .figma-measure-label {
    left: 6px;
    top: 50%;
    translate: 0 -50%;
}

@media (max-width: 768px) {
    .figma-measure {
        opacity: 0.6;
    }

    .figma-measure-label {
        font-size: 8px;
        padding: 1px 4px;
    }
}

/* Zoom badge */
.figma-zoom {
    position: absolute;
    bottom: 24px;
    left: 24px;
    font-size: 11px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.4);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 4px 10px;
    pointer-events: none;
    z-index: 5;
    font-family: var(--font-body);
    letter-spacing: 0.2px;
    user-select: none;
}

/* Floating mini frames in canvas */
.figma-mini-frame {
    position: absolute;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 2px;
    pointer-events: none;
    z-index: 2;
    animation: figma-float linear infinite;
}

.figma-mini-frame::before {
    content: attr(data-name);
    position: absolute;
    top: -16px;
    left: 0;
    font-size: 9px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.35);
    white-space: nowrap;
    font-family: var(--font-body);
}

@keyframes figma-float {
    from {
        transform: translateY(0px) rotate(var(--rot, 0deg));
    }

    to {
        transform: translateY(-100vh) rotate(var(--rot, 0deg));
    }
}

/* Hide heavy decorations on tablet/mobile, keep personality elements */
@media (max-width: 1100px) {

    .figma-artboard,
    .figma-ruler-corner,
    .figma-ruler-h,
    .figma-ruler-v {
        display: none;
    }

    /* Zoom badge: reposition for stacked layout */
    .figma-zoom {
        bottom: 16px;
        left: 16px;
        font-size: 10px;
        padding: 3px 8px;
    }

    /* Figma labels: adapt for tablet */
    .figma-label {
        font-size: 10px;
        opacity: 0.5;
    }

    /* Mini frames: subtler on tablet */
    .figma-mini-frame {
        opacity: 0.3;
    }

    /* Smaller handles on tablet */
    .figma-sel-frame .figma-handle {
        width: 5px;
        height: 5px;
    }

    /* Label above the frame, smaller */
    .figma-sel-frame .figma-artboard-label {
        font-size: 9px;
    }
}

@media (max-width: 768px) {

    /* Hide text selection frame on mobile (overflows viewport) */
    #figma-frame-text {
        display: none;
    }

    /* Smaller handles on mobile */
    .figma-sel-frame .figma-handle {
        width: 4px;
        height: 4px;
        border-width: 1px;
    }

    /* Show mini-frames, subtle on mobile */
    .figma-mini-frame {
        opacity: 0.2;
    }

    /* Dot grid: slightly denser for mobile feel */
    .hero::before {
        opacity: 0.35;
        background-size: 20px 20px;
    }

    /* Figma zoom badge mobile */
    .figma-zoom {
        bottom: 12px;
        left: 12px;
        font-size: 9px;
        padding: 2px 7px;
        opacity: 0.5;
    }

    /* Hide original Figma labels on mobile (replaced by layers/props panels) */
    .figma-label {
        display: none;
    }
}